Skip to content
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

feat(themes): add Windows theme adapter #221

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

tpenguinltg
Copy link
Contributor

This PR adds a new util function called mapFromWindowsTheme that takes a theme name, an object representing a Windows theme, and a flag indicating whether gradients should be used for the title bars.

The Windows theme object has Windows property names as keys and CSS colours as values (as strings). The rgb format allows for the simplest conversion since values in a Windows theme are already in decimal RGB, but any valid CSS colour can be used.

A theme called peggysPastels has been added to showcase the new function. The non-gradient version is the default export, but a gradient version is exported with a G suffix. Theme from DeviantArt.

Closes #212

@vercel
Copy link

vercel bot commented Jan 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/arturbien/react95/g9vu8slhe
✅ Preview: https://react95-git-fork-tpenguinltg-feat-windows-theme-mapping.arturbien.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 2, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f0ed55b:

Sandbox Source
React95 template Configuration

@arturbien
Copy link
Member

@tpenguinltg at first glance it looks really good. Also the new theme is super cute. I will take a closer look at the PR tomorrow. Thanks a lot ♥️

name,

anchor: HotTrackingColor,
anchorVisited: GrayText, // no Windows equivalent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's map anchorVisited to HotTrackingColor as well then. This way links will always stay the same color

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I've made the change.

Add a util function mapFromWindowsTheme that transforms a Windows theme
into a React95 theme.
@tpenguinltg tpenguinltg force-pushed the feat/windows-theme-mapping branch from e5fc7bf to f0ed55b Compare January 6, 2021 17:26
@arturbien arturbien merged commit d87a2e0 into react95-io:master Jan 6, 2021
@arturbien
Copy link
Member

@tpenguinltg great work. do you plan to also open a PR with additional converted themes? ☺️

@arturbien
Copy link
Member

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tpenguinltg tpenguinltg deleted the feat/windows-theme-mapping branch January 6, 2021 19:02
@tpenguinltg
Copy link
Contributor Author

tpenguinltg commented Jan 6, 2021

do you plan to also open a PR with additional converted themes?

@arturbien I do. We can discuss in #213 which one's you'd like to have and I'll also curate a list myself for the ones I think would be good, then I can go ahead and convert the ones we agree on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a utility to map Windows theme colors to React95 theme objects.
2 participants