Typography
This commit is contained in:
parent
259d1e49dd
commit
e29085e389
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -11,8 +11,9 @@
|
||||
--color-primary-text: var(--color-darker-gray);
|
||||
--color-secondary-text: rgba(0, 0, 0, 0.4);
|
||||
--color-border: rgba(0, 0, 0, 0.08);
|
||||
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
--font-serif: Georgia, Times, serif;
|
||||
--font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||
--font-serif: EB Garamond, Georgia, Times, serif;
|
||||
--font-slab: Roboto Slab;
|
||||
--font-mono: Menlo, Courier, monospace;
|
||||
--container-gap: clamp(24px, 1.7032rem + 1.9355vw, 48px);
|
||||
--grid-gap: 40px;
|
||||
@ -152,6 +153,28 @@ a:hover {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
|
||||
.has-sans-title [data-title] {
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
.has-serif-title [data-title] {
|
||||
font-family: var(--font-serif);
|
||||
}
|
||||
|
||||
.has-slab-title [data-title] {
|
||||
font-family: var(--font-slab);
|
||||
}
|
||||
|
||||
.has-sans-body [data-body] {
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
.has-serif-body [data-body] {
|
||||
font-family: Georgia;
|
||||
}
|
||||
|
||||
/* 5. Navigation */
|
||||
|
||||
.gh-navigation {
|
||||
|
@ -11,6 +11,10 @@
|
||||
<link rel="preload" as="style" href="{{asset "built/screen.css"}}">
|
||||
<link rel="preload" as="script" href="{{asset "built/casper.js"}}">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,700;0,800;1,400;1,700&family=Roboto+Slab:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
{{!-- Theme assets - use the {{asset}} helper to reference styles & scripts, this will take care of caching and cache-busting automatically --}}
|
||||
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}">
|
||||
|
||||
@ -39,7 +43,7 @@
|
||||
{{ghost_head}}
|
||||
|
||||
</head>
|
||||
<body class="{{body_class}}">
|
||||
<body class="{{body_class}} has-{{#match @custom.title_font "Elegant serif"}}serif{{else match @custom.title_font "Clean slab"}}slab{{else}}sans{{/match}}-title has-{{#match @custom.body_font "Elegant serif"}}serif{{else}}sans{{/match}}-body">
|
||||
|
||||
<div class="gh-viewport">
|
||||
|
||||
|
10
package.json
10
package.json
@ -106,6 +106,16 @@
|
||||
],
|
||||
"default": "Background color"
|
||||
},
|
||||
"title_font": {
|
||||
"type": "select",
|
||||
"options": ["Modern sans-serif", "Elegant serif", "Clean slab"],
|
||||
"default": "Modern sans-serif"
|
||||
},
|
||||
"body_font": {
|
||||
"type": "select",
|
||||
"options": ["Modern sans-serif", "Elegant serif"],
|
||||
"default": "Modern sans-serif"
|
||||
},
|
||||
"footer_signup_header": {
|
||||
"type": "text",
|
||||
"default": "Stay in the loop"
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
{{!-- Landing layout --}}
|
||||
{{#match headerStyle "Landing"}}
|
||||
<h1>Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
||||
<h1 data-title>Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
||||
<form>
|
||||
<input type="email" placeholder="jamie@example.com">
|
||||
<button class="gh-button" type="submit">Subscribe</button>
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
{{!-- Search layout --}}
|
||||
{{#match headerStyle "Search"}}
|
||||
<h1>Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
||||
<h1 data-title>Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
||||
<button data-ghost-search>{{> "icons/search"}}Search</button>
|
||||
{{/match}}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="gh-navigation-inner gh-inner">
|
||||
|
||||
<div class="gh-navigation-brand">
|
||||
<a class="gh-navigation-logo" href="{{@site.url}}">
|
||||
<a class="gh-navigation-logo" href="{{@site.url}}" data-title>
|
||||
{{#if @site.logo}}
|
||||
<img src="{{@site.logo}}" alt="{{@site.title}}">
|
||||
{{else}}
|
||||
|
@ -15,9 +15,9 @@
|
||||
</figure>
|
||||
{{/if}}
|
||||
<div class="gh-card-wrapper">
|
||||
<h3 class="gh-card-title">{{title}}</h3>
|
||||
<p class="gh-card-excerpt">{{excerpt}}</p>
|
||||
<footer class="gh-card-meta">
|
||||
<h3 class="gh-card-title" data-title>{{title}}</h3>
|
||||
<p class="gh-card-excerpt" data-body>{{excerpt}}</p>
|
||||
<footer class="gh-card-meta" data-body>
|
||||
{{#if @custom.show_author}}
|
||||
<span class="gh-card-author">By {{#foreach authors}}{{#if @first}}{{name}}{{else}}, {{name}}{{/if}}{{/foreach}}</span>
|
||||
{{/if}}
|
||||
|
Loading…
Reference in New Issue
Block a user