Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
loke-dev committed Apr 21, 2019
0 parents commit 6ea4d24
Show file tree
Hide file tree
Showing 16 changed files with 7,021 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
*.log
.cache
.DS_Store
src/.temp
node_modules
dist
.env
.env.*
12 changes: 12 additions & 0 deletions README.md
@@ -0,0 +1,12 @@
# Default starter for Gridsome

### 1. Install Gridsome CLI tool if you don't have

`npm install --global @gridsome/cli`

### 2. Create a Gridsome project

1. `gridsome create my-gridsome-site` to install default starter
2. `cd my-gridsome-site` to open the folder
3. `gridsome develop` to start a local dev server at `http://localhost:8080`
4. Happy coding 🎉🙌
10 changes: 10 additions & 0 deletions gridsome.config.js
@@ -0,0 +1,10 @@
// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config

// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = {
siteName: 'Gridsome',
plugins: []
}
12 changes: 12 additions & 0 deletions gridsome.server.js
@@ -0,0 +1,12 @@
// Server API makes it possible to hook into various parts of Gridsome
// on server-side and add custom data to the GraphQL data layer.
// Learn more: https://gridsome.org/docs/server-api

// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = function (api) {
api.loadSource(store => {
// Use the Data store API here: https://gridsome.org/docs/data-store-api
})
}
12 changes: 12 additions & 0 deletions package.json
@@ -0,0 +1,12 @@
{
"name": "gridsome-starter-bootstrap",
"private": true,
"scripts": {
"build": "gridsome build",
"develop": "gridsome develop",
"explore": "gridsome explore"
},
"dependencies": {
"gridsome": "^0.5.0"
}
}
4 changes: 4 additions & 0 deletions src/components/README.md
@@ -0,0 +1,4 @@
Add components that will be imported to Pages and Layouts to this folder.
Learn more about components here: https://gridsome.org/docs/components

You can delete this file.
Binary file added src/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions src/layouts/Default.vue
@@ -0,0 +1,50 @@
<template>
<div class="layout">
<header class="header">
<strong>
<g-link to="/">{{ $static.metaData.siteName }}</g-link>
</strong>
<nav class="nav">
<g-link class="nav__link" to="/">Home</g-link>
<g-link class="nav__link" to="/about">About</g-link>
</nav>
</header>
<slot/>
</div>
</template>

<static-query>
query {
metaData {
siteName
}
}
</static-query>

<style>
body {
font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
margin:0;
padding:0;
line-height: 1.5;
}
.layout {
max-width: 760px;
margin: 0 auto;
padding-left: 20px;
padding-right: 20px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
height: 80px;
}
.nav__link {
margin-left: 20px;
}
</style>
5 changes: 5 additions & 0 deletions src/layouts/README.md
@@ -0,0 +1,5 @@
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.

Learn more about Layouts: https://gridsome.org/docs/layouts

You can delete this file.
9 changes: 9 additions & 0 deletions src/main.js
@@ -0,0 +1,9 @@
// This is the main.js file. Import global CSS and scripts here.
// The Client API can be used here. Learn more: gridsome.org/docs/client-api

import DefaultLayout from '~/layouts/Default.vue'

export default function (Vue, { router, head, isClient }) {
// Set default layout as a global component
Vue.component('Layout', DefaultLayout)
}
14 changes: 14 additions & 0 deletions src/pages/About.vue
@@ -0,0 +1,14 @@
<template>
<Layout>
<h1>About us</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error doloremque omnis animi, eligendi magni a voluptatum, vitae, consequuntur rerum illum odit fugit assumenda rem dolores inventore iste reprehenderit maxime! Iusto.</p>
</Layout>
</template>

<script>
export default {
metaInfo: {
title: 'About us'
}
}
</script>
33 changes: 33 additions & 0 deletions src/pages/Index.vue
@@ -0,0 +1,33 @@
<template>
<Layout>

<!-- Learn how to use images here: https://gridsome.org/docs/images -->
<g-image alt="Example image" src="~/favicon.png" width="135" />

<h1>Hello, world!</h1>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur excepturi labore tempore expedita, et iste tenetur suscipit explicabo! Dolores, aperiam non officia eos quod asperiores
</p>

<p class="home-links">
<a href="https://gridsome.org/docs" target="_blank" rel="noopener">Gridsome Docs</a>
<a href="https://github.com/gridsome/gridsome" target="_blank" rel="noopener">GitHub</a>
</p>

</Layout>
</template>

<script>
export default {
metaInfo: {
title: 'Hello, world!'
}
}
</script>

<style>
.home-links a {
margin-right: 1rem;
}
</style>
5 changes: 5 additions & 0 deletions src/pages/README.md
@@ -0,0 +1,5 @@
Pages are usually used for normal pages or for listing items from a GraphQL collection.
Add .vue files here to create pages. For example **About.vue** will be **site.com/about**.
Learn more about pages: https://gridsome.org/docs/pages

You can delete this file.
7 changes: 7 additions & 0 deletions src/templates/README.md
@@ -0,0 +1,7 @@
Templates for **GraphQL collections** should be added here.
To create a template for a collection called `WordPressPost`
create a file named `WordPressPost.vue` in this folder.

Learn more: https://gridsome.org/docs/templates

You can delete this file.
3 changes: 3 additions & 0 deletions static/README.md
@@ -0,0 +1,3 @@
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.

This file should be deleted.

0 comments on commit 6ea4d24

Please sign in to comment.