From ad503162f29f4c5a273b1d61dfa5adad6eef0d87 Mon Sep 17 00:00:00 2001 From: FarseaSH Date: Thu, 5 Sep 2024 21:55:44 +0800 Subject: [PATCH] FEATURE: pic set can support more than 9 pictures --- assets/more-icon.png | Bin 0 -> 2316 bytes assets/style-refractored.scss | 23 +++++++++++++++++++++++ layouts/partials/pic_set.html | 32 ++++++++++++++++++++++---------- 3 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 assets/more-icon.png diff --git a/assets/more-icon.png b/assets/more-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..eb2035534f89b04384ff148c1f5d9f909b8d77ac GIT binary patch literal 2316 zcmeHHi8mB_6#mUvvg8rZl6unPkr}*_EZMWASx7`0;Z&B)FeF*BJc+VLV@Q^9vSp2F z7$!4h$=E4Vw&^vhAmffL$ZNF|3KtgUh+n)h-Lx<-Djj*2;$_jwznUdQ+ zA^?by9BiyyA|Sk(rH69%3j01(AQ&l$|+d)fpaT|=C__*!O3r*oLYIt=JMa?!vtG?#ZRSxQHpEFLI2v?t;}kb z%&3}*xY%(HOC>m(cBS@WFgM}bi6{$$S4J^!IZLZv$y&2(C!#zR`D)bFx}K2M4Gc7I z&}kqF8+C`xLA4dTnO#B3ZQClvvQ&nn7x>0@uiV=gmgucAq2k_<^1jXQe#kd*zPE>L zgJAw`YuDFs+9}-A)+k+wwsrBfVspl|9s8X1)*+iiZrg2Z4Qpmatb+l)ePupw-k!iT zE&NGoIP0S%#sqzSYouL=#yCY4ZrC5A_wupCu-2W+lBY1yCh0Mm)gC1V3VSgo>D`}Y z84Hu{+nLnT9W^$qlf3j~_fb-GW0gq2%G?-UeX$a>&<*M)&}KgL<~)s(!k|xaEPSxS zbGZ?8+cG^cMCvaF*0-pEoodmG_X;xY4aq!pK zWY5zzjm55cRSmW9-bFiFSMp40Xq7!iH{`uO=n~V$-tAhMA_pp`#JPk>4whAr(q$FT z30Y=W5Wbur`_2o~;WAg)%s~?=7vhM2s+D-2&$4FhXhY_odHn$#OG+O@S!KCeWlc<$@4a(PA~o2?Qfo8EkJ}Y6@r5mo1jJ%U zIJmD@JMFBZvE}$_vsG`pJSfnS`l#{p@*ea9Cuvw{{ath9j7v*w`tT%eO=p`M{lgE4 zVttm`EIASzcy#kcyZ?$3f6!IOG6wV^; zuhE{jQ|*O4sUDTFJVTzoLenz6y3l|~5n&MXHTa$;MWjlz>U)8llaOA_C%(r<{$2%{ z^JUC?i7G5p=2*kx{p*Hrqb!!Lkqi`ClFem}Qbp&jc@b3d>zM=b5jbtUq4e>{uag_M zKl%l1%uEvN!;(8K(!O0Px@su!A`*w`##vm2vQcuo<+@!ib48RbLm}(YIOB9)w<%*H zj-^?gkEqwxAsSiC3ctSO&zaylHB4OCKf4;?#)11t6L;k)RVDNz74-E8(;XJ6XLvuo p$ebBAIw$*6{oG&22ozu_ewSi*Wso6^(`i2haj-?()SdB8_#Y*!s|5f6 literal 0 HcmV?d00001 diff --git a/assets/style-refractored.scss b/assets/style-refractored.scss index 2786005..34c4592 100644 --- a/assets/style-refractored.scss +++ b/assets/style-refractored.scss @@ -360,6 +360,29 @@ $gray: #919EB1; padding-bottom: 50%; position: relative; height: 0px; + + &.img-black-filter::after { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + + background-color: rgb(0, 0, 0); + opacity: 0.8; + } + + .more-icon { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + + background-size: 100% 100%; + z-index: 1; + } } img{ diff --git a/layouts/partials/pic_set.html b/layouts/partials/pic_set.html index 45f5215..a825969 100644 --- a/layouts/partials/pic_set.html +++ b/layouts/partials/pic_set.html @@ -11,18 +11,30 @@
{{ range $num, $a := $pic_set }} - {{ if resources.Get $a }} - {{ $a = (resources.Get $a).Permalink }} - {{ end }} -
-
-
- - pictures - + {{ if resources.Get $a }} + {{ $a = (resources.Get $a).Permalink }} + {{ end }} + + {{ $display := "block"}} + {{ if gt $num 8 }} {{ $display = "none"}} {{ end }} +
+
+ {{ if and (eq $num 8) (gt (len $pic_set) 9) }} + + {{ else }} +
+ + pictures + +
+ {{ end }}
-
{{ end }}
\ No newline at end of file