From 0f43b6ba435ae72565f7a1ccd942edfabc9d6d97 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 14 Jun 2024 15:51:41 +0200 Subject: [PATCH 1/1] one of many positioning fixes --- src/catalogue/templates/catalogue/book_text.html | 7 +++++-- src/wolnelektury/static/2022/styles/layout/_text.scss | 8 ++++---- src/wolnelektury/static/js/book_text/references.js | 11 ++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html index 22106b473..dbe92591a 100644 --- a/src/catalogue/templates/catalogue/book_text.html +++ b/src/catalogue/templates/catalogue/book_text.html @@ -223,7 +223,6 @@
@@ -270,9 +269,13 @@ / Załóż konto +
+
+ Słuchaj od tego miejsca +
+
{% endif %} -
diff --git a/src/wolnelektury/static/2022/styles/layout/_text.scss b/src/wolnelektury/static/2022/styles/layout/_text.scss index 1c617c7ee..d74496800 100644 --- a/src/wolnelektury/static/2022/styles/layout/_text.scss +++ b/src/wolnelektury/static/2022/styles/layout/_text.scss @@ -468,7 +468,7 @@ div.kwestia div.stanza { p.paragraph { text-align: justify; - margin: 0 0 0 44px; + margin: 0; text-indent: 1.5em; } @@ -565,7 +565,7 @@ table.border td, table.border th { float: left; clear: left; font-size: .8em; - margin-left: 0; + margin-left: -40px; width: 36px; height: auto; padding: 2px; @@ -738,7 +738,6 @@ a.reference.interesting:after { border-radius: 22px; background: white; box-shadow: 6px 6px 10px 0px rgba(0, 120, 128, 0.35); - overflow: hidden; &.copied { .content:after { @@ -753,9 +752,10 @@ a.reference.interesting:after { color: black; justify-content: center; align-items: center; + border-radius: 22px; } } - + .content { overflow: hidden; display: flex; diff --git a/src/wolnelektury/static/js/book_text/references.js b/src/wolnelektury/static/js/book_text/references.js index 87c806195..6abd103d4 100644 --- a/src/wolnelektury/static/js/book_text/references.js +++ b/src/wolnelektury/static/js/book_text/references.js @@ -139,10 +139,11 @@ leftoffset = x - margin; } else { right = ''; - - // default position. - leftoffset = 40; + leftoffset = $elem.data('default-leftoffset'); + if (leftoffset === undefined) { + leftoffset = $elem.width() / 2; + } nx = x - leftoffset; @@ -157,12 +158,8 @@ // Do we need to move away from the right? if (nx + boxwidth > maxx) { - // ACTUALLY CALCULATE STUFF - // if maxx - minx < 470 px -- daj z lewej do prawej i już! - right = ''; let d = nx + boxwidth - maxx; - //if (leftoffset + d > $elem.width() - 10) d = $elem.width() - leftoffset - 10; nx -= d; leftoffset += d; } -- 2.20.1