Compare commits
No commits in common. "95e5a1618a55557ebf9bbaaa086d2351f78dbc71" and "ff91324a79333b42157157f3f875aaf7eea48b53" have entirely different histories.
95e5a1618a
...
ff91324a79
6 changed files with 223 additions and 277 deletions
|
@ -5,7 +5,7 @@ const { posts, displayDate = false, placeholder = false } = Astro.props;
|
|||
{posts.map((post) => (
|
||||
<p>
|
||||
{displayDate && <span class="list-date">{new Date(post.data.date).toISOString().split('T')[0]}</span>}
|
||||
{post.data.draft && <span class="draft-badge">[draft] </span>}<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
||||
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
||||
</p>
|
||||
))}
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
import Callout from "./shortcodes/Callout.astro"
|
||||
const { lastUpdatedAt } = Astro.props
|
||||
const lastUpdated = new Date(lastUpdatedAt).getTime()
|
||||
const dateNow = new Date().getTime()
|
||||
const dateDelta = dateNow - lastUpdated
|
||||
const Day = 1000 * 60 * 60 * 24
|
||||
const daysDelta = Math.round(dateDelta / Day)
|
||||
---
|
||||
{ daysDelta >= 30 &&
|
||||
<Callout type="warning" icon="📅">
|
||||
This article was updated on {daysDelta} days ago. The content may be outdated.
|
||||
</Callout>
|
||||
}
|
|
@ -37,13 +37,6 @@ export const siteConfig = {
|
|||
listuuid: '3546fc35-fd75-4163-936a-114514191981', // the id of the list to subscribe to, can be found in the listmonk admin panel
|
||||
}
|
||||
},
|
||||
// outdated callout
|
||||
// enable the callout to notify users that the content maybe outdated, this will add a callout to the top of the article page,
|
||||
// initialized by the server islands
|
||||
outdatedCallout: {
|
||||
enabled: true,
|
||||
daysBeforeOutdated: 90, // the number of days before the content is considered outdated, defaults to 90 days
|
||||
},
|
||||
// encryption
|
||||
// the global password to encrypt/decrypt the content, if set, all <ProtectedContent/> without specifying a password will be encrypted with this password
|
||||
// To use an environment variable to set the password, replace the value with `import.meta.env.CONTENT_PASSWORD`
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
title: 'the Origin of the Computer Science'
|
||||
description: 'A walkthrough of my current terminal configuration'
|
||||
date: '1970-01-01'
|
||||
updated: '2000-01-01'
|
||||
author:
|
||||
- 'Wheatley'
|
||||
---
|
||||
The
|
|
@ -11,7 +11,6 @@ import AuthorInfo from "../../components/helper/authors/Info.astro";
|
|||
import TableOfContents from "../../components/TableOfContents.astro";
|
||||
import "katex/dist/katex.css"
|
||||
import { getLangFromUrl, useTranslations, useTranslatedPath } from '../../i18n/utils';
|
||||
import OutDatedCallOut from "../../components/OutDatedCallOut.astro";
|
||||
|
||||
const lang = getLangFromUrl(Astro.url);
|
||||
const t = useTranslations(lang);
|
||||
|
@ -35,10 +34,10 @@ const author = Array.isArray(entry.data.author) ? entry.data.author : (entry.dat
|
|||
|
||||
// Get Wordcount and Last Updated Date
|
||||
const wordcount = remarkPluginFrontmatter.wordcount;
|
||||
const lastUpdated = entry.data.updated ? entry.data.updated : remarkPluginFrontmatter.lastModified;
|
||||
const lastUpdated = remarkPluginFrontmatter.lastModified;
|
||||
|
||||
const pubDate = new Date(entry.data.date).toISOString().split('T')[0]
|
||||
const lastUpdatedDate = new Date(lastUpdated).toISOString().split('T')[0]
|
||||
const lastUpdatedDate = entry.data.updated ? new Date(entry.data.updated).toISOString().split('T')[0] : new Date(lastUpdated).toISOString().split('T')[0];
|
||||
|
||||
// Get author data
|
||||
const authorData = await Promise.all((author).map((singleAuthor) => getEntry(singleAuthor).then(authorEntry => authorEntry?.data)))
|
||||
|
@ -74,7 +73,6 @@ const cover = customFeaturedImage || matchedImage_src?.src || firstImageURL || `
|
|||
{ (cover && cover !== firstImageURL && cover !== `/blog/${slug}/featured.png`) && <Image class="cover" width=720 height=480 src={cover} alt={`cover of ${entry.data.title}`} /> }
|
||||
{headings.length !== 0 && <TableOfContents headings={headings} />}
|
||||
{entry.data.summary && <p class="summary">{entry.data.summary}</p> }
|
||||
<OutDatedCallOut server:defer lastUpdatedAt={lastUpdated} />
|
||||
<div class="content">
|
||||
<Content />
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
--terminal-red: #bf616a;
|
||||
--font-mono: 'JetBrains Mono',ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
/* Light theme */
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root:not([data-theme="dark"]) {
|
||||
|
@ -30,7 +29,6 @@
|
|||
--terminal-red: #bf616a;
|
||||
}
|
||||
}
|
||||
|
||||
/* Light theme override (for switch) */
|
||||
:root[data-theme="light"] {
|
||||
--bg-color: #eceff4;
|
||||
|
@ -118,11 +116,9 @@ body {
|
|||
content: "./";
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.nav a.home::before{
|
||||
content: "";
|
||||
}
|
||||
|
||||
.cursor {
|
||||
display: inline-block;
|
||||
width: 0.6em;
|
||||
|
@ -133,12 +129,8 @@ body {
|
|||
}
|
||||
|
||||
@keyframes blink {
|
||||
from, to {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
from, to { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
@ -179,7 +171,6 @@ body {
|
|||
background: var(--accent-color);
|
||||
color: var(--bg-color);
|
||||
}
|
||||
|
||||
/* Theme Switcher */
|
||||
.theme-switcher {
|
||||
background: var(--border-color);
|
||||
|
@ -203,10 +194,8 @@ h1.title {
|
|||
font-weight: bold;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
div.content {
|
||||
margin: 1rem auto;
|
||||
|
||||
span.date {
|
||||
color: var(--secondary-text-color);
|
||||
font-size: 0.9rem;
|
||||
|
@ -214,7 +203,6 @@ div.content {
|
|||
margin-bottom: 1.5rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span.list-date {
|
||||
color: var(--secondary-text-color);
|
||||
font-size: 0.9rem;
|
||||
|
@ -222,21 +210,14 @@ div.content {
|
|||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
span.draft-badge {
|
||||
color: var(--secondary-text-color);
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
ul, ol, li {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 20px;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
ul li {
|
||||
padding-left: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
|
@ -247,9 +228,7 @@ div.content {
|
|||
padding: 1rem;
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
||||
/* Highlighted Code Blocks */
|
||||
|
||||
pre.astro-code,
|
||||
pre.astro-code span {
|
||||
background-color: #3b4252 !important;
|
||||
|
@ -285,7 +264,6 @@ div.content {
|
|||
}
|
||||
|
||||
/* Responsive Images */
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
|
@ -293,6 +271,7 @@ div.content {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/* Terminal Commands */
|
||||
.command {
|
||||
color: var(--terminal-green);
|
||||
|
@ -311,7 +290,6 @@ div.content {
|
|||
transition-duration: .7s;
|
||||
transition-timing-function: cubic-bezier(.4,0,1,1);
|
||||
}
|
||||
|
||||
.fade-out {
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue