Skip to content

Commit 0070a2b

Browse files
authored
Improved readability in single posts, improved assets loading based o… (#91)
1 parent a3fa040 commit 0070a2b

File tree

18 files changed

+387
-370
lines changed

18 files changed

+387
-370
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ old/
3232
!assets/js/lib/**
3333
.cursorignore
3434
.env
35-
docker-compose.yml
35+
docker-compose.yml
36+
demo.html

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SREDevOps.org Ghost Theme
22

3-
Our Ghost v5 Theme made for [SREDevOps.org](https://sredevops.org) based on Tailwind CSS v3, responsive, dark color schema, SVG icons, sidebar + footer navigation, customized tags, and recommendations pages. Highly inspired by [Priority Vision's "Aspect" Theme](https://www.priority.vision/themes/aspect/) and took many functionalities from [@TryGhost "Source" default theme](https://github.com/TryGhost/Source).
3+
Our Ghost v6 Theme made for [SREDevOps.org](https://www.sredevops.org) based on Tailwind CSS v3, responsive, dark color schema, SVG icons, sidebar + footer navigation, customized tags, and recommendations pages. Highly inspired by [Priority Vision's "Aspect" Theme](https://www.priority.vision/themes/aspect/) and took many functionalities from [@TryGhost "Source" default theme](https://github.com/TryGhost/Source).
44

55
## Table of Contents
66

@@ -17,9 +17,8 @@ Our Ghost v5 Theme made for [SREDevOps.org](https://sredevops.org) based on Tail
1717

1818
- [x] Missing SVG Icons
1919
- [ ] Granular internationalization using custom post templates
20-
- [ ] Ghost Cards assets CSS Cleanup
20+
- [x] Ghost Cards assets CSS Cleanup
2121
- [ ] Migrate Tailwind classes from inline styles into stylesheets files
22-
- ~~[ ] Improve Algolia Search~~ (Replaced with Ghost Search)
2322
- [x] Implement custom options
2423

2524
## Repo
@@ -28,7 +27,7 @@ Find the source code on [GitHub Repo](https://github.com/sredevopsorg/sredevopso
2827

2928
## Demo
3029

31-
Check out the live demo at [SREDevOps.org](https://sredevops.org).
30+
Check out the live demo at [www.SREDevOps.org](https://www.sredevops.org).
3231

3332
## Installation
3433

assets/built/cards.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/prism.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/tocbot.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cards.css

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
2+
/****************************************/
3+
/* 16. Cards
4+
/* ---------------------------------------------------------- */
5+
6+
/* Add extra margin before/after any cards, except for when immediately preceeded by a heading */
7+
8+
.gh-content :not(.kg-card):not(table):not([id])+ :is(.kg-card, table) {
9+
margin-top: calc(48px * var(--content-spacing-factor, 1));
10+
}
11+
12+
.gh-content :is(.kg-card, table)+ :not(.kg-card):not(table):not([id]) {
13+
margin-top: calc(48px * var(--content-spacing-factor, 1));
14+
}
15+
16+
.gh-content :not(.kg-card):not([id])+.kg-card.kg-width-full {
17+
margin-top: calc(68px * var(--content-spacing-factor, 1));
18+
}
19+
20+
.gh-content .kg-card.kg-width-full+ :not(.kg-card):not([id]) {
21+
margin-top: calc(68px * var(--content-spacing-factor, 1));
22+
}
23+
24+
/* Image */
25+
26+
.kg-image {
27+
margin-right: auto;
28+
margin-left: auto;
29+
max-width: 90%;
30+
}
31+
32+
/* Gallery */
33+
34+
.kg-image[width][height],
35+
.kg-gallery-image {
36+
cursor: pointer;
37+
}
38+
39+
.kg-image-card a:hover,
40+
.kg-gallery-image a:hover {
41+
opacity: 1 !important;
42+
}
43+
44+
/* Toggle */
45+
46+
.kg-card.kg-toggle-card .kg-toggle-heading-text {
47+
font-size: 2rem;
48+
font-weight: 700;
49+
}
50+
51+
.has-serif-title .kg-toggle-card .kg-toggle-heading-text {
52+
@apply font-serif;
53+
}
54+
55+
.has-mono-title .kg-toggle-card .kg-toggle-heading-text {
56+
@apply font-mono;
57+
}
58+
59+
/* Callout */
60+
61+
.kg-callout-card.kg-card {
62+
border-radius: 0.25em;
63+
}
64+
65+
.kg-callout-card-accent a {
66+
text-decoration: underline;
67+
}
68+
69+
/* Blockquote */
70+
71+
blockquote:not([class]) {
72+
padding-left: 2rem;
73+
border-left: 4px solid var(--ghost-accent-color);
74+
@apply text-light;
75+
}
76+
77+
blockquote.kg-blockquote-alt {
78+
@apply text-light;
79+
font-style: normal;
80+
font-weight: 400;
81+
}
82+
83+
/* Button */
84+
85+
.kg-card.kg-button-card .kg-btn {
86+
height: unset;
87+
padding: .6em 1.2em;
88+
text-align: center;
89+
font-size: 1em;
90+
line-height: 1.2em;
91+
}
92+
93+
/* Header */
94+
95+
.has-serif-title .kg-card.kg-header-card h2.kg-header-card-header {
96+
@apply font-serif;
97+
}
98+
99+
.has-mono-title .kg-card.kg-header-card h2.kg-header-card-header {
100+
@apply font-mono;
101+
}
102+
103+
.has-serif-body .kg-header-card h3.kg-header-card-subheader {
104+
@apply font-serif;
105+
}
106+
107+
/* Bookmark */
108+
109+
.kg-bookmark-card .kg-bookmark-container {
110+
border-radius: 0.25em !important;
111+
@apply text-light
112+
}
113+
114+
.kg-bookmark-card .kg-bookmark-container:hover {
115+
opacity: 1;
116+
}
117+
118+
.kg-bookmark-card a.kg-bookmark-container,
119+
.kg-bookmark-card a.kg-bookmark-container:hover {
120+
@apply bg-dark text-lighter;
121+
background: #212121!important;
122+
color: #fefefe!important;
123+
124+
125+
}
126+
127+
.kg-bookmark-card .kg-bookmark-content {
128+
padding: 1.15em;
129+
}
130+
131+
.kg-bookmark-card .kg-bookmark-title {
132+
font-size: 0.9em;
133+
}
134+
135+
.kg-bookmark-card .kg-bookmark-description {
136+
max-height: none;
137+
margin-top: 0.3em;
138+
font-size: 0.8em;
139+
}
140+
141+
.kg-bookmark-card .kg-bookmark-metadata {
142+
font-size: 0.8em;
143+
}
144+
145+
.kg-bookmark-card .kg-bookmark-thumbnail img {
146+
border-radius: 0 0.2em 0.2em 0;
147+
margin-top: 0;
148+
149+
}
150+
151+
/* Product */
152+
153+
.kg-product-card.kg-card .kg-product-card-image {
154+
margin-bottom: 12px;
155+
}
156+
157+
.kg-product-card.kg-card a.kg-product-card-button {
158+
height: 2.8em;
159+
margin-top: 12px;
160+
}
161+
162+
.has-serif-title .kg-product-card.kg-card .kg-product-card-title {
163+
@apply font-serif;
164+
}
165+
166+
.has-mono-title .kg-product-card.kg-card .kg-product-card-title {
167+
@apply font-mono;
168+
}
169+
170+
.has-serif-body .kg-product-card-description :is(p, ul, ol) {
171+
font-family: var(--font-serif-alt);
172+
}
173+
174+
/* File */
175+
176+
.kg-file-card.kg-card .kg-file-card-container {
177+
padding: 0.6em;
178+
}
179+
180+
.kg-file-card.kg-card .kg-file-card-contents {
181+
margin: 4px 8px 6px;
182+
}
183+
184+
.kg-file-card.kg-card .kg-file-card-metadata {
185+
font-size: 0.9em;
186+
}
187+
188+
.kg-file-card.kg-card .kg-file-card-filesize::before {
189+
margin-right: 6px;
190+
margin-left: 6px;
191+
}
192+
193+
/* Caption */
194+
195+
figcaption {
196+
@apply mt-3 text-sm text-light text-center
197+
}
198+
199+
.kg-card.kg-width-full figcaption {
200+
padding: 0 16px;
201+
}
202+
203+
figcaption a {
204+
text-decoration: underline;
205+
}

0 commit comments

Comments
 (0)