forked from mirrors/treebird
Solarized theme by Coyote
Also fixed up options FossilOrigin-Name: 961da4797b37b2cbe3954d43603e68c5b7f1b12d2900ae5ee87be9650356dd3b
This commit is contained in:
parent
ca3c2b097c
commit
df27783706
11 changed files with 44 additions and 1274 deletions
1251
dist/treebird40.css
vendored
1251
dist/treebird40.css
vendored
File diff suppressed because it is too large
Load diff
|
@ -65,7 +65,8 @@ char* read_cookies_env(struct cookie_values* cookies)
|
|||
{ "statgreentexts", &(cookies->stat_greentexts), key_int },
|
||||
{ "statdope", &(cookies->stat_dope), key_int },
|
||||
{ "statoneclicksoftware", &(cookies->stat_oneclicksoftware), key_int },
|
||||
{ "statemojilikes", &(cookies->stat_emoji_likes), key_int },
|
||||
{ "statemojolikes", &(cookies->stat_emojo_likes), key_int },
|
||||
{ "stathidemuted", &(cookies->stat_hide_muted), key_int },
|
||||
{ "instanceshowshoutbox", &(cookies->instance_show_shoutbox), key_int },
|
||||
{ "instancepanel", &(cookies->instance_panel), key_int },
|
||||
};
|
||||
|
|
|
@ -39,7 +39,8 @@ struct cookie_values
|
|||
struct key stat_greentexts;
|
||||
struct key stat_dope;
|
||||
struct key stat_oneclicksoftware;
|
||||
struct key stat_emoji_likes;
|
||||
struct key stat_emojo_likes;
|
||||
struct key stat_hide_muted;
|
||||
struct key instance_show_shoutbox;
|
||||
struct key instance_panel;
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ struct local_config
|
|||
int stat_greentexts;
|
||||
int stat_dope;
|
||||
int stat_oneclicksoftware;
|
||||
int stat_emoji_likes;
|
||||
int stat_emojo_likes;
|
||||
int stat_hide_muted;
|
||||
int instance_show_shoutbox;
|
||||
int instance_panel;
|
||||
|
|
|
@ -88,7 +88,8 @@ void load_config(struct session* ssn, mastodont_t* api)
|
|||
set_config_int(LOAD_CFG_SIM("statgreentexts", stat_greentexts));
|
||||
set_config_int(LOAD_CFG_SIM("statdope", stat_dope));
|
||||
set_config_int(LOAD_CFG_SIM("statoneclicksoftware", stat_oneclicksoftware));
|
||||
set_config_int(LOAD_CFG_SIM("statemojilikes", stat_emoji_likes));
|
||||
set_config_int(LOAD_CFG_SIM("statemojolikes", stat_emojo_likes));
|
||||
set_config_int(LOAD_CFG_SIM("stathidemuted", stat_hide_muted));
|
||||
set_config_int(LOAD_CFG_SIM("instanceshowshoutbox", instance_show_shoutbox));
|
||||
set_config_int(LOAD_CFG_SIM("instancepanel", instance_panel));
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ int main(void)
|
|||
.stat_greentexts = 1,
|
||||
.stat_dope = 1,
|
||||
.stat_oneclicksoftware = 1,
|
||||
.stat_emoji_likes = 0,
|
||||
.stat_emojo_likes = 0,
|
||||
.stat_hide_muted = 0,
|
||||
.instance_show_shoutbox = 1,
|
||||
.instance_panel = 1,
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#include "../static/config_appearance.chtml"
|
||||
#include "../static/config_sidebar.chtml"
|
||||
|
||||
#define bool_checked(key) (ssn->config.key ? "checked" : "")
|
||||
|
||||
enum config_category
|
||||
{
|
||||
CONFIG_CAT_GENERAL,
|
||||
|
@ -60,23 +62,39 @@ static char* construct_config_sidebar(enum config_category cat, size_t* size)
|
|||
return sidebar_html;
|
||||
}
|
||||
|
||||
|
||||
void content_config_general(struct session* ssn, mastodont_t* api, char** data)
|
||||
{
|
||||
char* sidebar_html = construct_config_sidebar(CONFIG_CAT_GENERAL, NULL);
|
||||
|
||||
char* general_page;
|
||||
|
||||
easprintf(&general_page, data_config_general_html,
|
||||
bool_checked(js),
|
||||
bool_checked(jsactions),
|
||||
bool_checked(jsreply),
|
||||
bool_checked(jslive),
|
||||
bool_checked(stat_attachments),
|
||||
bool_checked(stat_greentexts),
|
||||
bool_checked(stat_dope),
|
||||
bool_checked(stat_oneclicksoftware),
|
||||
bool_checked(stat_emojo_likes),
|
||||
bool_checked(stat_hide_muted),
|
||||
bool_checked(instance_show_shoutbox),
|
||||
bool_checked(instance_panel));
|
||||
|
||||
load_config(ssn, api);
|
||||
|
||||
struct base_page b = {
|
||||
.category = BASE_CAT_CONFIG,
|
||||
.locale = L10N_EN_US,
|
||||
.content = data_config_general_html,
|
||||
.content = general_page,
|
||||
.sidebar_left = sidebar_html
|
||||
};
|
||||
|
||||
render_base_page(&b, ssn, api);
|
||||
// Cleanup
|
||||
free(sidebar_html);
|
||||
free(general_page);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ char* read_post_data(struct post_values* post)
|
|||
{ "statgreentexts", &(post->stat_greentexts), key_int },
|
||||
{ "statdope", &(post->stat_dope), key_int },
|
||||
{ "statoneclicksoftware", &(post->stat_oneclicksoftware), key_int },
|
||||
{ "statemojolikes", &(post->stat_emoji_likes), key_int },
|
||||
{ "statemojolikes", &(post->stat_emojo_likes), key_int },
|
||||
{ "stathidemuted", &(post->stat_hide_muted), key_int },
|
||||
{ "instanceshowshoutbox", &(post->instance_show_shoutbox), key_int },
|
||||
{ "instancepanel", &(post->instance_panel), key_int },
|
||||
|
|
|
@ -41,7 +41,7 @@ struct post_values
|
|||
struct key stat_greentexts; // Int
|
||||
struct key stat_dope; // Int
|
||||
struct key stat_oneclicksoftware; // Int
|
||||
struct key stat_emoji_likes; // Int
|
||||
struct key stat_emojo_likes; // Int
|
||||
struct key stat_hide_muted; // Int
|
||||
struct key instance_show_shoutbox; // Int
|
||||
struct key instance_panel; // Int
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<li>
|
||||
<label for="cfgthemevar">Theme variant</label>
|
||||
<select name="theme" id="cfgthemevar">
|
||||
<option value="treebird20">treebird 2.0 - Default, simple theme</option>
|
||||
<option value="treebird40">treebird 4.0 - Flat, modern theme</option>
|
||||
<option value="treebird20" title="Created by nekobit (@neko@rdrama.cc) | Dark variant created by Grumbulon (@grumbulon@freecumextremist.com)">treebird 2.0 - Default, simple theme</option>
|
||||
<option value="solarized" title="Created by coyote (@coyote@pl.lain.sh)">Solarized - Solarized colors for pleasant viewing</option>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
<h3>JavaScript</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgjs" name="js" value="1" checked>
|
||||
<input type="checkbox" id="cfgjs" name="js" value="1" %s>
|
||||
<label for="cfgjs">Enable JavaScript - If disabled, overrides options below</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgjsactions" name="jsactions" value="1" checked>
|
||||
<input type="checkbox" id="cfgjsactions" name="jsactions" value="1" %s>
|
||||
<label for="cfgjsactions">Quick actions - Likes, Boosts, etc done in background</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgjsreply" name="jsreply" value="1" checked>
|
||||
<input type="checkbox" id="cfgjsreply" name="jsreply" value="1" %s>
|
||||
<label for="cfgjsreply">Quick reply - Replies don't require redirects</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgjslive" name="jslive" value="1">
|
||||
<input type="checkbox" id="cfgjslive" name="jslive" value="1" %s>
|
||||
<label for="cfgjslive">Live update - Statuses, chats, and reactions fetch on the fly</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -27,27 +27,27 @@
|
|||
<h3>Statuses</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstatattachments" name="statattachments" value="1" checked>
|
||||
<input type="checkbox" id="cfgstatattachments" name="statattachments" value="1" %s>
|
||||
<label for="cfgstatattachments">Show attachments - If disabled, attachments are links instead</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstatgreentexts" name="statgreentexts" value="1" checked>
|
||||
<input type="checkbox" id="cfgstatgreentexts" name="statgreentexts" value="1" %s>
|
||||
<label for="cfgstatgreentexts">Show greentexts</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstatdope" name="statdope" value="1" checked>
|
||||
<input type="checkbox" id="cfgstatdope" name="statdope" value="1" %s>
|
||||
<label for="cfgstatdope">Show dopameme numbers - Likes, comments, and boost counts</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstatoneclicksoftware" name="statoneclicksoftware" value="1" checked>
|
||||
<input type="checkbox" id="cfgstatoneclicksoftware" name="statoneclicksoftware" value="1" %s>
|
||||
<label for="cfgstatoneclicksoftware">Show Like-Boost button - Show a button in the status which likes and boosts a post</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstatemojolikes" name="statemojolikes" value="1">
|
||||
<input type="checkbox" id="cfgstatemojolikes" name="statemojolikes" value="1" %s>
|
||||
<label for="cfgstatemojolikes">Convert Emoji reacts to likes - Also disables the emoji reaction button</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfgstathidemuted" name="stathidemuted" value="1">
|
||||
<input type="checkbox" id="cfgstathidemuted" name="stathidemuted" value="1" %s>
|
||||
<label for="cfgstathidemuted">Hide statuses from muted users and threads - If disabled, statuses will appear collapsed</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -55,11 +55,11 @@
|
|||
<h3>Instance</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="checkbox" id="cfginstanceshowshoutbox" name="instanceshowshoutbox" value="1" checked>
|
||||
<input type="checkbox" id="cfginstanceshowshoutbox" name="instanceshowshoutbox" value="1" %s>
|
||||
<label for="cfginstanceshowshoutbox">Show instance shoutbox (JS required)</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" id="cfginstancepanel" name="instancepanel" value="1" checked>
|
||||
<input type="checkbox" id="cfginstancepanel" name="instancepanel" value="1" %s>
|
||||
<label for="cfginstancepanel">Show instance panel - <em>Admins should <strong>not</strong> use the instance panel for major announcements</em></label>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue