[blog] Minor changes following feedback

This commit is contained in:
Monty 2021-09-25 16:01:38 +02:00
parent 6ffcb816ab
commit 308f0c6337
No known key found for this signature in database
GPG Key ID: 78B405B6520E1012
5 changed files with 12 additions and 13 deletions

View File

@ -20,7 +20,7 @@
}
.blog-card .post-info .title {
color: white;
color: var(--text);
margin: 0;
}
@ -57,7 +57,7 @@
}
.blog-card .profile img {
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid var(--border);
max-width: 100%;
}

View File

@ -29,7 +29,7 @@ header {
.blog-card strong,
.blog-card a,
.blog-card a * {
color: white;
color: var(--text);
}
.blog-card .title {
@ -65,7 +65,7 @@ header {
.blog-card .profile img {
margin: 0;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid var(--border);
max-width: 100%;
}
@ -80,7 +80,7 @@ header {
margin: 10px auto;
display: block;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid var(--border);
}
.blog-card img.emoji {
display: inline;
@ -91,14 +91,14 @@ header {
.blog-card video {
width: 100%;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid var(--border);
}
.blog-card iframe {
width: 100%;
aspect-ratio: 16/9;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid var(--border);
}
/* Fallback for aspect-ratio since it's unsupported by some browsers (looking at you Safari) */
@supports not (aspect-ratio: 16/9) {
@ -123,12 +123,11 @@ header {
background: #31375e;
margin-bottom: 30px;
overflow: hidden;
color: var(--text-secondary);
}
.blog-card table th {
padding: 8px 12px;
background: #3f4778;
color: white;
color: var(--text);
}
.blog-card table td {
padding: 8px 12px;

View File

@ -8,6 +8,7 @@
--theme: var(--btn);
--theme-light: #A185D6;
--text-secondary-2: #8990C1;
--border: rgba(255, 255, 255, 0.1);
}
body {

View File

@ -20,7 +20,7 @@ router.get('/', async (request, response) => {
// We get the info for each blogpost, ignoring the ones starting with _
const postList = fileList
.filter(filename => !filename.startsWith('_'))
.filter(filename => filename.endsWith('.md')) //Ignores other files/folders
.filter(filename => filename.endsWith('.md')) // Ignores other files/folders
.map((filename) => {
const slug = filename.replace('.md', '');
const rawPost = fs.readFileSync(path.join('blogposts', `${filename}`), 'utf-8');

View File

@ -74,11 +74,10 @@ app.use('/blog', routers.blog);
logger.info('Creating 404 status handler');
// This works because it is the last router created
// Meaning the request could not find a valid router
app.use((request, response) => {
app.use((request, response, next) => {
const fullUrl = util.fullUrl(request);
logger.warn(`HTTP 404 at ${fullUrl}`);
response.sendStatus(404); // TODO: 404 page
next();
});
logger.info('Setting up handlebars engine');