diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-11 01:20:39 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-11 01:49:12 +0200 |
| commit | e79e955d93e24a192c9bf94181294d0797e9fded (patch) | |
| tree | 5c3697710b6aa004bb7e3747f4c8ba98b37d662d /style.c | |
| parent | 4236c7fc3a7c7ef9f79b045cfd99c6575b16f7b1 (diff) | |
| download | slcl-e79e955d93e24a192c9bf94181294d0797e9fded.tar.gz | |
Allow admins to define their own stylesheet
slcl used to provide a hardcoded stylesheet. However, it would be
desirable for some admins to provide a custom stylesheet without having
to rebuild the application.
Now, slcl creates a default stylesheet, namely style.css, into the
target directory, that can be later modified by admins.
While this might contradict the suckless philosophy a bit, hopefully
some admins might find this new feature useful.
Diffstat (limited to 'style.c')
| -rw-r--r-- | style.c | 55 |
1 files changed, 55 insertions, 0 deletions
@@ -0,0 +1,55 @@ +#include "style.h" +#include <stddef.h> + +const char style_default[] = + "body\n" + "{\n" + " font-family: 'Courier New', Courier, monospace;\n" + "}\n" + "td\n" + "{\n" + " font-size: 14px;\n" + "}\n" + "a\n" + "{\n" + " text-decoration: none;\n" + "}\n" + ".userform\n" + "{\n" + " padding: 4px;\n" + "}\n" + ".loginform\n" + "{\n" + " display: grid;\n" + "}\n" + "form, label, table\n" + "{\n" + " margin: auto;\n" + "}\n" + "div\n" + "{\n" + " align-items: center;\n" + " display: grid;\n" + "}\n" + "input, .abutton\n" + "{\n" + " margin: auto;\n" + " border: 1px solid;\n" + " border-radius: 8px;\n" + "}\n" + "header, footer\n" + "{\n" + " display: flex;\n" + " justify-content: center;\n" + " text-decoration: auto;\n" + "}\n" + "table\n" + "{\n" + " max-width: 50%;\n" + "}\n" + "tr:nth-child(even)\n" + "{\n" + " background-color: lightgray;\n" + "}\n"; + +const size_t style_default_len = sizeof style_default - 1; |
