Compare commits
No commits in common. "fa55c8dc17e014ad5873a7f5eae9bf81a5b1116a" and "7f8d171825e235d6a7a55063345c557984f9e7fa" have entirely different histories.
fa55c8dc17
...
7f8d171825
|
@ -1,9 +0,0 @@
|
|||
<h2>Mods</h2>
|
||||
<ul>
|
||||
{% for mod_id in mods %}
|
||||
{% let (mod_link, mod_title) = mod_id|drg_mod %}
|
||||
<li>
|
||||
<a href="{{ mod_link }}" target="_blank">{{ mod_title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
|
@ -24,7 +24,15 @@
|
|||
</ul>
|
||||
|
||||
{% if let Some(mods) = speedrun.mods %}
|
||||
{% include "drg-mods.html" %}
|
||||
<h2>Mods</h2>
|
||||
<ul>
|
||||
{% for mod_id in mods %}
|
||||
{% let (mod_link, mod_title) = mod_id|drg_mod %}
|
||||
<li>
|
||||
<a href="{{ mod_link }}" target="_blank">{{ mod_title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if let Some(chapters) = speedrun.chapters %}
|
||||
|
@ -46,12 +54,6 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if let Some(drg) = drg %}
|
||||
{% if let Some(mods) = drg.mods %}
|
||||
{% include "drg-mods.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<iframe
|
||||
src="https://www.youtube-nocookie.com/embed/{{ video_id }}"
|
||||
title="Embedded YouTube video player"
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
id = "_9xtYCGWtn4"
|
||||
page_title = "No HUD Hazard 5 Mining Expedition"
|
||||
tags = ["Deep Rock Galactic", "No HUD"]
|
||||
|
||||
[drg]
|
||||
mods = ["brighter-objects"]
|
||||
---
|
||||
|
||||
## Description
|
||||
|
|
|
@ -7,7 +7,6 @@ Get the DRG mod link and title from a given ID.
|
|||
*/
|
||||
pub fn drg_mod(mod_id: &str) -> askama::Result<(String, &str)> {
|
||||
let mods = std::collections::HashMap::<_, _>::from_iter([
|
||||
("brighter-objects", "Brighter Objects"),
|
||||
("drglib", "DRGLib"),
|
||||
("simplemissiontimer", "SimpleMissionTimer"),
|
||||
]);
|
||||
|
|
|
@ -11,9 +11,6 @@ mod filters;
|
|||
#[derive(Debug, Template)]
|
||||
#[template(path = "video.html")]
|
||||
pub struct VideoTemplate {
|
||||
/// Deep Rock Galactic data.
|
||||
pub drg: Option<DeepRockGalacticData>,
|
||||
|
||||
/// The title of the page.
|
||||
pub page_title: String,
|
||||
|
||||
|
@ -29,9 +26,6 @@ pub struct VideoTemplate {
|
|||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct VideoData {
|
||||
/// Deep Rock Galactic data.
|
||||
pub drg: Option<DeepRockGalacticData>,
|
||||
|
||||
/// The YouTube video ID.
|
||||
pub id: String,
|
||||
|
||||
|
@ -61,12 +55,6 @@ pub struct SpeedrunData {
|
|||
pub mods: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct DeepRockGalacticData {
|
||||
/// Deep Rock Galactic mods used in the run.
|
||||
pub mods: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
pub fn write_all(public_dir: &Path) -> Result<()> {
|
||||
let video_datas = {
|
||||
let mut data = vec![];
|
||||
|
@ -102,7 +90,6 @@ pub fn write_all(public_dir: &Path) -> Result<()> {
|
|||
fs::create_dir_all(&video_dir)?;
|
||||
|
||||
let template = VideoTemplate {
|
||||
drg: video_data.drg,
|
||||
page_title: video_data.page_title,
|
||||
rendered_markdown: comrak::markdown_to_html(
|
||||
&markdown,
|
||||
|
|
Loading…
Reference in New Issue