init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
*.log
|
||||
.cache
|
||||
.DS_Store
|
||||
src/.temp
|
||||
node_modules
|
||||
dist
|
||||
.env
|
||||
.env.*
|
||||
@@ -0,0 +1,14 @@
|
||||
# Default starter for Gridsome
|
||||
|
||||
This is the project you get when you run `gridsome create new-project`.
|
||||
|
||||
### 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 🎉🙌
|
||||
@@ -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: []
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
const axios = require('axios')
|
||||
|
||||
module.exports = function (api) {
|
||||
api.loadSource(async store => {
|
||||
const { data } = await axios.get('http://api.archives-ouvertes.fr/search/?q=docid:2172000&fl=*')
|
||||
|
||||
const contentType = store.addContentType({
|
||||
typeName: 'article',
|
||||
})
|
||||
|
||||
let item = data.response.docs[0];
|
||||
contentType.addNode({
|
||||
id: item.docid,
|
||||
title: item.title_s[0],
|
||||
path:"article",
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
Generated
+9968
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "popsu_html2print_grid",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "gridsome build",
|
||||
"develop": "gridsome develop",
|
||||
"explore": "gridsome explore"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"gridsome": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -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 not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,71 @@
|
||||
<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="/article">Article</g-link>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<slot/>
|
||||
</main>
|
||||
<footer>
|
||||
<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>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<static-query>
|
||||
query {
|
||||
metaData {
|
||||
siteName
|
||||
}
|
||||
}
|
||||
</static-query>
|
||||
|
||||
<style>
|
||||
html,body{
|
||||
height:100%;
|
||||
}
|
||||
body {
|
||||
font-family: "Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
|
||||
margin:0;
|
||||
padding:0;
|
||||
line-height: 1.5;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:flex-start;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
.layout {
|
||||
max-width: 760px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
height:100%;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
}
|
||||
|
||||
main{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.nav__link {
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -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.
|
||||
@@ -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)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<Layout>
|
||||
<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>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
metaInfo: {
|
||||
title: 'Hello, world!'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.home-links a {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
</style>
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div v-html="$static.article.title" />
|
||||
</template>
|
||||
|
||||
<static-query>
|
||||
query Post {
|
||||
article(id: "2172000") {
|
||||
title
|
||||
}
|
||||
}
|
||||
</static-query>
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user