implement nav
This commit is contained in:
parent
f89b05a084
commit
84b5d3b7cc
|
@ -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
154
src/main.rs
154
src/main.rs
|
@ -71,40 +71,57 @@ fn generate_servershtml(config: &ListgenConfig) -> String {
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>"e3team Servers"</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>"e3team-owned servers"</h1>
|
<div id="nav">
|
||||||
<p>"e3team owns and controls several servers around the globe. Following is a list of them all:"</p>
|
<div class="nav-section">
|
||||||
<table style="border: 1px solid;">
|
<span>"Navigation"</span>
|
||||||
<tr>
|
<a class="nav-item" href="/">"About"</a>
|
||||||
<th style="border: 1px solid;">"Hostname"</th>
|
<a class="nav-item" href="services.html">"Services"</a>
|
||||||
<th style="border: 1px solid;">"Public?"</th>
|
<a class="nav-item" href="servers.html">"Machines"</a>
|
||||||
<th style="border: 1px solid;">"Public IP"</th>
|
</div>
|
||||||
<th style="border: 1px solid;">"Edge?"</th>
|
<div class="nav-section">
|
||||||
<th style="border: 1px solid;">"Domain Name"</th>
|
<span>"another entry"</span>
|
||||||
<th style="border: 1px solid;">"Ownership"</th>
|
<a class="nav-item" href="example">"example"</a>
|
||||||
<th style="border: 1px solid;">"Country"</th>
|
</div>
|
||||||
<th style="border: 1px solid;">"Region"</th>
|
</div>
|
||||||
<th style="border: 1px solid;">"Primary Admin(s)"</th>
|
<div id="main">
|
||||||
</tr>
|
<h1>"e3team-owned servers"</h1>
|
||||||
{ config.servers.iter().map(|u| {
|
<p>"e3team owns and controls several servers around the globe. Following is a list of them all:"</p>
|
||||||
html! (
|
<table style="border: 1px solid;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.hostname) }</td>
|
<th style="border: 1px solid;">"Hostname"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if u.public { "Yes" } else { "No" }) }</td>
|
<th style="border: 1px solid;">"Public?"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if let Some(ips) = &u.public_ips { ips.iter().map(|u| u.to_string()).collect::<Vec<_>>().join(", ") } else { "N/A".into() } ) }</td>
|
<th style="border: 1px solid;">"Public IP"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if u.edge { "Yes" } else { "No" }) }</td>
|
<th style="border: 1px solid;">"Edge?"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if let Some(domain) = &u.domain { domain.as_str() } else { "N/A" }) }</td>
|
<th style="border: 1px solid;">"Domain Name"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if matches!(u.ownership, ListgenConfigServerOwnership::Rented) { "Rented" } else { "Owned" }) }</td>
|
<th style="border: 1px solid;">"Ownership"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.country ) }</td>
|
<th style="border: 1px solid;">"Country"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.region ) }</td>
|
<th style="border: 1px solid;">"Region"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.admins.join(", ")) }</td>
|
<th style="border: 1px solid;">"Primary Admin(s)"</th>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
{ config.servers.iter().map(|u| {
|
||||||
})}
|
html! (
|
||||||
</table>
|
<tr>
|
||||||
<p>"Generated automatically by e3t-listgen from "<a href="listing.yaml">"listing.yaml"</a>"."</p>
|
<td style="border: 1px solid;">{ text!("{}", u.hostname) }</td>
|
||||||
<a href="services.html">"View our services list"</a>
|
<td style="border: 1px solid;">{ text!("{}", if u.public { "Yes" } else { "No" }) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", if let Some(ips) = &u.public_ips { ips.iter().map(|u| u.to_string()).collect::<Vec<_>>().join(", ") } else { "N/A".into() } ) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", if u.edge { "Yes" } else { "No" }) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", if let Some(domain) = &u.domain { domain.as_str() } else { "N/A" }) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", if matches!(u.ownership, ListgenConfigServerOwnership::Rented) { "Rented" } else { "Owned" }) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.country ) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.region ) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.admins.join(", ")) }</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
@ -116,36 +133,53 @@ fn generate_serviceslist(config: &ListgenConfig) -> String {
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>"e3team Services"</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>"e3team-hosted servers"</h1>
|
<div id="nav">
|
||||||
<p>"e3team hosts many services on it's servers around the globe. Many are public. Following is a list of them all:"</p>
|
<div class="nav-section">
|
||||||
<table style="border: 1px solid;">
|
<span>"Navigation"</span>
|
||||||
<tr>
|
<a class="nav-item" href="/">"About"</a>
|
||||||
<th style="border: 1px solid;">"Name"</th>
|
<a class="nav-item" href="services.html">"Services"</a>
|
||||||
<th style="border: 1px solid;">"Software"</th>
|
<a class="nav-item" href="servers.html">"Machines"</a>
|
||||||
<th style="border: 1px solid;">"Public?"</th>
|
</div>
|
||||||
<th style="border: 1px solid;">"Public URL"</th>
|
<div class="nav-section">
|
||||||
<th style="border: 1px solid;">"Hosted On"</th>
|
<span>"another entry"</span>
|
||||||
<th style="border: 1px solid;">"Backed Up"</th>
|
<a class="nav-item" href="example">"example"</a>
|
||||||
<th style="border: 1px solid;">"Primary Admin(s)"</th>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
{ config.services.iter().map(|u| {
|
<div id="main">
|
||||||
html! (
|
<h1>"e3team-hosted servers"</h1>
|
||||||
<tr>
|
<p>"e3team hosts many services on it's servers around the globe. Many are public. Following is a list of them all:"</p>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.name) }</td>
|
<table style="border: 1px solid;">
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.software) }</td>
|
<tr>
|
||||||
<td style="border: 1px solid;">{ text!("{}", if u.public { "Yes" } else { "No" }) }</td>
|
<th style="border: 1px solid;">"Name"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.url ) }</td>
|
<th style="border: 1px solid;">"Software"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.host) }</td>
|
<th style="border: 1px solid;">"Public?"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.backups ) }</td>
|
<th style="border: 1px solid;">"Public URL"</th>
|
||||||
<td style="border: 1px solid;">{ text!("{}", u.admins.join(", ")) }</td>
|
<th style="border: 1px solid;">"Hosted On"</th>
|
||||||
</tr>
|
<th style="border: 1px solid;">"Backed Up"</th>
|
||||||
)
|
<th style="border: 1px solid;">"Primary Admin(s)"</th>
|
||||||
})}
|
</tr>
|
||||||
</table>
|
{ config.services.iter().map(|u| {
|
||||||
<p>"Generated automatically by e3t-listgen from "<a href="listing.yaml">"listing.yaml"</a>"."</p>
|
html! (
|
||||||
<a href="servers.html">"View our server list"</a>
|
<tr>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.name) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.software) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", if u.public { "Yes" } else { "No" }) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.url ) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.host) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.backups ) }</td>
|
||||||
|
<td style="border: 1px solid;">{ text!("{}", u.admins.join(", ")) }</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue