blog

The tiny blog platform powering https://blog.kore.io
Commits | Files | Refs | README | git clone https://git.kore.io/kore-blog.git

commit 40869c8fd0a3dfeeca55d8bf93541521d020fabf
parent b3c44330c0d97f6bc4db8131402e964a95c1d29c
Author: Joris Vink <joris@coders.se>
Date:   Fri,  8 Nov 2019 19:53:09 +0100

update blog style a bit

Diffstat:
assets/index_top.html | 2+-
assets/style.css | 15+++++++--------
conf/build.conf | 2+-
src/blog.c | 11+++++++++--
4 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/assets/index_top.html b/assets/index_top.html @@ -9,7 +9,7 @@ <body> <div style="width: 100%; text-align: center"> - <a href="/"><img class="logo" src="/logo.png"></a> + <a href="/"><img class="logo" src="https://kore.io/images/logos/logo-mascotte.png"></a> </div> <div style="margin-top: 45px"></div> diff --git a/assets/style.css b/assets/style.css @@ -1,7 +1,7 @@ * { margin: 0px; padding: 0px; - font-family: "Courier New", Courier, monospace + font-family: "Lucida Console", Monaco, monospace; } body { @@ -10,8 +10,8 @@ body { margin-right: auto; width: 600px; font-size: 16px; - background-color: #101010; - color: #fff; + background-color: #ffffe2; + color: #000000; } div.blog-version { @@ -26,13 +26,12 @@ div.blog-version a { } h2.title { - color: #b5e853; + color: #0366d6; margin-bottom: 15px; - font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; } a, a:visited { - color: #40e0d0; + color: #0366d6; } p { @@ -45,8 +44,8 @@ p.date { } img.logo { - width: 320px; - height: auto; + width: auto; + height: 190px; } code { diff --git a/conf/build.conf b/conf/build.conf @@ -10,7 +10,7 @@ kore_flavor=NOTLS=1 # The flags below are shared between flavors cflags=-std=c99 -pedantic -O3 -cflags=-Wall -Wmissing-declarations -Wshadow +cflags=-Wall -Wextra -Werror -Wmissing-declarations -Wshadow cflags=-Wstrict-prototypes -Wmissing-prototypes cflags=-Wpointer-arith -Wcast-qual -Wsign-compare diff --git a/src/blog.c b/src/blog.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Joris Vink <joris@coders.se> + * Copyright (c) 2018-2019 Joris Vink <joris@coders.se> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -42,7 +42,7 @@ #define MSG_SESSION_DEL 200 #define BLOG_DIR "blogs" -#define BLOG_VER "kore-blog v0.1" +#define BLOG_VER "kore-blog v0.2" #define BLOG_USER_CONF "users.conf" #define POST_FLAG_DRAFT 0x0001 @@ -122,6 +122,9 @@ signal_handler(int sig) void tick(void *unused, u_int64_t now) { + (void)now; + (void)unused; + if (blog_sig == SIGHUP) { blog_sig = -1; index_rebuild(); @@ -451,6 +454,8 @@ referer(struct http_request *req, const void *unused) { const char *ref, *p; + (void)unused; + if (!http_request_header(req, "referer", &ref)) return (KORE_RESULT_OK); @@ -538,6 +543,8 @@ auth_user_exists(struct http_request *req, char *user) { struct user *usr; + (void)req; + if (user == NULL) return (KORE_RESULT_ERROR);