implement nav

This commit is contained in:
core 2023-06-13 17:33:21 -04:00
parent f89b05a084
commit 84b5d3b7cc
Signed by: core
GPG Key ID: FDBF740DADDCEECF
4 changed files with 143 additions and 62 deletions

47
nav.css Normal file
View File

@ -0,0 +1,47 @@
body {
margin: 0;
}
body > * {
box-sizing: border-box;
float: left;
padding: 4px;
}
#main {
position: absolute;
top: 0;
left: 192px;
width: calc(100% - 192px);
}
#nav {
width: 192px;
background-color: #cccccc;
position: fixed;
top: 0;
left: 0;
}
.nav-item {
padding: 0px 4px 0px 4px;
margin: 2px;
background-color: #800000;
color: #ddd;
display: block;
}
.nav-item:hover {
background-color: #ffffff;
color: #800000;
}
.nav {
width: 100%;
}
@media only screen and (max-width: 576px) {
#main, #nav {
width: 100%;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -71,8 +71,24 @@ fn generate_servershtml(config: &ListgenConfig) -> String {
<html>
<head>
<title>"e3team Servers"</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" href="nav.css" />
</head>
<body>
<div id="nav">
<div class="nav-section">
<span>"Navigation"</span>
<a class="nav-item" href="/">"About"</a>
<a class="nav-item" href="services.html">"Services"</a>
<a class="nav-item" href="servers.html">"Machines"</a>
</div>
<div class="nav-section">
<span>"another entry"</span>
<a class="nav-item" href="example">"example"</a>
</div>
</div>
<div id="main">
<h1>"e3team-owned servers"</h1>
<p>"e3team owns and controls several servers around the globe. Following is a list of them all:"</p>
<table style="border: 1px solid;">
@ -105,6 +121,7 @@ fn generate_servershtml(config: &ListgenConfig) -> String {
</table>
<p>"Generated automatically by e3t-listgen from "<a href="listing.yaml">"listing.yaml"</a>"."</p>
<a href="services.html">"View our services list"</a>
</div>
</body>
</html>
);
@ -116,8 +133,24 @@ fn generate_serviceslist(config: &ListgenConfig) -> String {
<html>
<head>
<title>"e3team Services"</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" href="nav.css" />
</head>
<body>
<div id="nav">
<div class="nav-section">
<span>"Navigation"</span>
<a class="nav-item" href="/">"About"</a>
<a class="nav-item" href="services.html">"Services"</a>
<a class="nav-item" href="servers.html">"Machines"</a>
</div>
<div class="nav-section">
<span>"another entry"</span>
<a class="nav-item" href="example">"example"</a>
</div>
</div>
<div id="main">
<h1>"e3team-hosted servers"</h1>
<p>"e3team hosts many services on it's servers around the globe. Many are public. Following is a list of them all:"</p>
<table style="border: 1px solid;">
@ -146,6 +179,7 @@ fn generate_serviceslist(config: &ListgenConfig) -> String {
</table>
<p>"Generated automatically by e3t-listgen from "<a href="listing.yaml">"listing.yaml"</a>"."</p>
<a href="servers.html">"View our server list"</a>
</div>
</body>
</html>
);