Change styling a bit
This commit is contained in:
parent
b313808b9c
commit
f7559c02e1
|
@ -5,8 +5,6 @@ created_at = "2024-11-02T05:13:44+01:00"
|
||||||
|
|
||||||
# Why I love arcaea
|
# Why I love arcaea
|
||||||
|
|
||||||
_Tuesday, October 10, 2024_
|
|
||||||
|
|
||||||
## What is arcaea
|
## What is arcaea
|
||||||
- explain the base mechanics
|
- explain the base mechanics
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,11 @@ This article contains a highly subjective tier list of most of the games I've pl
|
||||||
|
|
||||||
{ role="tier-list" }
|
{ role="tier-list" }
|
||||||
``` =yaml
|
``` =yaml
|
||||||
|
id: games-tier-list
|
||||||
|
tiers:
|
||||||
- name: Beyond
|
- name: Beyond
|
||||||
id: beyond
|
id: beyond
|
||||||
elements:
|
members:
|
||||||
- alt: Arcaea
|
- alt: Arcaea
|
||||||
id: arcaea
|
id: arcaea
|
||||||
image: arcaea.png
|
image: arcaea.png
|
||||||
|
@ -19,6 +21,42 @@ This article contains a highly subjective tier list of most of the games I've pl
|
||||||
- alt: Noita
|
- alt: Noita
|
||||||
id: noita
|
id: noita
|
||||||
image: noita.png
|
image: noita.png
|
||||||
|
- name: Masterpiece
|
||||||
|
id: masterpiece
|
||||||
|
members:
|
||||||
|
- alt: Tunic
|
||||||
|
id: tunic
|
||||||
|
image: tunic.ico
|
||||||
|
- alt: Ultrakill
|
||||||
|
id: ultrakill
|
||||||
|
image: ultrakill.png
|
||||||
|
- alt: The Talos Principle
|
||||||
|
id: talos
|
||||||
|
image: thetalosprinciple.jpg
|
||||||
|
- name: Amazing
|
||||||
|
id: amazing
|
||||||
|
members:
|
||||||
|
- alt: Celeste
|
||||||
|
id: celeste
|
||||||
|
image: celeste.png
|
||||||
|
- alt: "Rain World: Downpour"
|
||||||
|
id: downpour
|
||||||
|
image: downpour.jpg
|
||||||
|
- alt: Hollow Knight
|
||||||
|
id: hollow-knight
|
||||||
|
image: hollow-knight.png
|
||||||
|
- alt: Slay the Spire
|
||||||
|
id: slay-the-spire
|
||||||
|
image: slaythespire.png
|
||||||
|
- alt: Hade
|
||||||
|
id: hades
|
||||||
|
image: hades.ico
|
||||||
|
- alt: Portal 2
|
||||||
|
id: portal2
|
||||||
|
image: portal2.png
|
||||||
|
- alt: Baba is you
|
||||||
|
id: baba
|
||||||
|
image: babaisyou.png
|
||||||
```
|
```
|
||||||
|
|
||||||
``` =html
|
``` =html
|
||||||
|
@ -141,4 +179,4 @@ Ultrakill is a game all about doing cool shit. There's so many instances where y
|
||||||
|
|
||||||
After each level, the game rates you on three axes: kills, time, and style. Improving until you can chain together stylish combos in order to P-rank (i.e. perfect) a hard level is super fun. Ultrakill has some of my favourite boss fights in all of gaming, all to the tune of a soundtrack that goes incredibly hard.
|
After each level, the game rates you on three axes: kills, time, and style. Improving until you can chain together stylish combos in order to P-rank (i.e. perfect) a hard level is super fun. Ultrakill has some of my favourite boss fights in all of gaming, all to the tune of a soundtrack that goes incredibly hard.
|
||||||
|
|
||||||
The game has some technical issues (it often forgets the resolution you configure in the settings after alt-tabbing around, but this seems to be an issue a lot of Unity games have, so I'll add it to the ever-growing list of justicications for me hating engines). The community seems to be a bit predisposed to spoiling people on gameplay elements, so if you want to go in blind, I recommend staying away from any kind of content related to the game.
|
The game has some technical issues (it often forgets the resolution you configure in the settings after alt-tabbing around, but this seems to be an issue a lot of Unity games have, so I'll add it to the ever-growing list of justicications for me hating engines). The community seems to be a bit predisposed to spoiling people on gameplay elements, so if you want to go in blind, I recommend staying away from any kind of content related to the game.^
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
body {
|
body {
|
||||||
font: 100%/1.6 sans-serif;
|
font: 100%/1.6 sans-serif;
|
||||||
max-width: 70ch;
|
max-width: 43em;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,16 @@ h6 {
|
||||||
a {
|
a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
/* Note: I need to check whether this only aligns things better with the font I use */
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-content {
|
||||||
|
max-width: 40em;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/* {{{ Asides*/
|
/* {{{ Asides*/
|
||||||
.aside {
|
.aside {
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
|
@ -95,7 +101,7 @@ img.aside-icon {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}}*/
|
/* }}}*/
|
||||||
|
/* {{{ Tier lists*/
|
||||||
.tier-list {
|
.tier-list {
|
||||||
background: #444;
|
background: #444;
|
||||||
|
|
||||||
|
@ -194,3 +200,4 @@ img.aside-icon {
|
||||||
}
|
}
|
||||||
/* }}}*/
|
/* }}}*/
|
||||||
}
|
}
|
||||||
|
/* }}}*/
|
||||||
|
|
96
src/html.rs
96
src/html.rs
|
@ -161,7 +161,7 @@ impl<'s> Writer<'s> {
|
||||||
if matches!(ty, LinkType::Email) {
|
if matches!(ty, LinkType::Email) {
|
||||||
out.write_str("mailto:")?;
|
out.write_str("mailto:")?;
|
||||||
}
|
}
|
||||||
write_attr(dst, &mut out)?;
|
write_attr_contents(dst, &mut out)?;
|
||||||
out.write_char('"')?;
|
out.write_char('"')?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ impl<'s> Writer<'s> {
|
||||||
|
|
||||||
character
|
character
|
||||||
.parts()
|
.parts()
|
||||||
.try_for_each(|part| write_attr(part, &mut out))?;
|
.try_for_each(|part| write_attr_contents(part, &mut out))?;
|
||||||
renderer.next(&mut out)?;
|
renderer.next(&mut out)?;
|
||||||
} else if label == "title" {
|
} else if label == "title" {
|
||||||
let title = attrs.get_value("title").ok_or_else(|| {
|
let title = attrs.get_value("title").ok_or_else(|| {
|
||||||
|
@ -224,7 +224,7 @@ impl<'s> Writer<'s> {
|
||||||
|
|
||||||
title
|
title
|
||||||
.parts()
|
.parts()
|
||||||
.try_for_each(|part| write_attr(part, &mut out))?;
|
.try_for_each(|part| write_attr_contents(part, &mut out))?;
|
||||||
renderer.next(&mut out)?;
|
renderer.next(&mut out)?;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
@ -253,28 +253,29 @@ impl<'s> Writer<'s> {
|
||||||
Container::LinkDefinition { .. } => return Ok(()),
|
Container::LinkDefinition { .. } => return Ok(()),
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut write_attribs = true;
|
let mut write_attr_contentsibs = true;
|
||||||
if matches!(
|
if matches!(
|
||||||
c,
|
c,
|
||||||
Container::Div {
|
Container::Div {
|
||||||
class: "aside" | "long-aside" | "char-aside"
|
class: "aside" | "long-aside" | "char-aside"
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
write_attribs = false;
|
write_attr_contentsibs = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if write_attribs {
|
if write_attr_contentsibs {
|
||||||
// {{{ Write attributes
|
// {{{ Write attributes
|
||||||
let mut id_written = false;
|
let mut id_written = false;
|
||||||
let mut class_written = false;
|
let mut class_written = false;
|
||||||
|
|
||||||
if write_attribs {
|
if write_attr_contentsibs {
|
||||||
for (a, v) in attrs.unique_pairs() {
|
for (a, v) in attrs.unique_pairs() {
|
||||||
let is_class = a == "class";
|
let is_class = a == "class";
|
||||||
let is_id = a == "id";
|
let is_id = a == "id";
|
||||||
if (!is_id || !id_written) && (!is_class || !class_written) {
|
if (!is_id || !id_written) && (!is_class || !class_written) {
|
||||||
write!(out, r#" {}=""#, a)?;
|
write!(out, r#" {}=""#, a)?;
|
||||||
v.parts().try_for_each(|part| write_attr(part, &mut out))?;
|
v.parts()
|
||||||
|
.try_for_each(|part| write_attr_contents(part, &mut out))?;
|
||||||
out.write_char('"')?;
|
out.write_char('"')?;
|
||||||
|
|
||||||
id_written |= is_id;
|
id_written |= is_id;
|
||||||
|
@ -284,32 +285,31 @@ impl<'s> Writer<'s> {
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
// {{{ Write default ids/classes
|
// {{{ Write default ids/classes
|
||||||
if let Container::Heading {
|
match c {
|
||||||
id,
|
Container::Heading { id, .. } if !id_written => {
|
||||||
has_section: false,
|
write_attr("id", id, &mut out)?;
|
||||||
..
|
}
|
||||||
}
|
Container::Section { id, .. } => {
|
||||||
| Container::Section { id } = &c
|
write_attr("aria-labeledby", id, &mut out)?;
|
||||||
{
|
}
|
||||||
if !id_written {
|
Container::Div { class } if !class.is_empty() && !class_written => {
|
||||||
out.write_str(r#" id=""#)?;
|
out.write_str(r#" class=""#)?;
|
||||||
write_attr(id, &mut out)?;
|
write_class(c, false, &mut out)?;
|
||||||
out.write_char('"')?;
|
out.write_char('"')?;
|
||||||
}
|
}
|
||||||
// TODO: do I not want this to add onto the provided class?
|
Container::Math { .. }
|
||||||
} else if (matches!(c, Container::Div { class } if !class.is_empty())
|
| Container::List {
|
||||||
|| matches!(
|
kind: ListKind::Task(..),
|
||||||
c,
|
..
|
||||||
Container::Math { .. }
|
}
|
||||||
| Container::List {
|
| Container::TaskListItem { .. }
|
||||||
kind: ListKind::Task(..),
|
if !class_written =>
|
||||||
..
|
{
|
||||||
} | Container::TaskListItem { .. }
|
out.write_str(r#" class=""#)?;
|
||||||
)) && !class_written
|
write_class(c, false, &mut out)?;
|
||||||
{
|
out.write_char('"')?;
|
||||||
out.write_str(r#" class=""#)?;
|
}
|
||||||
write_class(c, false, &mut out)?;
|
_ => {}
|
||||||
out.write_char('"')?;
|
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ impl<'s> Writer<'s> {
|
||||||
out.write_str("><code>")?;
|
out.write_str("><code>")?;
|
||||||
} else {
|
} else {
|
||||||
out.write_str(r#"><code class="language-"#)?;
|
out.write_str(r#"><code class="language-"#)?;
|
||||||
write_attr(language, &mut out)?;
|
write_attr_contents(language, &mut out)?;
|
||||||
out.write_str(r#"">"#)?;
|
out.write_str(r#"">"#)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@ impl<'s> Writer<'s> {
|
||||||
match &c {
|
match &c {
|
||||||
Container::Heading { id, .. } => {
|
Container::Heading { id, .. } => {
|
||||||
out.write_str(r##"<a href="#"##)?;
|
out.write_str(r##"<a href="#"##)?;
|
||||||
write_attr(id, &mut out)?;
|
write_attr_contents(id, &mut out)?;
|
||||||
out.write_str(r#"">◇</a> "#)?;
|
out.write_str(r#"">◇</a> "#)?;
|
||||||
}
|
}
|
||||||
Container::Image(..) => {
|
Container::Image(..) => {
|
||||||
|
@ -411,7 +411,7 @@ impl<'s> Writer<'s> {
|
||||||
Container::Image(src, ..) => {
|
Container::Image(src, ..) => {
|
||||||
if !src.is_empty() {
|
if !src.is_empty() {
|
||||||
out.write_str(r#"" src=""#)?;
|
out.write_str(r#"" src=""#)?;
|
||||||
write_attr(src, &mut out)?;
|
write_attr_contents(src, &mut out)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
out.write_str(r#"">"#)?;
|
out.write_str(r#"">"#)?;
|
||||||
|
@ -483,13 +483,18 @@ impl<'s> Writer<'s> {
|
||||||
if wc < 400 {
|
if wc < 400 {
|
||||||
write!(&mut out, "{}", wc)?;
|
write!(&mut out, "{}", wc)?;
|
||||||
} else if wc < 1000 {
|
} else if wc < 1000 {
|
||||||
|
write!(&mut out, "{}", wc / 10 * 10)?;
|
||||||
|
} else if wc < 2000 {
|
||||||
write!(&mut out, "{}", wc / 100 * 100)?;
|
write!(&mut out, "{}", wc / 100 * 100)?;
|
||||||
} else {
|
} else {
|
||||||
write!(&mut out, "{} thousand", wc / 1000)?;
|
write!(&mut out, "{} thousand", wc / 1000)?;
|
||||||
}
|
}
|
||||||
} else if label == "reading_duration" {
|
} else if label == "reading_duration" {
|
||||||
let minutes = meta.word_count / 200;
|
let minutes = meta.word_count / 200;
|
||||||
if minutes < 10 {
|
if minutes == 0 {
|
||||||
|
let seconds = meta.word_count * 60 / 200;
|
||||||
|
write!(&mut out, "very short {seconds} second")?;
|
||||||
|
} else if minutes < 10 {
|
||||||
write!(&mut out, "short {minutes} minute")?;
|
write!(&mut out, "short {minutes} minute")?;
|
||||||
} else if minutes < 20 {
|
} else if minutes < 20 {
|
||||||
write!(&mut out, "somewhat short {minutes} minute")?;
|
write!(&mut out, "somewhat short {minutes} minute")?;
|
||||||
|
@ -533,7 +538,7 @@ impl<'s> Writer<'s> {
|
||||||
// }}}
|
// }}}
|
||||||
// {{{ Raw string
|
// {{{ Raw string
|
||||||
Event::Str(s) => match self.states.last() {
|
Event::Str(s) => match self.states.last() {
|
||||||
Some(State::TextOnly) => write_attr(s, &mut out)?,
|
Some(State::TextOnly) => write_attr_contents(s, &mut out)?,
|
||||||
Some(State::Raw) => out.write_str(s)?,
|
Some(State::Raw) => out.write_str(s)?,
|
||||||
Some(State::Math(display)) => {
|
Some(State::Math(display)) => {
|
||||||
let config = pulldown_latex::RenderConfig {
|
let config = pulldown_latex::RenderConfig {
|
||||||
|
@ -590,7 +595,8 @@ impl<'s> Writer<'s> {
|
||||||
out.write_str("<hr")?;
|
out.write_str("<hr")?;
|
||||||
for (a, v) in attrs.unique_pairs() {
|
for (a, v) in attrs.unique_pairs() {
|
||||||
write!(out, r#" {}=""#, a)?;
|
write!(out, r#" {}=""#, a)?;
|
||||||
v.parts().try_for_each(|part| write_attr(part, &mut out))?;
|
v.parts()
|
||||||
|
.try_for_each(|part| write_attr_contents(part, &mut out))?;
|
||||||
out.write_char('"')?;
|
out.write_char('"')?;
|
||||||
}
|
}
|
||||||
out.write_str(">")?;
|
out.write_str(">")?;
|
||||||
|
@ -683,10 +689,18 @@ fn write_text(s: &str, out: impl std::fmt::Write) -> std::fmt::Result {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn write_attr(s: &str, out: impl std::fmt::Write) -> std::fmt::Result {
|
fn write_attr_contents(s: &str, out: impl std::fmt::Write) -> std::fmt::Result {
|
||||||
write_escape(s, true, out)
|
write_escape(s, true, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn write_attr(attr: &str, content: &str, mut out: impl std::fmt::Write) -> std::fmt::Result {
|
||||||
|
write!(&mut out, r#" {attr}=""#)?;
|
||||||
|
write_attr_contents(content, &mut out)?;
|
||||||
|
out.write_char('"')?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
fn write_escape(
|
fn write_escape(
|
||||||
mut s: &str,
|
mut s: &str,
|
||||||
escape_quotes: bool,
|
escape_quotes: bool,
|
||||||
|
@ -721,8 +735,8 @@ fn write_datetime<T: TimeZone>(
|
||||||
let datetime = datetime.to_utc();
|
let datetime = datetime.to_utc();
|
||||||
write!(
|
write!(
|
||||||
&mut out,
|
&mut out,
|
||||||
"<time datetime={}>{}</time>",
|
r#"<time datetime="{}">{}</time>"#,
|
||||||
datetime,
|
datetime.to_rfc3339(),
|
||||||
datetime.format("%a, %d %b %Y")
|
datetime.format("%a, %d %b %Y")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
<hr />
|
<hr />
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{content}}
|
<section class="article-content">{{content}}</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
Loading…
Reference in a new issue