Add text variant

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-09-11 23:04:32 +03:00
parent 64db65c72e
commit 7f53d88f50
47 changed files with 6851 additions and 86 deletions

View File

@@ -0,0 +1,33 @@
.commento-main-area :not(a) {
color: var(--primary-foreground-color);
}
.commento-root .commento-highlighted-card,
.commento-main-area textarea,
.commento-main-area input {
background: var(--secondary-subtle-color);
}
.commento-main-area input[type="text"]::placeholder,
.commento-main-area textarea::placeholder {
color: #868e96;
}
.commento-root .commento-submit-button {
background: var(--ghost-accent-color);
color: var(--color-white);
}
.commento-root .commento-name,
.commento-mod-tools::before,
.commento-sort-policy-button-selected {
color: var(--ghost-accent-color);
}
.commento-root .commento-card {
border-top: none;
}
.commento-markdown-help {
border: none;
}

9
assets/css/lib/prism.css Normal file
View File

@@ -0,0 +1,9 @@
.gh-content code {
display: inline-block;
color: var(--primary-foreground-color) !important;
}
pre[class*="language-"] {
background: var(--secondary-subtle-color) !important;
color: var(--primary-foreground-color) !important;
}

19
assets/css/lib/tocbot.css Normal file
View File

@@ -0,0 +1,19 @@
.toc ol {
counter-reset: item;
list-style: decimal;
line-height: 1.25;
}
.toc li:before {
content: counters(item, ".") " ";
counter-increment: item;
}
a.toc-link {
text-decoration: none;
font-weight: normal;
}
.toc>.toc-list li {
list-style: none
}

23
assets/css/main.css Normal file
View File

@@ -0,0 +1,23 @@
@import "@tryghost/shared-theme-assets/assets/css/v1/screen.css";
@import "main/article.css";
@import "main/author.css";
@import "main/card.css";
@import "main/gscan.css";
@import "main/head.css";
@import "main/navigation.css";
@import "main/pagehead.css";
@import "main/section.css";
@import "main/tag.css";
@import "lib/prism.css";
@import "lib/commento.css";
@import "lib/tocbot.css";
:root {
--font-sans: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
--font-serif: Lora, Times, serif;
--color-primary-text: var(--color-black);
--color-darker-gray: var(--color-black);
--head-nav-gap: 3.2rem;
}

View File

@@ -0,0 +1,51 @@
.gh-article:not(.no-image) .gh-article-header>* {
grid-column: wide-start / wide-end;
}
.gh-article-meta {
margin-top: 2rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1;
color: var(--color-secondary-text);
text-transform: uppercase;
}
.gh-article-meta a {
font-weight: 600;
}
.gh-article-title {
font-size: 7.4rem;
font-weight: 600;
line-height: 1;
}
.gh-article-excerpt {
max-width: 920px;
margin-top: 1.6rem;
font-size: 2.8rem;
line-height: 1.35;
color: var(--color-darker-gray);
}
.gh-article-footer {
padding-top: 3.2rem;
margin-top: 8rem;
border-top: 1px solid var(--color-light-gray);
}
.gh-article-footer.no-border {
margin-top: 24px;
border-top: 0;
}
@media (max-width: 767px) {
.gh-article-title {
font-size: 4.2rem;
}
.gh-article-excerpt {
font-size: 2.2rem;
}
}

View File

@@ -0,0 +1,43 @@
.gh-author-image {
width: 80px;
height: 80px;
margin-bottom: 2.4rem;
border-radius: 50%;
}
.gh-author-meta {
display: flex;
flex-direction: column;
margin-top: 2rem;
}
.gh-author-location {
margin-left: -4px;
color: var(--color-darker-gray);
}
.gh-author-website {
margin-top: 1.2rem;
}
.gh-author-social {
display: flex;
margin-top: 2.4rem;
}
.gh-author-facebook {
margin-left: 0.8rem;
}
@media (min-width: 768px) and (max-width: 991px) {
.gh-author-meta {
flex-direction: row;
align-items: center;
}
.gh-author-website,
.gh-author-social {
margin-top: 0;
margin-left: 1.6rem;
}
}

71
assets/css/main/card.css Normal file
View File

@@ -0,0 +1,71 @@
.gh-card+.gh-card {
margin-top: 8rem;
}
.gh-card-link {
display: block;
}
.gh-card-link:hover {
opacity: 1;
}
.gh-card-title {
font-size: 3.4rem;
font-weight: 600;
word-break: break-word;
}
.gh-card-link:hover .gh-card-title {
opacity: 0.8;
}
.gh-card-excerpt {
margin-top: 1.2rem;
font-size: 1.8rem;
line-height: 1.5;
letter-spacing: -0.01em;
word-break: break-word;
}
.gh-card-meta {
display: inline-flex;
gap: 6px;
align-items: center;
margin-top: 2rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1;
color: var(--color-secondary-text);
text-transform: uppercase;
}
.gh-card-date {
color: var(--ghost-accent-color);
}
.gh-card-meta svg {
position: relative;
top: -1px;
margin-left: 0.6rem;
}
.gh-card-meta>* {
display: flex;
gap: 6px;
align-items: center;
}
.gh-card-meta>*+*:not(script)::before {
width: 2px;
height: 2px;
content: "";
background-color: var(--color-secondary-text);
border-radius: 50%;
}
@media (max-width: 767px) {
.gh-card+.gh-card {
margin-top: 6.4rem;
}
}

View File

@@ -0,0 +1,2 @@
.kg-width-full img,
.kg-width-wide img {}

7
assets/css/main/head.css Normal file
View File

@@ -0,0 +1,7 @@
.gh-head-menu,
.gh-head-actions {
font-size: 1.2rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.01em;
}

View File

@@ -0,0 +1,51 @@
.gh-navigation {
grid-column: wide-start / wide-end;
}
.gh-navigation>div {
align-items: flex-start;
height: 100%;
}
.gh-navigation-link {
flex-direction: column;
align-items: flex-start;
}
.gh-navigation-next .gh-navigation-link {
align-items: flex-end;
text-align: right;
}
.gh-navigation-previous svg {
margin-left: -2px;
}
.gh-navigation-next svg {
margin-right: -2px;
}
.gh-navigation-label {
display: flex;
align-items: center;
font-size: 1.7rem;
font-weight: 700;
line-height: 1.8;
text-transform: uppercase;
letter-spacing: 0.01em;
}
.gh-navigation-title {
margin-top: 0.8rem;
font-size: 1.6rem;
font-weight: 400;
letter-spacing: 0;
word-break: break-word;
}
@media (max-width: 767px) {
.gh-navigation {
grid-template-columns: 1fr;
row-gap: 1.6rem;
}
}

View File

@@ -0,0 +1,43 @@
.gh-pagehead {
position: sticky;
top: 4vmin;
grid-column: wide-start/main-start;
max-width: 200px;
height: max-content;
padding-top: 0.8rem;
font-size: 1.4rem;
line-height: 1;
}
.gh-pagehead-title {
font-size: 2.1rem;
font-weight: 600;
letter-spacing: -0.02em;
}
.gh-pagehead-description {
margin-top: 0.8rem;
line-height: 1.45;
color: var(--color-secondary-text);
}
@media (max-width: 767px) {
.gh-pagehead {
margin-bottom: 4.8rem;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.gh-pagehead {
margin-bottom: 8rem;
}
}
@media (max-width: 991px) {
.gh-pagehead {
position: static;
grid-column: main-start / main-end;
max-width: 480px;
padding-top: 0;
}
}

View File

@@ -0,0 +1,17 @@
.gh-section-title {
display: flex;
align-items: center;
margin-bottom: 2.4rem;
font-size: 1.2rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.01em;
}
.gh-section-title::after {
flex-grow: 1;
height: 1px;
margin-left: 1.6rem;
content: "";
background-color: var(--color-light-gray);
}

11
assets/css/main/tag.css Normal file
View File

@@ -0,0 +1,11 @@
.gh-tag-label {
margin-bottom: 1.2rem;
font-size: 1.2rem;
font-weight: 500;
color: var(--ghost-accent-color);
text-transform: uppercase;
}
.gh-tag-description {
margin-top: 1.6rem;
}

32
assets/js/main.js Normal file
View File

@@ -0,0 +1,32 @@
function tabsInNewPage() {
var links = document.getElementsByTagName("article")[0].querySelectorAll('a');
var a = new RegExp('/' + window.location.host + '/');
links.forEach(link => !a.test(link.href) && link.setAttribute("target", "_blank"));
}
function tableOfContents() {
var elements = document.getElementsByClassName('kg-toggle-card');
for (var i = 0; i < elements.length; i++) {
if (elements[i].querySelector('.kg-toggle-content').hasChildNodes()) continue;
const div = document.createElement('div');
div.className = 'toc';
elements[i].querySelector('.kg-toggle-content').appendChild(div);
tocbot.init({
tocSelector: '.toc',
contentSelector: '.gh-content',
hasInnerContainers: true,
headingSelector: 'h1, h2, h3, h4, h5, h6',
collapseDepth: 3,
ignoreSelector: '.m-submenu-title, .kg-toggle-heading-text',
});
return;
}
}
tabsInNewPage();
tableOfContents();
pagination(true);