#dev 2025-02-14

2025-02-14 UTC
rossabaker, bret_, gRegor, gRegorLove_, geoffo and grufwub joined the channel
#
carrvo
How might one retrieve Netflix history to display on your own website? Perhaps some JavaScript to run on a webpage that aggregates title, episode, and watch date into JSON?
nanoflite, jak2k, [jeremycherfas], Guest6 and Pixi` joined the channel
#
jeremycherfas
About buttons. This almost came up in FrESH yesterday. Is there any benefit to styling a link as a button? Tailwind made that relatively easy, but now that I am getting out from under it, I wondered whether there were any real benefits, if all the "button" contains is a link?
#
[Murray]
[jeremycherfas] I can't think of any specific _benefits_ from a code perspective, but I know there have been arguments that certain actions on a site should be "consistent" and that styled links that look like buttons can help with that
#
[Murray]
e.g. a login "button" which just redirects you to a `/login` page, which I don't see any inherent issue styling as a button and could be more consistent for people across sites
#
[Murray]
personally, I feel like there is benefit to making key actions as big and bold as possible, and button styling helps with that, but it's certainly not the only option (and I wouldn't even say the *best* one, it's just simplest)
GuestZero joined the channel
#
jeremycherfas
Thanks. I'm reading this https://css-tricks.com/a-complete-guide-to-links-and-buttons/ and given that you can style a link with things like border, hover, etc I'm not seeing a huge benefit.
#
[Murray]
Yeah, there's no code or functionality benefits, its purely aesthetics πŸ™‚
ttybitnik, [qubyte] and nemonical joined the channel
#
capjamesg[d]
[Jo] I can't subscribe to your notes page. I ran it through https://monocle.p3k.io/preview?url=https%3A%2F%2Fdead.garden%2Fnotes%2F and it looks like the mf2 may be missing some things?
#
capjamesg[d]
I think the notes may need a e-content class.
#
[Jo]
ooh thanks, i dont know any feed readers that work with microformats so i didnt know how to test!!
#
capjamesg[d]
aaronpk's Monocle preview is a great testing tool.
#
Loqi
[preview] Tantek Γ‡elik
#
[Jo]
would each of the notes need a unique link, too? i do that for webmentions but not for normal notes
#
capjamesg[d]
I don't think so.
#
capjamesg[d]
I think the link can be to a fragment like example.com/page#whatever_unique_id
#
[Jo]
oh yeaj thats what i do for my webmentions
#
[Jo]
so it does need a link then?
#
capjamesg[d]
A link would let a web reader link directly to the post.
#
[Jo]
yeah ill add it to future notes its a good idea
#
[Jo]
yup, its e-content!! easy. ill just add that to everything tjanks
#
[Jo]
it should work now, tho im sure it could be improved at least the content is now visible :^)
#
Loqi
[Jo] has 3 karma in this channel over the last year (28 in all channels)
#
[Jo]
capjamesg++ thanks for showing me that
#
Loqi
capjamesg has 50 karma in this channel over the last year (219 in all channels)
#
capjamesg[d]
It works in my feed reader now too ✨
#
[Jo]
yippie!
jak2k and Guest6 joined the channel
#
[tantek]
http://Indiewebify.me is also good for testing notes!
#
[tantek]
You have to scroll a bit for the h-entry tester: https://indiewebify.me/validate-h-entry/
MyNetAz joined the channel
#
capjamesg[d]
[Joe_Crawford] I made some CSS style changes to the quiz page: https://jamesg.blog/2025/02/13/html-quiz
#
capjamesg[d]
[edit] [Joe_Crawford] I made some CSS style changes to the quiz page: https://jamesg.blog/2025/02/13/html-quiz
#
capjamesg[d]
The inputs are now in the labels. The input width is set to 5ch.
#
capjamesg[d]
I'd be curious what you think about the element spacing.
#
capjamesg[d]
I have another CSS question too πŸ˜‚
#
capjamesg[d]
I am using clamp() to set the size of pre elements in a range. But sometimes the size of a pre is too big and it ends up pushing the content container to become larger and the sidebar to become smaller.
#
capjamesg[d]
I can't figure out what is broken.
#
capjamesg[d]
I use grid-template-columns: 0.9fr (sidebar) 3fr (main content), but the clamp()ed pre is supposed to overflow on the right rather than push the sidebar to be smaller.
#
capjamesg[d]
[edit] An example where this is a problem is on https://jamesg.blog/2023/12/22/taylor-swift-lyrics-desk
#
capjamesg[d]
(You may need to do a hard refresh on the page to see the latest CSS)
#
Loqi
[preview] [James] Displaying Taylor Swift lyrics on my desk
#
[Murray]
[capjamesg] oh that's a gnarly one. I _think_ you can fix it by setting the `max-width` value separately; leave your `clamp()` as-is, but add `max-width: 65vw` and that seems to solve the issue (if I understand correctly)
#
[Murray]
I would love for someone to explain why that works though (or, more specifically, why it is needed on top of the clamp statement)
#
capjamesg[d]
It doesn't look like that changes anything.
#
capjamesg[d]
This is what the sidebar should look like:
#
capjamesg[d]
This is what the pre is doing to the sidebar:
#
capjamesg[d]
(The pre visually looks as I want)
#
[Murray]
Ah, I see, I think I was noticing something else (on narrower viewports, the sidebar gets squished down a lot; I assumed that was the issue, as I can't really see the sidebar that far down the page on wider screens)
#
capjamesg[d]
Oh I need to fix that too!
#
capjamesg[d]
I have never noticed that!
GuestZero_ and GuestZero joined the channel
#
capjamesg[d]
Wow, it is fixed if I use ` white-space: pre-wrap;`
#
capjamesg[d]
But I don't want to wrap.
#
[Joe_Crawford]
capjamesg[d] the grid/wrapping looks good. I might have said 5ch yesterday for a possible layout of that column of checkbox/radios. I'd try 3ch which might feel more even. I did some resizing and bumping up and browser font zoom and I think it works okay.
#
[Murray]
I was wondering about `pre-wrap`, as removing the content from the `<pre>` removes the issue (i.e. the clamp on the pre is not causing the problem)
#
capjamesg[d]
Yeah. It seems the clamp is fine. It does work with images, but not the pre.
#
[Murray]
I do wonder about your `fr` units on the `<main>` element. It's tricky to work out the specific calculations, but I wonder if that ratio (0.9 - 3) is right on the edge of being rounded down at certain pixel values, and because the non-wrapped `pre` is literally taking up 130% of the parent, that's causing it to squeeze a bit
#
[Murray]
I mean, the `fr` is a bit of a magic number unit by definition πŸ˜…
#
capjamesg[d]
`10rem 35rem` on the grid-template-columns works well.
#
capjamesg[d]
Not when I change to narrower viewport sizes though.
#
doesnm
wow fedicm looks great. Waiting for mobile: https://bsky.app/profile/mfoster.io/post/3kt4ptnugnk2k
#
[Murray]
[capjamesg] one thing to consider (based purely on this one page; I'm aware your site is a bit more complex so this may not be viable), but your two-column layout is one-dimensional, so Flex may be a better fit. And that will "just work" when I test it πŸ˜… If you stick with grid, I hope you write up whatever this is when you work it out!
#
capjamesg[d]
I set the column widths to 10rem and 35rem and there is still a tiny nudge that happens when there is a pre on the page.
#
capjamesg[d]
I can see it when going to a page with vs. without a pre.
#
capjamesg[d]
Oh flex works really well here.
#
capjamesg[d]
I need to tinker more.
#
[Murray]
Just a thought that came slightly too late (as always πŸ˜„) : if you want to stick to Grid, perhaps use `auto` as the first column: `grid-template-columns: auto 3fr`. You'd need to test, but that should avoid potential pixel rounding errors
#
capjamesg[d]
Oooh, that seems to work?
#
[Joe_Crawford]
I'm wandering into this conversation blind, but I will mention grid column (and row) values can take vales like `min-content` or `fit-content` or `max-content` in addition to `1fr` etc. Also I've said `<nobr>` is my favorite html tag partly because of how useful it can be for assuring certain parts of a layout lay out as I wish. `white-space: nowrap` can be very useful in some places. And oh! Just as I type this maybe you have what you
#
[Joe_Crawford]
want James
#
[Joe_Crawford]
[Murray]++ capjamesg[d]++
#
Loqi
capjamesg[d] has 51 karma in this channel over the last year (220 in all channels)
#
Loqi
[Murray] has 2 karma in this channel over the last year (11 in all channels)
#
capjamesg[d]
`auto` doesn't work well across pages without the pre.
#
[Murray]
and that's why testing is important πŸ˜…
thegreekgeek joined the channel
#
[Murray]
artlung's right, though, `max-content` may be a better fit there
#
[Joe_Crawford]
This is an asideSomething we talked about yesterday I don't think I consider often enough is that if I can *describe* -- as completely as i can -- in words how I expect something to work, then I can create code for it. It's
#
[Joe_Crawford]
I think I'm going to do that as I am building up the newer-non-WP pages on my site. They are spartan right now. But if I can describe in sentences how it scales up to large screens, and down to tablets and phones, and what the major parts do, maybe I can write more terse code.
bret, bret_, barnaby, nemonical, [snarfed] and [manton] joined the channel
#
[snarfed]
hey [aaronpk], another modern OAuth question. if a client wants a certain set of scopes, and it starts an OAuth flow with a server, and it notices that the server doesn't support some of those scopes (eg in its `scopes_supported` metadata field)...is the client expected to short circuit and tell its user, sorry, this server can't do what you want?
#
doesnm
iirc authelia just warn about it in console
#
[snarfed]
getting HTTP 521 from CloudFlare, that's a new one. https://placekitten.com/
#
[snarfed]
what, CF, you're special, 502 wasn't good enough?
barnaby joined the channel
#
capjamesg[d]
Now I'm curious what that website is πŸ˜„
#
aaronpk
[snarfed]: i think the expectation is very dependent on the ecosystem. "traditional" oauth consumer services wouldn't have this problem because the client developers have to find the scopes from the docs anyway. would need to know more about the specific scopes and functionality of the client in order to know whether it would be better to error early or late
#
[snarfed]
ok! thx
[Sophia_wood] joined the channel
#
[Sophia_wood]
Hi all - I moved from WP to ghost, but don't have a contact form in that transition. Any easy to implement recommendations from the community on how to do this - I don't want to put my email out there.
sebbu, sebbu2, barnaby, ttybitnik and MyNetAz joined the channel
CRISPR joined the channel