Prototype out crate list table styles

This commit is contained in:
Nico Burns 2022-03-13 20:29:46 +00:00
parent 447ac8dba1
commit f3dade3308
3 changed files with 83 additions and 6 deletions

View file

@ -1,4 +1,4 @@
use tera::{Tera, Context};
use tera::Tera;
use once_cell::sync::Lazy;
pub(crate) static TERA: Lazy<Tera> = Lazy::new(|| {

View file

@ -1,10 +1,50 @@
* {
box-sizing: border-box;
}
body {
font-family: system-ui, Arial, Helvetica, sans-serif;
background-color: #333;
color: #FFF;
}
#content {
max-width: 1024px;
margin: 0 auto;
}
h1.logo {
font-size: 5rem;
font-weight: normal;
}
h3 {
font-size: 1.6em;
font-weight: normal;
}
a, a:hover, a:visited, a:active {
color: #3298dc
}
table {
border-collapse: collapse;
/* border: 1px solid #f9f9f9; */
}
.full-width {
width: 100%;
}
table th {
padding: 6px 18px 6px 6px;
text-align: left;
font-size: 0.8em;
white-space: nowrap;
color: #EAEAEA;
}
table td {
padding: 6px 12px;
border: 1px solid #EAEAEA;
}

View file

@ -2,14 +2,51 @@
{% block title %}Crate List{% endblock title %}
{% block head %}
{{ super() }}
<style type="text/css">
.important { color: #336699; }
</style>
{{ super() }}
<style type="text/css">
.important { color: #336699; }
</style>
{% endblock head %}
{% block content %}
<center>
<h1 class="logo">Blessed.rs</h1>
<h1 class="logo">Blessed.rs</h1>
</center>
<h3>Core Crates</h3>
<table class="full-width">
<thead>
<tr>
<th width="200">Use Case</th>
<th>Recommendation</th>
<!-- <th>Latest Version</th> -->
<!-- <th>Last Updated</th> -->
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Random Numbers</td>
<td><a href="https://docs.rs/rand">rand</a></td>
<!-- <td>0.8.5</td> -->
<!-- <td>5 days ago</td> -->
<td>De facto random number generation library split out from the standard library</td>
</tr>
</tbody>
<tbody>
<tr>
<td rowspan="2" style="vertical-align: top">Lazily initialized static variables</td>
<td><a href="https://docs.rs/once_cell">once_cell</a></td>
<!-- <td>0.8.5</td> -->
<!-- <td>5 days ago</td> -->
<td>Newer crate with more ergonomic API. On track to be incorporated into the standard library. Should be preferred for all new projects.</td>
</tr>
<tr>
<td><a href="https://docs.rs/lazy_static">lazy_static</a></td>
<!-- <td>0.8.5</td> -->
<!-- <td>5 days ago</td> -->
<td>De facto random number generation library split out from the standard library</td>
</tr>
</tbody>
</table>
{% endblock content %}