div updates
This commit is contained in:
parent
d4dfdc073f
commit
76b919b498
11 changed files with 46 additions and 26 deletions
|
@ -26,13 +26,4 @@ a:not(.button) {
|
||||||
h1,h2,h3,h4,h5,h6 {
|
h1,h2,h3,h4,h5,h6 {
|
||||||
transition: color .6s;
|
transition: color .6s;
|
||||||
color: var(--title-color);
|
color: var(--title-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-highlight {
|
|
||||||
background-color: var(--bg-highlight-color);
|
|
||||||
transition: background-color .6s;
|
|
||||||
padding: var(--space);
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 1px 1px 5px 0 rgba(0,0,0,.02), 1px 1px 15px 0 rgba(0,0,0,.03);
|
|
||||||
transition: transform .3s, background-color .3s, box-shadow .6s;
|
|
||||||
}
|
|
9
src/assets/style/_content-box.scss
Normal file
9
src/assets/style/_content-box.scss
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// Used to wrap content inside a nice box.
|
||||||
|
.content-box {
|
||||||
|
background-color: var(--bg-highlight-color);
|
||||||
|
transition: background-color .6s;
|
||||||
|
padding: var(--space);
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 1px 1px 5px 0 rgba(0,0,0,.02), 1px 1px 15px 0 rgba(0,0,0,.03);
|
||||||
|
transition: transform .3s, background-color .3s, box-shadow .6s;
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
// Generated with https://type-scale.com/
|
|
||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css?family=Poppins:400, 600');
|
@import url('https://fonts.googleapis.com/css?family=Poppins:400, 600');
|
||||||
|
|
||||||
html {font-size: 20px;}
|
html {font-size: 20px;}
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import 'typography';
|
@import 'typography';
|
||||||
@import 'base';
|
@import 'base';
|
||||||
|
@import 'content-box';
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="author">
|
<div class="author">
|
||||||
|
|
||||||
<g-image class="author__image" src="~/assets/images/author.jpg" width="240" height="240" blur="5" />
|
<g-image class="author__image" src="~/assets/images/author.jpg" width="240" height="240" blur="5" />
|
||||||
<h1 v-if="siteTitle" class="author__site-title">{{ siteTitle }}</h1>
|
|
||||||
<p class="author__intro">A minimalistic and simple blog starter for Gridsome that uses Markdown for content.</p>
|
<h1 v-if="siteTitle" class="author__site-title">
|
||||||
<p class="author__links">
|
{{ siteTitle }}
|
||||||
<a href="#">Twitter</a>
|
</h1>
|
||||||
<a href="#">GitHub</a>
|
|
||||||
|
<p class="author__intro">
|
||||||
|
A minimalistic and simple blog starter for Gridsome that uses Markdown for content.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p class="author__links">
|
||||||
|
<a href="//twitter.com/gridsome">Twitter</a>
|
||||||
|
<a href="//github.com/gridsome/gridsome">GitHub</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="post-card bg-highlight">
|
<div class="post-card content-box">
|
||||||
<h2 v-html="post.title" />
|
<h2 v-html="post.title" />
|
||||||
<p v-html="post.excerpt" />
|
<p v-html="post.excerpt" />
|
||||||
<PostMeta :post="post" />
|
<PostMeta :post="post" />
|
||||||
|
|
|
@ -11,6 +11,5 @@ export default {
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.post-meta {
|
.post-meta {
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
opacity: .7;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -53,6 +53,11 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1200px) {
|
||||||
|
//Make header sticky for large screens
|
||||||
|
position: sticky;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
// Import main css
|
// Import main css
|
||||||
import '~/assets/style/index.scss'
|
import '~/assets/style/index.scss'
|
||||||
|
|
||||||
|
// Import PrismJS style
|
||||||
import 'prismjs/themes/prism.css'
|
import 'prismjs/themes/prism.css'
|
||||||
|
|
||||||
// Import default layout so we don't need to import it everywhere.
|
// Import default layout so we don't need to import it to every page
|
||||||
import DefaultLayout from '~/layouts/Default.vue'
|
import DefaultLayout from '~/layouts/Default.vue'
|
||||||
|
|
||||||
// The Client API can be used here. Learn more: gridsome.org/docs/client-api
|
// The Client API can be used here. Learn more: gridsome.org/docs/client-api
|
||||||
export default function (Vue, { router, head, isClient }) {
|
export default function (Vue, { router, head, isClient }) {
|
||||||
|
|
||||||
// Set default layout as a global component
|
// Set default layout as a global component
|
||||||
Vue.component('Layout', DefaultLayout)
|
Vue.component('Layout', DefaultLayout)
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|
||||||
<Author site-title="Gridome Blog Starter" />
|
<Author :site-title="$static.metaData.siteName" />
|
||||||
|
|
||||||
<div class="posts">
|
<div class="posts">
|
||||||
<PostCard v-for="edge in $page.posts.edges" :key="edge.node.id" :post="edge.node"/>
|
<PostCard v-for="edge in $page.posts.edges" :key="edge.node.id" :post="edge.node"/>
|
||||||
|
@ -10,6 +10,14 @@
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<static-query>
|
||||||
|
query {
|
||||||
|
metaData {
|
||||||
|
siteName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</static-query>
|
||||||
|
|
||||||
<page-query>
|
<page-query>
|
||||||
{
|
{
|
||||||
posts: allPost {
|
posts: allPost {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<PostMeta :post="$page.post" />
|
<PostMeta :post="$page.post" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post bg-highlight">
|
<div class="post content-box">
|
||||||
<div class="post__header">
|
<div class="post__header">
|
||||||
<!-- Add anything here. Like a featured image -->
|
<!-- Add anything here. Like a featured image -->
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,16 +69,14 @@ query Post ($path: String!) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
width: calc(100% + var(--space) * 2);
|
|
||||||
margin-left: calc(var(--space) * -1);
|
|
||||||
padding: calc(var(--space) / 2);
|
padding: calc(var(--space) / 2);
|
||||||
font-size: .85em;
|
font-size: .85em;
|
||||||
background-color: var(--bg-code);
|
background-color: var(--bg-code);
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
border-top: 1px solid rgba(0,0,0,.03);
|
border: 1px solid rgba(0,0,0,.03);
|
||||||
border-bottom: 1px solid rgba(0,0,0,.03);
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
|
Loading…
Add table
Reference in a new issue