distribusi is a content management system for the web that produces static pages based on the file system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

100 lines
1.3 KiB

def html_head(stylesheet):
header = """
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Generated with distribusi https://git.vvvvvvaria.org/rra/distribusi -->
<meta http-equiv="content-type" content="text/html; charset=utf-8">
{}
</head>
<body>
""".format(stylesheet)
return header
html_footer = """
</body>
</html>
"""
styles = """
body{
position: absolute;
top:0;
left:0;
margin:3.5em 1em 1em 1em;
}
.stylesheet{
display: none;
}
h1.foldername{
margin: 0 0 1em 1.5em;
}
a{
text-decoration:none;
}
div{
width: 640px;
float:left;
padding:1em;
}
div.folder, div.README{
float: none;
padding: 0.5em 1em;
}
a.dir::before{
content:"📁";
font-size:18px;
padding-right: 1em;
text-decoration:none;
}
a.text::before{
content:"";
font-size:18px;
padding-right: 1em;
text-decoration:none;
}
a.back::before{
content:"";
font-size:18px;
padding-right: 1.25em;
text-decoration:none;
}
a.back{
position: fixed;
width:100%;
background-color:white;
top:0;
left:0;
padding:1em 1.5em;
}
.image{
max-width: 100%;
}
.pdf {
width:100%;
}
video {
width:640px;
}
.filename{
display:block;
font-size:small;
margin-top:0.5em;
}
@media only screen and (max-width: 600px) {
body{
width:calc(100% - 2em);
}
div {
width:calc(100% - 2em);
}
div a img{
width:100%;
}
}
"""