css cleaning, convention developing for styles

This commit is contained in:
veclav talica 2024-03-31 15:46:53 +05:00
parent 0577a56127
commit 0a5a556f08
2 changed files with 24 additions and 21 deletions

View File

@ -2,7 +2,18 @@
:root { :root {
--bg-color: #111; --bg-color: #111;
--fg-color: #fff; --fg-color: #fff;
--hover-color: #e0e0e0;
--link-color: dodgerblue; --link-color: dodgerblue;
--nav-border-color: #bbbbdd;
}
}
@media only screen and (max-device-width: 480px) {
article, .container {
width: 100%;
}
html {
font-size: 13px;
} }
} }
@ -10,15 +21,15 @@
color: var(--fg-color); color: var(--fg-color);
text-decoration: none; text-decoration: none;
} }
a { a {
color: var(--link-color); color: var(--link-color);
} }
html { html {
font-size: 20px; font-size: 20px;
font-family: "Charter","Georgia",'Times New Roman',serif; font-family: "Charter", "Georgia", "Times New Roman", serif;
} }
body { body {
background-color: var(--bg-color); background-color: var(--bg-color);
line-height: 1.3; line-height: 1.3;
@ -65,15 +76,15 @@ html {
flex-wrap: nowrap; flex-wrap: nowrap;
font-size: 0.8em; font-size: 0.8em;
background-color: var(--bg-color); background-color: var(--bg-color);
border: 1px solid #bbbbdd; border: 1px solid var(--nav-border-color);
overflow: scroll; overflow: scroll;
} }
nav li:first-child { nav li:first-child {
border-left: none; border-left: none;
} }
nav li { nav li {
border-right: 1px solid #bbbbdd; border-right: 1px solid var(--nav-border-color);
border-left: 1px solid #ffffff; border-left: 1px solid var(--fg-color);
} }
nav a { nav a {
padding: 0.4em 1em; padding: 0.4em 1em;
@ -82,7 +93,7 @@ html {
font-family: arial, sans; font-family: arial, sans;
} }
nav a:hover { nav a:hover {
background-color: #e0e0e0; background-color: var(--hover-color);
} }
nav a:link { nav a:link {
color: var(--link-color); color: var(--link-color);
@ -91,15 +102,7 @@ html {
color: var(--link-color); color: var(--link-color);
} }
nav a.here { nav a.here {
background-color: #e0e0e0; background-color: var(--hover-color);
}
@media only screen and (max-device-width: 480px) {
article, .container {
width: 100%;
}
html {
font-size: 13px;
}
} }
img { img {

View File

@ -11,7 +11,7 @@ _navbar_lis = '\n'.join(f"""<li><a {' '.join(
_head = f""" _head = f"""
<div class="container"> <div class="container">
<nav class="custom-nav"> <nav>
<ul> <ul>
{_navbar_lis} {_navbar_lis}
</ul> </ul>