You've already forked Ghost-Theme-Source
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61a511b229 | ||
|
|
3e765a1c43 | ||
|
|
4af74269c7 | ||
|
|
d09d421326 | ||
|
|
457397b4f1 | ||
|
|
c5dd484544 | ||
|
|
ca2477b365 | ||
|
|
70945e1e04 | ||
|
|
ed015bab11 | ||
|
|
933c34ac92 | ||
|
|
5fcbe8f3fd | ||
|
|
476c6e9b02 | ||
|
|
e860b018a3 |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -83,50 +83,7 @@ production stylesheet in assets/built/screen.css
|
||||
/* 2. Fonts
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
@font-face {
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
src: url(../fonts/inter-roman.woff2) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "EB Garamond";
|
||||
font-style: normal;
|
||||
font-weight: 400 800;
|
||||
font-display: swap;
|
||||
src: url(../fonts/eb-garamond-roman.woff2) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "EB Garamond";
|
||||
font-style: italic;
|
||||
font-weight: 400 800;
|
||||
font-display: swap;
|
||||
src: url(../fonts/eb-garamond-italic.woff2) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 100 800;
|
||||
font-display: swap;
|
||||
src: url(../fonts/jetbrains-mono-roman.woff2) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 100 800;
|
||||
font-display: swap;
|
||||
src: url(../fonts/jetbrains-mono-italic.woff2) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* Fonts are preloaded and defined in default.hbs to avoid layout shift */
|
||||
|
||||
/* 3. Resets
|
||||
/* ---------------------------------------------------------- */
|
||||
@@ -276,6 +233,7 @@ a:hover {
|
||||
letter-spacing: inherit;
|
||||
line-height: 1.1;
|
||||
border: 0;
|
||||
border-radius: 40px;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
transition: 0.3s ease-in-out;
|
||||
@@ -1636,7 +1594,7 @@ Search LOGO Login Subscribe
|
||||
grid-column: span 12;
|
||||
}
|
||||
|
||||
.home-template .gh-more {
|
||||
.home-template .gh-feed:has(> :nth-child(12):last-child) ~ .gh-more {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -2067,6 +2025,8 @@ Search LOGO Login Subscribe
|
||||
.gh-article-author-image :is(img, svg) {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
@@ -2418,6 +2378,12 @@ blockquote.kg-blockquote-alt {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.kg-bookmark-card a.kg-bookmark-container,
|
||||
.kg-bookmark-card a.kg-bookmark-container:hover {
|
||||
background: var(--background-color) !important;
|
||||
color: var(--color-darker-gray) !important;
|
||||
}
|
||||
|
||||
.kg-bookmark-card .kg-bookmark-content {
|
||||
padding: 1.15em;
|
||||
}
|
||||
@@ -2578,6 +2544,7 @@ figcaption a {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.author-template .gh-article-title {
|
||||
@@ -2742,7 +2709,7 @@ figcaption a {
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.has-serif-title :is(.gh-button, .gh-form) {
|
||||
.has-serif-title :is(.gh-button, .gh-form, .gh-form-input) {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ function pagination(isInfinite = true, done, isMasonry = false) {
|
||||
if (!feedElement) return;
|
||||
|
||||
let loading = false;
|
||||
const target = feedElement.nextElementSibling || document.querySelector('.gh-footer');
|
||||
const target = document.querySelector('.gh-footer');
|
||||
const buttonElement = document.querySelector('.gh-loadmore');
|
||||
|
||||
if (!document.querySelector('link[rel=next]') && buttonElement) {
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
{{!-- Preload main styles and scripts for better performance --}}
|
||||
<link rel="preload" as="style" href="{{asset "built/screen.css"}}">
|
||||
<link rel="preload" as="script" href="{{asset "built/source.js"}}">
|
||||
|
||||
{{!-- Fonts are preloaded and defined in the default template to avoid layout shift --}}
|
||||
{{> "typography/fonts"}}
|
||||
|
||||
{{!-- 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"}}">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "source",
|
||||
"description": "A default theme for the Ghost publishing platform",
|
||||
"demo": "https://source.ghost.io",
|
||||
"version": "1.2.3",
|
||||
"version": "1.3.2",
|
||||
"engines": {
|
||||
"ghost": ">=5.0.0"
|
||||
},
|
||||
@@ -61,7 +61,7 @@
|
||||
"defaults"
|
||||
],
|
||||
"config": {
|
||||
"posts_per_page": 16,
|
||||
"posts_per_page": 12,
|
||||
"image_sizes": {
|
||||
"xs": {
|
||||
"width": 160
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{{#if @custom.show_featured_posts}}
|
||||
{{#match posts.length ">=" 4}}
|
||||
{{#get "posts" include="authors" limit="16"}}
|
||||
{{#foreach posts from="5" limit="12"}}
|
||||
{{#foreach posts from="5"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -32,7 +32,7 @@
|
||||
{{else}}
|
||||
{{#match posts.length ">=" 10}}
|
||||
{{#get "posts" include="authors" limit="22"}}
|
||||
{{#foreach posts from="11" limit="12"}}
|
||||
{{#foreach posts from="11"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -41,7 +41,7 @@
|
||||
{{else match @custom.header_style "Magazine"}}
|
||||
{{#match posts.length ">=" 7}}
|
||||
{{#get "posts" include="authors" limit="19"}}
|
||||
{{#foreach posts from="8" limit="12"}}
|
||||
{{#foreach posts from="8"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -77,6 +77,12 @@
|
||||
{{/match}}
|
||||
|
||||
</div>
|
||||
|
||||
{{#match pagination.pages ">" 1}}
|
||||
<div class="gh-more is-title">
|
||||
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
|
||||
</div>
|
||||
{{/match}}
|
||||
</main>
|
||||
|
||||
{{#if showSidebar}}
|
||||
@@ -113,11 +119,5 @@
|
||||
</aside>
|
||||
{{/if}}
|
||||
|
||||
{{#match pagination.pages ">" 1}}
|
||||
<div class="gh-more is-title">
|
||||
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
|
||||
</div>
|
||||
{{/match}}
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="gh-form" data-members-form>
|
||||
<input class="gh-form-input" id="{{email_field_id}}" type="email" placeholder="jamie@example.com" required data-members-email>
|
||||
<input class="gh-form-input" id="{{email_field_id}}" name="email" type="email" placeholder="jamie@example.com" required data-members-email>
|
||||
<button class="gh-button" type="submit" aria-label="Subscribe">
|
||||
<span><span>Subscribe</span> {{> "icons/arrow"}}</span>
|
||||
{{> "icons/loader"}}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
{{img_url feature_image size="l"}} 960w,
|
||||
{{img_url feature_image size="xl"}} 1200w,
|
||||
{{img_url feature_image size="xxl"}} 2000w"
|
||||
sizes="(max-width: 1200px) 100vw, 1120px"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
alt="{{title}}"
|
||||
>
|
||||
|
||||
15
partials/typography/fonts.hbs
Normal file
15
partials/typography/fonts.hbs
Normal file
@@ -0,0 +1,15 @@
|
||||
{{!-- Sans-serif font is always loaded, because it's the default font for some part of the theme regardless of the settings --}}
|
||||
{{> "typography/sans"}}
|
||||
|
||||
{{#match @custom.title_font "Modern sans-serif"}}
|
||||
{{#match @custom.body_font "Elegant serif"}}
|
||||
{{> "typography/serif"}}
|
||||
{{/match}}
|
||||
{{else match @custom.title_font "Elegant serif"}}
|
||||
{{> "typography/serif"}}
|
||||
{{else}}
|
||||
{{> "typography/mono"}}
|
||||
{{#match @custom.body_font "Elegant serif"}}
|
||||
{{> "typography/serif"}}
|
||||
{{/match}}
|
||||
{{/match}}
|
||||
21
partials/typography/mono.hbs
Normal file
21
partials/typography/mono.hbs
Normal file
@@ -0,0 +1,21 @@
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{asset "fonts/jetbrains-mono-roman.woff2"}}" crossorigin="anonymous">
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{asset "fonts/jetbrains-mono-italic.woff2"}}" crossorigin="anonymous">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 100 800;
|
||||
font-display: optional;
|
||||
src: url({{asset "fonts/jetbrains-mono-roman.woff2"}}) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 100 800;
|
||||
font-display: optional;
|
||||
src: url({{asset "fonts/jetbrains-mono-italic.woff2"}}) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
</style>
|
||||
11
partials/typography/sans.hbs
Normal file
11
partials/typography/sans.hbs
Normal file
@@ -0,0 +1,11 @@
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{asset "fonts/inter-roman.woff2"}}" crossorigin="anonymous">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Inter";
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: optional;
|
||||
src: url({{asset "fonts/inter-roman.woff2"}}) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
</style>
|
||||
21
partials/typography/serif.hbs
Normal file
21
partials/typography/serif.hbs
Normal file
@@ -0,0 +1,21 @@
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{asset "fonts/eb-garamond-roman.woff2"}}" crossorigin="anonymous">
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{asset "fonts/eb-garamond-italic.woff2"}}" crossorigin="anonymous">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "EB Garamond";
|
||||
font-style: normal;
|
||||
font-weight: 400 800;
|
||||
font-display: optional;
|
||||
src: url({{asset "fonts/eb-garamond-roman.woff2"}}) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "EB Garamond";
|
||||
font-style: italic;
|
||||
font-weight: 400 800;
|
||||
font-display: optional;
|
||||
src: url({{asset "fonts/eb-garamond-italic.woff2"}}) format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
</style>
|
||||
4
post.hbs
4
post.hbs
@@ -19,11 +19,11 @@
|
||||
|
||||
{{#if @custom.show_post_metadata}}
|
||||
<div class="gh-article-meta">
|
||||
<div class="gh-article-author-image">
|
||||
<div class="gh-article-author-image instapaper_ignore">
|
||||
{{#foreach authors}}
|
||||
{{#if profile_image}}
|
||||
<a href="{{url}}">
|
||||
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
|
||||
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}">
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="{{url}}">{{> "icons/avatar"}}</a>
|
||||
|
||||
Reference in New Issue
Block a user