From 75930735ff1e368a806ae7aadc35c17bdcf252fb Mon Sep 17 00:00:00 2001 From: zvevqx Date: Wed, 26 Mar 2025 11:31:50 +0100 Subject: [PATCH] fix fix fix search / css /nocontent --- __pycache__/app.cpython-313.pyc | Bin 6400 -> 6379 bytes app.py | 16 +++---- pages/028_IER.md | 15 +++++++ pages/030_ESC.md | 10 ++--- pages/034_GWG.md | 11 +++-- pages/037_PAD.md | 11 +++-- pages/038_VNM.md | 12 +++--- pages/042_VHB.md | 14 ++++++ pages/045_EDC.md | 11 +++-- pages/test.md | 14 +++--- static/main.bak2 | 69 +++++++++++++++++++++++++++++ static/main.js | 7 ++- static/style.css | 74 ++++++++++++++++---------------- templates/index.html | 7 +-- 14 files changed, 186 insertions(+), 85 deletions(-) create mode 100644 pages/028_IER.md create mode 100644 pages/042_VHB.md create mode 100644 static/main.bak2 diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index 0ab4170cd9672e2ba81e9dbbf8b3ed23676ed262..ea3dfa2c4edd32c973f626caa5c94b1808cb03e7 100644 GIT binary patch delta 410 zcmZoLdTq$}nU|M~0SIiaJx;&Iy^$|bfbrSn0s&|7Xm*e=2!yhlFa|S8F=TN>b1+PP zASfx9$6&ya#~8{W%;2HHz>voj%?(irRLc~^Gx@!MDkIP24la2{{>`R>Y)lT}K+`fedj$7{VlCKC5(w;tK8!h1<(EmR;1ao$Po=MEncL^c$*b%fl9i zEstFoyCnWIGf?C^1EZ+fcV-4rv5AheN+(B&C<=2Fu>wuI#gdj^lv@NcxJY4gr$~rR zAjqOjkVOp)Pk4m;eL8(+h+pJUY;e89!r7tP;`4-G_zMHj`njc_K@^Y>FmLeqz{bEY zI9X6sLQqO>0^@YHiEQ2cA6Xgr#J+HBwh~QbR%2seVr`dflnU|M~0SHvKK1$c;*~phDz<6bHfq*klD60u$Fq0HR7DqJO~KZT+FSwoLhAVd3mhZSncS!T@yX zTvMPuK)S)>1~32QKOz#7-|_G 0) { + sortArticles(columnClass); + } + }); + + // Toggle content visibility + $(".alist").on('click', 'li', function(e) { + // Prevent sorting when clicking on content + if (!$(e.target).closest('.legend').length) { + const $contentWrapper = $(this).find('.content-wrapper'); + + // Ensure content-wrapper is not inside a link or legend + if (!$(e.target).closest('a, .legend').length) { + $contentWrapper.toggleClass("open"); + } + } + }); +}); diff --git a/static/main.js b/static/main.js index d4226bc..0d5163e 100644 --- a/static/main.js +++ b/static/main.js @@ -58,10 +58,9 @@ $(document).ready(function() { $(".alist").on('click', 'li', function(e) { // Prevent sorting when clicking on content if (!$(e.target).closest('.legend').length) { - const $contentWrapper = $(this).find('.content-wrapper'); - - // Ensure content-wrapper is not inside a link or legend - if (!$(e.target).closest('a, .legend').length) { + // Check if click is outside content-wrapper and not on its child elements + if (!$(e.target).closest('.content-wrapper').length) { + const $contentWrapper = $(this).find('.content-wrapper'); $contentWrapper.toggleClass("open"); } } diff --git a/static/style.css b/static/style.css index 476fcc4..02e946b 100644 --- a/static/style.css +++ b/static/style.css @@ -175,6 +175,16 @@ a:hover{ #articles ul li.noContent *{ color:#aaa } + + + +#articles ul li.noContent .content-wrapper.open{ + color:#aaa; + display: none; +} + + + #articles ul.alist li.noContent:hover { color:#aaa; background: #fff; @@ -226,28 +236,6 @@ a:hover{ display: none; } - - - - - -/* #articles ul li a span{ - max-height: 1em; - line-height: 1em; - overflow: hidden; - position:relative; - word-wrap: break-word; - -} - #articles ul li a span:after { - content: "..."; - position: absolute; - right:0; - bottom: 0px; -} -*/ - - #articles ul.alist li .content-wrapper{ height:0; max-height: 0; @@ -274,13 +262,20 @@ a:hover{ margin:auto ; font-size:1em!important; background:#fff; + display: grid; + grid-template-columns: 1fr 1fr ; -} +} + + +.content-wrapper .content { + padding:10px; +} #content-wrapper p{ text-align:left; - margin-left:10px -} + margin-left:10px; + } #content-wrapper pre{ // font-size:2em; @@ -373,30 +368,35 @@ p{ margin-top:1.5em; margin-bottom:1.5em; text-align:justify; -// font-size:2em; + font-size:1.3em; } -#gal { +.gal { display : grid ; - grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr ; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr ; column-gap: 10px; row-gap: 10px; } - .img_container { position: relative; overflow: hidden; - height: auto; - display: grid; - align-content: center; - align-items: center; - justify-items: center; - justify-content: center; - align-items: center; - align-content: space-around; + //display: grid; + //align-content: center; + //align-items: center; + //justify-items: center; + //justify-content: center; + //align-items: center; + //align-content: space-around; +} + + +.img_container:last-of-type { + grid-column: 1 / span 5 } + + .img_container img{ width:100%; } diff --git a/templates/index.html b/templates/index.html index ed58f98..6932b54 100644 --- a/templates/index.html +++ b/templates/index.html @@ -36,17 +36,18 @@
{% if imgDict[article.path] %} -
+
{% for img in imgDict[article.path] : %}
{% set img_url = article.path + '/' + img %} - {{ img_url }}
{% endfor %}
{%endif%} - {{article}} +
+ {{article}} +
{% endfor %}