diff --git a/make-pages/SinglePage.hs b/make-pages/SinglePage.hs index 9ad2d8d..64b6828 100644 --- a/make-pages/SinglePage.hs +++ b/make-pages/SinglePage.hs @@ -51,6 +51,7 @@ make' root prefix nsfw dataDir dir info@(Info {date, title, artist, bg}) = do = head images let download0 = fromMaybe path0 download0' let path0' = pageFile path0 + let tinyCls = if any (tiny . #second) images then [b| class=tiny|] else "" let descSection = makeDesc $ descFor nsfw info let tagsList = makeTags undir $ tagsFor nsfw info @@ -126,7 +127,7 @@ make' root prefix nsfw dataDir dir info@(Info {date, title, artist, bg}) = do $2.buttonBar
-
+
$warning' @@ -261,6 +262,9 @@ makeUpdate (Update {date, desc}) = [b|@8 data Size = Size {width, height :: !Int} deriving (Eq, Show) +tiny :: Size -> Bool +tiny (Size {width, height}) = width < 250 || height < 250 + imageSize :: FilePath -> FilePath -> IO Size imageSize dir img = do -- "[0]" to get the first frame of an animation diff --git a/style/shiny/single.css b/style/shiny/single.css index d463995..b87610a 100644 --- a/style/shiny/single.css +++ b/style/shiny/single.css @@ -22,15 +22,15 @@ background: hsl(340, 45%, 65%); } -#mainfig::after { - content: attr(data-width) ' × ' attr(data-height); +#mainfig:not(.tiny)::after { + content: 'click for full (' attr(data-width) ' × ' attr(data-height) ')'; position: absolute; top: calc(0px - var(--border-thickness)); right: calc(0px - var(--border-thickness)); padding: 0.15em 1.25em 0.15em 0.75em; - font-size: 60%; + font-size: 70%; font-weight: 700; background: hsl(0, 0%, 0%, 50%);