Workaround for some pages breaking, fix meme page header h1 sometimes overlapping with info below

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-12-10 18:47:03 -05:00
parent ec26576414
commit e53a77f13b
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
4 changed files with 10 additions and 6 deletions

View File

@ -151,7 +151,12 @@
(define (doc ptr)
(list-ref (parse-c-struct ptr xml-node) 8))
(define (text ptr)
(pointer->string (xml-node-list-get-string (doc ptr) (child ptr) 1)))
(cond
((not (null-pointer? (xml-node-list-get-string (doc ptr) (child ptr) 1)))
(pointer->string (xml-node-list-get-string (doc ptr) (child ptr) 1)))
(else
(pointer->string (xml-node-list-get-string (doc ptr)
(child (child ptr)) 1)))))
(define (nodeset ptr)
(cadr (parse-c-struct ptr xml-xpath-object)))

View File

@ -147,7 +147,6 @@
(define lst2 (list ""))
(define skip #f)
(while (not (null-pointer? chld))
(name chld)
(cond
(skip
(set! skip #f)))

View File

@ -171,8 +171,8 @@
(h1 ,(cadr l))
(img (@ (src ,(proxy (caddr l)))
(alt ,(cadr l))))
(p ,(cadddr l))
(i ,(list-ref l 4)))))
(p ,(cadddr l)))
(i ,(list-ref l 4))))
articles)))
(define (meme->sxml meme)

View File

@ -220,10 +220,10 @@ table.trending-images img {
}
.meme.box h1 {
margin-bottom: 0.5em;
margin-bottom: 2em;
margin-top: 0.3em;
font-size: 1.7em;
max-width: 65%;
font-size: clamp(0.5rem, -0.875rem + 4.333vw, 3.5rem);
}
.meme.box img {