From 53dde169d89d2a32465c88a0084d523d470add2b Mon Sep 17 00:00:00 2001 From: danpros Date: Sat, 6 Jan 2024 11:13:27 +0700 Subject: [PATCH] Compatibility with old theme Reverting it for compatibility with old theme. --- system/htmly.php | 180 +++------------------------------- themes/blog/main.html.php | 53 ++++++---- themes/blog/post.html.php | 16 +-- themes/blog/profile.html.php | 8 +- themes/blog/static.html.php | 2 +- themes/clean/main.html.php | 34 ++++--- themes/clean/post.html.php | 16 +-- themes/clean/profile.html.php | 10 +- themes/logs/main.html.php | 34 ++++--- themes/logs/post.html.php | 16 +-- themes/logs/profile.html.php | 10 +- themes/readable/main.html.php | 34 ++++--- themes/readable/post.html.php | 16 +-- themes/readable/profile.html.php | 10 +- themes/readable/static.html.php | 2 +- themes/twentyfifteen/README.md | 5 + themes/twentyfifteen/css/style.css | 2 +- themes/twentyfifteen/css/style_v2.css | 2 +- themes/twentyfifteen/layout.html.php | 5 - themes/twentyfifteen/main.html.php | 38 +++---- themes/twentyfifteen/post.html.php | 14 +-- themes/twentyfifteen/profile.html.php | 14 +-- themes/twentysixteen/README.md | 5 + themes/twentysixteen/css/style.css | 2 +- themes/twentysixteen/layout.html.php | 1 - themes/twentysixteen/main.html.php | 36 +++---- themes/twentysixteen/post.html.php | 14 +-- themes/twentysixteen/profile.html.php | 14 +-- 28 files changed, 232 insertions(+), 361 deletions(-) diff --git a/system/htmly.php b/system/htmly.php index 8da26c8..0a1ece5 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -67,17 +67,7 @@ get('/index', function () { 'p' => $front, 'static' => $front, 'type' => 'is_frontpage', - 'is_front' => true, - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_front' => true ), $layout); @@ -116,17 +106,7 @@ get('/index', function () { 'breadcrumb' => '', 'bodyclass' => 'no-posts', 'type' => 'is_frontpage', - 'is_front' => true, - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_front' => true ), $layout); die; @@ -142,17 +122,7 @@ get('/index', function () { 'breadcrumb' => '', 'pagination' => has_pagination($total, $perpage, $page), 'type' => 'is_frontpage', - 'is_front' => true, - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_front' => true ), $layout); } @@ -284,17 +254,7 @@ get('/author/:name', function ($name) { 'bodyclass' => 'in-profile author-' . $name, 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Profile_for') . ' ' . $author->name, 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => true, - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_profile' => true ), $layout); die; } @@ -312,17 +272,7 @@ get('/author/:name', function ($name) { 'bodyclass' => 'in-profile author-' . $name, 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Profile_for') . ' ' . $author->name, 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => true, - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_profile' => true ), $layout); }); @@ -1934,17 +1884,7 @@ get('/category/:category', function ($category) { 'bodyclass' => 'in-category category-' . strtolower($category), 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $desc->title, 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => true, - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_category' => true ), $layout); }); @@ -2160,17 +2100,7 @@ get('/type/:type', function ($type) { 'bodyclass' => 'in-type type-' . strtolower($type), 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . ucfirst($type), 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => true, - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_type' => true ), $layout); }); @@ -2253,17 +2183,7 @@ get('/tag/:tag', function ($tag) { 'bodyclass' => 'in-tag tag-' . strtolower($tag), 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Posts_tagged') . ' ' . tag_i18n($tag), 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => true, - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_tag' => true ), $layout); }); @@ -2356,17 +2276,7 @@ get('/archive/:req', function ($req) { 'bodyclass' => 'in-archive archive-' . strtolower($req), 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Archive_for') . ' ' . $timestamp, 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => true, - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_archive' => true ), $layout); }); @@ -2463,17 +2373,7 @@ get('/search/:keyword', function ($keyword) { 'bodyclass' => 'in-search search-' . strtolower($keyword), 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Search_results_for') . ' ' . $keyword, 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => true, - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_search' => true ), $layout); }); @@ -2639,17 +2539,7 @@ get('/post/:name', function ($name) { 'prev' => has_prev($prev), 'next' => has_next($next), 'type' => $var, - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => true, - 'is_page' => '', - 'is_subpage' => '', + 'is_post' => true ), $layout); }); @@ -3075,17 +2965,7 @@ get('/:static', function ($static) { 'bodyclass' => 'in-blog', 'breadcrumb' => '' . config('breadcrumb.home') . ' » Blog', 'pagination' => has_pagination($total, $perpage, $page), - 'is_front' => '', - 'is_blog' => true, - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => '', + 'is_blog' => true ), $layout); } elseif ($static === 'front') { @@ -3157,17 +3037,7 @@ get('/:static', function ($static) { 'type' => 'staticPage', 'prev' => static_prev($prev), 'next' => static_next($next), - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => true, - 'is_subpage' => '', + 'is_page' => true ), $layout); } }); @@ -3464,17 +3334,7 @@ get('/:static/:sub', function ($static, $sub) { 'prev' => static_prev($prev), 'next' => static_next($next), 'type' => 'subPage', - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => '', - 'is_page' => '', - 'is_subpage' => true, + 'is_subpage' => true ), $layout); }); @@ -3745,17 +3605,7 @@ get('/:year/:month/:name', function ($year, $month, $name) { 'prev' => has_prev($prev), 'next' => has_next($next), 'type' => $var, - 'is_front' => '', - 'is_blog' => '', - 'is_category' => '', - 'is_search' => '', - 'is_archive' => '', - 'is_type' => '', - 'is_tag' => '', - 'is_profile' => '', - 'is_post' => true, - 'is_page' => '', - 'is_subpage' => '', + 'is_post' => true ), $layout); }); diff --git a/themes/blog/main.html.php b/themes/blog/main.html.php index 7ea3c7b..ffefce6 100644 --- a/themes/blog/main.html.php +++ b/themes/blog/main.html.php @@ -1,48 +1,59 @@ - + - -
-
-
-
-

title;?>

-
- body; ?> -
-
-
+ + +
+
+
+
+

title;?>

+
+ body; ?> +
+
+
+
-
+ + -
+ +
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?>
- link) { ?> + link)) { ?>

title;?>

title;?>

@@ -56,7 +67,7 @@ - url ?>> - Edit'; } ?> + Edit'; } ?>

@@ -77,7 +88,7 @@
- + diff --git a/themes/blog/post.html.php b/themes/blog/post.html.php index c4e9567..e24d3c1 100644 --- a/themes/blog/post.html.php +++ b/themes/blog/post.html.php @@ -1,5 +1,5 @@ - +
@@ -7,28 +7,28 @@
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?>
- link) { ?> + link)) { ?>

title;?>

title;?>

@@ -57,10 +57,10 @@

- + - +
diff --git a/themes/blog/profile.html.php b/themes/blog/profile.html.php index e684b95..d05b574 100644 --- a/themes/blog/profile.html.php +++ b/themes/blog/profile.html.php @@ -1,5 +1,5 @@ - +
@@ -11,7 +11,7 @@

- +
  • @@ -27,8 +27,8 @@
- - + + \ No newline at end of file diff --git a/themes/blog/static.html.php b/themes/blog/static.html.php index 27fe66f..95afb61 100644 --- a/themes/blog/static.html.php +++ b/themes/blog/static.html.php @@ -1,5 +1,5 @@ - +
diff --git a/themes/clean/main.html.php b/themes/clean/main.html.php index cbd9eae..030e780 100644 --- a/themes/clean/main.html.php +++ b/themes/clean/main.html.php @@ -1,14 +1,16 @@ - + - -
-

title;?>

-
- body; ?> + + +
+

title;?>

+
+ body; ?> +
-
+ @@ -22,7 +24,7 @@ $i++; ?>
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -36,24 +38,24 @@ - url ?>> - Edit'; } ?> + Edit'; } ?>
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -66,13 +68,13 @@
- +
- + - +
diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index 80f97c7..7d2721f 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -1,12 +1,12 @@ - +
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -18,22 +18,22 @@ - Permalink
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -70,10 +70,10 @@
- + - +
diff --git a/themes/clean/profile.html.php b/themes/clean/profile.html.php index 591a58f..63c0238 100644 --- a/themes/clean/profile.html.php +++ b/themes/clean/profile.html.php @@ -1,5 +1,5 @@ - +
@@ -9,7 +9,7 @@

- + - +
- + - +
diff --git a/themes/logs/main.html.php b/themes/logs/main.html.php index f51aed9..8e0fea5 100644 --- a/themes/logs/main.html.php +++ b/themes/logs/main.html.php @@ -1,19 +1,21 @@ - + - -
-

title;?>

-
- body; ?> + + +
+

title;?>

+
+ body; ?> +
-
+
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -27,24 +29,24 @@ - url ?>> - Edit'; } ?> + Edit'; } ?>
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -57,13 +59,13 @@
- +
- + - +
diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index ce4cb1a..8271fac 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -1,12 +1,12 @@ - +
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -18,22 +18,22 @@ - Permalink
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -70,10 +70,10 @@
- + « - + »
diff --git a/themes/logs/profile.html.php b/themes/logs/profile.html.php index 5a6124b..30310e5 100644 --- a/themes/logs/profile.html.php +++ b/themes/logs/profile.html.php @@ -1,5 +1,5 @@ - +
@@ -9,7 +9,7 @@

- + - +
- + - +
diff --git a/themes/readable/main.html.php b/themes/readable/main.html.php index 0ca72b7..4950bb3 100644 --- a/themes/readable/main.html.php +++ b/themes/readable/main.html.php @@ -1,19 +1,21 @@ - + - -
-

title;?>

-
- body; ?> + + +
+

title;?>

+
+ body; ?> +
-
+
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -27,24 +29,24 @@ - url ?>> - Edit'; } ?> + Edit'; } ?>
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -57,12 +59,12 @@
- +
- + - +
diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index db520d4..7a90be6 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -1,12 +1,12 @@ - +
- link) { ?> + link)) { ?>

title ?> →

title ?>

@@ -18,22 +18,22 @@ - Permalink
- image) { ?> + image)) { ?> - video) { ?> + video)) { ?> - audio) { ?> + audio)) { ?> - quote) { ?> + quote)) { ?> @@ -68,10 +68,10 @@
- + - +
diff --git a/themes/readable/profile.html.php b/themes/readable/profile.html.php index 136900c..8bbf5bd 100644 --- a/themes/readable/profile.html.php +++ b/themes/readable/profile.html.php @@ -1,5 +1,5 @@ - +
@@ -9,7 +9,7 @@

- + - +
- + - +
diff --git a/themes/readable/static.html.php b/themes/readable/static.html.php index 480c9fc..969ced9 100644 --- a/themes/readable/static.html.php +++ b/themes/readable/static.html.php @@ -1,5 +1,5 @@ - + diff --git a/themes/twentyfifteen/README.md b/themes/twentyfifteen/README.md index d2d4e24..7e2272c 100644 --- a/themes/twentyfifteen/README.md +++ b/themes/twentyfifteen/README.md @@ -1,6 +1,11 @@ # HTMLy Theme Twenty Fifteen WordPress Twenty Fifteen ported to HTMLy. +## Installations + - Upload and extract the zip file into themes directory. + - Rename the extracted folder to `twentyfifteen`. + - Change the `views.root` using `http://www.example.com/admin/config` to `themes/twentyfifteen` + ## License See the LICENSE.txt diff --git a/themes/twentyfifteen/css/style.css b/themes/twentyfifteen/css/style.css index 7aca5d4..a98104b 100644 --- a/themes/twentyfifteen/css/style.css +++ b/themes/twentyfifteen/css/style.css @@ -880,7 +880,7 @@ a:focus { content: "\f516"; } -.social-navigation a[href*="/feed"]:before { +.social-navigation a[href$="/feed/rss"]:before { content: "\f413"; } diff --git a/themes/twentyfifteen/css/style_v2.css b/themes/twentyfifteen/css/style_v2.css index bba4372..16aa9f4 100644 --- a/themes/twentyfifteen/css/style_v2.css +++ b/themes/twentyfifteen/css/style_v2.css @@ -881,7 +881,7 @@ a:focus { content: "\f516"; } -.social-navigation a[href*="/feed"]:before { +.social-navigation a[href$="/feed/rss"]:before { content: "\f413"; } diff --git a/themes/twentyfifteen/layout.html.php b/themes/twentyfifteen/layout.html.php index c876824..cb96800 100644 --- a/themes/twentyfifteen/layout.html.php +++ b/themes/twentyfifteen/layout.html.php @@ -47,11 +47,6 @@