Nibbles & Bites
Table of Contents

This post is for me to test out all the features and styling of the website, and to make sure that if I change anything I don’t break any of it! This is also a show off for the website where others could check the functionality I implement and how it’s implemented on the frontend in the dev tools.

Embedding Code

I sometimes post code, and I want the syntax to be nicely formatted and the syntax highlighted according to the currently selected theme.

Without highlighting

cron
* * * * * <command to execute>
│ │ │ │ │
│ │ │ │ └─── day of the week (0 = Sunday, 6 = Saturday)
│ │ │ └─── month (1 - 12)
│ │ └─── day of the month (1 - 31)
│ └─── hour (0 - 23)
└─── minute (0 - 59)

With syntax highlighting

fibonacci.rs
/// Calculate the `n`th number in the fibonacci sequence recursively.
fn fibonacci(n: u32) -> u128 {
match n {
0 => 0,
1 => 1,
// We start from F₂ here to skip some tiny steps. Meaning that both the
// previous and current values would be a 1.
_ => fibonacci_impl(n - 2, 1, 1),
}
}
/// Inner tail recursive implementation function.
fn fibonacci_impl(n: u32, prev: u128, current: u128) -> u128 {
if n == 0 {
current
} else {
fibonacci_impl(n - 1, current, prev + current)
}
}

Inline code

We can also mark up inline code without syntax highlighting cron and with syntax highlighting u64{:rust}.

Picture embeds

2 pink caticorns (cats with a rainbow colored horn like a unicorn) to either side, facing towards the middle. In the middle there's the cursive text 'AliciaBytes'.
2 pink caticorns (cats with a rainbow colored horn like a unicorn) to either side, facing towards the middle. In the middle there's the cursive text 'AliciaBytes'.

Asides

Spoilers

I want to be able to put things between spoilers and content warnings depending on the situation to actually be considerate of the reader. For example inline spoilers . Or also big block spoilers:

CutenessActually a lot of people are very very cute!

Miscellaneous

There is also miscelaneous items, like the styling of horizontal rulers:


That have to be consistent with the site.