pagefind update

This commit is contained in:
Wouter Groeneveld 2022-11-11 09:53:18 +01:00
parent 6980fdec86
commit e3603906a1
6 changed files with 6 additions and 44 deletions

View File

@ -15,7 +15,7 @@ Except that it isn't. Infrax came to be in 2006 by merging Interelectra, Iveg, a
But the website you're pointed to still comes with the domain name `infrax.be`. Worse, try going to https://infrax.be: you'll be redirected to https://fluvius.be. That's good, right? Except that they forgot to redirect the subdomain `mijn.infrax.be` you use to access your account and register solar panels. To add to the confusion, the logo _did_ change. For people who don't know Infrax equals Fluvius, this site now looks like a phishing attempt. Look at the `?ReturnUrl=` parameter:
![](../infrax.jpg)
![](../infrax.jpg "The old Infrax login screen.")
What's up with that, needlessly including the SSL port when it's pointing to `HTTPS` anyway? Things get much worse when trying to log in. The first login attempt failed. I press "back" on the browser to retry and I'm greeted with a "This document is no longer available" expiration error. Breaking that back button is another irritating violation.
@ -25,7 +25,7 @@ Which redirects me to another website to login. Again. Because the cookie at dom
The beautiful address I now find myself in is `https://klanten.b2clogin.com/klanten.onmicrosoft.com/b2c_1a_customer_signup_signin/oauth2/v2.0/authorize?client_id=91bb9a0a-f45d-491a-ae0b-43324fbc343a&scope=openid%20profile%20offline_access&redirect_uri=https%3A%2F%2Fmijn.fluvius.be%2Fredirect&client-request-id=0cc2b4d9-ef8f-4478-989f-1af2f4ccfae6&response_mode=fragment&response_type=code&x-client-SKU=msal.js.browser&x-client-VER=2.23.0&client_info=1&code_challenge=oLNa2bV0-9ROEl0F7XG8anOjO4kofUWajxaSFlZwEow&code_challenge_method=S256&nonce=a08fea39-fade-49fd-bef6-2ce17df0c5fd&state=eyJpZCI6IjM4Mjk1YzM2LWQ5ZDctNDk2NS05Zjk4LWZmOTBmNWI2MDIwZiIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicmVkaXJlY3QifX0%3D`:
![](../fluvius.jpg)
![](../fluvius.jpg "The shiny new cloud-based Fluvius login screen.")
As you all undoubtedly know, `onmicrosoft` has something to do with Microsoft's Office 365 platform, and `b2clogin` is the domain Microsoft uses for their Azure logins. I don't care what tech they use to develop this site, but I do care about transparency and security, and this clearly isn't it. If you choose to login using your electronic identity card, you're again redirected to `idp.iamfas.belgium.be`

View File

@ -1,10 +0,0 @@
---
title: Search
disableComments: true
---
Not finding what youre looking for? Try your luck here.
Use `*` to partially match terms.
{{< searchresults >}}

View File

@ -1,28 +0,0 @@
<article>
<form method="get" action="" class="search-form">
<input id="zoekentxt" placeholder="philosophy" aria-label="Search terms" name="q" type="text" style="width: 56%" />
<button type="submit" class="button" style="width: 36%">Search!</button>
</form>
</article>
<div id="resultaten">
<hr/>
<h2>
Search results
<span class="pages"></span> &raquo;
</h2>
<div id="searchapp">Searching, please wait... </div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<script src="/js/lunr.min.js"></script>
{{ $p := slice }}
{{ range (where .Site.RegularPages "Section" "!=" "") }}
{{ $post := dict "link" .RelPermalink "title" .Title "content" (substr .Plain 0 200) -}}
{{ $p = $p | append $post -}}
{{ end }}
<script>
window.searchposts = JSON.parse(
{{ $p | jsonify }}
);
</script>

View File

@ -15,7 +15,7 @@
"scripts": {
"prenote": "node hooks/prenote.js",
"precommit": "node hooks/precommit.js",
"search": "echo 'executing Hugo+Pagefind (locally)...' && /opt/homebrew/bin/hugo && /Users/wgroeneveld/.cargo/bin/pagefind --source docs --bundle-dir ../static/_pagefind",
"search": "echo 'executing Hugo+Pagefind (locally)...' && hugo && /usr/local/bin/pagefind --source docs --bundle-dir ../static/_pagefind && hugo serve",
"postdeploy": "node hooks/postdeploy.js"
},
"repository": {

View File

@ -5,7 +5,7 @@
{{ $url = (printf "%s%s" .Page.Permalink $url) }}
{{ end }}
<a href="{{ $url | absURL }}" class="lbox">
<img src="{{ $url | absURL }}" loading="lazy"{{ with .Text }} alt="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}"{{ end }}>
<img src="{{ $url | absURL }}" loading="lazy"{{ with .Text }} alt="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}"{{ end }} data-pagefind-index-attrs="title">
</a>
{{ with .Title }}
<figcaption>{{ . }}</figcaption>

View File

@ -1,9 +1,9 @@
{{ partial "header" . }}
<main class="h-entry" data-pagefind-body>
<main class="h-entry">
{{ partial "bigimg" . }}
<article class="single {{ .Section }}">
<article class="single {{ .Section }}" data-pagefind-body>
{{ partial "single-header" . }}
<div class="e-content content">
{{ .Content | safeHTML }}