From 835628c43683870495dd947cbd87f2116171c62a Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:57:51 +0800 Subject: [PATCH] Standardise teresa milestones with PP shop --- public/stylesheets/styles.css | 112 +++++++++++++++++- src/components/CustomizeableTooltip.vue | 90 ++------------ .../tabs/celestial-teresa/TeresaTab.vue | 17 +-- 3 files changed, 123 insertions(+), 96 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 0382ced7d..511a60b47 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -301,6 +301,89 @@ button:focus { outline: none; } +/* #region CustomizeableTooltip */ + +.c-tooltip-content, +.c-tooltip-arrow { + visibility: hidden; + opacity: 0; + transition: 0.4s linear; + transition-property: opacity, visibility; + pointer-events: none; +} + +.c-tooltip-content { + content: attr(ach-tooltip); + width: 16rem; + position: absolute; + z-index: 4; + text-align: center; + font-size: 1.4rem; + line-height: 1.2; + color: #ffffff; + background-color: hsla(0deg, 0%, 5%, 90%); + border-radius: var(--var-border-radius, 0.3rem); + padding: 0.7rem; +} + +.c-tooltip-arrow { + content: " "; + width: 0; + position: absolute; + z-index: 4; + font-size: 0; + line-height: 0; + border-top: 0.55rem solid transparent; + border-right: 0.55rem solid transparent; + border-bottom: 0.55rem solid transparent; + border-left: 0.55rem solid transparent; + transform: translate(-50%, -100%); + transition-duration: 0.4s; +} + +.c-tooltip--top.c-tooltip-content { + margin-top: -0.5rem; +} + +.c-tooltip--top.c-tooltip-arrow { + border-top: 0.55rem solid hsla(0deg, 0%, 5%, 90%); + border-bottom: 0; +} + +.c-tooltip--bottom.c-tooltip-content { + margin-bottom: -0.5rem; +} + +.c-tooltip--bottom.c-tooltip-arrow { + border-top: 0; + border-bottom: 0.55rem solid hsla(0deg, 0%, 5%, 90%); +} + +.c-tooltip--right.c-tooltip-content { + margin-right: -0.5rem; +} + +.c-tooltip--right.c-tooltip-arrow { + border-right: 0.55rem solid hsla(0deg, 0%, 5%, 90%); + border-left: 0; +} + +.c-tooltip--left.c-tooltip-content { + margin-left: -0.5rem; +} + +.c-tooltip--left.c-tooltip-arrow { + border-right: 0; + border-left: 0.55rem solid hsla(0deg, 0%, 5%, 90%); +} + +.c-tooltip-show { + visibility: visible; + opacity: 1; +} + +/* #endregion CustomizeableTooltip */ + /* #region TT shop */ .time-theorem-buttons { @@ -5974,23 +6057,44 @@ kbd { color: black; } -.c-teresa-unlock-description { +.c-teresa-unlock-description--hover-area { display: flex; width: 100%; height: 3rem; position: absolute; align-items: center; - color: var(--color-text); +} + +.c-teresa-unlock-description { + width: 14rem; + font-size: 1rem; + color: var(--color-teresa--base); + background-color: var(--color-teresa--accent); + border: 0.1rem solid var(--color-teresa--base); +} + +.c-teresa-unlock-description--unlocked { + color: var(--color-teresa--accent); + background-color: var(--color-teresa--base); } .c-teresa-milestone-line { width: 100%; height: 0.2rem; background-color: var(--color-teresa--base); + animation: a-teresa-unfinished-milestone-flash 2s infinite; } -.c-teresa-milestone-line--attained { - background-color: rgba(0, 0, 0, 50%); +@keyframes a-teresa-unfinished-milestone-flash { + 0% { opacity: 0.8; } + 20% { opacity: 0.8; } + 50% { opacity: 0.3; } + 80% { opacity: 0.8; } + 100% { opacity: 0.8; } +} + +.c-teresa-milestone-line--unlocked { + animation: none; } .o-teresa-quotes { diff --git a/src/components/CustomizeableTooltip.vue b/src/components/CustomizeableTooltip.vue index b9a946d20..bf5972405 100644 --- a/src/components/CustomizeableTooltip.vue +++ b/src/components/CustomizeableTooltip.vue @@ -36,7 +36,12 @@ export default { default: "" }, contentClass: { - type: String, + type: [Object, String], + required: false, + default: "" + }, + tooltipClass: { + type: [Object, String], required: false, default: "" }, @@ -114,14 +119,14 @@ export default {
@@ -137,82 +142,5 @@ export default { position: absolute; } -.c-tooltip-content, -.c-tooltip-arrow { - visibility: hidden; - opacity: 0; - transition: 0.4s linear; - transition-property: opacity, visibility; - pointer-events: none; -} - -.c-tooltip-content { - content: attr(ach-tooltip); - width: 16rem; - position: absolute; - z-index: 4; - text-align: center; - font-size: 1.4rem; - line-height: 1.2; - color: #ffffff; - background-color: hsla(0deg, 0%, 5%, 90%); - border-radius: var(--var-border-radius, 0.3rem); - padding: 0.7rem; -} - -.c-tooltip-arrow { - content: " "; - width: 0; - position: absolute; - z-index: 4; - font-size: 0; - line-height: 0; - border-top: 0.55rem solid transparent; - border-right: 0.55rem solid transparent; - border-bottom: 0.55rem solid transparent; - border-left: 0.55rem solid transparent; - transform: translate(-50%, -100%); - transition-duration: 0.4s; -} - -.c-tooltip--top.c-tooltip-content { - margin-top: -0.5rem; -} - -.c-tooltip--top.c-tooltip-arrow { - border-top: 0.55rem solid hsla(0deg, 0%, 5%, 90%); - border-bottom: 0; -} - -.c-tooltip--bottom.c-tooltip-content { - margin-bottom: -0.5rem; -} - -.c-tooltip--bottom.c-tooltip-arrow { - border-top: 0; - border-bottom: 0.55rem solid hsla(0deg, 0%, 5%, 90%); -} - -.c-tooltip--right.c-tooltip-content { - margin-right: -0.5rem; -} - -.c-tooltip--right.c-tooltip-arrow { - border-right: 0.55rem solid hsla(0deg, 0%, 5%, 90%); - border-left: 0; -} - -.c-tooltip--left.c-tooltip-content { - margin-left: -0.5rem; -} - -.c-tooltip--left.c-tooltip-arrow { - border-right: 0; - border-left: 0.55rem solid hsla(0deg, 0%, 5%, 90%); -} - -.c-tooltip-show { - visibility: visible; - opacity: 1; -} +/* c-tooltip-content styles in styles.css to make way for custom class colour styling */ diff --git a/src/components/tabs/celestial-teresa/TeresaTab.vue b/src/components/tabs/celestial-teresa/TeresaTab.vue index 5a90cf94b..dc0768927 100644 --- a/src/components/tabs/celestial-teresa/TeresaTab.vue +++ b/src/components/tabs/celestial-teresa/TeresaTab.vue @@ -118,14 +118,10 @@ export default { hasUnlock(unlockInfo) { return unlockInfo.isUnlocked; }, - unlockInfoTooltipContentStyle(unlockInfo) { - const hasInfo = this.hasUnlock(unlockInfo); + unlockInfoTooltipClass(unlockInfo) { return { - border: "0.1rem solid var(--color-teresa--base)", - backgroundColor: hasInfo ? "var(--color-teresa--base)" : "var(--color-teresa--accent)", - fontSize: "1rem", - color: hasInfo ? "black" : "var(--color-teresa--base)", - width: "14rem" + "c-teresa-unlock-description": true, + "c-teresa-unlock-description--unlocked": this.hasUnlock(unlockInfo) }; } } @@ -213,20 +209,19 @@ export default {