diff --git a/Makefile b/Makefile index 4873c03..2ba72ca 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ CFLAGS += -Wall -I $(MASTODONT_DIR)include/ -Wno-unused-variable -Wno-discarded- LDFLAGS = -L$(MASTODONT_DIR) -lmastodont $(shell pkg-config --libs libcjson libcurl libpcre) -lfcgi SRC = $(wildcard src/*.c) OBJ = $(patsubst %.c,%.o,$(SRC)) +HEADERS = $(wildcard src/*.h) PAGES_DIR = static PAGES = $(wildcard $(PAGES_DIR)/*.html) PAGES_CMP = $(patsubst %.html,%.chtml,$(PAGES)) @@ -15,16 +16,14 @@ TARGET = treebird.cgi MASTODONT_URL = https://git.nekobit.net/repos/mastodont-c.git all: $(MASTODONT_DIR) dep_build $(TARGET) +apache: all apache_start -$(TARGET): filec $(PAGES_CMP) $(OBJ) +$(TARGET): filec $(PAGES_CMP) $(OBJ) $(HEADERS) $(CC) -o $(DIST)$(TARGET) $(OBJ) $(LDFLAGS) filec: src/file-to-c/main.o $(CC) -o filec $< -%.chtml: %.html - ./filec $< $< > $@ - # PAGES $(PAGES_DIR)/index.chtml: $(PAGES_DIR)/index.html ./filec $< data_index_html > $@ @@ -86,13 +85,16 @@ $(MASTODONT_DIR): git clone $(MASTODONT_URL) || true @echo -e "\033[38;5;13mRun 'make update' to update mastodont-c\033[0m" +apache_start: + ./scripts/fcgistarter.sh + dep_build: make -C $(MASTODONT_DIR) update: git -C $(MASTODONT_DIR) pull -%.o: %.c +%.o: %.c %.h $(PAGES) $(CC) $(CFLAGS) -c $< -o $@ clean: diff --git a/dist/treebird20.css b/dist/treebird20.css index 2b2a5bf..5165299 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -1,5 +1,3 @@ - - /* Look, I tried my best to make this theme compatible with browsers like Netsurf and stuff, I HATE the modern web and flexboxes and stuff, so as a result, you WILL see some fugly things in here that you will probably want to cleanup or throw out completely, this CSS is a big hack. @@ -174,14 +172,14 @@ table.present th, table.present td /************************************************* * BUTTONS * *************************************************/ -input[type=button], input[type=submit], .sidebarbtn, .btn +.sidebarbtn, .btn { background: linear-gradient(#fff, #f7f7f7); color: #000; text-decoration: none; } -input[type=button]:hover, input[type=submit]:hover, .sidebarbtn:hover, .btn:hover +.sidebarbtn:hover, .btn:hover { background: linear-gradient(#aa0000, #600000); border-color: #400000; @@ -189,7 +187,7 @@ input[type=button]:hover, input[type=submit]:hover, .sidebarbtn:hover, .btn:hove cursor: pointer; } -input[type=button]:active, input[type=submit]:active, .sidebarbtn:active, .btn:active +.sidebarbtn:active, .btn:active { background: linear-gradient(#600000, #aa0000); border-color: #400000; @@ -961,14 +959,19 @@ ul.large-list li a list-style-type: none; } -.menu .btn +.menu .btn-menu { background: unset; + background-color: unset; display: block; padding: 6px 12px; + width: 100%; + border: 0; + cursor: pointer; + text-align: left; } -.menu .btn:hover +.menu .btn-menu:hover { background-color: #eaeaea; color: #000; diff --git a/src/status.c b/src/status.c index 59733c9..442fc35 100644 --- a/src/status.c +++ b/src/status.c @@ -152,6 +152,18 @@ char* construct_status(struct mstdnt_status* status, status->account.acct, status->account.acct, /* Account */ "Public", /* visibility */ + config_url_prefix, + status->id, + status->muted ? "un" : "", + status->muted ? "Unmute thread" : "Mute thread", + config_url_prefix, + status->id, + status->pinned ? "un" : "", + status->pinned ? "Unpin" : "Pin", + config_url_prefix, + status->id, + status->bookmarked ? "un" : "", + status->bookmarked ? "Remove Bookmark" : "Bookmark", status->content, attachments ? attachments : "", emoji_reactions ? emoji_reactions : "", diff --git a/static/index.html b/static/index.html index 3884798..c8070f0 100644 --- a/static/index.html +++ b/static/index.html @@ -5,7 +5,6 @@ %s -
@@ -17,7 +16,7 @@
+ -->
diff --git a/static/login.html b/static/login.html index b60910b..e0c5815 100644 --- a/static/login.html +++ b/static/login.html @@ -1,6 +1,6 @@

%s

- + %s
@@ -13,7 +13,7 @@
- +
diff --git a/static/status.html b/static/status.html index 4689c11..07e9c52 100644 --- a/static/status.html +++ b/static/status.html @@ -17,20 +17,20 @@