From d8764831fd93707fc3b175202a9fbd2fdd1380af Mon Sep 17 00:00:00 2001 From: Usbac Date: Sat, 7 Sep 2024 14:51:15 +0200 Subject: [PATCH] Improve HTML structure --- app/views/admin/base.php | 50 +++++++------- app/views/admin/login.php | 36 +++++----- app/views/admin/partials/media_header.php | 1 - app/views/admin/password_restore.php | 20 +++--- app/views/themes/default/blog.php | 66 +++++++++---------- app/views/themes/default/partials/header.php | 12 ++-- .../themes/default/partials/posts_page.php | 2 +- app/views/themes/default/post.php | 18 ++--- public/assets/css/themes/default/main.css | 14 ++-- 9 files changed, 113 insertions(+), 106 deletions(-) diff --git a/app/views/admin/base.php b/app/views/admin/base.php index 387c92a..8293c65 100755 --- a/app/views/admin/base.php +++ b/app/views/admin/base.php @@ -63,33 +63,33 @@ include('admin/partials/snackbar.php') ?> sectionStart('content') ?> sectionEnd() ?> - - - -sectionStart('extra') ?> -sectionEnd() ?> + updateMetaThemeColor(is_light_enabled); + get('#toggle-theme').dataset.theme = theme; + document.cookie = 'theme=' + theme + ';path=/'; + }); + + sectionStart('extra') ?> + sectionEnd() ?> + + \ No newline at end of file diff --git a/app/views/admin/login.php b/app/views/admin/login.php index 3d4c266..1c3b23b 100755 --- a/app/views/admin/login.php +++ b/app/views/admin/login.php @@ -34,24 +34,24 @@ - - - + + + diff --git a/app/views/admin/partials/media_header.php b/app/views/admin/partials/media_header.php index 843768c..fb66d8d 100644 --- a/app/views/admin/partials/media_header.php +++ b/app/views/admin/partials/media_header.php @@ -114,7 +114,6 @@ - - diff --git a/app/views/themes/default/blog.php b/app/views/themes/default/blog.php index d303195..39bf81d 100755 --- a/app/views/themes/default/blog.php +++ b/app/views/themes/default/blog.php @@ -16,62 +16,62 @@ include('themes/default/partials/header.php') ?>
-
+

:

-
+ -
+

:

-
+ -
- +
+ <?= t('author') ?>

-
+ -
+
include('themes/default/partials/posts_page.php') ?>

-
+
include('themes/default/partials/footer.php') ?> - - - + document.getElementById('posts').insertAdjacentHTML('beforeend', res.html); + }) + .finally(() => btn.classList.remove('loading')); + } + + + diff --git a/app/views/themes/default/partials/header.php b/app/views/themes/default/partials/header.php index fd3d755..7a8c46f 100755 --- a/app/views/themes/default/partials/header.php +++ b/app/views/themes/default/partials/header.php @@ -9,13 +9,17 @@ diff --git a/app/views/themes/default/partials/posts_page.php b/app/views/themes/default/partials/posts_page.php index ca38540..e86268a 100755 --- a/app/views/themes/default/partials/posts_page.php +++ b/app/views/themes/default/partials/posts_page.php @@ -24,7 +24,7 @@
- + <?= t('author') ?>
diff --git a/app/views/themes/default/post.php b/app/views/themes/default/post.php index a56ef51..2b2e892 100755 --- a/app/views/themes/default/post.php +++ b/app/views/themes/default/post.php @@ -15,7 +15,7 @@ include('themes/default/partials/header.php') ?>
-
+
-
-
+ +
-
+ -
+
-
+ -
+

@@ -76,7 +76,7 @@
-
+
include('themes/default/partials/footer.php') ?> diff --git a/public/assets/css/themes/default/main.css b/public/assets/css/themes/default/main.css index 9ab70e5..e875c78 100755 --- a/public/assets/css/themes/default/main.css +++ b/public/assets/css/themes/default/main.css @@ -45,6 +45,10 @@ header > * { margin: 0 40px; } +header ul { + list-style-type: none; +} + .logo-img { display: flex; align-items: center; @@ -92,11 +96,11 @@ header nav a { text-align: center; } -header nav a[active] { +header nav a[data-active] { color: var(--main-color); } -header nav a[active]:before, +header nav a[data-active]:before, header nav a:hover:before { width: 100%; } @@ -318,7 +322,7 @@ button:not(.loading):hover { margin-bottom: 12px; } -section { +.section { min-width: var(--section-max-width); max-width: var(--section-max-width); margin: 0 auto; @@ -495,7 +499,7 @@ article a { margin: 0 30px; } - section { + .section { min-width: initial; flex-direction: column; align-items: center; @@ -504,7 +508,7 @@ article a { margin-right: var(--mobile-margin); } - section > img { + .section > img { max-width: 100%; }