1
0
Fork 0

Fix typography

This commit is contained in:
Tommy Vedvik 2019-02-27 11:30:30 +01:00
parent 8a0e99c39b
commit 49f797a671
4 changed files with 33 additions and 6 deletions

View file

@ -1,6 +1,8 @@
@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: var(--base-font-size);
}
body { body {
font-family: 'Poppins', sans-serif; font-family: 'Poppins', sans-serif;

View file

@ -1,4 +1,8 @@
// Default variables // Default variables
html {
--base-font-size: 20px;
}
body { body {
--bg-color: #F3F7F9; --bg-color: #F3F7F9;
--bg-highlight-color: #FFF; --bg-highlight-color: #FFF;
@ -12,6 +16,9 @@ body {
} }
@media screen and (max-width: 650px) { @media screen and (max-width: 650px) {
html {
--base-font-size: 17px;
}
body { body {
--space: 1.5rem; --space: 1.5rem;
} }

View file

@ -4,7 +4,9 @@
<header class="header"> <header class="header">
<div class="header__left"> <div class="header__left">
<g-link v-if="$route.params.slug" class="logo" to="/"> <g-link v-if="$route.params.slug" class="logo" to="/">
<span class="logo__text">Gridsome Blog Starter</span> <span class="logo__text">
{{ $static.metaData.siteName }}
</span>
</g-link> </g-link>
</div> </div>
<div class="header__right"> <div class="header__right">
@ -17,12 +19,21 @@
</main> </main>
<footer class="footer"> <footer class="footer">
Copyright © {{ new Date().getFullYear() }}. Powered by <a href="//gridsome.org"> Gridsome </a> <span class="footer__copyright">Copyright © {{ new Date().getFullYear() }}. </span>
<span class="footer__links">Powered by <a href="//gridsome.org"> Gridsome </a></span>
</footer> </footer>
</div> </div>
</template> </template>
<static-query>
query {
metaData {
siteName
}
}
</static-query>
<script> <script>
import ToggleTheme from '~/components/ToggleTheme.vue' import ToggleTheme from '~/components/ToggleTheme.vue'
@ -75,9 +86,12 @@ export default {
text-align: center; text-align: center;
font-size: .8em; font-size: .8em;
> span {
margin: 0 .35em;
}
a { a {
color: currentColor; color: currentColor;
margin: 0 .35em;
} }
} }
</style> </style>

View file

@ -20,7 +20,7 @@
<!-- Add comment widgets here --> <!-- Add comment widgets here -->
</div> </div>
<Author /> <Author class="post-author" />
</Layout> </Layout>
</template> </template>
@ -52,7 +52,7 @@ query Post ($path: String!) {
<style lang="scss"> <style lang="scss">
.post-title { .post-title {
padding: calc(var(--space) / 2) 0; padding: calc(var(--space) / 2) 0 var(--space);
text-align: center; text-align: center;
} }
@ -85,4 +85,8 @@ query Post ($path: String!) {
display: none; display: none;
} }
} }
.post-author {
margin-top: calc(var(--space) / 2);
}
</style> </style>