19 Commits

Author SHA1 Message Date
Sodbileg Gansukh
d09d421326 v1.3.1 2024-07-10 18:22:27 +08:00
Sodbileg Gansukh
457397b4f1 Fixed bookmark card text color 2024-07-10 18:12:28 +08:00
Sodbileg Gansukh
c5dd484544 v1.3.0 2024-07-03 11:50:04 +08:00
Sodbileg Gansukh
ca2477b365 Fixed bookmark card background color 2024-07-03 11:47:28 +08:00
Sodbileg Gansukh
70945e1e04 Removed unnecessary itemprop 2024-07-02 13:56:38 +08:00
Sodbileg Gansukh
ed015bab11 Improved Safari Reader support 2024-07-02 13:50:47 +08:00
Sodbileg Gansukh
933c34ac92 Added autofill support to the email input 2024-07-02 11:47:51 +08:00
Sodbileg Gansukh
5fcbe8f3fd Fixed non-square avatar issue 2024-06-18 12:40:56 +08:00
Sodbileg Gansukh
476c6e9b02 Renamed fonts partial directory 2024-06-17 15:57:17 +08:00
Sodbileg Gansukh
e860b018a3 Improved font loading method for better performance 2024-06-17 15:40:06 +08:00
Sodbileg Gansukh
9a2f77a5b9 v1.2.3 2024-06-03 17:19:32 +08:00
Sodbileg Gansukh
b9ae39eab9 Made the background color calculation compatible with shortened hex value 2024-06-03 17:19:03 +08:00
Sodbileg Gansukh
62cb3da424 v1.2.2 2024-04-12 11:24:14 +08:00
Sodbileg Gansukh
f749b4bed0 Fixed wrapper issue for multiple table elements
fixes DES-203, closes https://github.com/TryGhost/Source/issues/41
2024-04-12 11:22:51 +08:00
Sodbileg Gansukh
daf120397f Added error message field to the subscription form
fixes ENG-17
2024-04-10 12:26:58 +08:00
Sodbileg Gansukh
539464ac9b Fixed form error styling issue on subscribe input
fixes ENG-17
2024-04-10 12:01:51 +08:00
Sodbileg Gansukh
2cfe4e2016 v1.2.1 2024-03-13 17:11:42 +08:00
Sodbileg Gansukh
3b99c9e881 Fixed white background issue on accent color navigation
fixes DES-173
2024-03-13 17:09:19 +08:00
Sanne de Vries
0beef28a44 Updated default button card styles to support multiline buttons (#43)
* Updated default button card styles to support multiline buttons

Ref DES-160

* Center-aligned button text
2024-03-13 08:37:06 +01:00
15 changed files with 126 additions and 66 deletions

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

View File

@@ -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
/* ---------------------------------------------------------- */
@@ -238,7 +195,6 @@ a:hover {
display: flex;
align-items: center;
position: relative;
overflow: hidden;
max-width: 560px;
width: 100%;
height: 56px;
@@ -277,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;
@@ -365,6 +322,15 @@ button.gh-form-input {
display: block;
}
.gh-form [data-members-error] {
position: absolute;
top: 100%;
margin-top: 10px;
width: 100%;
font-size: 1.4rem;
line-height: 1.4;
}
@media (max-width: 576px) {
.gh-form {
font-size: 1.6rem;
@@ -518,6 +484,10 @@ button.gh-form-input {
background-color: var(--background-color);
}
.gh-navigation.has-accent-color .gh-navigation-actions {
background-color: var(--ghost-accent-color);
}
.gh-navigation-members {
display: flex;
gap: 20px;
@@ -1385,6 +1355,7 @@ Search LOGO Login Subscribe
flex-direction: column;
align-items: center;
gap: 48px;
overflow: unset;
margin: auto;
max-width: 1020px;
text-align: center;
@@ -2054,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;
}
@@ -2374,7 +2347,11 @@ blockquote.kg-blockquote-alt {
/* Button */
.kg-card.kg-button-card .kg-btn {
height: unset;
padding: .6em 1.2em;
text-align: center;
font-size: 1em;
line-height: 1.2em;
}
/* Header */
@@ -2401,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;
}
@@ -2561,6 +2544,7 @@ figcaption a {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
}
.author-template .gh-article-title {
@@ -2725,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;
}

View File

@@ -50,10 +50,10 @@
/* Responsive HTML table */
(function () {
const tables = document.querySelectorAll('.gh-content > table:not(.gist table)');
const wrapper = document.createElement('div');
wrapper.className = 'gh-table';
tables.forEach(function (table) {
const wrapper = document.createElement('div');
wrapper.className = 'gh-table';
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
});

View File

@@ -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"}}">
@@ -26,6 +29,11 @@
https://gomakethings.com/dynamically-changing-the-text-color-based-on-background-color-contrast-with-vanilla-js/ */
var accentColor = getComputedStyle(document.documentElement).getPropertyValue('--background-color');
accentColor = accentColor.trim().slice(1);
if (accentColor.length === 3) {
accentColor = accentColor[0] + accentColor[0] + accentColor[1] + accentColor[1] + accentColor[2] + accentColor[2];
}
var r = parseInt(accentColor.substr(0, 2), 16);
var g = parseInt(accentColor.substr(2, 2), 16);
var b = parseInt(accentColor.substr(4, 2), 16);

View File

@@ -2,7 +2,7 @@
"name": "source",
"description": "A default theme for the Ghost publishing platform",
"demo": "https://source.ghost.io",
"version": "1.2.0",
"version": "1.3.1",
"engines": {
"ghost": ">=5.0.0"
},

View File

@@ -1,8 +1,9 @@
<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"}}
{{> "icons/checkmark"}}
</button>
<p data-members-error></p>
</form>

View File

@@ -1,14 +1,13 @@
{{#if feature_image}}
<figure class="gh-article-image">
<img
srcset="{{img_url feature_image size="s"}} 320w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 960w,
{{img_url feature_image size="xl"}} 1200w,
{{img_url feature_image size="xxl"}} 2000w"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
>
<picture>
<source srcset="{{img_url feature_image size="xxl"}}" media="(min-width: 2000px)">
<source srcset="{{img_url feature_image size="xl"}}" media="(min-width: 1200px)">
<source srcset="{{img_url feature_image size="l"}}" media="(min-width: 960px)">
<source srcset="{{img_url feature_image size="m"}}" media="(min-width: 600px)">
<source srcset="{{img_url feature_image size="s"}}" media="(min-width: 320px)">
<img src="{{img_url feature_image size="xl"}}" alt="{{title}}">
</picture>
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}

View 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}}

View 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>

View 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>

View 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>

View File

@@ -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>