This commit is contained in:
りき萌 2024-02-21 23:17:19 +01:00
parent d64cc3fbf2
commit a1464bb865
20 changed files with 636 additions and 193 deletions

View file

@ -369,6 +369,16 @@ th {
--recursive-casl: 0.5;
}
/* Horizontal rules */
hr {
width: 100%;
border: none;
border-top: 1px solid var(--border-1);
margin-top: 2em;
margin-bottom: 2em;
}
/* Style the noscript box a little more prettily. */
.noscript {
@ -413,6 +423,7 @@ nav {
nav .nav-page {
display: flex;
flex-grow: 1;
flex-direction: column;
}
@ -435,8 +446,49 @@ h1.page-title {
font-size: 1.25rem;
}
/* Style the footer */
/* Style the `new` link on the homepage */
a[is="th-new"] {
flex-shrink: 0;
color: var(--text-color);
opacity: 50%;
&.has-news {
opacity: 100%;
text-decoration: none;
& .new-text {
text-decoration: underline;
}
}
& .badge {
margin-left: 8px;
text-decoration: none;
}
}
/* Style new badges */
span.badge {
--recursive-wght: 800;
--recursive-slnt: 0;
--recursive-mono: 1.0;
--recursive-casl: 0;
border-radius: 999px;
padding: 2px 6px;
font-size: 0.9em;
&.red {
color: white;
background-color: #d01243;
}
&.before-content {
margin-right: 6px;
}
}
/* Style the footer */
footer {
margin-top: 4rem;
text-align: right;
@ -561,6 +613,9 @@ th-literate-program[data-mode="output"] {
border-style: none;
border-radius: 4px;
display: block;
}
& img.placeholder.js {
transition: opacity var(--transition-duration);
}
@ -709,3 +764,11 @@ th-literate-program[data-mode="output"] {
}
}
}
/* Style settings sections */
section[is="th-settings"] {
/* Don't display settings when JavaScript is disabled.
JS overrides this value on the element itself. */
display: none;
}

103
static/css/new.css Normal file
View file

@ -0,0 +1,103 @@
/* Give the intro and outro some breathing room. */
section {
padding: 1em 2em;
}
/* Style all links in the last paragraph as big buttons. */
.tree th-bc>p:last-child {
--transition-duration: 0.2s;
margin-top: 12px;
margin-bottom: 4px;
&>a {
padding: 0.5em 1.5em;
color: var(--text-color);
background-color: transparent;
border: 1px solid var(--border-1);
border-radius: 2em;
text-decoration: none;
transition:
color var(--transition-duration),
background-color var(--transition-duration),
border-color var(--transition-duration);
&:hover,
&:focus {
color: white;
background-color: #058ef0;
border-color: white;
}
}
}
section[is="th-settings"] {
& h3 {
display: inline;
}
& details>summary {
--recursive-wght: 700;
list-style: none;
cursor: pointer;
opacity: 50%;
transition: opacity var(--transition-duration);
&::-webkit-details-marker {
display: none;
}
&::before {
--recursive-casl: 0.0;
--recursive-mono: 1.0;
--recursive-slnt: 0.0;
content: '+';
margin-right: 0.3em;
opacity: 50%;
}
&:hover {
opacity: 100%;
}
}
& details[open]>summary {
opacity: 100%;
&::before {
content: '-';
}
}
& p {
margin-bottom: 8px;
}
& button {
border: 1px solid var(--border-1);
border-radius: 999px;
padding: 4px 12px;
background: none;
color: var(--text-color);
font-size: 1rem;
cursor: pointer;
transition:
color var(--transition-duration),
background-color var(--transition-duration),
border-color var(--transition-duration);
&:hover {
color: white;
background-color: #058ef0;
border-color: white;
}
}
}