barrettruth.com/public/styles/posts.css

192 lines
2.8 KiB
CSS

li {
margin: 5px 0;
}
.post-wrapper {
width: 100%;
position: relative;
}
.toc-column {
position: absolute;
left: calc((100vw - min(65vw, 800px)) / 4 - 100px);
top: 0;
width: 200px;
padding-top: 190px;
}
.post-header {
padding: 0;
}
.post-container {
width: 65%;
max-width: 800px;
margin: 0 auto;
}
.post-title {
font-weight: normal;
font-size: 2.2em;
margin: 50px 0;
width: 100%;
position: relative;
display: inline-block;
}
.post-title::before {
content: "";
position: absolute;
background-color: var(--topic-color, var(--text));
height: 30px;
width: 2px;
bottom: -10px;
left: -20px;
}
.post-title::after {
content: "";
position: absolute;
background-color: var(--topic-color, var(--text));
width: 200px;
height: 2px;
bottom: -10px;
left: -20px;
}
.post-meta {
font-size: 1.6em;
color: var(--text);
margin-left: 100px;
}
.post-article {
font-size: 1.5em;
line-height: 1.3;
padding-bottom: 50px;
}
.post-article a {
text-decoration: underline;
}
article h1,
article h2,
article h3,
.post-article h1,
.post-article h2,
.post-article h3 {
font-weight: normal;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
article h1,
.post-article h1 {
font-size: 1.8em;
padding-left: 1.5em;
}
article h2,
.post-article h2 {
font-size: 1.2em;
padding-left: 2em;
}
article h3,
.post-article h3 {
padding-left: 2.5em;
}
article h1::before,
.post-article h1::before {
content: "#";
}
article h2::before,
.post-article h2::before {
content: "##";
}
article h3::before,
.post-article h3::before {
content: "###";
}
article h1::before,
article h2::before,
article h3::before,
.post-article h1::before,
.post-article h2::before,
.post-article h3::before {
position: absolute;
left: 0;
color: var(--topic-color, var(--text));
margin-right: 0.5em;
}
.date {
font-size: 0.67em;
}
article img {
display: block;
margin: 2rem auto;
max-width: 100%;
height: auto;
}
article pre {
padding: 1rem;
overflow-x: auto;
border-radius: 4px;
border: 1px solid var(--border);
}
[data-theme="dark"] .astro-code,
[data-theme="dark"] .astro-code span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
}
:not(pre) > code {
font-family: "Courier New", Courier, monospace;
padding: 4px;
margin: 0 5px;
white-space: nowrap;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--code-bg);
}
.astro-code {
font-size: 0.8em !important;
}
@media (max-width: 1200px) {
.toc-column {
display: none;
}
}
@media (max-width: 768px) {
.post-container {
width: 85%;
}
.post-title {
font-size: 1.8em;
margin: 30px 0;
}
.post-meta {
font-size: 1.2em;
margin-left: 50px;
}
.post-article {
font-size: 1.1em;
}
}