diff --git a/themes/landscape/layout/_partial/after-footer.ejs b/themes/landscape/layout/_partial/after-footer.ejs index 98663ffa27..0858096ab6 100644 --- a/themes/landscape/layout/_partial/after-footer.ejs +++ b/themes/landscape/layout/_partial/after-footer.ejs @@ -40,74 +40,6 @@ } - - - -<%- js('js/jquery-3.6.0.min.js') %> -<%- js('js/dist/bundle.min.js') %> -<%- js('js/script.js') %> -<%- js('js/dist/qr-code-styling.js') %> -<%- json({ - src: 'js/dist/qr-code-styling-options-contact.json', - id: 'qr-code-styling-options' -}) %> - - - - - - - -<% if (config.pirsch.enabled === true) { %> - -<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/article_OLD.ejs b/themes/landscape/layout/_partial/article_OLD.ejs deleted file mode 100644 index d9c119c630..0000000000 --- a/themes/landscape/layout/_partial/article_OLD.ejs +++ /dev/null @@ -1,55 +0,0 @@ -<% if (!index && post.photograph){ %> - <%- partial('_partial/photograph', { page: post }) %> -<% } %> - - - -
-
- - - <%- partial('post/date', { class_name: 'article-date', date_format: 'DD MMM YYYY' }) %> - <%- partial('post/category', { class_name: 'article-category' }) %> -
-
- <% if (index){ %> - <%- partial('post/photograph', { class_name: 'article-photo' }) %> - <% } %> - - <% if (post.link || post.title){ %> -
- <%- partial('post/anything', { class_name: 'article-anything' }) %> - <%- partial('post/title', { class_name: 'article-title', show_link: false }) %> - <%- partial('post/subtitle', { class_name: 'article-subtitle' }) %> -
- <% } %> - -
- <% if (post.excerpt && index){ %> - <%- post.excerpt %> - <% if (theme.excerpt_link){ %> -

- <%= theme.excerpt_link %> -

- <% } %> - <% } else { %> - <%- post.content %> - <% } %> -
- - -
- <% if (!index){ %> - <%- partial('post/comments') %> - <%- partial('post/related') %> - <%- partial('post/nav') %> - <% } %> -
\ No newline at end of file diff --git a/themes/landscape/layout/_partial/header.ejs.NEW b/themes/landscape/layout/_partial/header.ejs.NEW deleted file mode 100644 index 4e4c9b381c..0000000000 --- a/themes/landscape/layout/_partial/header.ejs.NEW +++ /dev/null @@ -1,40 +0,0 @@ -
-
-
- -

<%= config.title %>

-
-

<%= config.subtitle %>

-
- -
-
- - -
-
- -
-
- - \ No newline at end of file diff --git a/themes/landscape/layout/_partial/photograph.ejs.NEW b/themes/landscape/layout/_partial/photograph.ejs.NEW deleted file mode 100644 index faaca9be4f..0000000000 --- a/themes/landscape/layout/_partial/photograph.ejs.NEW +++ /dev/null @@ -1,30 +0,0 @@ - - -<%= page.photograph.name%> - -<% if (page.photograph.file) { %> - -<% } %> diff --git a/themes/landscape/source/css/_partial/header.styl b/themes/landscape/source/css/_partial/header.styl index 57ec43ad3f..5c31c2c691 100644 --- a/themes/landscape/source/css/_partial/header.styl +++ b/themes/landscape/source/css/_partial/header.styl @@ -23,13 +23,6 @@ right: 0 height: 40px -#content - padding-top: banner-height - @media mq-tablet - padding-top: banner-height-tablet - @media mq-mobile - padding-top: banner-height-mobile - #header-outer position: relative z-index: 99 @@ -281,3 +274,10 @@ $sub-nav-link &:before //see /images/icons/sun.svg + fill white background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' viewBox='0 0 56 56' fill='%23FFFFFF'%3E%3Cpath d='M 30.0391 4.6094 C 30.0391 3.5078 29.1016 2.5703 28.0001 2.5703 C 26.8985 2.5703 25.9610 3.5078 25.9610 4.6094 L 25.9610 9.5312 C 25.9610 10.6328 26.8985 11.5703 28.0001 11.5703 C 29.1016 11.5703 30.0391 10.6328 30.0391 9.5312 Z M 39.5782 13.5390 C 38.8047 14.3359 38.8047 15.6484 39.5782 16.4219 C 40.3751 17.2187 41.6642 17.2422 42.4844 16.4219 L 45.9766 12.9297 C 46.7737 12.1328 46.7737 10.8203 45.9766 10.0234 C 45.2032 9.25 43.8907 9.25 43.0938 10.0234 Z M 13.5157 16.4219 C 14.2891 17.2187 15.6016 17.2187 16.3985 16.4219 C 17.1720 15.6719 17.1720 14.3125 16.4220 13.5390 L 12.9298 10.0234 C 12.1798 9.2734 10.8438 9.25 10.0469 10.0234 C 9.2735 10.7968 9.2735 12.1328 10.0235 12.9063 Z M 28.0001 16.0468 C 21.4610 16.0468 16.0469 21.4609 16.0469 28.0000 C 16.0469 34.5390 21.4610 39.9766 28.0001 39.9766 C 34.5157 39.9766 39.9298 34.5390 39.9298 28.0000 C 39.9298 21.4609 34.5157 16.0468 28.0001 16.0468 Z M 51.3203 30.0390 C 52.4219 30.0390 53.3593 29.1016 53.3593 28.0000 C 53.3593 26.8984 52.4219 25.9609 51.3203 25.9609 L 46.4220 25.9609 C 45.3204 25.9609 44.3829 26.8984 44.3829 28.0000 C 44.3829 29.1016 45.3204 30.0390 46.4220 30.0390 Z M 4.6798 25.9609 C 3.5782 25.9609 2.6407 26.8984 2.6407 28.0000 C 2.6407 29.1016 3.5782 30.0390 4.6798 30.0390 L 9.5782 30.0390 C 10.6798 30.0390 11.6173 29.1016 11.6173 28.0000 C 11.6173 26.8984 10.6798 25.9609 9.5782 25.9609 Z M 42.4610 39.6016 C 41.6642 38.8281 40.3751 38.8281 39.5782 39.6016 C 38.8047 40.3750 38.8047 41.6875 39.5782 42.4844 L 43.0938 46.0000 C 43.8907 46.7734 45.2032 46.7500 45.9766 45.9766 C 46.7737 45.2031 46.7737 43.8906 45.9766 43.0937 Z M 10.0235 43.0703 C 9.2266 43.8437 9.2266 45.1797 10.0001 45.9531 C 10.7735 46.7266 12.1094 46.7500 12.9063 45.9766 L 16.3985 42.4844 C 17.1720 41.7109 17.1720 40.3984 16.4220 39.6016 C 15.6485 38.8281 14.3126 38.8281 13.5157 39.6016 Z M 30.0391 46.4687 C 30.0391 45.3672 29.1016 44.4297 28.0001 44.4297 C 26.8985 44.4297 25.9610 45.3672 25.9610 46.4687 L 25.9610 51.3906 C 25.9610 52.4922 26.8985 53.4297 28.0001 53.4297 C 29.1016 53.4297 30.0391 52.4922 30.0391 51.3906 Z'/%3E%3C/svg%3E"); + +#content + padding-top: banner-height + @media mq-tablet + padding-top: banner-height-tablet + @media mq-mobile + padding-top: banner-height-mobile \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/header.styl.NEW b/themes/landscape/source/css/_partial/header.styl.NEW deleted file mode 100644 index 3471919dbb..0000000000 --- a/themes/landscape/source/css/_partial/header.styl.NEW +++ /dev/null @@ -1,173 +0,0 @@ -header - position: relative - z-index: 999 - height: header-height-extended - @media mq-mobile - height: header-height-extended-mobile - min-height: header-height-minimum - width: 100% - background-image: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 75%), url("/images/banner.jpg") - background-size: contain - background-position: 50% 50% - background-blend-mode: normal - filter: grayscale(0) - transition: filter 1.5s ease - color: color-logo - /[data-theme="dark"] & - color: dark-color-logo - &.gray - filter: grayscale(1) - - #h-overlay - content: "" - display: block - width: 100% - height: 100% - background-color: color-base - /[data-theme="dark"] & - background-color: dark-color-base - opacity: 0 - - #h-signet - position: absolute - top: 2rem - width: 100% - place-items: center - text-align: center - #h-title, - #h-subtitle - text-decoration: none - font-weight: 400 - #h-title - display: inline-block - font-family: font-sans - font-size: 1.8rem - @media mq-mobile - font-size: 1.5rem - font-variant: small-caps - font-weight: 600 - color: color-logo - letter-spacing: 0.1rem - #h-title h1 - font-weight: inherit - margin: 0 - line-height: 2.75rem - #h-subtitle - font-size: 0.88rem - letter-spacing: 0.066rem - margin-block-start: 0.5rem - @media mq-mobile - font-size: 0.8rem - letter-spacing: 0.033rem - margin-block-start: 0.25rem - em - font-style: normal - text-decoration: line-through - opacity: 0.5 - - #h-photo, #h-photo-link - display: none - &.photograph #h-photo-link - display: block - #h-photo-link - position: absolute - top: 0.5rem - right: 100% - padding: 0.5rem - white-space: nowrap - font-size: 90% - font-weight: 300 - text-decoration: none - transform: rotate(270deg) - transform-origin: right top - transition: all 0.2s ease-out - color: rgba(255, 255, 255, 0.75) - &:hover - color: rgba(255, 255, 255, 1) - z-index: 99 - - #h-commands - display: flex - flex-direction: row - position: absolute - top: 0 - right: 0 - height: header-height-minimum - z-index: 99 - #h-command-theme - padding-block: 0.75rem - padding-inline: 1rem - font-size: 1.5rem - @media mq-mobile - padding-block: 0.5rem - padding-inline: 0.75rem - font-size: 1.25rem - transition: all 0.2s ease-out - color: rgba(255, 255, 255, 0.5) - &:hover - color: rgba(255, 255, 255, 1) - #h-theme-switch - display: none - #h-theme-switch ~ label - display: inline-block - cursor: pointer - - #h-progress - position: absolute - display: block - width: 100% - height: 4px - bottom: 0 - transform-origin: 0 50% - transform: scaleX(100) - background-color: color-highlight - /[data-theme="dark"] & - background-color: dark-color-highlight - - nav - position: absolute - left: 0 - bottom: 0 - width: 100% - height: auto - backdrop-filter: blur(5px) brightness(90%) - font-size: 2rem - #h-menu - display: flex - list-style: none - margin: 0 - padding: 0 - width: 100% - li.h-menu-item - flex-basis: 3rem - flex-shrink: 0 - flex-grow: 0 - &:first-child - margin-inline-start: 0.5rem - &.h-menu-item-icon - font-family: fa-icons - font-size: icon-size - text-align: center - width: 16px - height: 16px - padding: 16px 12px - position: relative - cursor: pointer - a - color: color-logo - /[data-theme="dark"] & - color: dark-color-logo - font-weight: 600 - text-decoration: none - text-align: center - display: block - width: 100% - padding-block: 0.75rem - font-size: 1rem - text-transform: uppercase - text-overflow: ellipsis - white-space: nowrap - overflow: hidden - -#content - padding-top: 1rem \ No newline at end of file diff --git a/themes/landscape/source/css/_variables.styl b/themes/landscape/source/css/_variables.styl index 631c039b2c..b0f61e9b15 100644 --- a/themes/landscape/source/css/_variables.styl +++ b/themes/landscape/source/css/_variables.styl @@ -111,7 +111,7 @@ dark-color-github = #fdfdfd font-path = "fonts" font-size = 16px font-size-code = 0.85rem -font-size-medium = 0.9rem +font-size-medium = 0.94rem font-size-small = 0.8rem font-size-tiny = 0.7rem font-title-size = 1.8rem diff --git a/themes/landscape/source/js/scripts.js b/themes/landscape/source/js/scripts.js index 87ad25701d..d1c7f59bf4 100644 --- a/themes/landscape/source/js/scripts.js +++ b/themes/landscape/source/js/scripts.js @@ -133,6 +133,75 @@ function initImageViewportVisibility() { /** ============================================================ */ +function ensureIconLinkText() { + let linksWithoutText = document.querySelectorAll("a[href^='http']:empty"); + linksWithoutText.forEach(e => { + if (window.getComputedStyle(e).display !== "none") { + if (e.title) { + let eText = document.createElement("span"); + eText.innerText = e.title; + eText.classList.add("visually-hidden"); + e.append(eText); + } else { + console.error("Link without Text and Title: " + e.outerHTML); + } + } + }); +} + +/** ============================================================ */ + +//HEADER +var header = { + height: 0, + top: 0, + offset: 55, + photoLinkOpacity: 0, + titleFontSize: 0 +}; +function initHeader() { + $("#header").css("height", ""); //reset inline css + $("#header-title").css("top", ""); + $("#header-photo-link").css("opacity", ""); + $("#title-wrap").css("font-size", ""); + header.height = $("#header").height(); //set from given css + header.top = parseFloat($("#header-title").css("top")); + header.photoLinkOpacity = parseFloat($("#header-photo-link").css("opacity")); + header.titleFontSize = parseFloat($("#title-wrap").css("font-size")); + + scrollHeader(); +} + +function scrollHeader() { + var h = header.height - header.offset, + st = $(document).scrollTop(), + d = (h - st), + p = (d / h), + hfs = header.titleFontSize / 5 * 3, + jSide = $("aside"); + if (d > 0) { + $("#header").css("height", d + header.offset + "px"); + $("#header-photo-link").css("opacity", header.photoLinkOpacity * p); + $("#banner").css("opacity", p); + $("#title-wrap").css("font-size", header.titleFontSize - ( header.titleFontSize / 3) * (1 - p) ); + $("#header-title").css("top", header.top - (hfs * (1 - p)) + "px"); + $("#subtitle").css("opacity", p); + jSide.css("max-width", "").css("position", "").css("top", ""); + } else { + $("#header").css("height", header.offset + "px"); + $("#header-photo-link").css("opacity", 0); + $("#banner").css("opacity", 0); + $("#title-wrap").css("font-size", header.titleFontSize - ( header.titleFontSize / 3) * (1) ); + $("#header-title").css("top", header.top - (hfs * (1)) + "px"); + $("#subtitle").css("opacity", 0); + if (window.matchMedia("screen and (min-width: 768px)").matches & window.innerHeight > (jSide.height() + 50)) { + jSide.css("max-width", $("aside").width()).css("position", "fixed").css("top", "50px"); + } + } +} + +/** ------------------------------------------------------------ */ + function initScrollProgress() { // Create ScrollTimeline @@ -250,6 +319,8 @@ function setVibrantColor(theme) { } } +/** ============================================================ */ + function bindWebmentionSending(formName) { function submitWebmention(e) {