From ca31135c3604550cf0000d109952ece5037fad9d Mon Sep 17 00:00:00 2001 From: Heiko August Date: Mon, 27 Apr 2020 08:37:48 +0200 Subject: [PATCH 1/3] Change: add lang attribute to the main template, to the language files and to the processing scripts --- index.php | 7 ++++--- lang/lang.de.inc.php | 1 + lang/lang.en.inc.php | 1 + lang/lang.it.inc.php | 1 + lang/lang.pl.inc.php | 1 + lang/lang.sv.inc.php | 3 ++- personal/template.tpl | 2 +- scripts/do_template.php | 2 ++ 8 files changed, 13 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index d2453e8..c31e40c 100644 --- a/index.php +++ b/index.php @@ -29,9 +29,10 @@ } require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php'); - $c['meta']['robots'] = "noindex, follow"; - $c['meta']['description'] = htmlspecialchars(strip_tags(str_replace("\n", '', JLOG_DESCRIPTION)), ENT_QUOTES); - $c['meta']['title'] = $l['index_topic']; + $c['meta']['robots'] = "noindex, follow"; + $c['meta']['description'] = htmlspecialchars(strip_tags(str_replace("\n", '', JLOG_DESCRIPTION)), ENT_QUOTES); + $c['meta']['title'] = $l['index_topic']; + $c['meta']['html_language'] = $l['html_language']; $c['main'] = ""; $cc = array(); diff --git a/lang/lang.de.inc.php b/lang/lang.de.inc.php index b614caa..efb2805 100644 --- a/lang/lang.de.inc.php +++ b/lang/lang.de.inc.php @@ -86,6 +86,7 @@ "err404_message" => "Diese Seite existiert leider nicht. Versuchen Sie sie über die Suchfunktion zu finden.", "language" => "de-de", +"html_language" => "de", "locale" => array('de_DE.UTF-8', 'de_DE.UTF-8@euro', 'de_DE'), "date_format" => "%d. %B %Y um %H:%M Uhr", "date_format_comment" => "%d.%m.%Y", diff --git a/lang/lang.en.inc.php b/lang/lang.en.inc.php index 49ce8d6..9b6abf2 100644 --- a/lang/lang.en.inc.php +++ b/lang/lang.en.inc.php @@ -86,6 +86,7 @@ "err404_message" => "There is no such page. Please try the search engine on this page.", "language" => "en-gb", +"html_language" => "en", "locale" => array( "en_US", "us", "verUS" ), "date_format" => "%d. %B %Y um %H:%M Uhr", "date_format_comment" => "%d.%m.%Y", diff --git a/lang/lang.it.inc.php b/lang/lang.it.inc.php index 692aea7..0e84224 100644 --- a/lang/lang.it.inc.php +++ b/lang/lang.it.inc.php @@ -86,6 +86,7 @@ "err404_message" => "Non ci sono file riguardanti la ricerca in questa pagina. Perfavore prova a usare il motore di ricerca di questa pagina.", "language" => "it-it", +"html_language" => "it", "locale" => array( "it_IT", "it" ), "date_format" => "%d. %B %Y alle %H:%M", "date_format_comment" => "%d.%m.%Y", diff --git a/lang/lang.pl.inc.php b/lang/lang.pl.inc.php index 94f5ef6..b5aefef 100644 --- a/lang/lang.pl.inc.php +++ b/lang/lang.pl.inc.php @@ -85,6 +85,7 @@ "err404_message" => "Nie ma takiej strony. Prosze użyć przeglądarki na tej stronie.", "language" => "en-gb", +"html_language" => "pl", "locale" => array( "en_US", "us", "verUS" ), "date_format" => "%d. %B %Y um %H:%M Uhr", "date_format_comment" => "%d.%m.%Y", diff --git a/lang/lang.sv.inc.php b/lang/lang.sv.inc.php index 2213030..8f07b46 100644 --- a/lang/lang.sv.inc.php +++ b/lang/lang.sv.inc.php @@ -85,7 +85,8 @@ "err404_topic" => "Error 404 - Sidan hittades inte", "err404_message" => "Denna sida existerar tyvärr inte. Försök hitta den genom sökfunktionen.", -"language" => "sv-se", +"language" => "sv-se", +"html_language" => "sv", "locale" => array('sv_SE', 'sve_sve'), "date_format" => "%Y-%B-%d kl %H:%M", "date_format_comment" => "%Y-%m-%d", diff --git a/personal/template.tpl b/personal/template.tpl index d07b1c4..a20f4eb 100644 --- a/personal/template.tpl +++ b/personal/template.tpl @@ -1,5 +1,4 @@ - <jlog:title /> - <jlog:website /> @@ -33,6 +32,7 @@
+
diff --git a/scripts/do_template.php b/scripts/do_template.php index b61bea6..0c86fe1 100644 --- a/scripts/do_template.php +++ b/scripts/do_template.php @@ -54,6 +54,7 @@ if(defined('JLOG_ADMIN')) { $_search = array ( "", + "", "", "", "", @@ -81,6 +82,7 @@ $_search = array ( $_replace = array ( $l['language'], + $l['html_language'], htmlspecialchars(JLOG_WEBSITE, ENT_QUOTES), htmlspecialchars($c['meta']['title']), $c['meta']['aditionalheader'], From b13bfd52bb39c4c6da53143848faa7e0ec10855f Mon Sep 17 00:00:00 2001 From: Heiko August Date: Mon, 27 Apr 2020 11:16:16 +0200 Subject: [PATCH 2/3] Change: change main template to HTML5 - semantic HTML5-elements in the main template - matching selectors for screen.css and print.css (no change of rules) --- personal/css/print.css | 6 ++-- personal/css/screen.css | 16 ++++----- personal/template.tpl | 79 ++++++++++++++++++++++------------------- 3 files changed, 53 insertions(+), 48 deletions(-) diff --git a/personal/css/print.css b/personal/css/print.css index ec681cd..63de6f4 100644 --- a/personal/css/print.css +++ b/personal/css/print.css @@ -3,7 +3,7 @@ */ /* -- hide -- */ - #subnav, .skip, .entryform, .hidecomments, #entryform, hr { display: none; } + aside, #subnav, .skip, .entryform, .hidecomments, #entryform, hr { display: none; } /* -- main settings -- */ body { font-family: Georgia, "Times New Roman", Times, serif; } @@ -12,8 +12,8 @@ /* -- links -- */ a { text-decoration: none; } - #main a:after { font-size: 70%; content:" <"attr(href)">"; } - #main .meta a:after, #main h2 a:after { content:""; } + main a:after { font-size: 70%; content:" <"attr(href)">"; } + main .meta a:after, main h2 a:after { content:""; } /* -- comments -- */ ul#commentslist { list-style-type: none; } diff --git a/personal/css/screen.css b/personal/css/screen.css index 4b9600e..4bd6e8c 100644 --- a/personal/css/screen.css +++ b/personal/css/screen.css @@ -26,7 +26,7 @@ border-top: 0; position: relative; } - #main { + main { margin: 0 0 0 25px; padding: 190px 0 2em 0; width: 64.5%; @@ -34,7 +34,7 @@ } /* Clearfix-Hack */ - #main:after { + main:after { content: "."; display: block; height: 0; @@ -42,11 +42,11 @@ visibility: hidden; } - #main {display: inline-table;} + main {display: inline-table;} /* Hides from IE-mac \*/ - * html #main {height: 1%;} - #main {display: block;} + * html main {height: 1%;} + main {display: block;} /* End hide from IE-mac */ /* -- logo -- */ @@ -98,7 +98,7 @@ .rss img { vertical-align: middle; border: 0; width: 94px; height: 15px; } /* -- footer -- */ - #footer { + footer { clear: both; height: 60px; background: url(img/footer.png) no-repeat top center; @@ -132,13 +132,13 @@ /* -- pictures -- */ .fl { float: left; margin: 0 1em 1em 0; } .fr { float: right; margin: 0 0 1em 1em; } - #main img, dl.img { + main img, dl.img { border: 1px solid #aaa; padding: 2px; max-width: 95%; } dl.img dt { padding: 0; margin: 0;} - #main dl.img dt img { margin: 0; padding: 0; max-width: 100%; border: none; } + main dl.img dt img { margin: 0; padding: 0; max-width: 100%; border: none; } dl.img dd { margin: 0; padding: 0 0.3em; font-size: 90%; } .teaser { clear: both; } diff --git a/personal/template.tpl b/personal/template.tpl index a20f4eb..6096758 100644 --- a/personal/template.tpl +++ b/personal/template.tpl @@ -1,40 +1,45 @@ - - - <jlog:title /> - <jlog:website /> - - - - - - -

-
-

- -
- + + + <jlog:title /> - <jlog:website /> + + + + + + +

+
+ +
+

+
+ +
+ +
+
 
- -
- + From f9d6025a756352e2c1e461adcb2b7dc606eb02c1 Mon Sep 17 00:00:00 2001 From: Heiko August Date: Mon, 27 Apr 2020 11:23:48 +0200 Subject: [PATCH 3/3] Change: replace inputs of type submit with button elements Attributes 'type="submit"' got removed because it's the default type. Therefore the attribute can be omitted. --- admin/login.php | 2 +- admin/media/select-picture.php | 2 +- admin/media/upload-picture.php | 4 ++-- admin/media/upload-teaser.php | 2 +- error404.php | 2 +- personal/template.tpl | 2 +- plugins/CommentCloser.jplug.php | 2 +- scripts/JlogUpdater.php | 2 +- search.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/login.php b/admin/login.php index f288259..deeb7b5 100644 --- a/admin/login.php +++ b/admin/login.php @@ -63,7 +63,7 @@ $c['main'] = '

-

+

'; diff --git a/admin/media/select-picture.php b/admin/media/select-picture.php index a0ef43f..a2b42e2 100644 --- a/admin/media/select-picture.php +++ b/admin/media/select-picture.php @@ -25,7 +25,7 @@ if($_GET['p']) { ?>


-

+


-

+

">

- + ">

- + ".$l['err404_topic']."\n

".$l['err404_message']."

"; $c['main'] .= '

-

+

'; require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php'); diff --git a/personal/template.tpl b/personal/template.tpl index 6096758..21033e6 100644 --- a/personal/template.tpl +++ b/personal/template.tpl @@ -22,7 +22,7 @@

-

+

diff --git a/plugins/CommentCloser.jplug.php b/plugins/CommentCloser.jplug.php index a443d7b..6994dea 100644 --- a/plugins/CommentCloser.jplug.php +++ b/plugins/CommentCloser.jplug.php @@ -91,7 +91,7 @@ EOT; $output .= << -.

+

Nach der angegeben Zeit können Beiträge nicht mehr kommentiert werden.

EOT; diff --git a/scripts/JlogUpdater.php b/scripts/JlogUpdater.php index cfd878b..9194840 100644 --- a/scripts/JlogUpdater.php +++ b/scripts/JlogUpdater.php @@ -52,7 +52,7 @@ class JlogUpdater $html .= $class->getForm($l); $version = $this->versions[$version]; } - $html .= '

'; + $html .= '

'; $html .= ''; return $html; } diff --git a/search.php b/search.php index 0f95136..9a2d10a 100644 --- a/search.php +++ b/search.php @@ -9,7 +9,7 @@ $c['main'] .= '

-

+

';