Re-introduce code CSS, remove unused selectors & use tailwind when applicable, remove double slot

This commit is contained in:
2023-11-26 08:48:14 -06:00
parent a8db91f389
commit fd8882f756
3 changed files with 35 additions and 47 deletions

View File

@@ -10,10 +10,10 @@ interface Props {
const { url, date, title, tags, description } = Astro.props;
---
<div class="clear-both">
<div class="post_date text-center uppercase mb-4 ml-8 py-1 border-y border-white leading-4 float-right">
<div class="text-center uppercase mb-4 ml-8 py-1 border-y border-white leading-4 float-right">
<a href={url}>
<time datetime={date.toISOString()}>
<span class="month">
<span>
{ date.toLocaleDateString("en-US", {month: "short"}) }
</span>
<br>
@@ -21,13 +21,13 @@ const { url, date, title, tags, description } = Astro.props;
{ date.getDate().toString().padStart(2, "0") }
</span>
<br>
<span class="year">
<span>
{ date.getFullYear() }</span>
</time>
</a>
</div>
<div class="post_combo">
<h2 class="underline mr-1"><a href={url}>{ title }</a></h2>
<div class="mt-3">
<h2 class="font-medium inline underline mr-1"><a href={url}>{ title }</a></h2>
<i class="space-x-2">
{tags.map((tag) => (
<a href={`/tags/${tag}`}>

View File

@@ -1,31 +1,41 @@
pre,
code {
// font-family: "CMU Typewriter Text", monospace;
// font-size: 0.75em;
// font-style: normal !important;
font-family: "CMU Typewriter Text", monospace;
font-size: 0.8em;
font-style: normal !important;
}
// Inline code styling
p,
a,
h1,
h2,
h3,
h4,
h5,
h6 {
> code {
background-color: black;
padding: 0.1rem 0.27rem;
border-radius: 3px;
border: 1px solid rgba(white, 0.5);
}
}
// Inline code link styling
a > code {
// color: #90bcff;
}
code {
// border: 1px solid rgb(150, 150, 150);
// border-radius: 3px;
// background-color: rgb(0, 0, 0);
// padding: 0.15em 0.34em;
// white-space: nowrap;
color: #90bcff;
}
pre {
// background: rgb(25, 25, 25);
// border-radius: 7px;
// padding: 1em;
background: rgb(25, 25, 25);
border-radius: 7px;
padding: 1em;
code {
// font-size: 1em;
// border: 0;
// background-color: transparent !important;
// white-space: pre-wrap;
font-size: 1em;
border: 0;
background-color: transparent !important;
white-space: pre-wrap;
}
}

View File

@@ -1,7 +1,7 @@
@import "glitch";
@import "mixins";
@import "helpers";
// @import "code";
@import "code";
// Dark-mode selections
::selection,
@@ -219,28 +219,6 @@ nav {
font-family: "CMU Typewriter Text", monospace, monospace;
}
.post_date {
// border
// border: thin solid white;
// border-width: thin 0;
a {
text-decoration: none;
}
.date {
font-size: 2em;
}
}
.post_combo {
margin-top: 0.75em;
> h2 {
display: inline;
}
}
.post_image {
max-width: 30%;
margin: 0.5em;