diff --git a/dist/treebird20.css b/dist/treebird20.css index 8778590..d615816 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -11,8 +11,16 @@ padding: 0; } +html, body +{ + margin: 0; + padding: 0; + margin-top: 0px; +} + html { + height: 100%; background-color: #f6f6f6; } @@ -22,16 +30,35 @@ body background-size: cover !important; background-color: unset; font-family: Arial, Helvetica, sans-serif; + min-height: 100%; + +} + +/* Basic elements */ +h1, h2, h3, h4 +{ + margin: 12px 0px 6px 0px; +} + +ul +{ + margin: 12px; +} + +#main-page-container +{ + padding: 8px; } #main-page { margin: 8px; + margin-top: 0; width: 1000px; border-top: 0 !important; margin-left: auto; margin-right: auto; - border: 1px solid #dadada !important; + border: 1px solid #bbbbbb !important; box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3); border-width: 0; border-radius: 5px; @@ -93,7 +120,7 @@ table.ui-table td { vertical-align: middle; display: inline-block; - margin: 4px 3px 5px 14px; + margin: 4px 0px 6px 18px; } #navbar span.info @@ -107,11 +134,10 @@ table.ui-table td #navbar-right-container { - width: 782px; + width: 795px; display: inline-block; position: relative; top: 9px; - padding-right: 8px; align-items: center; } diff --git a/dist/treebird40.css b/dist/treebird40.css index 7d1735c..8055378 100644 --- a/dist/treebird40.css +++ b/dist/treebird40.css @@ -11,8 +11,16 @@ padding: 0; } +html, body +{ + margin: 0; + padding: 0; + margin-top: 0px; +} + html { + height: 100%; background-color: #f6f6f6; } @@ -22,6 +30,23 @@ body background-size: cover !important; background-color: unset; font-family: Arial, Helvetica, sans-serif; + min-height: 100%; +} + +/* Basic elements */ +h1, h2, h3, h4 +{ + margin: 12px 0px 6px 0px; +} + +ul +{ + margin: 12px; +} + +#main-page-container +{ + padding: 8px; } #main-page diff --git a/src/attachments.c b/src/attachments.c index 2b6e9aa..00cbe2b 100644 --- a/src/attachments.c +++ b/src/attachments.c @@ -38,7 +38,8 @@ int try_upload_media(struct mstdnt_storage* storage, struct mstdnt_attachment** attachments, char*** media_ids) { - if (!ssn->post.files.array_size) + if (!ssn->post.files.array_size || + !(ssn->post.files.content && ssn->post.files.content[0].content_size)) return 1; if (media_ids) diff --git a/src/local_config_set.c b/src/local_config_set.c index 7e0cf8b..87a46dc 100644 --- a/src/local_config_set.c +++ b/src/local_config_set.c @@ -60,14 +60,12 @@ int set_config_int(int* ssn, void load_config(struct session* ssn, mastodont_t* api) { - if (ssn->post.theme && ssn->post.files.array_size && ssn->post.files.content[0].content_size) + if (ssn->post.theme) { struct mstdnt_attachment* attachments = NULL; struct mstdnt_storage storage = { 0 }; if (try_upload_media(&storage, ssn, api, &attachments, NULL) == 0) - { set_config_str(&(ssn->config.background_url), "background_url", attachments[0].url); - } } set_config_str(&(ssn->config.theme), "theme", ssn->post.theme); set_config_int(&(ssn->config.themeclr), "themeclr", ssn->post.themeclr); diff --git a/static/index.html b/static/index.html index 6f4d272..459c1d2 100644 --- a/static/index.html +++ b/static/index.html @@ -7,48 +7,51 @@ -
- - - - - - - - + +
- %s -
+ + + + + + - - - -
+ %s +
+ + + %s + + + +