From 0583eb07ee1d2ae81da058cd2beb0126d364d509 Mon Sep 17 00:00:00 2001 From: SG Date: Mon, 16 Jun 2025 22:11:24 +0300 Subject: [PATCH] updates --- classes.py | 4 +-- themes/default/static/css/theme.css | 37 ++++++++++----------------- themes/default/templates/default.html | 37 +++++++++++++++------------ 3 files changed, 36 insertions(+), 42 deletions(-) diff --git a/classes.py b/classes.py index c1b105c..990f9b4 100644 --- a/classes.py +++ b/classes.py @@ -47,7 +47,7 @@ class ContentItem: logger.debug(f"Copying {self.js_file} to {js_targetfile}") shutil.copyfile(self.js_file, js_targetfile) with self.target_file.open("w", encoding="utf-8") as f: - f.write(content_item_template.render(content_item = self, page_title = self.title, parent_path = '../', categories = categories)) + f.write(content_item_template.render(content_item = self, page_title = f"{Config.MAIN_PAGE_TITLE}: {self.title}", parent_path = '../', categories = categories)) except Exception as e: logger.error(f"Renderer: {e}") @@ -175,7 +175,7 @@ class Site: category_index = Path(f"{self.output_dir}/categories/{category}.html") category_items = [i for i in visible_content_items if category in i.data.get("categories")] with (category_index).open(mode="w", encoding="utf-8") as f: - f.write(index_template.render(page_title=category, content_items=category_items, categories = self.categories, parent_path = '../')) + f.write(index_template.render(page_title=f"{Config.MAIN_PAGE_TITLE}: {category}", content_items=category_items, categories = self.categories, parent_path = '../')) logger.info(f"Created {len(self.content_items)} content items.") \ No newline at end of file diff --git a/themes/default/static/css/theme.css b/themes/default/static/css/theme.css index 6f3aea3..b06ec20 100644 --- a/themes/default/static/css/theme.css +++ b/themes/default/static/css/theme.css @@ -3,38 +3,29 @@ body { "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } + .top_header { position: relative; - height: 200px; + height: 150px; background: rgb(70, 70, 124); - background-image: url("{{ parent_path }}static/images/header.jpg"); - background-size: cover; - background-position: center; - display: flex; - justify-content: center; - align-items: center; - text-align: center; + overflow: hidden; + object-fit: cover; } + .top_header_text { position: absolute; - bottom: 10px; - left: 10px; - color: white; + bottom: 0; + left: 0; + color: rgba(255,255,255,0.75); font-weight: bold; - font-size: 2.5rem; - background: rgba(0, 0, 0, 0.05); - border-radius: 5px; - padding: 10px 20px; - border-radius: 10px; + font-size: 1em; + line-height: 2em; + background: rgba(0, 0, 0, 0.85); + width: 100%; + text-decoration: none; } -/* -@media (min-width: 768px) { -.top_header_text { - font-size: 4rem; -} -} -*/ + article { font-size: 1.1rem; line-height: 1.6; diff --git a/themes/default/templates/default.html b/themes/default/templates/default.html index 9888fe6..19b3f90 100644 --- a/themes/default/templates/default.html +++ b/themes/default/templates/default.html @@ -13,26 +13,29 @@ -
-
-

{{ page_title }}

+
+
+ + +
+ -
- +
+ +
-
- -
{% block content %}