Skip to content

Commit

Permalink
change(references): Add references page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Longor1996 committed May 24, 2024
1 parent c2926f5 commit 2b9b64f
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
!themes/
!static/
!public/
!.github/
!.vscode/
10 changes: 5 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ section = "categories"
url = "/categories/"
weight = 10

#[[extra.menu.main]]
#name = "Blog"
#section = "blog"
#url = "/blog/"
#weight = 20
[[extra.menu.main]]
name = "References"
section = "references"
url = "/wiki/references"
weight = 20

[[extra.menu.main]]
name = "Projects"
Expand Down
10 changes: 10 additions & 0 deletions content/wiki/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "References"
description = "All the references."
path = "wiki/references"
template = "references.html"
[taxonomies]
categories = ["community"]
+++

<!-- References table data can be found in the "content/wiki/references.toml"-file next to this file. -->
24 changes: 12 additions & 12 deletions content/wiki/references.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,18 @@ url = "https://github.com/xpansive/ExpansiveTerrain/tree/1.0/src/main/java/com/x
title = "Understanding Minecraft Performance"
url = "http://optifog.blogspot.com/2011/08/understanding-minecraft-performance.html"

[minecraft-resourcepack-js]
title = "@xmcl/resourcepack - npm"
url = "https://www.npmjs.com/package/@xmcl/resourcepack?ref=morioh.com&utm_source=morioh.com"

[minecraft-resourcepack-rs]
title = "Parsing Minecraft asset files and resource packs in Rust."
url = "https://github.com/BGR360/minecraft-assets-rs"

[minecraft-mca-parser-rs]
title = "mca-parser: A library for parsing Minecraft's region files"
url = "https://crates.io/crates/mca-parser"

[planetminecraft]
title = "Planet Minecraft"
url = "https://www.planetminecraft.com/"
Expand Down Expand Up @@ -1231,18 +1243,6 @@ url = "https://www.redblobgames.com/x/1938-square-tiling-of-sphere/"
title = "Path-Tracing Workshop Part 1: Learn to Write a Path Tracer in GLSL"
url = "https://www.intel.com/content/www/us/en/developer/videos/path-tracing-workshop-part-1.html#gs.5etor7"

[minecraft-resourcepack-js]
title = "@xmcl/resourcepack - npm"
url = "https://www.npmjs.com/package/@xmcl/resourcepack?ref=morioh.com&utm_source=morioh.com"

[minecraft-resourcepack-rs]
title = "Parsing Minecraft asset files and resource packs in Rust."
url = "https://github.com/BGR360/minecraft-assets-rs"

[minecraft-mca-parser-rs]
title = "mca-parser: A library for parsing Minecraft's region files"
url = "https://crates.io/crates/mca-parser"

[rbs-preprint]
title = "Fast Sorting for Exact OIT of Complex Scenes"
url = "https://www.heuristic42.com/dl/rbs-preprint.pdf"
Expand Down
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ zola-serve: zola-install

line-count:
tokei . -e themes/ -e public/

link-grep:
rg "(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})" ./content/ -g '*.md' -o --trim -I --pcre2 | sort -u > links.log
1 change: 1 addition & 0 deletions sass/overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ a {

/* external links: indicator icon */
article &[href*="//"]:not(
.card-link,
[href*="voxel.wiki"], /* dont show on primary domain */
[href*="127.0.0.1"], /* dont show on localhost site */
[href*="localhost"], /* dont show on localhost site */
Expand Down
69 changes: 69 additions & 0 deletions templates/references.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{% extends "page.html" %}
{% block body %}{% set page_class="projects" %}{% endblock body %}
{% block content %}
<div class="wrap container" role="document">
<div class="content">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-10 col-xl-8">
<article>
<div class="page-header">
<h1>{{ page.title }}</h1>
</div>
{% if page.extra.lead %}<p class="lead">{{ page.extra.lead }}</p>{% endif %}
{{ page.content | safe }}

{% set references = load_data(path="content/wiki/references.toml", format="toml") %}
<small>
There are currently {{ references | length }} references;
the raw list can <a href="https://github.com/voxel-wiki/voxel-wiki.github.io/blob/main/content/wiki/references.toml">be found here</a>.
</small>
<style>
#references {
display: flex;
flex-flow: column nowrap;
gap: 1.5rem;
margin: 1rem 0;
}

body.dark #references .card {
background: rgba(0,0,0,0.25);
}
body.dark #references .card-header {
border-bottom-color: #333;
}
</style>
<div id="references" class="">{% for refname, reference in references %}
<!--
[SLUG]
title = "TITLE"
url = "URL"
-->
<section class="card">
<header class="card-header">
<h5 class="card-title" style="margin-top:0.5rem">
<a class="card-link" target="_blank" href="{{reference.url}}" id="{{refname}}">
{% if reference.title %}
{{reference.title}}
{% else %}
REF_TITLE_MISSING
{% endif %}
</a>
</h5>
<small class="card-subtitle"><code style="user-select: all">{{refname}}</code></small>
</header>
<!--
<main class="card-body">
?
</main>
<footer></footer>
-->
</section>
{% else %}
<!-- References list is empty?! -->
{% endfor %}</div>
</article>
</div>
</div>
</div>
</div>
{% endblock content %}

0 comments on commit 2b9b64f

Please sign in to comment.