-
Notifications
You must be signed in to change notification settings - Fork 140
Holiday Frogs ❤️🍀🎃🦃🎅 #1766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Holiday Frogs ❤️🍀🎃🦃🎅 #1766
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import React from "react"; | ||
|
|
||
| const Frog = ({ | ||
| primary = "#951fd9", | ||
| secondary = "#cc87f4", | ||
| pupil = "#000", | ||
| eye = "#FFF", | ||
| nose = "#505050", | ||
| title = "", | ||
| ...props | ||
| }) => ( | ||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" {...props}> | ||
| <title>{title}</title> | ||
| <path | ||
| fill={secondary} | ||
| d="M36 22c0 7.456-8.059 12-18 12S0 29.456 0 22 8.059 7 18 7s18 7.544 18 15z" | ||
| /> | ||
| <path | ||
| fill={primary} | ||
| d="M31.755 12.676C33.123 11.576 34 9.891 34 8c0-3.313-2.687-6-6-6-2.861 0-5.25 2.004-5.851 4.685-1.288-.483-2.683-.758-4.149-.758-1.465 0-2.861.275-4.149.758C13.25 4.004 10.861 2 8 2 4.687 2 2 4.687 2 8c0 1.891.877 3.576 2.245 4.676C1.6 15.356 0 18.685 0 22c0 7.456 8.059 1 18 1s18 6.456 18-1c0-3.315-1.6-6.644-4.245-9.324z" | ||
| /> | ||
| <circle fill={eye} cx="7.5" cy="7.5" r="3.5" className="eyeL" /> | ||
| <circle fill={pupil} cx="7.5" cy="7.5" r="1.5" className="pupilL" /> | ||
| <circle fill={eye} cx="28.5" cy="7.5" r="3.5" className="eyeR" /> | ||
| <circle fill={pupil} cx="28.5" cy="7.5" r="1.5" className="pupilR" /> | ||
| <circle fill={nose} cx="14" cy="20" r="1" className="noseL" /> | ||
| <circle fill={nose} cx="22" cy="20" r="1" className="noseR" /> | ||
| </svg> | ||
| ); | ||
|
|
||
| export default Frog; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import React from "react"; | ||
| import Frog from "./Frog"; | ||
|
|
||
| interface HolidayFrogProps { | ||
| today?: Date; | ||
| className?: string; | ||
| } | ||
|
|
||
| export default function HolidayFrog({ | ||
| today = new Date(), | ||
| className = "size-7", | ||
| }: HolidayFrogProps) { | ||
| const month = today.getUTCMonth(); | ||
| const date = today.getUTCDate(); | ||
|
|
||
| // TODO: special handling for frug | ||
|
|
||
| // Defaults | ||
| let primary = "#951fd9"; | ||
| let secondary = "#cc87f4"; | ||
| let message = "Happy Decomping!"; | ||
|
|
||
| if (month === 1 && date === 14) { | ||
| primary = "#e6396f"; | ||
| secondary = "#f7a1c4"; | ||
| message = "❤️ Happy Valentine's Day! ❤️"; | ||
| } | ||
| if (month === 2 && date === 17) { | ||
| primary = "#2a9d34"; | ||
| secondary = "#7fd28d"; | ||
| message = "🍀 Happy St Patrick's Day! 🍀"; | ||
| } | ||
| if (month === 9 && date === 31) { | ||
| primary = "#d96516"; | ||
| secondary = "#20150aff"; | ||
| message = "🎃 Happy Halloween! 🎃"; | ||
| } | ||
|
|
||
| if (month === 10) { | ||
| // Thanksgiving (4th Thursday of November) | ||
| const firstDay = new Date(today.getFullYear(), 10, 1); | ||
| const firstThursday = 1 + ((4 - firstDay.getDay() + 7) % 7); | ||
| const fourthThursday = firstThursday + 21; | ||
| if (date === fourthThursday) { | ||
| primary = "#9e682a"; | ||
| secondary = "#d2a679"; | ||
| message = "🦃 Happy Thanksgiving! 🦃"; | ||
| } | ||
| } | ||
|
|
||
| if (month === 11 && date === 25) { | ||
| primary = "#E61A1A"; | ||
| secondary = "#F8BFBF"; | ||
| message = "🎅 Merry Christmas! 🎅"; | ||
| } | ||
|
|
||
| return ( | ||
| <Frog | ||
| className={className} | ||
| aria-label="Purple frog" | ||
| primary={primary} | ||
| secondary={secondary} | ||
| title={message} | ||
| /> | ||
| ); | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| @keyframes blink { | ||
| 0% { | ||
| transform: scaleY(1); | ||
| opacity: 1; | ||
| } | ||
| 25% { | ||
| transform: scaleY(0.2); | ||
| opacity: 0; | ||
| } | ||
| 50% { | ||
| transform: scaleY(1); | ||
| opacity: 1; | ||
| } | ||
| 75% { | ||
| transform: scaleY(0.2); | ||
| opacity: 0; | ||
| } | ||
| 100% { | ||
| transform: scaleY(1); | ||
| opacity: 1; | ||
| } | ||
| } | ||
|
|
||
| .blinkingEyes :global(.pupilR), | ||
| .blinkingEyes :global(.pupilL), | ||
| .blinkingEyes :global(.eyeR), | ||
| .blinkingEyes :global(.eyeL) { | ||
| transform-origin: 0 7px; | ||
| animation: blink 0.4s 2s ease; | ||
| } | ||
|
|
||
| @media (prefers-reduced-motion) { | ||
| .blinkingEyes :global(.pupilR), | ||
| .blinkingEyes :global(.pupilL), | ||
| .blinkingEyes :global(.eyeR), | ||
| .blinkingEyes :global(.eyeL) { | ||
| animation: none; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import clsx from "clsx"; | ||
| import HolidayFrog from "../Frog/HolidayFrog"; | ||
| import styles from "./SiteLogo.module.scss"; | ||
|
|
||
| export default function SiteLogo() { | ||
| return ( | ||
| <div | ||
| className={clsx( | ||
| "inline-flex items-center space-x-2", | ||
| styles.blinkingEyes, | ||
| )} | ||
| aria-label="decomp.me logo" | ||
| > | ||
| <HolidayFrog /> | ||
| <span className="font-semibold text-xl leading-6 tracking-tight"> | ||
| decomp.me | ||
| </span> | ||
| </div> | ||
| ); | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes