Skip to content

Commit

Permalink
feat: update april special
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyupe committed Mar 31, 2023
1 parent 40b4e21 commit 2a8ee77
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/components/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const path: Record<string, string> = {

export function Logo({ ...props }) {
const appIcon = getAppIcon() || 'matcha'

if (appIcon === 'methane') {
return <img className="logo" {...props} src="https://cafemaker.wakingsands.com/i/021000/021314_hr1.png" alt="" />
}

return (
<svg className="logo" viewBox="0 0 400 400" {...props}>
<path d={path[appIcon]} />
Expand Down
8 changes: 4 additions & 4 deletions src/lib/season/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './mofish.scss'
import './methane.scss'

const useAprilStyle = (() => {
const now = new Date()
Expand All @@ -7,23 +7,23 @@ const useAprilStyle = (() => {

export const getAppSeason = (): string => {
if (useAprilStyle) {
return ' app-season-mofish'
return ' app-season-methane'
}

return ''
}

export const getAppIcon = (): string => {
if (useAprilStyle) {
return 'mofish'
return 'methane'
}

return ''
}

export const getSeasonTitle = (short = false): string | null => {
if (useAprilStyle) {
return short ? 'Mofish' : '摸鱼 Mofish'
return short ? 'Methane Egg' : '甲烷矿蛋'
}

return null
Expand Down
65 changes: 65 additions & 0 deletions src/lib/season/methane.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
$methane-color: #92cc39;

.app-season-methane {
.button-active, .button:hover {
color: $methane-color;
border-color: $methane-color;
}

&.app {
border-color: rgba($methane-color, 0.66);
}

&.app-minified {
background-color: #5a5952
}

.logo {
background-color: $methane-color;
}

.header > .tab.active {
border-color: $methane-color;
}

.header-lock.locked {
color: $methane-color;
}

.header-menu {
background: rgba($methane-color, 0.93);
}

.header-menu::before {
border-bottom-color: rgba($methane-color, 0.8);
}

.tag {
color: $methane-color;
}

.cactpot-input.highlight {
border-color: $methane-color;
color: $methane-color;
}

.cactpot-max {
color: $methane-color;
}

.gearset-wrap h3 {
color: $methane-color;
}

.overlay-market .lowest {
color: $methane-color;
}

.overlay-market .lowest .icon-hq path {
fill: $methane-color;
}

.alert-title {
color: $methane-color;
}
}

0 comments on commit 2a8ee77

Please sign in to comment.