From 25a953003e045a1b928e599cabe0fa6fe89f9b73 Mon Sep 17 00:00:00 2001 From: Mika Ipstenu Epstein Date: Tue, 22 Oct 2024 16:19:54 -0700 Subject: [PATCH] As much as can be done :( --- .github/workflows/staging.yml | 2 +- assets/css/photoswipe.css | 420 -------------------------- config/staging/hugo.yaml | 3 + content/assets/scss/hugo.scss | 14 +- layouts/_default/global/main.html | 10 +- layouts/partials/assets/nav.html | 99 ------ layouts/partials/lightbox-images.html | 6 +- package.json | 1 + 8 files changed, 26 insertions(+), 529 deletions(-) delete mode 100644 assets/css/photoswipe.css create mode 100644 config/staging/hugo.yaml delete mode 100644 layouts/partials/assets/nav.html diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6e64d98b..abef7225 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -44,7 +44,7 @@ jobs: run: rsync -rlgoDzvc -i ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/ resources/ - name: Build site - run: npm run build + run: npm run build:staging - name: Delete Extra Folder run: rm -rf public/404/ diff --git a/assets/css/photoswipe.css b/assets/css/photoswipe.css deleted file mode 100644 index 553038be..00000000 --- a/assets/css/photoswipe.css +++ /dev/null @@ -1,420 +0,0 @@ -/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */ - -.pswp { - --pswp-bg: #000; - --pswp-placeholder-bg: #222; - - - --pswp-root-z-index: 100000; - - --pswp-preloader-color: rgba(79, 79, 79, 0.4); - --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9); - - /* defined via js: - --pswp-transition-duration: 333ms; */ - - --pswp-icon-color: #fff; - --pswp-icon-color-secondary: #4f4f4f; - --pswp-icon-stroke-color: #4f4f4f; - --pswp-icon-stroke-width: 2px; - - --pswp-error-text-color: var(--pswp-icon-color); -} - - -/* - Styles for basic PhotoSwipe (pswp) functionality (sliding area, open/close transitions) -*/ - -.pswp { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: var(--pswp-root-z-index); - display: none; - touch-action: none; - outline: 0; - opacity: 0.003; - contain: layout style size; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -/* Prevents focus outline on the root element, - (it may be focused initially) */ -.pswp:focus { - outline: 0; -} - -.pswp * { - box-sizing: border-box; -} - -.pswp img { - max-width: none; -} - -.pswp--open { - display: block; -} - -.pswp, -.pswp__bg { - transform: translateZ(0); - will-change: opacity; -} - -.pswp__bg { - opacity: 0.005; - background: var(--pswp-bg); -} - -.pswp, -.pswp__scroll-wrap { - overflow: hidden; -} - -.pswp__scroll-wrap, -.pswp__bg, -.pswp__container, -.pswp__item, -.pswp__content, -.pswp__img, -.pswp__zoom-wrap { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.pswp__img, -.pswp__zoom-wrap { - width: auto; - height: auto; -} - -.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img { - cursor: -webkit-zoom-in; - cursor: -moz-zoom-in; - cursor: zoom-in; -} - -.pswp--click-to-zoom.pswp--zoomed-in .pswp__img { - cursor: move; - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; -} - -.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active { - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: grabbing; -} - -/* :active to override grabbing cursor */ -.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img, -.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active, -.pswp__img { - cursor: -webkit-zoom-out; - cursor: -moz-zoom-out; - cursor: zoom-out; -} - - -/* Prevent selection and tap highlights */ -.pswp__container, -.pswp__img, -.pswp__button, -.pswp__counter { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.pswp__item { - /* z-index for fade transition */ - z-index: 1; - overflow: hidden; -} - -.pswp__hidden { - display: none !important; -} - -/* Allow to click through pswp__content element, but not its children */ -.pswp__content { - pointer-events: none; -} -.pswp__content > * { - pointer-events: auto; -} - - -/* - - PhotoSwipe UI - -*/ - -/* - Error message appears when image is not loaded - (JS option errorMsg controls markup) -*/ -.pswp__error-msg-container { - display: grid; -} -.pswp__error-msg { - margin: auto; - font-size: 1em; - line-height: 1; - color: var(--pswp-error-text-color); -} - -/* -class pswp__hide-on-close is applied to elements that -should hide (for example fade out) when PhotoSwipe is closed -and show (for example fade in) when PhotoSwipe is opened - */ -.pswp .pswp__hide-on-close { - opacity: 0.005; - will-change: opacity; - transition: opacity var(--pswp-transition-duration) cubic-bezier(0.4, 0, 0.22, 1); - z-index: 10; /* always overlap slide content */ - pointer-events: none; /* hidden elements should not be clickable */ -} - -/* class pswp--ui-visible is added when opening or closing transition starts */ -.pswp--ui-visible .pswp__hide-on-close { - opacity: 1; - pointer-events: auto; -} - -/* - {{ end -}} - -
- {{ range $index, $item := $list }} - {{ $header := $item.Title }} - {{ $body := $item.Content }} - {{ $show := eq $index 0}} - {{- $thumbnail := "" -}} - {{ if reflect.IsMap $item.Params.Thumbnail }}{{ $thumbnail = $item.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $item.Params.Thumbnail }}{{ end }} - - {{ end }} -
- - - {{ if eq $type "callout" }}{{ end }} - {{ if $vertical }}{{ end }} - diff --git a/layouts/partials/lightbox-images.html b/layouts/partials/lightbox-images.html index b341eedd..ded49222 100644 --- a/layouts/partials/lightbox-images.html +++ b/layouts/partials/lightbox-images.html @@ -34,7 +34,7 @@ {{- warnf "%s" . -}} {{- else -}} {{- $image = . -}} - {{- $imageurl = $image.Permalink -}} + {{- $imageurl = $image.RelPermalink -}} {{- $image = $image.Fill "250x250" -}} {{- $imagesrc = $image.RelPermalink -}} {{- end -}} @@ -42,8 +42,8 @@ {{- if $imagesrc -}}
-
-
+
+
{{ $title }}
diff --git a/package.json b/package.json index 21e94836..59d864b1 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "start:prod": "npm run -s prestart && hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings --minify -e production", "prebuild": "npm run clean:public && npm run -s mod:vendor", "build": "hugo --gc --minify", + "build:staging": "hugo --gc --minify --environment staging", "build:cache": "npm run -s prebuild && hugo config | grep cachedir && hugo --gc --minify -e ci", "build:debug": "hugo -v -e debug --logLevel debug", "build:preview": "npm run build -D -F",