├── starter
├── .env.example
├── src
│ ├── components
│ │ ├── README.md
│ │ ├── RichText.vue
│ │ ├── Navbar.vue
│ │ ├── LargeMedia.vue
│ │ ├── Slider.vue
│ │ ├── Content.vue
│ │ ├── ProjectCard.vue
│ │ └── Footer.vue
│ ├── layouts
│ │ ├── README.md
│ │ └── Default.vue
│ ├── pages
│ │ ├── README.md
│ │ ├── About.vue
│ │ └── Index.vue
│ ├── templates
│ │ ├── README.md
│ │ └── Project.vue
│ ├── utils
│ │ ├── medias.js
│ │ └── seo.js
│ └── main.js
├── static
│ └── README.md
├── README.md
├── package.json
├── tailwind.config.js
├── gridsome.config.js
└── gridsome.server.js
├── starter.json
├── screenshot.png
├── LICENSE.txt
├── README.md
└── .gitignore
/starter/.env.example:
--------------------------------------------------------------------------------
1 | GRIDSOME_STRAPI_URL=http://localhost:1337
--------------------------------------------------------------------------------
/starter.json:
--------------------------------------------------------------------------------
1 | {
2 | "template": "https://github.com/strapi/strapi-template-portfolio"
3 | }
4 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strapi/strapi-starter-gridsome-portfolio/HEAD/screenshot.png
--------------------------------------------------------------------------------
/starter/src/components/README.md:
--------------------------------------------------------------------------------
1 | Add components that will be imported to Pages and Layouts to this folder.
2 | Learn more about components here: https://gridsome.org/docs/components/
3 |
4 | You can delete this file.
5 |
--------------------------------------------------------------------------------
/starter/static/README.md:
--------------------------------------------------------------------------------
1 | Add static files here. Files in this directory will be copied directly to `dist` folder during build. For example, /static/robots.txt will be located at https://yoursite.com/robots.txt.
2 |
3 | This file should be deleted.
--------------------------------------------------------------------------------
/starter/src/layouts/README.md:
--------------------------------------------------------------------------------
1 | Layout components are used to wrap pages and templates. Layouts should contain components like headers, footers or sidebars that will be used across the site.
2 |
3 | Learn more about Layouts: https://gridsome.org/docs/layouts/
4 |
5 | You can delete this file.
6 |
--------------------------------------------------------------------------------
/starter/src/pages/README.md:
--------------------------------------------------------------------------------
1 | Pages are usually used for normal pages or for listing items from a GraphQL collection.
2 | Add .vue files here to create pages. For example **About.vue** will be **site.com/about**.
3 | Learn more about pages: https://gridsome.org/docs/pages/
4 |
5 | You can delete this file.
6 |
--------------------------------------------------------------------------------
/starter/src/templates/README.md:
--------------------------------------------------------------------------------
1 | Templates for **GraphQL collections** should be added here.
2 | To create a template for a collection called `WordPressPost`
3 | create a file named `WordPressPost.vue` in this folder.
4 |
5 | Learn more: https://gridsome.org/docs/templates/
6 |
7 | You can delete this file.
8 |
--------------------------------------------------------------------------------
/starter/src/components/RichText.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/starter/src/utils/medias.js:
--------------------------------------------------------------------------------
1 | export function getStrapiMedia(url) {
2 | // Check if URL is a local path
3 | if (url.startsWith('/')) {
4 | // Prepend Strapi address
5 | const strapiUrl = process.env.GRIDSOME_STRAPI_URL || 'http://localhost:1337'
6 | return strapiUrl + url
7 | }
8 | // Otherwise return full URL
9 | return url
10 | }
11 |
--------------------------------------------------------------------------------
/starter/src/main.js:
--------------------------------------------------------------------------------
1 | // This is the main.js file. Import global CSS and scripts here.
2 | // The Client API can be used here. Learn more: gridsome.org/docs/client-api
3 |
4 | import DefaultLayout from '~/layouts/Default.vue'
5 |
6 | export default function (Vue, { router, head, isClient }) {
7 | // Set default layout as a global component
8 | Vue.component('Layout', DefaultLayout)
9 | }
10 |
--------------------------------------------------------------------------------
/starter/README.md:
--------------------------------------------------------------------------------
1 | # Gridsome frontend
2 |
3 | This is the frontend of the Strapi Starter Gridsome Portfolio.
4 |
5 | ## Commands
6 |
7 | **yarn develop**
8 |
9 | Creates a development server with hot reloading.
10 |
11 | **yarn explore**
12 |
13 | Loads a GraphQL Playground to explore the data layer.
14 |
15 | **yarn build**
16 |
17 | Creates a build optimized for production in the `/dist` folder.
18 |
--------------------------------------------------------------------------------
/starter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "front",
3 | "private": true,
4 | "scripts": {
5 | "build": "gridsome build",
6 | "develop": "gridsome develop",
7 | "explore": "gridsome explore"
8 | },
9 | "dependencies": {
10 | "@gridsome/source-graphql": "^0.1.0",
11 | "@tailwindcss/typography": "^0.2.0",
12 | "babel-runtime": "^6.26.0",
13 | "gridsome": "^0.7.0",
14 | "gridsome-plugin-tailwindcss": "^3.0.1",
15 | "tailwindcss": "^1.6.2",
16 | "vue-markdown": "^2.2.4"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/starter/src/components/Navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) [year] [fullname]
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/starter/gridsome.server.js:
--------------------------------------------------------------------------------
1 | // Server API makes it possible to hook into various parts of Gridsome
2 | // on server-side and add custom data to the GraphQL data layer.
3 | // Learn more: https://gridsome.org/docs/server-api/
4 |
5 | // Changes here require a server restart.
6 | // To restart press CTRL + C in terminal and run `gridsome develop`
7 |
8 | module.exports = function (api) {
9 | api.loadSource((store) => {
10 | // Use the Data Store API here: https://gridsome.org/docs/data-store-api/
11 | })
12 |
13 | // Fetch all Strapi projects
14 | api.createPages(async ({ createPage, graphql }) => {
15 | // Use the Pages API here: https://gridsome.org/docs/pages-api/
16 | const { data } = await graphql(`{
17 | strapi {
18 | projects {
19 | slug
20 | }
21 | }
22 | }`)
23 |
24 | // Create a page for each project
25 | data.strapi.projects.forEach((project) => {
26 | createPage({
27 | path: `/project/${project.slug}`,
28 | component: './src/templates/Project.vue',
29 | context: {
30 | slug: project.slug
31 | }
32 | })
33 | })
34 | })
35 | }
36 |
--------------------------------------------------------------------------------
/starter/src/layouts/Default.vue:
--------------------------------------------------------------------------------
1 |
2 |