diff --git a/assets/images/utils/book-text.svg b/assets/images/utils/book-text.svg new file mode 100644 index 0000000000..b2442799f0 --- /dev/null +++ b/assets/images/utils/book-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/styles/components.scss b/assets/styles/components.scss index 156bf2bef8..4f6c6f4c08 100644 --- a/assets/styles/components.scss +++ b/assets/styles/components.scss @@ -3,7 +3,7 @@ */ .known-error .multiselect__tags { - border-color: var(--color-special-red) !important; + border-color: var(--color-red) !important; background-color: var(--color-warning-bg) !important; &::placeholder { @@ -104,7 +104,7 @@ font-weight: bold; .required { - color: var(--color-special-red); + color: var(--color-red); } &.size-card-header { @@ -285,6 +285,10 @@ } > :first-child { + :first-child { + margin-block-start: 0; + } + margin-block-start: 0; } @@ -476,7 +480,7 @@ } &.danger-button { - color: var(--color-special-red); + color: var(--color-red); } } @@ -636,12 +640,12 @@ tr.button-transparent { } .danger-button { - --background-color: var(--color-special-red); + --background-color: var(--color-red); --text-color: var(--color-brand-inverted); } .moderation-button { - --background-color: var(--color-special-orange); + --background-color: var(--color-orange); --text-color: var(--color-brand-inverted); } @@ -670,7 +674,7 @@ tr.button-transparent { } .known-error .multiselect__tags { - border-color: var(--color-special-red) !important; + border-color: var(--color-red) !important; background-color: var(--color-warning-bg) !important; &::placeholder { @@ -913,7 +917,7 @@ tr.button-transparent { .text-input-wrapper.known-error, input.known-error, textarea.known-error { - outline: 2px solid var(--color-special-red); + outline: 2px solid var(--color-red); background-color: var(--color-warning-bg) !important; &::placeholder { @@ -923,7 +927,7 @@ textarea.known-error { .known-errors { min-height: 0; - color: var(--color-special-red); + color: var(--color-red); ul { margin: 0; @@ -1269,3 +1273,179 @@ a.subtle-link { svg.inline-svg { vertical-align: middle; } + +// START STUFF FOR OMORPHIA + +.experimental-styles-within { + .tag-list { + display: flex; + flex-wrap: wrap; + gap: var(--gap-4); + } + + .tag-list__item { + background-color: var(--color-button-bg); + padding: var(--gap-2) var(--gap-6); + border-radius: var(--radius-max); + font-weight: var(--weight-bold); + font-size: var(--text-14); + display: flex; + gap: var(--gap-4); + align-items: center; + vertical-align: middle; + color: var(--_color, var(--color-secondary)); + + svg { + width: var(--icon-14); + height: var(--icon-14); + display: flex; + } + } + + .status-list { + display: flex; + flex-direction: column; + gap: var(--gap-8); + padding-left: var(--gap-6); + + color: var(--color-base); + font-weight: var(--weight-bold); + } + + .status-list__item { + display: flex; + align-items: center; + gap: var(--gap-4); + + svg { + width: var(--icon-16); + height: var(--icon-16); + margin-right: var(--gap-4); + } + + span { + color: var(--color-secondary); + font-style: italic; + font-weight: var(--weight-normal); + } + } + + .status-list__item--color-green svg { + color: var(--color-green); + } + + .status-list__item--color-orange svg { + color: var(--color-orange); + } + + .status-list__item--color-red svg { + color: var(--color-red); + } + + .status-list__item--color-blue svg { + color: var(--color-blue); + } + + .status-list__item--color-purple svg { + color: var(--color-purple); + } + + &.flex-card, + .flex-card { + display: flex; + flex-direction: column; + gap: var(--gap-12); + padding: var(--gap-16) var(--gap-24); + + h2 { + font-size: var(--text-18); + font-weight: var(--weight-extrabold); + color: var(--color-contrast); + margin: 0; + } + + h3 { + font-size: var(--text-16); + font-weight: var(--weight-bold); + color: var(--color-base); + margin: 0; + } + + > section { + display: flex; + flex-direction: column; + gap: var(--gap-8); + } + } + + .list-style { + display: flex; + flex-direction: column; + gap: var(--gap-12); + font-weight: var(--weight-bold); + + hr { + width: 100%; + border-color: var(--color-button-border); + margin-block: var(--gap-2); + } + } + + .iconified-list-item { + display: flex; + gap: var(--gap-8); + vertical-align: middle; + align-items: center; + width: fit-content; + + svg { + width: var(--icon-16); + height: var(--icon-16); + } + } + + .links-list { + @extend .list-style; + + > a { + @extend .iconified-list-item; + + &:hover { + text-decoration: underline; + } + } + } + + .details-list { + @extend .list-style; + } + + .details-list__item { + @extend .iconified-list-item; + + .details-list__item__text--style-secondary { + color: var(--color-secondary); + font-weight: var(--weight-normal); + font-size: var(--text-14); + } + } + + .icon { + --_size: 1rem; + width: var(--_size, var(--icon-16)) !important; + height: var(--_size, var(--icon-16)) !important; + border: 1px solid var(--color-button-border); + + &[data-size='32'] { + --_size: var(--icon-32); + } + + &[data-shape='circle'] { + border-radius: var(--radius-max) !important; + } + + &[data-shape='square'] { + border-radius: calc(2.25 * (var(--_size) / 16)) !important; + } + } +} diff --git a/assets/styles/global.scss b/assets/styles/global.scss index ee584048bc..a8b4985f80 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -5,8 +5,130 @@ html { --color-text-secondary: var(--color-icon); } +// TO BE MOVED TO OMORPHIA +:root { + --gap-2: 0.125rem; + --gap-4: calc(2 * var(--gap-2)); + --gap-6: calc(3 * var(--gap-2)); + --gap-8: calc(2 * var(--gap-4)); + --gap-12: calc(3 * var(--gap-4)); + --gap-16: calc(2 * var(--gap-8)); + --gap-24: calc(3 * var(--gap-8)); + + --radius-card: 1rem; + --radius-max: 999999999px; + + --radius-btn: 0.75rem; + --radius-btn-large: 1rem; + --radius-btn-circle: var(--radius-max); + + --text-14: 0.875rem; + --text-16: 1rem; + --text-18: 1.125rem; + --text-24: 1.5rem; + --text-32: 2rem; + + --weight-normal: 500; // used for general body text + --weight-bold: 600; // used for text needing extra emphasis + --weight-extrabold: 800; // used for main titles and headings + + --icon-14: 0.875rem; // used for icons inside a small container alongside a label + --icon-16: 1rem; // used for normal-sized icons alongside a label + --icon-20: 1.25rem; // used for icons in normal sized buttons + --icon-24: 1.5rem; // used for icons that are used as a primary label or in large buttons + --icon-32: 2rem; +} + +.experimental-styles-within { + // Reset deprecated properties + --color-icon: initial !important; + --color-text: initial !important; + --color-text-inactive: initial !important; + --color-text-dark: initial !important; + --color-heading: initial !important; + --color-divider: initial !important; + --color-divider-dark: initial !important; + --color-text-inverted: initial !important; + --color-bg-inverted: initial !important; + + --color-brand-green: initial !important; + --color-brand: var(--color-green) !important; + --color-brand-inverted: initial !important; + + --tab-underline-hovered: initial !important; + + --color-button-text: initial !important; + --color-button-bg-hover: initial !important; + --color-button-text-hover: initial !important; + --color-button-bg-active: initial !important; + --color-button-text-active: initial !important; + + --color-grey-link: inherit !important; + --color-grey-link-hover: inherit !important; // DEPRECATED, use filters in future + --color-grey-link-active: inherit !important; // DEPRECATED, use filters in future + --color-link: var(--color-blue) !important; + --color-link-hover: var(--color-blue) !important; // DEPRECATED, use filters in future + --color-link-active: var(--color-blue) !important; // DEPRECATED, use filters in future +} + +.light-mode, +.light { + .experimental-styles-within, + &.experimental-styles-within { + --color-bg: #ebebeb; + --color-raised-bg: #ffffff; + --color-button-bg: #f5f5f5; + --color-base: #2c2e31; + --color-secondary: #484d54; + --color-accent-contrast: #ffffff; + + --color-platform-fabric: #8a7b71; + --color-platform-quilt: #8b61b4; + --color-platform-forge: #5b6197; + --color-platform-neoforge: #dc895c; + --color-platform-liteloader: #4c90de; + --color-platform-bukkit: #e78362; + --color-platform-bungeecord: #c69e39; + --color-platform-folia: #6aa54f; + --color-platform-paper: #e67e7e; + --color-platform-purpur: #7763a3; + --color-platform-spigot: #cd7a21; + --color-platform-velocity: #4b98b0; + --color-platform-waterfall: #5f83cb; + --color-platform-sponge: #c49528; + + --color-button-border: rgba(161, 161, 161, 0.35); + } +} + +.dark-mode, +.dark { + .experimental-styles-within, + &.experimental-styles-within { + --color-button-bg: #33363d; + + --color-platform-fabric: #dbb69b; + --color-platform-quilt: #c796f9; + --color-platform-forge: #959eef; + --color-platform-neoforge: #f99e6b; + --color-platform-liteloader: #7ab0ee; + --color-platform-bukkit: #f6af7b; + --color-platform-bungeecord: #d2c080; + --color-platform-folia: #a5e388; + --color-platform-paper: #eeaaaa; + --color-platform-purpur: #c3abf7; + --color-platform-spigot: #f1cc84; + --color-platform-velocity: #83d5ef; + --color-platform-waterfall: #78a4fb; + --color-platform-sponge: #f9e580; + + --color-button-border: rgba(193, 190, 209, 0.12); + } +} + .light-mode { - --color-icon: #6b7280; + --color-secondary: #6b7280; + --color-icon: var(--color-secondary); --color-text: hsl(221, 39%, 11%); --color-text-inactive: hsl(215, 14%, 34%); --color-text-dark: #1a202c; @@ -59,13 +181,6 @@ html { --color-link-hover: #1a76e7; --color-link-active: #146fd7; - --color-special-red: #cb2245; - --color-special-orange: #e08325; - --color-special-green: var(--color-brand-green); - --color-special-blue: #1f68c0; - --color-special-purple: #8e32f3; - --color-special-gray: #595b61; - --color-red-bg: rgba(204, 35, 69, 0.1); --color-warning-bg: hsl(355, 70%, 88%); @@ -77,7 +192,7 @@ html { --color-info-banner-text: var(--color-text); --color-info-banner-bg: var(--color-ad); - --color-info-banner-side: var(--color-special-blue); + --color-info-banner-side: var(--color-blue); --color-block-quote: var(--color-tooltip-bg); --color-header-underline: var(--color-divider-dark); @@ -140,8 +255,12 @@ html { --landing-raw-bg: #fff; } -.dark-mode { - --color-icon: #96a2b0; +.dark, +.dark-mode, +.oled-mode, +.retro-mode { + --color-secondary: #96a2b0; + --color-icon: var(--color-secondary); --color-text: var(--dark-color-text); --color-text-inactive: #929aa3; --color-text-dark: var(--dark-color-text-dark); @@ -154,13 +273,6 @@ html { --color-text-inverted: var(--color-bg); --color-bg-inverted: var(--color-text); - --color-special-red: #ff496e; - --color-special-orange: #ffa347; - --color-special-green: var(--color-brand-green); - --color-special-blue: #4f9cff; - --color-special-purple: #c78aff; - --color-special-gray: #9fa4b3; - --color-red-bg: rgba(255, 74, 110, 0.2); --color-brand-green: #1bd96a; @@ -209,7 +321,7 @@ html { --color-info-banner-text: var(--color-text); --color-info-banner-bg: var(--color-ad); - --color-info-banner-side: var(--color-special-blue); + --color-info-banner-side: var(--color-blue); --color-block-quote: var(--color-code-bg); --color-header-underline: var(--color-divider-dark); @@ -274,7 +386,6 @@ html { } .oled-mode { - @extend .dark-mode; --color-bg: #000000; --color-raised-bg: #101013; diff --git a/components/ui/Badge.vue b/components/ui/Badge.vue index 81c4fe2191..f88a2c2793 100644 --- a/components/ui/Badge.vue +++ b/components/ui/Badge.vue @@ -65,7 +65,7 @@ defineProps({ .badge { font-weight: bold; width: fit-content; - --badge-color: var(--color-special-gray); + --badge-color: var(--color-gray); color: var(--badge-color); white-space: nowrap; @@ -88,7 +88,7 @@ defineProps({ &.type--withheld, &.type--rejected, &.red { - --badge-color: var(--color-special-red); + --badge-color: var(--color-red); } &.type--pending, @@ -96,7 +96,7 @@ defineProps({ &.type--processing, &.type--scheduled, &.orange { - --badge-color: var(--color-special-orange); + --badge-color: var(--color-orange); } &.type--accepted, @@ -104,23 +104,23 @@ defineProps({ &.type--success, &.type--approved-general, &.green { - --badge-color: var(--color-special-green); + --badge-color: var(--color-green); } &.type--creator, &.type--approved, &.blue { - --badge-color: var(--color-special-blue); + --badge-color: var(--color-blue); } &.type--unlisted, &.purple { - --badge-color: var(--color-special-purple); + --badge-color: var(--color-purple); } &.type--private, &.gray { - --badge-color: var(--color-special-gray); + --badge-color: var(--color-gray); } } diff --git a/components/ui/NotificationItem.vue b/components/ui/NotificationItem.vue index 293125a642..cefa5f85c0 100644 --- a/components/ui/NotificationItem.vue +++ b/components/ui/NotificationItem.vue @@ -249,7 +249,7 @@ > Mark as read - +
Mark as read - +
@@ -335,7 +335,7 @@ const props = defineProps({ }, }) -const cosmetics = useCosmetics() +const flags = useFeatureFlags() const tags = useTags() const type = computed(() => @@ -549,7 +549,7 @@ function getMessages() { } .unknown-type { - color: var(--color-special-red); + color: var(--color-red); } .title-link { @@ -560,11 +560,11 @@ function getMessages() { } .moderation-color { - color: var(--color-special-orange); + color: var(--color-orange); } .creator-color { - color: var(--color-special-blue); + color: var(--color-blue); } } diff --git a/components/ui/Notifications.vue b/components/ui/Notifications.vue index cf3e6336c6..91a2433996 100644 --- a/components/ui/Notifications.vue +++ b/components/ui/Notifications.vue @@ -26,8 +26,8 @@ function stopTimer(notif) { diff --git a/pages/[type]/[id]/changelog.vue b/pages/[type]/[id]/changelog.vue index 6c21a96011..ee92568a59 100644 --- a/pages/[type]/[id]/changelog.vue +++ b/pages/[type]/[id]/changelog.vue @@ -157,18 +157,18 @@ function switchPage(page) { } .changelog-bar { - --color: var(--color-special-green); + --color: var(--color-green); &.alpha { - --color: var(--color-special-red); + --color: var(--color-red); } &.release { - --color: var(--color-special-green); + --color: var(--color-green); } &.beta { - --color: var(--color-special-orange); + --color: var(--color-orange); } left: 0; diff --git a/pages/[type]/[id]/moderation.vue b/pages/[type]/[id]/moderation.vue index 1cbf2bda60..c1fac35d7d 100644 --- a/pages/[type]/[id]/moderation.vue +++ b/pages/[type]/[id]/moderation.vue @@ -204,12 +204,12 @@ svg { } &.bad { - color: var(--color-special-red); + color: var(--color-red); } } .warning { - color: var(--color-special-orange); + color: var(--color-orange); font-weight: bold; } diff --git a/pages/[type]/[id]/settings/index.vue b/pages/[type]/[id]/settings/index.vue index f7fd658b00..bb365335c4 100644 --- a/pages/[type]/[id]/settings/index.vue +++ b/pages/[type]/[id]/settings/index.vue @@ -421,11 +421,11 @@ svg { } &.bad { - color: var(--color-special-red); + color: var(--color-red); } &.warn { - color: var(--color-special-orange); + color: var(--color-orange); } } diff --git a/pages/[type]/[id]/settings/members.vue b/pages/[type]/[id]/settings/members.vue index dde7627835..da565af965 100644 --- a/pages/[type]/[id]/settings/members.vue +++ b/pages/[type]/[id]/settings/members.vue @@ -519,7 +519,6 @@ + + + + diff --git a/pages/moderation/review.vue b/pages/moderation/review.vue index 1aab55cee5..d430b0cb22 100644 --- a/pages/moderation/review.vue +++ b/pages/moderation/review.vue @@ -233,11 +233,11 @@ async function goToProjects() { } .warning { - color: var(--color-special-orange); + color: var(--color-orange); } .danger { - color: var(--color-special-red); + color: var(--color-red); font-weight: bold; } diff --git a/pages/organization/[id]/settings/projects.vue b/pages/organization/[id]/settings/projects.vue index 14627e181b..63f7befb79 100644 --- a/pages/organization/[id]/settings/projects.vue +++ b/pages/organization/[id]/settings/projects.vue @@ -630,7 +630,7 @@ const onBulkEditLinks = useClientTry(async () => { gap: var(--spacing-card-xs); svg { - color: var(--color-special-orange); + color: var(--color-orange); } } @@ -658,7 +658,7 @@ const onBulkEditLinks = useClientTry(async () => { } .label-button[data-active='true'] { - --background-color: var(--color-special-red); + --background-color: var(--color-red); --text-color: var(--color-brand-inverted); } diff --git a/pages/settings/index.vue b/pages/settings/index.vue index 78826b84e9..98468413c6 100644 --- a/pages/settings/index.vue +++ b/pages/settings/index.vue @@ -1,6 +1,6 @@