mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 10:57:01 +00:00
320 lines
5.1 KiB
CSS
320 lines
5.1 KiB
CSS
/* Global variables. */
|
|
:root,
|
|
::backdrop {
|
|
/* Set sans-serif & mono fonts */
|
|
--sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
|
|
"Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
|
|
"Helvetica Neue", sans-serif;
|
|
--mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
--standard-border-radius: 5px;
|
|
|
|
/* Default (light) theme */
|
|
--bg: #fff;
|
|
--accent-bg: #f5f7ff;
|
|
--text: #212121;
|
|
--text-light: #585858;
|
|
--border: #d8dae1; /*#898EA4;*/
|
|
--accent: #0d47a1;
|
|
--code: #d81b60;
|
|
--preformatted: #444;
|
|
--marked: #ffdd33;
|
|
--disabled: #efefef;
|
|
}
|
|
|
|
/* Dark theme */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root,
|
|
::backdrop {
|
|
color-scheme: dark;
|
|
--bg: #212121;
|
|
--accent-bg: #2b2b2b;
|
|
--text: #dcdcdc;
|
|
--text-light: #ababab;
|
|
--accent: #ffb300;
|
|
--code: #f06292;
|
|
--preformatted: #ccc;
|
|
--disabled: #111;
|
|
}
|
|
/* Add a bit of transparency so light media isn't so glaring in dark mode */
|
|
img,
|
|
video {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
body > header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
body > header p {
|
|
/* max-width: 40rem;*/
|
|
margin: 1rem;
|
|
}
|
|
|
|
header > nav a {
|
|
/* border: none;*/
|
|
}
|
|
|
|
header > nav form {
|
|
margin-top: -0.5rem;
|
|
}
|
|
|
|
header > nav select {
|
|
padding: 0.4rem;
|
|
}
|
|
|
|
/* === Timeline Style === */
|
|
|
|
.right {
|
|
float: right;
|
|
margin-right: 0.25rem;
|
|
}
|
|
|
|
header p a img.logo {
|
|
border: none;
|
|
height: 1.5rem;
|
|
width: 1.5rem;
|
|
vertical-align: sub;
|
|
}
|
|
|
|
header img.avatar {
|
|
height: 1.5rem;
|
|
width: 1.5rem;
|
|
vertical-align: sub;
|
|
}
|
|
|
|
header p a,
|
|
header p a:visited {
|
|
/* font-weight: bold;*/
|
|
/* color: var(--text);*/
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
nav ul.secondary {
|
|
/* padding: 0 0.75rem;*/
|
|
font-size: small;
|
|
}
|
|
|
|
/*nav ul li {
|
|
display: inline-block;
|
|
list-style: none;
|
|
}*/
|
|
|
|
header a {
|
|
/* text-decoration: none;*/
|
|
/* font-weight: bold;*/
|
|
/* line-height: 1.5;*/
|
|
}
|
|
|
|
nav .link-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
color: var(--text);
|
|
font-weight: bold;
|
|
border-radius: 0;
|
|
}
|
|
|
|
img {
|
|
object-fit: contain;
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: 0.25rem;
|
|
border: thin solid var(--border);
|
|
}
|
|
|
|
img.avatar {
|
|
height: 2.5rem;
|
|
width: 2.5rem;
|
|
object-fit: cover;
|
|
}
|
|
|
|
a.author {
|
|
text-decoration: none;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* === PROFILE === */
|
|
|
|
.profile {
|
|
padding: 0 1rem;
|
|
display: grid;
|
|
grid-template-columns: 4rem 1fr;
|
|
grid-gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.profile img.avatar {
|
|
width: 4rem;
|
|
height: 4rem;
|
|
}
|
|
|
|
.profile .author {
|
|
font-size: larger;
|
|
}
|
|
|
|
|
|
.profile p {
|
|
margin: 0.5rem 0;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.profile a,
|
|
.profile a:visited {
|
|
color: var(--text);
|
|
}
|
|
|
|
.profile a:hover {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.profile .filters a {
|
|
text-decoration: none;
|
|
font-weight: bold;
|
|
padding-right: 0.5rem;
|
|
}
|
|
|
|
.profile a.active {
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* == Tag Cloud ===================== */
|
|
|
|
.tagcloud {
|
|
margin-top: 0.75rem;
|
|
border-top: thin solid var(--border);
|
|
padding: 0.2rem;
|
|
}
|
|
|
|
.tagcloud a,
|
|
.tagcloud a:visited {
|
|
text-decoration: none;
|
|
padding-right: 0.2rem;
|
|
line-height: 1;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.tagcloud a.active {
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* === TIMELINE === */
|
|
|
|
article {
|
|
color: var(--text-light);
|
|
margin: 0.5rem;
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
article.post-entry {
|
|
display: grid;
|
|
grid-gap: 1rem;
|
|
grid-template-columns: 2.5rem auto;
|
|
}
|
|
|
|
article .twt-msg {
|
|
padding: 0.5rem 0.5rem 0.5rem 0 ;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
article .twt-msg > blockquote {
|
|
margin: 0;
|
|
border-left: thick solid grey;
|
|
padding: 0.25rem 0.5rem;
|
|
display: inline-block;
|
|
font-style: italic;
|
|
}
|
|
|
|
article .twt-msg img {
|
|
margin: 0.25rem -0.25rem;
|
|
}
|
|
|
|
article .twt-msg > img:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
article .twt-msg > img:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
article small {
|
|
font-size: small;
|
|
}
|
|
|
|
article small a,
|
|
article small a:visited {
|
|
color: var(--text);
|
|
|
|
}
|
|
|
|
|
|
/* === New Post Form === */
|
|
|
|
#new_twt {
|
|
border: none;
|
|
text-align: center
|
|
}
|
|
|
|
#new_twt input[type="submit"] {
|
|
min-width: 33%;
|
|
}
|
|
|
|
nav.pagnation {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 0.5rem 0;
|
|
}
|
|
|
|
/* === REFRESH === */
|
|
|
|
#refreshInfo {
|
|
display: block;
|
|
}
|
|
|
|
#refreshInfo {
|
|
display: block;
|
|
text-align: center:
|
|
}
|
|
|
|
#refreshURL {
|
|
}
|
|
|
|
#refreshCounter {
|
|
float: right;
|
|
}
|
|
|
|
/* == Gallery ===================== */
|
|
|
|
.gallery {
|
|
max-width: 1200px;
|
|
margin: 0 auto ;
|
|
display: grid;
|
|
grid-gap: 0.75rem;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
/*grid-auto-rows: 225px;*/
|
|
/*grid-auto-flow: dense;*/
|
|
}
|
|
|
|
.gallery a img {
|
|
/* https://web.dev/aspect-ratio/ */
|
|
aspect-ratio: 1 / 1;
|
|
width: 100%;
|
|
/*height: 100%;*/
|
|
object-fit: cover;
|
|
/*background-color: var(--border-color);*/
|
|
border-radius: 0.25rem;
|
|
}
|
|
|
|
/* === FOOTER === */
|
|
|
|
footer {
|
|
border-top: thin solid grey;
|
|
margin-top: 1rem;
|
|
text-align: center;
|
|
}
|