Compare commits

...

2 commits

Author SHA1 Message Date
a7ae878c5d
update PR docs to include https
All checks were successful
Deploy website / deploy (push) Successful in 11s
2024-09-16 14:12:36 +02:00
ad2d56f585
move https from code to the webring 2024-09-16 14:12:01 +02:00
3 changed files with 13 additions and 16 deletions

View file

@ -19,10 +19,9 @@ async fn next(
if let Some((i, _)) = members.iter().enumerate().find(|(_, member)| member.name == *name) {
let next_index = (i + 1) % members.len();
let next_site = &members[next_index].site;
let next_url = format!("https://{next_site}/");
return Response::PermanentRedirect()
.header(header::LOCATION, next_url)
.header(header::LOCATION, next_site)
.header(header::CACHE_CONTROL, "no-store")
.take();
}
@ -41,10 +40,9 @@ async fn prev(
if let Some((i, _)) = members.iter().enumerate().find(|(_, member)| member.name == *name) {
let prev_index = if i == 0 { members.len() - 1 } else { i - 1 };
let prev_site = &members[prev_index].site;
let prev_url = format!("https://{prev_site}/");
return Response::PermanentRedirect()
.header(header::LOCATION, prev_url)
.header(header::LOCATION, prev_site)
.header(header::CACHE_CONTROL, "no-store")
.take();
}
@ -61,10 +59,9 @@ async fn rand(
) -> impl web::Responder {
let rand_index = thread_rng().gen_range(0..members.len());
let rand_site = &members[rand_index].site;
let rand_url = format!("https://{rand_site}/");
Response::PermanentRedirect()
.header(header::LOCATION, rand_url)
.header(header::LOCATION, rand_site)
.header(header::CACHE_CONTROL, "no-store")
.take()
}

View file

@ -41,9 +41,9 @@ in {
in /*html*/''
<li>
<div class="webring-member">
<a href="https://${member.site}">${member.name}</a>
<a href="${member.site}">${member.name}</a>
${optionalString hasConfig /*html*/''
<a href="https://${member.config}"><img class="config-image" src="/nix.svg" alt="their nixos config"></a>
<a href="${member.config}"><img class="config-image" src="/nix.svg" alt="their nixos config"></a>
''}
</div>
</li>
@ -68,7 +68,7 @@ in {
<p>
and make a PR to one of <a href="https://codeberg.org/jacekpoz/nixwebr.ing">the</a> <a href="https://github.com/jacekpoz/nixwebr.ing">repos</a> adding yourself to the <code>webring.nix</code> file:
<br>
<code>{ name = "name"; site = "mysite.tld"; config = "gitforge.tld/name/nixos"; }</code>
<code>{ name = "name"; site = "https://mysite.tld"; config = "https://gitforge.tld/name/nixos"; }</code>
<br>
linking your nixos config is entirely optional! (you'll be way cooler though)
</p>

View file

@ -1,9 +1,9 @@
[
{ name = "poz"; site = "jacekpoz.pl"; config = "flake.jacekpoz.pl"; }
{ name = "krizej"; site = "krizej.codeberg.page"; config = "git.jacekpoz.pl/krizej/nix"; }
{ name = "partywumpus"; site = "partywump.us"; config = "nix.partywump.us"; }
{ name = "notashelf"; site = "notashelf.dev"; config = "github.com/NotAShelf/nyx"; }
{ name = "twig"; site = "imnottwig.github.io"; config = "git.disroot.org/twigthecat/nixos"; }
{ name = "fufexan"; site = "fufexan.net"; config = "dots.fufexan.net"; }
{ name = "orangc"; site = "orangc.xyz"; config = "github.com/orxngc/dots"; }
{ name = "poz"; site = "https://jacekpoz.pl"; config = "https://flake.jacekpoz.pl"; }
{ name = "krizej"; site = "https://krizej.codeberg.page"; config = "https://git.jacekpoz.pl/krizej/nix"; }
{ name = "partywumpus"; site = "https://partywump.us"; config = "https://nix.partywump.us"; }
{ name = "notashelf"; site = "https://notashelf.dev"; config = "https://github.com/NotAShelf/nyx"; }
{ name = "twig"; site = "https://imnottwig.github.io"; config = "https://git.disroot.org/twigthecat/nixos"; }
{ name = "fufexan"; site = "https://fufexan.net"; config = "https://dots.fufexan.net"; }
{ name = "orangc"; site = "https://orangc.xyz"; config = "https://github.com/orxngc/dots"; }
]