From 023678f628a5a50f698bb125e7a95f5495effff9 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 10 Nov 2022 12:36:05 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20Add=20transitions=20to=20author/?= =?UTF-8?q?article=20nav=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + assets/css/compiled/main.css | 38 ++++++++++++++++-------- layouts/partials/article-pagination.html | 12 ++++---- layouts/partials/author-links.html | 2 +- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb943fc3..5b3bf87f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - External links in article content will now open in a new browser tab ([#312](https://github.com/jpanther/congo/pull/312)) - Independent control over the display of taxonomy listings on article and list pages ([#326](https://github.com/jpanther/congo/pull/326)) - Button shortcode now supports an optional `download` parameter to instruct browsers to directly download resources rather than navigate to a URL ([#349](https://github.com/jpanther/congo/pull/349)) +- Minor style and layout improvements ### Changed diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 2989b3fe..047360a4 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1807,12 +1807,12 @@ body:has(#menu-controller:checked) { margin-top: -1rem; } -.mr-3 { - margin-right: 0.75rem; +.mr-2 { + margin-right: 0.5rem; } -.ml-3 { - margin-left: 0.75rem; +.ml-2 { + margin-left: 0.5rem; } .mt-\[0\.1rem\] { @@ -1831,10 +1831,6 @@ body:has(#menu-controller:checked) { margin-bottom: 0.25rem; } -.mr-2 { - margin-right: 0.5rem; -} - .mb-2 { margin-bottom: 0.5rem; } @@ -1843,10 +1839,6 @@ body:has(#menu-controller:checked) { margin-bottom: -0.25rem; } -.ml-2 { - margin-left: 0.5rem; -} - .\!mb-9 { margin-bottom: 2.25rem !important; } @@ -2447,6 +2439,12 @@ body:has(#menu-controller:checked) { backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); } +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + .transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); @@ -2457,6 +2455,12 @@ body:has(#menu-controller:checked) { margin-top: 2rem; } +.hover\:scale-125:hover { + --tw-scale-x: 1.25; + --tw-scale-y: 1.25; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .hover\:border-primary-300:hover { --tw-border-opacity: 1; border-color: rgba(var(--color-primary-300), var(--tw-border-opacity)); @@ -2540,6 +2544,16 @@ body:has(#menu-controller:checked) { outline-color: transparent; } +.group:hover .group-hover\:-translate-x-\[2px\] { + --tw-translate-x: -2px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.group:hover .group-hover\:translate-x-\[2px\] { + --tw-translate-x: 2px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .group:hover .group-hover\:text-primary-600 { --tw-text-opacity: 1; color: rgba(var(--color-primary-600), var(--tw-text-opacity)); diff --git a/layouts/partials/article-pagination.html b/layouts/partials/article-pagination.html index 3853edbb..e031f67f 100644 --- a/layouts/partials/article-pagination.html +++ b/layouts/partials/article-pagination.html @@ -11,13 +11,13 @@
{{ if $prev }} - + @@ -36,7 +36,7 @@ {{ if $next }} - + diff --git a/layouts/partials/author-links.html b/layouts/partials/author-links.html index f6831cf6..65686019 100644 --- a/layouts/partials/author-links.html +++ b/layouts/partials/author-links.html @@ -3,7 +3,7 @@ {{ range $links := . }} {{ range $name, $url := $links }}