Fix articles

This commit is contained in:
Bruno Rybársky 2024-02-22 18:16:42 +01:00
parent c905e929f6
commit 37d8577629
10 changed files with 20 additions and 10 deletions

@ -213,13 +213,13 @@ async function submitarticle(){
"Nastala chyba pri pridávaní článku", "Nastala chyba pri pridávaní článku",
false false
); );
togglearticlecreate(); await togglearticlecreate();
} }
async function articleInit(){ async function articleInit(){
let articleContainerElement = document.getElementById("articlecreatecontainer"); let articleContainerElement = document.getElementById("articlecreatecontainer");
articleContainerElement.addEventListener("keyup", function (ev) { articleContainerElement.addEventListener("keyup", function (ev) {
if(ev.which === 27){ if(ev.key === "Escape"){
togglearticlecreate(); togglearticlecreate();
} }
}) })

@ -355,14 +355,12 @@ button:hover {
} }
header.ye-span:hover + body{ header.ye-span:hover + body{
background: url('/assets/images/ye.jpg') !important; background: url('/assets/images/ye.jpg') repeat !important;
background-repeat: repeat !important;
background-size: 10% !important; background-size: 10% !important;
} }
body:has(.ye-span:hover) { body:has(.ye-span:hover) {
background: url('/assets/images/ye.jpg') !important; background: url('/assets/images/ye.jpg') repeat !important;
background-repeat: repeat !important;
background-size: 10% !important; background-size: 10% !important;
} }
@ -396,7 +394,11 @@ div#articleslist{
position: relative; position: relative;
} }
div#articleslist > article > div#articleinfo{ div#articleslist > article > div.articleinfo > *{
width: fit-content;
}
div#articleslist > article > div.articleinfo{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }

@ -27,7 +27,7 @@ function inlineLocalStylesFromHref($inputString): string
// Minify the CSS content // Minify the CSS content
$cssContent = minifyCss($cssContent); $cssContent = minifyCss($cssContent);
return "<style>{$cssContent}</style>"; return "<style>$cssContent</style>";
}, $inputString); }, $inputString);
} }
@ -41,7 +41,7 @@ function inlineScriptFromSrc($inputString): string
// Minify the JavaScript content // Minify the JavaScript content
$jsContent = minifyJs($jsContent); $jsContent = minifyJs($jsContent);
return "<script>{$jsContent}</script>"; return "<script>$jsContent</script>";
}, $inputString); }, $inputString);
} }

@ -41,6 +41,9 @@ function generateNavigation(): string
$site_location = "/" . $site_dir . "/" . $routerConfig["default_page"]; $site_location = "/" . $site_dir . "/" . $routerConfig["default_page"];
$stnm = $routerRequest["site_name"];
echo "a: $site_dir b: $stnm";
if ($routerRequest["site_name"] == $site_dir) { if ($routerRequest["site_name"] == $site_dir) {
//this is the current page //this is the current page
$site_class = "class=\"navsite_link active\""; $site_class = "class=\"navsite_link active\"";

@ -54,7 +54,7 @@ function addNewsArticle($title="Nazov", $body="Obsah") :array
if ($query->affected_rows > 0) { if ($query->affected_rows > 0) {
$output["Status"] = "Success"; $output["Status"] = "Success";
} }
$query->close();
} }
$query->close();
return $output; return $output;
} }

@ -1,3 +1,4 @@
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
<page minimal_permission_level="1" secret="no" page_title="Domov"></page> <page minimal_permission_level="1" secret="no" page_title="Domov"></page>
<header> <header>
<h1 class="title">Vitaj, na tejto úžasnej stránke</h1> <h1 class="title">Vitaj, na tejto úžasnej stránke</h1>

@ -1,3 +1,4 @@
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
<page minimal_permission_level="1" secret="no" page_title="Memes"></page> <page minimal_permission_level="1" secret="no" page_title="Memes"></page>
<header> <header>
<h1 class="title">Adlerka Memes</h1> <h1 class="title">Adlerka Memes</h1>

@ -1,3 +1,4 @@
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
<page minimal_permission_level="2" secret="no" page_title="Zošit"></page> <page minimal_permission_level="2" secret="no" page_title="Zošit"></page>
<header> <header>
<h1 class="title">Adlerka Zošit</h1> <h1 class="title">Adlerka Zošit</h1>

@ -1,3 +1,4 @@
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
<page minimal_permission_level="1" secret="no" page_title="Domov"></page> <page minimal_permission_level="1" secret="no" page_title="Domov"></page>
<header> <header>
<h1 class="title">Vitaj na oficiálnej AdlerkaSMP stránke</h1> <h1 class="title">Vitaj na oficiálnej AdlerkaSMP stránke</h1>

@ -1,2 +1,3 @@
<!--suppress HtmlUnknownTag, HtmlUnknownTag -->
<page minimal_permission_level="1" secret="no" page_title="AdlerkaSMP info"></page> <page minimal_permission_level="1" secret="no" page_title="AdlerkaSMP info"></page>
<h1>Vitaj na oficiálnej stránke Informácii o AdlerkaSMP</h1> <h1>Vitaj na oficiálnej stránke Informácii o AdlerkaSMP</h1>