style code blocks, style tables, better projects

This commit is contained in:
avitex 2020-04-15 19:31:02 +10:00
parent fbef748bfb
commit 722ed9071c
Signed by: avitex
GPG Key ID: 38C76CBF3749D62C
6 changed files with 191 additions and 18 deletions

View File

@ -4,6 +4,7 @@ description = "Home of avitex"
compile_sass = true
highlight_code = true
highlight_theme = "1337"
build_search_index = true
generate_rss = true

91
content/projects.toml Normal file
View File

@ -0,0 +1,91 @@
status = { experimental = "red", development = "orange", published = "green" }
[project.rust-arae]
lang = "rust"
crate = "arae"
status = "experimental"
github = "avitex/rust-arae"
[project.rust-dnscat]
lang = "rust"
crate = "dnscat"
status = "development"
github = "avitex/rust-dnscat"
[project.rust-public-ip]
lang = "rust"
crate = "public-ip"
status = "published"
github = "avitex/rust-public-ip"
[project.mdbook-tera]
lang = "rust"
crate = "mdbook-tera"
status = "published"
github = "avitex/mdbook-tera"
[project.rust-xlff]
lang = "rust"
crate = "xlff"
status = "development"
github = "avitex/rust-xlff"
[project.rust-abuseipdb]
lang = "rust"
crate = "abuseipdb"
status = "published"
github = "avitex/rust-abuseipdb"
[project.rust-aliasable-deref-trait]
lang = "rust"
crate = "aliasable_deref_trait"
status = "published"
github = "avitex/rust-aliasable-deref-trait"
[project.rust-shared-box]
lang = "rust"
crate = "shared-box"
status = "development"
github = "avitex/rust-shared-box"
[project.rust-feast]
lang = "rust"
crate = "feast"
status = "experimental"
github = "avitex/rust-feast"
[project.battlelayer]
lang = "rust"
crate = "battlelayer"
status = "development"
github = "avitex/battlelayer"
[project.elixir-glicko]
lang = "elixir"
hex = "glicko"
status = "published"
github = "avitex/elixir-glicko"
[project.elixir-rcon]
lang = "elixir"
hex = "rcon"
status = "published"
github = "avitex/elixir-rcon"
[project.elixir-vultr]
lang = "elixir"
hex = "vultr"
status = "published"
github = "avitex/elixir-vultr"
[project.elixir-gitlab]
lang = "elixir"
hex = "gitlab"
status = "development"
github = "avitex/elixir-gitlab"
[project.typed-struct-cast]
lang = "elixir"
hex = "typed-struct-cast"
status = "development"
github = "avitex/typed-struct-cast"

View File

@ -8,22 +8,10 @@ description = "Project repositories, along with their associated state. PRs are
Project repositories, along with their associated state.
PRs are always welcome, see my [about page](@/about/_index.md) to contact me.
## Rust
- `arae` - [git](https://github.com/avitex/rust-arae) - `todo`, `v0.1`
- `dnscat2` - [git](https://github.com/avitex/rust-dnscat2) - `todo`, `v0.1`
- `public-ip` - [git](https://github.com/avitex/rust-public-ip) - `todo`, `v0.1`
- `mdbook-tera` - [git](https://github.com/avitex/mdbook-tera) - `v0.2`
- `xlff` [git](https://github.com/avitex/rust-xlff) - `todo`, `unpublished`
- `abuseipdb` - [git](https://github.com/avitex/rust-abuseipdb) - `todo`, `v0.2`
- `aliasable-deref-trait` - [git](https://github.com/avitex/rust-aliasable-deref-trait) - `todo`, `v0.2`
- `shared-box` - [git](https://github.com/avitex/rust-shared-box) - `todo`, `unpublished`
- `wamp-message` - [git](https://github.com/avitex/rust-wamp-message) - `dead`, `unpublished`
- `feast` - [git](https://github.com/avitex/feast) - `todo`, `experimental`, `v0.1`
- `battlelayer` - [git](https://github.com/avitex/battlelayer) - `todo`, `unpublished`
# Rust
## Elixir
- `glicko` - [git](https://github.com/avitex/elixir-glicko) - `v0.6`
- `rcon` - [git](https://github.com/avitex/elixir-rcon) - `v0.3`
- `vultr` - [git](https://github.com/avitex/elixir-vultr) - `todo`, `v0.3`
- `gitlab` - [git](https://github.com/avitex/elixir-gitlab) - `todo`, `unpublished`
- `typed-struct-cast` - [git](https://github.com/avitex/typed-struct-cast) - `todo`, `unpublished`
{{ projects(lang="rust") }}
# Elixir
{{ projects(lang="elixir") }}

View File

@ -136,6 +136,40 @@ p {
padding-bottom: 0.5rem;
}
pre {
background-color: $fg-color;
font-size: 0.8em;
overflow-x: auto;
padding: 0.8rem;
border-radius: 4px;
margin-bottom: 0.5rem;
border-left: 4px solid $red;
}
table {
border-collapse: collapse;
border-spacing: 0;
tr {
border-bottom: 1px solid $border-color;
}
th {
padding-top: 0.6em;
padding-bottom: 0.4em;
padding-left: 0.8em;
padding-right: 0.8em;
font-size: 0.9em;
font-family: $heading-font;
font-weight: normal;
background-color: $border-color;
}
td {
padding: 0.4em 0.6em;
}
}
code {
font-family: $mono-font;
background-color: $fg-color;
@ -144,6 +178,15 @@ code {
font-size: 0.75em;
}
img.badge, a.badge img {
vertical-align: middle;
}
.badge {
border: none;
text-decoration: none;
}
.muted {
color: $grey;
}

View File

@ -27,3 +27,15 @@
{%- endif -%}
{%- endif -%}
{% endmacro meta_desc %}
{% macro status_badge(status, desc, link, color) %}
{{ self::badge(type="badge", scope="status-" ~ status ~ "-" ~ color, desc=desc, link=link) }}
{% endmacro status_badge %}
{% macro badge(type, scope, desc, link) %}
{% if link %}
<a class="badge" href="{{ link }}"><img alt="{{ desc }}" src="https://img.shields.io/{{ type }}/{{ scope }}" /></a>
{% else %}
<img class="badge" alt="{{ desc }}" src="https://img.shields.io/{{ type }}/{{ scope }}" />
{% endif %}
{% endmacro link %}

View File

@ -0,0 +1,38 @@
{% import "macros.html" as macros %}
{% set data = load_data(path="content/projects.toml") %}
<table>
<thead>
<tr>
<th>Project</th>
<th>Links</th>
<th>Package</th>
<th>Maintenance</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for project_name, project in data.project %}
{% if project.lang == lang %}
<tr>
<td><code>{{ project_name }}</code></td>
<td><a href="https://github.com/{{ project.github }}">github</a></td>
<td>
{% if project.crate %}
{{ macros::badge(type="crates/v", scope=project.crate, desc="Rust crate", link="https://crates.io/" ~ project.crate) }}
{% endif %}
{% if project.hex %}
{{ macros::badge(type="hexpm/v", scope=project.hex, desc="Hex package", link="https://hex.pm/" ~ project.hex) }}
{% endif %}
</td>
<td>
{{ macros::status_badge(status=project.status, color=data.status[project.status], desc="Project status", link=false) }}
</td>
<td>
{{ macros::badge(type="github/issues", scope=project.github, desc="Github issues", link="https://github.com/" ~ project.github ~ "/issues") }}
{{ macros::badge(type="travis/com", scope=project.github ~ "/master", desc="Build status", link="https://travis-ci.com/" ~ project.github) }}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>