1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
| <%- css('./css/custom/gallery') %> <% if (site.data && site.data.gallery) { %> <% var galleries = site.data.gallery; var path = page.path.trim().split('/'); var galleryName = path[path.length - 2]; var currentGallery = galleries[galleryName]; function getArchive(archivesArr, archiveName) { for (let i = 0; i < archivesArr.length; i++) { if (archivesArr[i]['url_album'] == archiveName) { return archivesArr[i]; } } } var currentArchive = getArchive(galleries.archives,galleryName); var name = currentArchive.name; var description = currentArchive.description; %> <% } %>
<main class="content"> <div class="swbk"> <div class="label" style="color: rgb(178, 143, 206);"> <span><%- name %></span> </div> <p><%- description %></p> </div> <br> <div class="gallery-container"> <% if (site.data.gallery && currentGallery) { %> <% for (var i = 0, len = currentGallery.length; i < len; i++) { %> <% var item = currentGallery[i]; %> <% if (item.cover){ %> <div class="album-item" data-spmid="./<%- item.url_photo %>"> <i class="fa-solid fa-thumbtack thumbtack"></i> <a href="javascript:void(0)" onclick='clickgallery("<%- item.pwdenable %>","<%- item.url_photo %>")'> <div class="photo-container"> <strong class="title">“ <%- item.date %> ”</strong> <img class="xk" src="<%- item.cover %>" data-src="<%- item.cover %>" class="responsive-img" alt="img"+<%- i %> /> <strong class="describe"> “ <%- item.name %> ” <% if (item.pwdenable) { %> <i class="fa-solid fa-lock" style="color:red;"></i> <% } %> </strong> </div> </a> </div> <% } %> <% } %> <% } %> </div> <div class="swbk"> <div class="label" style="color: rgb(178, 143, 206);"> <span>用光影留住美好的事物,用心发现身边的美丽</span> </div> <p>若干年后,你会发现相册记录下的不仅仅是你所拍下的美好</p> </div> </main> <div style="width: 1110px;display: flex;justify-content: center;align-items: center;"> <div id="l_main"> <%- partial('_plugins/comments/index',{post: page}) %> </div> </div> <script defer="defer" type="text/javascript"> function clickgallery(enable,url){ if(enable=='true'){ iziToast.info({ timeout: 10000, overlay: true, displayMode: 'once', id: 'inputs', zindex: 999, title: 'Hey', message: '<%- theme.PhotoVerifyPassword.promptMessage %>', position: 'center', drag: false, inputs: [ ['<input type="password">', 'keyup', function (instance, toast, input, e) { pwd = input.value }, true] ], buttons: [ ['<button><b>确定</b></button>', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); document.cookie = `pwd=${pwd};max-age=180`; window.open(url, "_blank"); }, true], ['<button>取消</button>', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); }], ], onClosed: function(instance, toast, closedBy){ } }); } else{ window.open(url, "_blank"); } } </script>
|