blog init

an svg stylized greyscale image of me, the author

Date:

Reading time:
2 minutes

I guess I couldn't sit around on a domain name for so long without finally creating a web presence. So here it is, my latest blog.

For now I'm going to give it a shot with zola, which is a rust alternative to the often used hugo. I'm hosting it directly on a tiny VPS with nginx for now, let's see if that works out, or whether I need to go an S3 like route. I doubt I'll get that much traffic, but perhaps throwing a CDN in front might help when getting slashdotted1?

1

Slashdot was a website that people used to use in the early 2000s in order to get angry about privacy issues and Linux

Did you know?

I thought media queries were a matter of using @media in CSS. However, it seems I was mistaken. When making this blog's (S)CSS I tried first using something like:

$minimum_big_screen_width: 450px;
@media screen and (min-width: $minimum_big_screen_width) {
    & {
        grid-template-columns: 2fr 1fr;
        grid-template-areas:
            "nav    nav"
            "header header";
        grid-column-gap: 1px;
    }
    aside {
        grid-column: 2 / 3;
    }
}

Hoping that this would be enough to match larger devices. But much to my surprise, despite messing with the window size, and the "responsive" web dev tooling in Firefox and Chrome, it seemed to constantly match every size, including mobile sizes. I hit my head against the wall for a bit, then I asked a local LLM, and it suggested I use a @media query. Then I asked ChatGPT and it said the same. But then I told it that it didn't work and it told me to use this magic html tag:

  <meta name="viewport" content="width=device-width, initial-scale=1">

I'm surprised I got this far without noticing this before. Perhaps I've only ever written CSS in environments where some other genius knew to write this tag already? And is there any conceivable reason why you might not want the viewport to not be the device-width? The internet does some handwaving stuff about the scrollbar etc. but from testing that's not what I see - I can have the window very narrow indeed and even including all the window's chrome it should clearly be below the min-width.

Either way, hi. I'm Ben, a software developer based in Berlin for the last decade.