Config page

FossilOrigin-Name: f7d37fae123ccbdce2732773af0c1b46309dad9c930b65e1fc264e215dd71019
This commit is contained in:
me@ow.nekobit.net 2022-01-31 22:22:48 +00:00
parent 13a577dca1
commit 8efbef7706
6 changed files with 37 additions and 1 deletions

4
$ Normal file
View file

@ -0,0 +1,4 @@
#ifndef __data_config_html
#define __data_config_html
static size_t data_config_html_size = 16;static const char data_config_html[] = {0X3C,0X68,0X31,0X3E,0X43,0X6F,0X6E,0X66,0X69,0X67,0X3C,0X2F,0X68,0X31,0X3E,0XA,0};
#endif

View file

@ -25,10 +25,13 @@ filec: src/file-to-c/main.o
%.chtml: %.html
./filec $< $< > $@
# PAGES
$(PAGES_DIR)/index.chtml: $(PAGES_DIR)/index.html
./filec $< data_index_html > $@
$(PAGES_DIR)/status.chtml: $(PAGES_DIR)/status.html
./filec $< data_status_html > $@
$(PAGES_DIR)/config.chtml: $(PAGES_DIR)/config.html
./filec $< data_config_html > $@
$(MASTODONT_DIR):
git clone $(MASTODONT_URL) || true

17
dist/ratfe.css vendored
View file

@ -31,6 +31,7 @@ a
{
display: flex;
align-items: center;
padding: 0 5px;
border-bottom: 2px solid #cacaca;
}
@ -89,7 +90,7 @@ div#content aside
#leftbar ul
{
margin: 0;
margin: 0px 0px 10px 0px;
padding: 0;
}
@ -98,6 +99,9 @@ div#content aside
list-style-type: none;
}
/*************************************************
* BUTTONS *
*************************************************/
input[type=button], input[type=submit], .sidebarbtn
{
background: linear-gradient(#fff, #f1f1f1);
@ -126,6 +130,12 @@ input[type=button], input[type=submit]
padding: 3px 15px;
}
/* Make first button glue to header */
#leftbar ul:first-child .sidebarbtn
{
border-top: 0;
}
.sidebarbtn
{
border-bottom: 1px solid #dadada;
@ -134,6 +144,11 @@ input[type=button], input[type=submit]
text-decoration: none;
}
ul li:first-child a.sidebarbtn
{
border-top: 1px solid #dadada;
}
#rightbar
{
border-left: 1px solid #cacaca;

View file

@ -17,9 +17,19 @@
*/
#include <stdio.h>
#include "../config.h"
#include "page_config.h"
// Pages
#include "../static/index.chtml"
#include "../static/config.chtml"
void content_config(mastodont_t* api)
{
(void)api; // No need to use this
/* Output */
printf("Content-Length: %ld\r\n\r\n",
data_index_html_size + data_config_html_size);
printf(data_index_html, config_canonical_name, data_config_html);
}

1
static/config.html Normal file
View file

@ -0,0 +1 @@
<h1>Config</h1>

View file

@ -30,6 +30,9 @@
<li><a class="sidebarbtn" href="#">Local</a></li>
<li><a class="sidebarbtn" href="#">Federated</a></li>
</ul>
<ul>
<li><a class="sidebarbtn" href="/config">Config</a></li>
</ul>
</aside>
<!-- Display for posts -->