diff --git a/styles/upcloud/catppuccin.user.less b/styles/upcloud/catppuccin.user.less new file mode 100644 index 0000000000..8d39c2e771 --- /dev/null +++ b/styles/upcloud/catppuccin.user.less @@ -0,0 +1,750 @@ +/* ==UserStyle== +@name UpCloud Catppuccin +@namespace github.com/catppuccin/userstyles/styles/upcloud +@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/upcloud +@version 2000.01.01 +@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/upcloud/catppuccin.user.less +@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Aupcloud +@description Soothing pastel theme for UpCloud +@author Catppuccin +@license MIT + +@preprocessor less +@var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"] +@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"] +@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] +==/UserStyle== */ + +@-moz-document domain("hub.upcloud.com") { + /* This section applies the light/dark themes automatically based on the user's system theme. + Use the below example CSS to start if the website you are theming doesn't have a light/dark mode toggle. + For an actual example of this, see https://github.com/catppuccin/userstyles/blob/39288b593278e5efa48007d5fc001292cf910672/styles/brave-search/catppuccin.user.css#L16-L29. + */ + :root { + @media (prefers-color-scheme: light) { + #catppuccin(@lightFlavor); + } + @media (prefers-color-scheme: dark) { + #catppuccin(@darkFlavor); + } + } + + /* If the website you are theming *does* have a light/dark mode toggle, + you can conditionally enable light/dark flavors by targeting whatever + attribute that website uses to indicate the theme. *The example below gives you an idea of what + to look for. The website you are theming may use a class-based approach (e.g. :root.theme-dark), + or any of the myriad of other methods like this.* + Use the below example CSS to start if this is the case. + For an actual example of this, see https://github.com/catppuccin/userstyles/blob/39288b593278e5efa48007d5fc001292cf910672/styles/youtube/catppuccin.user.css#L21-L30. + */ + :root[data-theme="dark"] { + #catppuccin(@darkFlavor); + } + :root[data-theme="light"] { + #catppuccin(@lightFlavor); + } + + #catppuccin(@flavor) { + @rosewater: @catppuccin[@@flavor][@rosewater]; + @flamingo: @catppuccin[@@flavor][@flamingo]; + @pink: @catppuccin[@@flavor][@pink]; + @mauve: @catppuccin[@@flavor][@mauve]; + @red: @catppuccin[@@flavor][@red]; + @maroon: @catppuccin[@@flavor][@maroon]; + @peach: @catppuccin[@@flavor][@peach]; + @yellow: @catppuccin[@@flavor][@yellow]; + @green: @catppuccin[@@flavor][@green]; + @teal: @catppuccin[@@flavor][@teal]; + @sky: @catppuccin[@@flavor][@sky]; + @sapphire: @catppuccin[@@flavor][@sapphire]; + @blue: @catppuccin[@@flavor][@blue]; + @lavender: @catppuccin[@@flavor][@lavender]; + @text: @catppuccin[@@flavor][@text]; + @subtext1: @catppuccin[@@flavor][@subtext1]; + @subtext0: @catppuccin[@@flavor][@subtext0]; + @overlay2: @catppuccin[@@flavor][@overlay2]; + @overlay1: @catppuccin[@@flavor][@overlay1]; + @overlay0: @catppuccin[@@flavor][@overlay0]; + @surface2: @catppuccin[@@flavor][@surface2]; + @surface1: @catppuccin[@@flavor][@surface1]; + @surface0: @catppuccin[@@flavor][@surface0]; + @base: @catppuccin[@@flavor][@base]; + @mantle: @catppuccin[@@flavor][@mantle]; + @crust: @catppuccin[@@flavor][@crust]; + @accent: @catppuccin[@@flavor][@@accentColor]; + + color-scheme: if(@flavor = latte, light, dark); + + ::selection { + background-color: fade(@accent, 30%); + } + + input, + textarea { + &::placeholder { + color: @subtext0 !important; + } + } + + /* Start styling your website here: */ + background-color: @base; + --white: @mantle !important; + --primary: @accent !important; + --strawberry: @red !important; + --card-border: fade(@overlay0, 30%) !important; + --background-body: @mantle !important; + /* uikit (components) */ + --uikit-black: @text !important; + --uikit-danger: @red !important; + --uikit-grey: @subtext0 !important; + --uikit-grey-card-border: @surface0 !important; + --uikit-grey-border: @overlay0 !important; + --uikit-grey-disabled-text: @subtext1 !important; + --uikit-grey-light: @surface1 !important; + --uikit-grey-bg: @base !important; + --uikit-neutral: @surface1 !important; + --uikit-primary: @accent !important; + --uikit-primary-foreground: @base !important; + --uikit-white: @mantle !important; + --uikit-black-light: @subtext0 !important; + --uikit-grey-lighter: @surface0 !important; + --uikit-destructive: @red !important; + --uikit-progressbar-bg: @surface0 !important; + /* highlights */ + --highlight-default: @accent !important; + /* borders */ + --border-grey: @surface0 !important; + --border-light-grey: @surface1 !important; + --borderGrey: @surface0 !important; + /* text */ + --text-semi-dark: @subtext1 !important; + --text-body: @text !important; + --text-white: @base !important; + --tag-background: @surface0 !important; + --text-lighter: @subtext0 !important; + --text-grey: @subtext0 !important; + --text-light: @subtext0 !important; + + /* badges */ + .HeaderBadge_badge--danger__ky5Oa .HeaderBadge_badge__button__uSQwy { + background-color: @red !important; + color: @base !important; + } + + .server-subtitle.jsx-2530893253 { + color: @subtext1; + } + + .PageNavigation_navTab__nBNT0.PageNavigation_selected__PTIPv, + .PageNavigation_navTab__nBNT0:hover { + color: @accent !important; + } + + .PageNavigation_navTab__nBNT0 { + color: @text; + } + + /* Promotional banner */ + .Header_appFeaturePromotionHeader__xZzHK { + background-color: @mantle; + color: @text; + border-bottom: 0.05px solid @surface0; + } + + /* Popover */ + .Popover_menu__1uJ_3 { + border-radius: 0.5rem; + } + + .Popover_item__Sz_rR:not(.Popover_disabledItem__LpnlT):hover + .Popover_itemContent__gAOiJ { + background-color: fade(white, 5%); + color: @accent; + transition: background 0.2s, color 0.2s; + border-radius: 0.5rem; + } + + // "info boxes" + .infobox { + background-color: @surface0 !important; + border: 0.1px solid @surface1 !important; + color: @text !important; + } + + .infobox::before, .infobox::after { + border-color: @surface1 transparent transparent !important; + } + + /* code */ + .inline-code { + background-color: @crust !important; + } + + /* disclaimer (warning) */ + .disclaimer { + background-color: @mantle !important; + color: @text !important; + } + + .disclaimer--warning { + border-color: @yellow !important; + } + + .disclaimer--error { + border-color: @red !important; + } + .disclaimer--error .disclaimer__icon { + background-color: @red !important; + } + .disclaimer--warning .disclaimer__icon { + background-color: @yellow !important; + } + + .disclaimer__icon .Phoenix--Icon { + color: @base !important; + } + + /* toast */ + .Phoenix__Toast__icon-container svg, .Phoenix__Toast__icon-container path { + fill: @base !important; + } + + /* Buttons */ + .Phoenix--Button__primary { + background-color: @accent !important; + color: @base !important; + border-radius: 0.5rem; + + transition: background-color 0.2s ease; + + &:hover { + background-color: fade(@accent, 80%) !important; + } + } + + .Phoenix--Button__outlined { + border-radius: 0.5rem; + transition: background-color 0.2s, color 0.2s; + &:active, + &:hover { + background-color: @accent !important; + border-color: transparent; + color: @base !important; + } + } + + .Phoenix__MiniButton svg, + .Phoenix__MiniButton svg path, + .Phoenix__MiniButton svg * { + fill: @text !important; + color: @text !important; + } + + .expired-session__modal .Phoenix__CardHead { + background-color: @accent !important; + color: @base !important; + } + + /* modals */ + // Only apply transition/animation for modal cards + .Phoenix--Modal { + transition: + box-shadow 0.2s, + border-radius 0.2s, + opacity 0.2s, + transform 0.2s; + opacity: 0; + transform: translateY(20px); + animation: modalCardFadeIn 0.3s forwards; + } + @keyframes modalCardFadeIn { + to { + opacity: 1; + transform: translateY(0); + } + } + + .Phoenix__CardHead { + color: @text !important; + border-bottom: 0.5px solid @surface0 !important; + border-radius: 0.5rem 0.5rem 0 0; + &.Phoenix__CardHead--collapsed { + border-radius: 0.5rem; + } + } + + .Phoenix--Modal__content .Phoenix__Card { + box-shadow: none; + border-radius: 0.5rem; + } + + .Phoenix__Card { + border: 0.5px solid @surface0 !important; + } + + .Phoenix__CardDataRow__Cell + .Phoenix__CardDataRow__Cell { + border-left: 0.5px solid @surface0; + } + + .expired-session__modal .Phoenix__Card path { + fill: @base !important; + } + + /* cards */ + .card-section.jsx-1989900655 + .card-section.jsx-1989900655, + .footer-wrapper { + border-top: 0.5px solid @surface0; + } + + .Phoenix__CardDataRow__Cell--editable .Phoenix__CardDataRow__Cell__content, + .Phoenix__CardDataRow__Cell__value { + color: @text !important; + } + + .Phoenix__Card { + border-radius: 0.5rem; + } + + /* state indicators */ + .state-indicator--green { + background: @green !important; + } + + .state-indicator--red { + background: @red !important; + } + + .state-indicator--yellow { + background: @yellow !important; + } + + .state-indicator--gray { + background: @overlay2 !important; + } + + .server-state-value { + color: @text !important; + } + + .server-state-label { + color: @subtext0 !important; + } + + /* events */ + .latest-events-wrapper.jsx-2763421929::before { + background-color: var(--uikit-neutral) !important; + } + .event-header.jsx-2763421929 { + color: @subtext1 !important; + } + + /* avatars */ + + .Phoenix__Avatar--secondary {} + + /* checkbox */ + + .chunkbox { + background-color: @surface0; + border-radius: 0.25rem; + transition: all 0.2s ease; + + &.checked { + background-color: @accent; + border-color: @accent; + } + + &::before { + border: 2px solid @overlay2; + border-radius: 0.25rem; + } + + &::after { + border-color: @base !important; + } + } + + /* dropdown inputs */ + .Phoenix__Select__Select__control { + border: 1px solid @surface0 !important; + } + + .Phoenix__Select__Select__indicators path { + fill: @text !important; + } + + .dropdown { + background: @base; + border-radius: 0.5rem; + border: 1px solid @surface0; + box-shadow: none; + color: @text; + } + + .border-top { + border-top: 0.5px solid @surface0; + } + + /* radio inputs */ + input:checked + .Phoenix--Radio__glyph::after { + background: transparent !important; + } + + .Phoenix__RadioCard > label { + border: 0.5px solid @surface0 !important; + border-radius: 0.5rem !important; + transition: border-color 0.2s ease, background-color 0.2s ease; + } + + /* text inputs */ + .Phoenix__Input__Input:hover::before { + // to prevent black flashes + border-color: var(--uikit-neutral) !important; + } + + /* tables */ + .Phoenix__SortableTable__Body { + background: @mantle !important; + color: @text !important; + + & > * { + --uikit-grey-border: @surface0 !important; + } + } + + /* sidebar */ + .Phoenix__Sidebar__Head { + color: @text; + } + + .Phoenix__Sidebar__Head .logo { + filter: if(@flavor = latte, none, brightness(0) invert(1)); + } + + .Phoenix__Sidebar__NavItem { + color: @text; + } + + .Phoenix__Sidebar__NavItem--has-subnav a.active::before, + .Phoenix__Sidebar__SubNavItem a::before { + background: @accent !important; + } + + .Phoenix__Sidebar__inner { + background-color: @mantle; + border-right: 0.05px solid @surface0; + color: @text; + } + + /* resource (dashboard) */ + .resource-summary-graph-bar-success, + .resource-summary-value-success::before { + background-color: @green !important; + } + + /* dashboard cards */ + .dashboard-card.jsx-3277314316:not(.dashboard-card-disabled):hover { + color: @accent; + border-color: @accent; + } + + .dashboard-card.jsx-3277314316:not(.dashboard-card-disabled):hover + .dashboard-card-icon.jsx-3277314316, + .dashboard-card.jsx-3277314316:not(.dashboard-card-disabled):focus-visible + .dashboard-card-icon.jsx-3277314316 { + color: @accent !important; + } + + .resource-summary-label, .dashboard-card-empty { + color: @subtext0 !important; + } + + .list-item:last-child { + border-top: 1px solid @surface1 !important; + } + + .backup-summary-legend, .list-item { + color: @subtext1 !important; + } + + // link cards + .dashboard-link { + background-color: @mantle; + border: 0.1px solid @surface0; + color: @text; + transition: color 0.2s ease, border-color 0.2s ease; + + &:hover { + border-color: @accent !important; + color: @text !important; + } + } + + // generic cards + .card, .dashboard-card, .graph, .network-card-header, .card-header { + background-color: @mantle; + color: @text; + + &.card, &.dashboard-card { + border: 0.1px solid @surface0; + } + + &.dashboard-card { + transition: color 0.2s ease, border-color 0.2s ease; + } + } + + .card-header { + border: 0.1px solid transparent; + } + + .network-card-header { + border: 0.1px solid @surface0; + } + + .card-item { + border: 0.1px solid transparent; + border-top: 0.1px solid @surface1; + } + + .network-card-item, .card-item { + background-color: @mantle; + color: @text; + transition: color 0.2s ease, border-color 0.2s ease; + + &:hover { + border-color: @accent !important; + color: @text !important; + } + } + + .network-card-item { + border: 0.1px solid @surface0; + } + + .network-card-item-label, + .card-item-location, + .card-news-date, + .billing-label, + .item-cell, + .summary-item__label, + .header-subtitle, + .details, + .heading__title-suffix, + .u-subdued { + color: @subtext0 !important; + } + + // network cards + + .network-card { + background-color: @mantle; + color: @text; + } + + // news cards + .header-title { + color: @accent; + } + + // header dots + .header-dots-item { + background-color: @surface1; + } + .header-dots-item-active { + background-color: @accent; + } + + /* icons */ + .Phoenix--Icon { + // part of the dashboard + color: @accent !important; + } + + .app-header-badges .Phoenix--Icon, + .Phoenix--Button__primary .Phoenix--Icon { + // don't style these + // do not style the shield "2fa" button + color: @base !important; + } + + /* charts */ + .recharts-surface { + background-color: transparent; + } + + .recharts-reference-line-line { + stroke: @overlay0 !important; + } + + .recharts-area-area { + fill: fade(@accent, 20%) !important; + } + + .recharts-area-curve { + stroke: @accent !important; + } + + .recharts-default-tooltip { + background-color: @surface0 !important; + border: 0.05px solid @surface1 !important; + color: @text !important; + border-radius: 0.25rem; + } + + .recharts-tooltip-item, + .u-text-purple, + .u-bold-purple, + .big-purple, + .bold-purple, + .plan--selected, + .plan--selected .details { + color: @accent !important; + } + + .recharts-tooltip-label { + color: @text !important; + font-weight: bold; + } + + .recharts-dot { + fill: @accent !important; + stroke: @surface0 !important; + } + + /* server list */ + .styles_serverListItemCard__XD_by { + border-radius: 0.5rem; + } + + .sort-desc::after { + // for sorting items + border-top-color: @accent !important; + } + + .sort-asc::after { + border-bottom-color: @accent !important; + } + + /* deploy a server */ + .summary, .server-summary { + background-color: @crust; + border-radius: 0.5rem; + } + + .summary-totals { + border-top: 0.05px solid @surface0; + } + + .summary-totals__monthly, .summary-totals__hourly { + color: @accent; + } + + .styles_planTypeToggle__ugmCW { + background-color: transparent !important; + //color: @base !important; + } + + .Phoenix__Tab { + background-color: @mantle; + color: @text; + } + + .plan { + border: none; + } + + .plans-radio-table, .plans-content { + color: @text !important; + } + + .plan .Phoenix__RadioCard:not(.Phoenix__RadioCard--disabled):hover > label { + border-color: @accent !important; + } + + .plan-column:not(:last-child) { + border-right: 0.1px solid @surface1 !important; + } + .plan.selected { + color: @accent !important; + } + + .plan.selected { + background-color: @mantle !important; + border: 0.5px solid @accent !important; + border-radius: 0.5rem !important; + } + + .gpu-quota-row { + border-radius: 0.5rem; + color: @text !important; + background-color: rgba(123, 0, 255, 0.05); + } + + .error-wrapper { + background-color: transparent !important; + } + + .resize-info__price { + color: @text !important; + } + + .backup-card--selected .backup-price { + color: @accent !important; + } + + .backup-card--selected, .backup-feature { + color: @text !important; + } + + /* referral */ + .overlay { + background: linear-gradient(fade(@base, 85%) 0%, fade(@base, 95%) 100%) + !important; + } + + .ReferralProgram_disabledTextContainer__Tqy9M { + background-color: fade(@base, 95%); + box-shadow: + 0 -10px 20px 20px fade(@base, 90%), + -10px 0 20px 20px fade(@base, 90%), + 10px 0 20px 20px fade(@base, 90%), + 0 20px 20px 30px fade(@base, 90%); + } + + /* main app */ + + .app-main, .app { + background-color: @base; + color: @text; + } + + .logo, .image-wrapper { + filter: if(@flavor = latte, none, brightness(0) invert(1)); + color: @text !important; + } + + .image-wrapper { + opacity: 0.1; + } + + /* If you need to specify an overwrite specific to a flavor + * (e.g. only when the flavor is set to latte), you can use a `when` guard clause. */ + & when (@flavor = latte) { + /* ... */ + } + /* You can also negate the statement above by using + * a `when not` guard clause. */ + & when not(@flavor = latte) { + /* ... */ + } + } +} + +/* deno-fmt-ignore */ +@catppuccin: { + @latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; }; + @frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; }; + @macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; }; + @mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; }; +};