diff --git a/public/assets/css/blog.css b/public/assets/css/blog.css index a7fb59c..9a00411 100644 --- a/public/assets/css/blog.css +++ b/public/assets/css/blog.css @@ -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%; } diff --git a/public/assets/css/blogpost.css b/public/assets/css/blogpost.css index 831bd5c..8e3cad6 100644 --- a/public/assets/css/blogpost.css +++ b/public/assets/css/blogpost.css @@ -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; diff --git a/public/assets/css/main.css b/public/assets/css/main.css index 0f975cd..12c8f23 100644 --- a/public/assets/css/main.css +++ b/public/assets/css/main.css @@ -8,6 +8,7 @@ --theme: var(--btn); --theme-light: #A185D6; --text-secondary-2: #8990C1; + --border: rgba(255, 255, 255, 0.1); } body { diff --git a/src/routers/blog.js b/src/routers/blog.js index b12840f..4c7fd4d 100644 --- a/src/routers/blog.js +++ b/src/routers/blog.js @@ -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'); diff --git a/src/server.js b/src/server.js index 2bb5dfc..7b1a79d 100644 --- a/src/server.js +++ b/src/server.js @@ -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');