Logs for #nikola for 2018-08-23

12:58:39 <KwBot> charlesay: 08:24:48 <ChrisWarrick> I would guess that was caused by Arch Linux upgrading to Python 3.7.  That requires recreation of all virtualenvs and reinstall of all packages
12:59:19 <charlesay> ChrisWarrick: thanks for answering my question a few days ago
13:02:19 <charlesay> i am having trouble right now with the placement of images and captions. the issue with the latter is that lines don't wrap in a sensible way. is that something that is entirely up to themes and their styling?
13:06:44 <ralsina> charlesay: it's all a matter of CSS, really
13:07:13 <ralsina> when you say images and captions, are you using something like the figure reSt directive?
13:08:02 <charlesay> yes, i am using .figure 
13:08:49 <ralsina> ok, so, there is some CSS to handle that in rst.css and nikola_rst.css
13:08:52 <charlesay> i know started to try using css to just limit the length of lines in captions (if they wrap to often that is less bad than long lines producing acres of white space
13:09:48 <ralsina> Honestlyy, to me, captions that are less than a full paragraph and more than, like, 3 words, always look awful
13:09:58 <ralsina> Can't say I have seen them look good in other sites either
13:11:30 <charlesay> yeah. looking great is one thing, but i feel the image gives them a natural constraint: they should expand its footprint by close enough to just the space the text itself takes up
13:12:24 <ralsina> Ah, you mean you want the image in the figure to adjust its size to that of the text? That's an unusual approach.
13:15:47 <charlesay> no, the other way around
13:16:42 <charlesay> if you are a caption, just draw down the frame of the image as low as you need to fit in 
13:18:21 <charlesay> messing with the caption in css like i have done so far makes it divorce itself from the image, so the caption starts as far left on the page as it possibly can, while the image is placed further to the right or centre... 
13:20:05 <ralsina> Ah, I see.
13:35:52 <charlesay> i thought of getting at the actual problem in an other way. is there a way in rst to pass different images to clients with different screen widths/
13:35:55 <charlesay> ?
13:45:55 <ralsina> well, you can use media queries in your CSS
13:46:02 <ralsina> ah, different images
13:46:08 <ralsina> you would need imgset?
13:46:31 <ralsina> or the picture element
13:46:54 <ralsina> So, no, there isn't BUT creating your own directive that creates a picture element should be pretty easy
13:47:32 <charlesay> i am using the picture element to do the same for the header of my page, something like that, yes
13:48:00 <ralsina> So, a ".. picture" that works like figure but takes more than one source is doable
13:48:29 <ralsina> It's just that very few people know how to do reSt directives or bother. Maybe a shortcut instead?
13:49:01 <ralsina> Or just use ".. raw:" and use the picture element by hand
13:49:36 <charlesay> i am not sure i really get how the rst-html translation works ergo how to fit that in
13:49:46 <charlesay> what i do in the header is:
13:49:58 <charlesay> <picture>
13:49:58 <charlesay>  20     <source media="(min-width: 1200px)" srcset="/images/ek-logo2-banner_pagehead-wide.png">
13:50:01 <charlesay>  21     <source media="(min-width: 750px)" srcset="/images/ek-logo2-banner_pagehead.png">
13:50:02 <ralsina> charlesay: in that case, the raw directive is the easiest. No code.
13:50:04 <charlesay>  22     <source media="(min-width: 400px)" srcset="/images/ek-logo2-banner_pagehead-mid.png">
13:50:07 <charlesay>  23     <source media="(min-width: 100px)" srcset="/images/ek-logo2-banner_pagehead-mobile.png">
13:50:10 <charlesay>  24     <img src="/images/ek-logo2-banner_pagehead.png" alt="Eiserne Ketten Logo" style="width:auto;">
13:50:13 <charlesay>  25   </picture>
15:01:40 <charlesay> ralsina: what do you mean by raw directive?
15:14:31 <ralsina> charlesay: http://docutils.sourceforge.net/docs/ref/rst/directives.html#raw-data-pass-through
15:14:52 <ralsina> basically, a way to just put HTML in your document if reSt doesn't do what you want it to do.
15:25:35 <charlesay> right, thanks, i was looking for that
19:30:13 <charlesay> turns out the stuff i worked out this afternoon was a silly idea because it would have created work to make the site look marginally better on desktop ie for 16% of users. but while i was working out what to do instead i noticed that nikola with bootstrap produces things like this https://eiserneketten.de/2018-08-23-212329_swaygrab.png 
19:32:57 <charlesay> this is from simply using '.. figure:: /images/etc' without an align. i'd consider it a bug in either nikola or the theme that the image is not centred, and another one that the caption is beside the image. 
19:33:48 <charlesay> *bootstrap3
20:11:30 <ralsina> Weird
20:11:49 <ralsina> I have not seen that kind of thing, but I have not been looking for it either. Could you file a bug?
20:12:11 <ralsina> small self-contained example using the demo site and images much appreciated :-)
20:27:32 <charlesay> ok, i'll try to get to it tomorrow
22:00:37 <mmercer> hey folks, anyone know of a dev/8.x gitlab image or does one need to be built for publishing 8.x versions of nikola via the pages ci/cd on gitlab ?
22:04:50 <charlesay> ralsina: with a vanilla demo site the placement of the image off centre still occurs, but the caption is aligned. will see if i can find what i have done that makes that not work
22:19:01 <charlesay> ... what does this apparently is limiting the length of lines in css to a certain number of characters
22:23:36 <charlesay> i think having lines run the full width of a desktop screen is bad for readability. is there a smarter way than something like 'p { max-width: 100ch }' to limit that which might not interfere with other elements (not sure why that is, btw)
22:40:32 <charlesay> turns out: no it is centred, it just looks off because with short lines of text there is unused space on the right of the image. so basically what i would need is just a way to limit the frame within which nikola lays out the page