#dev 2025-01-27
2025-01-27 UTC
bterry, grufwub, gRegor, gregsarjeant, strugee_ and [aciccarello] joined the channel
# [aciccarello] vinceaggrippino, I have a block in my 11ty head template that only renders on the homepage. If the auth endpoint is the only thing like that you probably wouldn't need to care but it is possible with an if statement checking the URL.
[morganm], glacier, [pfefferle] and gRegor joined the channel
# capjamesg[d] [Joe_Crawford] You may appreciate https://flexboxfroggy.com/
Guest6, ttybitnik, cambridgeport90, jbrr, [Murray], nemonical and [tantek] joined the channel
# [Joe_Crawford] capjamesg[d] we looked at some similar games last FrESH — so yes!
# [Murray] CSS question: anyone have a piece of magic that will take a row of elements and flip it to a column the moment the row _exceeds_ the available space (viewport is fine; it's basically always full width of the page)? The catch is that I have no idea how large the elements are going to be, so I can't use a set pixel value as the trigger.
# [Joe_Crawford] How are the sizes of the child elements set? And is it a matter of knowing there are more than x elements?
[snarfed] joined the channel
# [Joe_Crawford] Failure of my imagination i'm having trouble imagining arbitrary text hunks as the basis for a layout like that. But also, there's flex-direction: row vs flex-direction: column which could do the switch rather than grow. still need something to set the widths of child elements to 100%;
# [Joe_Crawford] you don't indicate how the height of the child elements is defined or controlled
# [Joe_Crawford] ah. I was imagining arbitrary paragraphs with maybe user supplied text
# [Joe_Crawford] I feel like if the tab text strings are known one could add up how many there are and infer a max width in ch units (the text widths + gaps between + margins) -- create a media query based on that that triggers the. change. It's what I can think of short of JavaScript.
# [Joe_Crawford] If the layout is `nav > label` I'd be looking at things like `nav:has(label + label + label + label + label)` which is dopey but I've been playing with using it to set layouts based on scale. Could also do nth-child or nth-of-type in that context. But the short answer to your wish is "no."
# [Joe_Crawford] And when I say scale I mean "count of child elements"
# [Joe_Crawford] here's an post about your precise wish. https://ishadeed.com/article/flex-wrap-detect/
[ilovecomputers] joined the channel
# jeremycherfas !tell [Murray] Is that what Every Layout calls The Switcher? See https://every-layout.dev/layouts/switcher/ I'm not sure how I can give you access to see it for yourself, but the idea is a row of horizontal divs that becomes a stacked column below a certain width.
# aaronpk ok video post-processing workflow progress... I can now upload a video of arbitrary length and it gets uploaded in chunks, when it's done uploading it will start post-processing to create 3 thumbnails from various parts of the video, a scaled down 360p version, a transcoded h264 at full resolution, and an HLS segmented version
[schmarty] joined the channel
# [schmarty] niiiceee
# [schmarty] does this all work through a browser??
# [schmarty] (the uploading bit, i mean. i assume the transcoding and segmenting is all server-side)
# aaronpk Yeah there a nice resumable large file upload library https://tus.io/demo
# [schmarty] ah yeah that's why i was seeing that floating around.
# [schmarty] very exciting!!
# [Murray] [jeremycherfas] thanks, I actually own Every Layout, so no need to worry about that 🙂 Unfortunately, this falls into the same trap: it relies on a manually defined, constant breakpoint (honestly, I've never been entirely clear on how the Switcher is _better_ than a media query and flex direction for that reason)
# jeremycherfas I use the switcher and set a width that makes sense in the context of my layout. I think the reason they think itis better is only that it doesn't require a media query, but I am a complete Cargo Culter at this kind of thing.
ttybitnik joined the channel
# [Murray] there's also this slightly mind melting technique from Kevin Powell which I've been exploring, but it also suffers from setting pre-defined widths in some way: https://www.youtube.com/watch?v=LEkFckg7sfw
fusil, jak2k and gRegor joined the channel
# carrvo[d] Yes, .htaccess can do everything the static config can (with the proper overrides). I designed it specifically for the recommended static config for a few reasons so there may be a few adjustments.
# carrvo[d] I would love if bugs are found so they can be fixed!
# carrvo[d] For example, I decided to use `Alias` instead of `DocumentRoot` for everything, but you may not find that matches your flow.
btrem and jak2k joined the channel
jbrr joined the channel
# [Joe_Crawford] _I then wonder if parsers accept `h-entry` on the `<html>` element_
sebbu2 joined the channel
bret joined the channel
# [aciccarello] This looks like it has some answers https://stackoverflow.com/q/29844865/4252741
ttybitnik joined the channel
# [aciccarello] Apparently there are some undocumented conditional checks though I've never tried them like
{% if foo is string %}
# carrvo[d] Unfortunately I don't know Nunjucks to suggest anything 😦
# btrem It's /mostly/ like jinja. But the built-in tests are undocumented within nunjucks. They /are/ documented on in jinja. It appears that some of those tests were not ported to njk, which as I said makes sense. (Python has sequences, javascript does not. I just wish I knew which other tests were ported. Without testing, that is. ;-)
# carrvo[d] I've only used Django, but might remember whenever I might use templates again...