This commit is contained in:
2022-01-24 15:39:44 +02:00
4 changed files with 113 additions and 63 deletions

View File

@@ -159,43 +159,7 @@ Released : 20110306
<link rel="shortcut icon" href="{resource}/mirva.ico"/>
<title>{page_title}</title>
<link href="{resource}/style.css" rel="stylesheet" type="text/css" media="screen" />
<script>
function r(f){{/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}}
r(function(){{
create_nav();
}});
function create_nav() {{
let navis = document.getElementsByClassName("navigation");
for (let i = 0; i<navis.length; i++) {{
if (i==navis.length-1) {{
navis[i].appendChild(create_button("up", navis[0]));
continue;
}}
if (navis[i-1]) {{
navis[i].appendChild(create_button("up", navis[i-1]));
}} else {{
navis[i].appendChild(create_button("up", document.body));
}}
if (navis[i+1]) {{
navis[i].appendChild(create_button("down", navis[i+1]));
}}
}}
}}
function create_button(direction, to) {{
let container = document.createElement('div');
container.classList.add("float_" + direction);
let button = document.createElement('img');
button.src = "{resource}/arrow_" + direction + ".png";
button.classList.add("navigation_button");
button.onclick = function(){{
to.parentElement.scrollIntoView({{behavior: "smooth"}});
}};
container.appendChild(button);
return container
}}
</script>
<script src="{resource}/mirva.js"></script>
</head>
<body>
<div id="wrapper">
@@ -304,6 +268,7 @@ function create_button(direction, to) {{
"arrow_down.png",
"banner.jpg",
"mirva.ico",
"mirva.js",
):
if os.path.exists(os.path.join(self.resource_dir, f)):
continue