From 673f7a82d19700ee2be06739277cbb8ae9f3cb43 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Sun, 14 Aug 2022 12:42:58 -0700 Subject: [PATCH] New features (#592) * New features * Lots of bug fixes * Fix respack creation * Improve mobile nav with more project types * Fix resolution sorting and remove icons * Move cookie consent to top on small devices to get out of the way of navigation * Move cookie consent + fix hydration * Fix project editing + update search features * Centralize hardcoding of loader/category names, fix cookie consent shadow, fix mobile navbar rounding * Fix plugin platforms formatting * Kitchen sink! * Add support for display names * LiteLoader formatting * Fixed "show all loaders" toggle not resetting when changing pages * Allow multiple loaders in version filter controls * Fix clear filters button * Revert "Add support for display names" This reverts commit 370838763d86bcae51bf06c304248f7a1f8fc28f. * Let's see how this goes. Upstream filters, attempt 1 * github? hello? * No more "Server mod" on plugins * Fix formatting of project types in project creation * Move where project creation sets the resource pack loader * Allow setting pixelated image-rendering Allows to apply 'style' attribute to IMG tags with value 'image-rendering' set to 'pixelated', which can be useful for people who use pixel art in their READMEs (to demonstrate items, for example). * fix user page + hydration issue fix from Brawaru * Rename to proxies * Make categories use title case * Always show project type on moderation page, improve project type display on project pages * Remove invalid key * Missed a check * Fix browse menu animation * Fix disabled button condition and minimum width for 2 lines * Body -> Description in edit pages * More casing consistency issues * Fix duplicate version URLs * Fix version creation * Edit URLs, fix privacy page buttons * Fix notifications popup overlaying * Final merge fixes Co-authored-by: Prospector Co-authored-by: Sasha Sorokin <10401817+Brawaru@users.noreply.github.com> --- app/router.scrollBehavior.js | 6 +- assets/styles/components.scss | 54 +++-- assets/styles/global.scss | 8 +- components/ads/CookieConsent.vue | 47 +++- components/ui/ProjectCard.vue | 29 ++- components/ui/ThisOrThat.vue | 6 +- components/ui/VersionFilterControl.vue | 20 +- components/ui/search/Categories.vue | 9 +- components/ui/search/SearchFilter.vue | 1 - layouts/default.vue | 225 +++++++++++++---- nuxt.config.js | 20 +- pages/_type/_id.vue | 124 ++++++---- pages/_type/_id/changelog.vue | 14 +- pages/_type/_id/edit.vue | 73 +++++- pages/_type/_id/version.vue | 61 ++--- pages/_type/_id/versions.vue | 18 +- pages/create/project.vue | 181 +++++++++++--- pages/moderation.vue | 1 + pages/notifications.vue | 4 +- pages/search.vue | 168 ++++++++++--- pages/search/modpacks.vue | 3 - pages/search/mods.vue | 3 - pages/search/plugins.vue | 31 +++ pages/search/resourcepacks.vue | 31 +++ pages/settings/privacy.vue | 3 + pages/user/_id.vue | 16 +- plugins/shorthands.js | 320 +++++++++++++++++++------ plugins/xss.js | 9 + static/favicon-dark.ico | Bin 15086 -> 0 bytes static/favicon.ico | Bin 15086 -> 15086 bytes store/tag.js | 15 ++ 31 files changed, 1152 insertions(+), 348 deletions(-) create mode 100644 pages/search/plugins.vue create mode 100644 pages/search/resourcepacks.vue delete mode 100644 static/favicon-dark.ico diff --git a/app/router.scrollBehavior.js b/app/router.scrollBehavior.js index 1dd2f351..76cf84ed 100644 --- a/app/router.scrollBehavior.js +++ b/app/router.scrollBehavior.js @@ -1,5 +1,9 @@ export default function (to, from, savedPosition) { - if (to.name.startsWith('type-id') && from.name.startsWith('type-id')) { + if ( + from == null || + (to.name.startsWith('type-id') && from.name.startsWith('type-id')) || + to.name === from.name + ) { return savedPosition } else { return { x: 0, y: 0 } diff --git a/assets/styles/components.scss b/assets/styles/components.scss index 413ec3da..30e49862 100644 --- a/assets/styles/components.scss +++ b/assets/styles/components.scss @@ -263,6 +263,14 @@ > :last-child { margin-bottom: 0 !important; } + + @media screen and (max-width: 850px) { + iframe { + aspect-ratio: 16 / 9; + width: 100%; + height: auto; + } + } } .tooltip { @@ -826,12 +834,12 @@ label { } .vue-notification { - background: #44A4FC; - border-left: 5px solid #44A4FC; + background: #44a4fc; + border-left: 5px solid #44a4fc; &.success { - background: #68CD86; - border-left-color: #68CD86; + background: #68cd86; + border-left-color: #68cd86; } &.warn { @@ -840,25 +848,43 @@ label { } &.error { - background: #E54D42; - border-left-color: #E54D42; + background: #e54d42; + border-left-color: #e54d42; } } .vue-notification-group { right: 25px !important; + bottom: 25px !important; - .vue-notification-template { - border-radius: var(--size-rounded-card); - margin: 0 0 25px 0; + .vue-notification-wrapper { + margin-bottom: 10px; - .notification-title { - font-size: var(--font-size-lg); - margin-right: auto; + .vue-notification-template { + border-radius: var(--size-rounded-card); + margin: 0; + + .notification-title { + font-size: var(--font-size-lg); + margin-right: auto; + } + + .notification-content { + font-size: var(--font-size-md); + } } - .notification-content { - font-size: var(--font-size-md); + &:last-child { + margin: 0; + } + } + + @media screen and (max-width: 750px) { + transition: bottom 0.25s ease-in-out; + bottom: calc(var(--size-mobile-navbar-height) + 10px) !important; + + &.browse-menu-open { + bottom: calc(var(--size-mobile-navbar-height-expanded) + 10px) !important; } } } diff --git a/assets/styles/global.scss b/assets/styles/global.scss index 491a0697..989bfc04 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -208,7 +208,9 @@ body { --size-rounded-tooltip: 0.25rem; --size-navbar-height: 3.5rem; - --size-mobile-navbar-height: 4rem; + --size-mobile-navbar-height: 3.5rem; + // --size-mobile-navbar-height-expanded: 10rem; + --size-mobile-navbar-height-expanded: 7.5rem; --spacing-card-lg: 1.5rem; --spacing-card-bg: 1rem; @@ -235,6 +237,10 @@ body { --font-weight-text: var(--font-weight-medium); --font-weight-heading: var(--font-weight-extrabold); --font-weight-title: var(--font-weight-extrabold); + + @media screen and (min-width: 501px) { + --size-mobile-navbar-height-expanded: 7rem; + } } svg { diff --git a/components/ads/CookieConsent.vue b/components/ads/CookieConsent.vue index 014a0c55..66f2c4ae 100644 --- a/components/ads/CookieConsent.vue +++ b/components/ads/CookieConsent.vue @@ -3,13 +3,15 @@