From 8cbeca99bfc2cdff57c4d08cd8282ddd6849a0ad Mon Sep 17 00:00:00 2001 From: discomrade Date: Wed, 30 Jun 2021 04:42:49 -0200 Subject: [PATCH 1/5] Add logo config variable --- inc/config.php | 4 ++++ inc/instance-config.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/inc/config.php b/inc/config.php index 9aa83e8f..34a72ce4 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1921,3 +1921,7 @@ //Empty board alias $config['boards_alias'] = array(); + + //Logo location for themes + $config['logo'] = 'static/logo.png'; + diff --git a/inc/instance-config.php b/inc/instance-config.php index fa838fc5..67699f4f 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -109,6 +109,9 @@ $config['secure_trip_salt'] = 'ODQ2NDM0ODlmMmRhNzk2M2EyNjJlOW'; //Banners $config['url_banner'] = '/banners.php'; +//Logo location for themes +$config['logo'] = 'static/leftypol_logo.png'; + //Date format $config['post_date'] = '%F (%a) %T'; From b4c5697bf6da3ef20d1d45ecdf0e22ff82a16377 Mon Sep 17 00:00:00 2001 From: discomrade Date: Wed, 30 Jun 2021 05:29:29 -0200 Subject: [PATCH 2/5] Improve responsiveness of homepage, add description and logo --- templates/themes/categories/frames.html | 65 ++++++++++++++++++++++--- templates/themes/categories/news.html | 10 ++-- templates/themes/categories/theme.php | 5 ++ 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/templates/themes/categories/frames.html b/templates/themes/categories/frames.html index 7d02d584..400d3a3f 100644 --- a/templates/themes/categories/frames.html +++ b/templates/themes/categories/frames.html @@ -8,21 +8,38 @@ {{ settings.title }} + {% include 'themes/categories/' ~ settings.file_sidebar %} {% include 'themes/categories/' ~ settings.file_news %} + diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index a6683fd4..bb391374 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -1,13 +1,16 @@ {% filter remove_whitespace %} -
+
{{ boardlist.top }}

{{ settings.title }}

{{ settings.subtitle }}
+

{{ description }}

- + logo +
+
{% if not news %}

{% trans %}(No news to show.){% endtrans %}

@@ -31,7 +34,7 @@ {% trans "Post Statistics" %}
- +
@@ -91,3 +94,4 @@ {% endfilter %} + diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php index 44cae18f..a732a0e2 100644 --- a/templates/themes/categories/theme.php +++ b/templates/themes/categories/theme.php @@ -34,6 +34,9 @@ // Build homepage public static function homepage($settings) { global $config; + $description = 'Leftypol is a fun and enjoyable space where users can post anonymously.
' . + 'We engage in both serious political discourse and less serious informal discussions ' . + 'on various topics related to leftist thought.'; $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error()); $news = $query->fetchAll(PDO::FETCH_ASSOC); $stats = Categories::getPostStatistics($settings); @@ -42,6 +45,7 @@ Array( 'config' => $config, 'settings' => $settings, + 'description' => $description, 'categories' => Categories::getCategories($config), 'news' => $news, 'stats' => $stats, @@ -160,3 +164,4 @@ }; ?> + From c3c87e29e6e398d17d568de2cca8bd0cb35c1988 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Sat, 3 Jul 2021 21:31:43 -0400 Subject: [PATCH 3/5] move logo to top, refactor inline css --- templates/themes/categories/news.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index bb391374..a064b611 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -1,14 +1,29 @@ {% filter remove_whitespace %}
+ {{ boardlist.top }} +

{{ settings.title }}

{{ settings.subtitle }}
-

{{ description }}

+

{{ description }}

- logo
From e52273d3a96ef1f648194dbf1985fcedb34a8124 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Sat, 3 Jul 2021 21:33:27 -0400 Subject: [PATCH 4/5] add a bit more space between top and logo --- templates/themes/categories/news.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index a064b611..b8b79f28 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -4,6 +4,7 @@ .home-logo { display: block; margin: auto; + margin-top: 1em; margin-bottom: 1em; min-width: 100px; width: 15%; From 73517b0ffc657e16e306850b476e9899e5487671 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Sat, 3 Jul 2021 22:38:01 -0400 Subject: [PATCH 5/5] Put image under title, inside header (homepage) --- templates/themes/categories/news.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index b8b79f28..b9ffecca 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -4,8 +4,6 @@ .home-logo { display: block; margin: auto; - margin-top: 1em; - margin-bottom: 1em; min-width: 100px; width: 15%; } @@ -17,9 +15,9 @@ } {{ boardlist.top }} -

{{ settings.title }}

+
{{ settings.subtitle }}
{% trans "Board" %}