mobile friendly layout
This commit is contained in:
parent
d8f227344c
commit
3fb5570331
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#define RED 0
|
#define RED 0
|
||||||
#define GREEN 0
|
#define GREEN 0
|
||||||
#define BLUE 0
|
#define BLUE 255
|
||||||
|
|
||||||
static struct sinewave {
|
static struct sinewave {
|
||||||
float f, s, c;
|
float f, s, c;
|
||||||
|
@ -38,7 +38,7 @@ html {
|
|||||||
padding: 0.5em 0.5em;
|
padding: 0.5em 0.5em;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.nav ul {
|
nav ul {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -49,29 +49,29 @@ html {
|
|||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
border: 1px solid #bbbbdd;
|
border: 1px solid #bbbbdd;
|
||||||
}
|
}
|
||||||
.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 #bbbbdd;
|
||||||
border-left: 1px solid #ffffff;
|
border-left: 1px solid #ffffff;
|
||||||
}
|
}
|
||||||
.nav a {
|
nav a {
|
||||||
padding: 0.4em 1em;
|
padding: 0.4em 1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-family: arial, sans;
|
font-family: arial, sans;
|
||||||
}
|
}
|
||||||
.nav a:hover {
|
nav a:hover {
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
}
|
}
|
||||||
.nav a:link {
|
nav a:link {
|
||||||
color: #44d;
|
color: #44d;
|
||||||
}
|
}
|
||||||
.nav a:visited {
|
nav a:visited {
|
||||||
color: #44d;
|
color: #44d;
|
||||||
}
|
}
|
||||||
.nav a.here {
|
nav a.here {
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
}
|
}
|
||||||
@media only screen and (max-device-width: 480px) {
|
@media only screen and (max-device-width: 480px) {
|
||||||
|
@ -23,7 +23,7 @@ with open(argv[1], "r") as f:
|
|||||||
metadata = parse_metadata(argv[1])
|
metadata = parse_metadata(argv[1])
|
||||||
|
|
||||||
title = metadata.get("Title", "Oopsie, somebody forgot to name the article!")
|
title = metadata.get("Title", "Oopsie, somebody forgot to name the article!")
|
||||||
article_head = "\n# " + title + "\n---\n"
|
article_head = "\n# " + title + "\n"
|
||||||
|
|
||||||
brief = metadata.get("Brief")
|
brief = metadata.get("Brief")
|
||||||
if not brief is None:
|
if not brief is None:
|
||||||
|
@ -21,8 +21,6 @@ CSS: /style.css
|
|||||||
|
|
||||||
page = f"""Personal blog of one {choice(ADJECTIVES)} Veclav Talica.
|
page = f"""Personal blog of one {choice(ADJECTIVES)} Veclav Talica.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Articles ###
|
### Articles ###
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
|
|
||||||
HEAD_EMBED = """
|
HEAD_EMBED = """
|
||||||
<div style="display: flex;">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
|
|
||||||
## mjestečko ##
|
|
||||||
|
|
||||||
<ul class="nav">
|
|
||||||
<li><a href="/">main page</a></li>
|
|
||||||
<li><a href="https://git.poto.cafe/veclavtalica/mjestecko">source</a></li>
|
|
||||||
<li><a href="/tracks.html">tracks</a></li>
|
|
||||||
<li><a href="/feed.xml">rss</a></li>
|
|
||||||
<li><a href="/articles/mjestečko.html">about</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<strong>mjestečko</strong> /
|
||||||
|
<a href="/">main</a> /
|
||||||
|
<a href="https://git.poto.cafe/veclavtalica/mjestecko">source</a> /
|
||||||
|
<a href="/tracks.html">tracks</a> /
|
||||||
|
<a href="/feed.xml">rss</a> /
|
||||||
|
<a href="/articles/mjestečko.html">about</a>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
NOTICE = """
|
||||||
|
---
|
||||||
|
*Remember, - all you see here is free for use for any purpose whatsoever.*
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
TAIL_EMBED = """
|
TAIL_EMBED = """
|
||||||
---
|
|
||||||
*Remember, - all you see here is free for use for any purpose whatsoever.*
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -56,4 +56,4 @@ WEEKDAYS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def wrap_page(page: str) -> str:
|
def wrap_page(page: str) -> str:
|
||||||
return HEAD_EMBED + page + TAIL_EMBED
|
return HEAD_EMBED + page + NOTICE + TAIL_EMBED
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
from sys import argv, exit
|
from sys import argv, exit
|
||||||
from os import walk, path
|
from os import walk, path
|
||||||
|
|
||||||
|
from page_shares import HEAD_EMBED, TAIL_EMBED
|
||||||
|
|
||||||
if len(argv) <= 1:
|
if len(argv) <= 1:
|
||||||
print("No directory was supplied")
|
print("No directory was supplied")
|
||||||
exit(-1)
|
exit(-1)
|
||||||
@ -58,20 +60,10 @@ page = """<!DOCTYPE html>
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
"""
|
||||||
|
page += HEAD_EMBED
|
||||||
|
|
||||||
<div style="display: flex;">
|
page += """
|
||||||
<div>
|
|
||||||
<h2 id="mjestečko">mjestečko</h2>
|
|
||||||
<ul class="nav">
|
|
||||||
<li><a href="/">main page</a></li>
|
|
||||||
<li><a href="https://git.poto.cafe/veclavtalica/mjestecko">source</a></li>
|
|
||||||
<li><a href="/tracks.html">tracks</a></li>
|
|
||||||
<li><a href="/feed.xml">rss</a></li>
|
|
||||||
<li><a href="/articles/mjestečko.html">about</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h3 id="articles">Tracks</h3>
|
<h3 id="articles">Tracks</h3>
|
||||||
<p>.xm module tracks of my own. Btw, they're playable in browser :3</p>
|
<p>.xm module tracks of my own. Btw, they're playable in browser :3</p>
|
||||||
<p>Note that some files are rendered incorrectly.</p>
|
<p>Note that some files are rendered incorrectly.</p>
|
||||||
@ -90,8 +82,9 @@ for _, _, files in walk(argv[1]):
|
|||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|
||||||
page += """ </div>
|
page += TAIL_EMBED
|
||||||
</div>
|
|
||||||
|
page += """</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user