Skip to content

Commit 59cfd3f

Browse files
committed
Support light theme for title card and tweak elements visibility
1 parent 802a6ba commit 59cfd3f

File tree

3 files changed

+32
-16
lines changed

3 files changed

+32
-16
lines changed

example.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,4 @@ Alignments:
261261

262262
---
263263

264-
<!-- _footer: '' -->
265-
266264
<div class="thanks"></div>

theme/codestar.css

Lines changed: 15 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

theme/codestar.scss

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,18 @@ section:has(> h1), section:has(> h2), section:has(.title) {
9191
&::after {
9292
color: var(--cs-background);
9393
}
94-
header {
95-
display: none;
96-
}
97-
footer {
94+
header, footer {
9895
display: none;
9996
}
10097
}
10198

10299
/* First title card */
103100
:root:has(.title) {
104101
@include patterns.pattern(list.nth(patterns.$patterns, 1));
102+
&::before, &::after {
103+
display: none;
104+
}
105+
105106
.title {
106107
position: absolute;
107108
inset: 0;
@@ -120,8 +121,8 @@ section:has(> h1), section:has(> h2), section:has(.title) {
120121
}
121122

122123
& div:nth-child(2) {
123-
color: var(--cs-background);
124-
background: var(--cs-background-dark);
124+
color: var(--color-foreground);
125+
background: var(--color-background);
125126
writing-mode: vertical-lr;
126127

127128
&::before {
@@ -133,7 +134,7 @@ section:has(> h1), section:has(> h2), section:has(.title) {
133134

134135
&::after {
135136
content: "";
136-
background-image: url("#{$url-base}/theme/logo/logo_red_dark_transparent_tagline%402x.png");
137+
background-image: url("#{$url-base}/theme/logo/logo_red_light_transparent_tagline.png");
137138
background-size: contain;
138139
background-repeat: no-repeat;
139140
background-position: center;
@@ -142,6 +143,9 @@ section:has(> h1), section:has(> h2), section:has(.title) {
142143
}
143144
}
144145
}
146+
:root.invert .title div:nth-child(2)::after {
147+
background-image: url("#{$url-base}/theme/logo/logo_red_dark_transparent_tagline.png");
148+
}
145149

146150
/* Rotating section backgrounds for title cards */
147151
@for $i from 1 through list.length(patterns.$patterns) {
@@ -363,3 +367,9 @@ section::before {
363367
font-family: Righteous;
364368
}
365369
}
370+
371+
:root:has(.thanks) {
372+
&::before, &::after, footer, header {
373+
display: none;
374+
}
375+
}

0 commit comments

Comments
 (0)