Skip to content

Commit

Permalink
feat: add glassmorphism theme
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechmarek committed Jan 25, 2023
1 parent 7dfe872 commit 6ed0da9
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 3 deletions.
Binary file added src/assets/backgrounds/glassmorphism.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export const ModalSettingsContent = ({
text="Cardboard"
handleThemeClick={() => handleClick('cardboard')}
/>
<ImageTile
isActive={currentTheme === 'glassmorphism'}
text="Glassmorphism"
handleThemeClick={() => handleClick('glassmorphism')}
/>
</SettingsContainer>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const MainContentContainer = styled.div`
background-color: var(--nav-and-content-bg-color);
border: var(--standard-border);
box-shadow: var(--container-box-shadow);
backdrop-filter: var(--backdrop-filter);
@media (max-width: 768px) {
width: calc(100% - 2em);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const SettingsModalStyle = styled.div`
border-radius: var(--standard-border-radius);
box-shadow: var(--modal-box-shadow);
border: var(--standard-border);
backdrop-filter: var(--backdrop-filter);
@media screen and (min-width: 768px) {
height: 35em;
Expand Down
2 changes: 2 additions & 0 deletions src/components/organisms/Navbar/navbar.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const MobileNavbar = styled.nav<{ expanded: boolean }>`
justify-content: space-between;
border: var(--standard-border);
box-shadow: var(--container-box-shadow);
backdrop-filter: var(--backdrop-filter);
@media screen and (min-width: 768px) {
display: none;
Expand Down Expand Up @@ -69,6 +70,7 @@ export const DesktopNavbar = styled.nav<{ expanded: boolean }>`
transition: width 0.3s ease-in-out;
border: var(--standard-border);
box-shadow: var(--container-box-shadow);
backdrop-filter: var(--backdrop-filter);
@media screen and (min-width: 768px) {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
@import url('./layouts/neobruthalism.css');
@import url('./layouts/bruthalism.css');
@import url('./layouts/cardboard.css');
@import url('./layouts/glassmorphism.css');
4 changes: 2 additions & 2 deletions src/styles/layouts/bruthalism.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

/* --------- */

--modal-box-shadow: 0;
--container-box-shadow: 3px 3px 0 #000000;

--standard-border-radius: 0;

--standard-border: 1px solid black;
--modal-box-shadow: 5px 5px 0 #000000;
--backdrop-filter: 0;
}
3 changes: 2 additions & 1 deletion src/styles/layouts/cardboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

/* --------- */

--modal-box-shadow: 0;
--modal-box-shadow: 0 0 20px #1a161a;
--container-box-shadow: 0;

--standard-border-radius: 0;
--standard-border: 1px solid #1a161a;
--backdrop-filter: 0;
}
23 changes: 23 additions & 0 deletions src/styles/layouts/glassmorphism.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[data-theme='glassmorphism'] {
--background: url('/src/assets/backgrounds/glassmorphism.jpg');
--nav-and-content-bg-color: #ffffff30;
--modal-bg-color: #ffffff30;
--modal-cross-button-bg-color: #60c0bf;
--navbar-menu-button-bg-color: #ffffff30;
--navbar-settings-button-bg-color: #ffffff30;
--theme-tile-button-bg-color: #ffffff30;

--button-font-color: #1a161a;
--text-font-color: #1a161a;

--divider-color: #1a161a;

/* --------- */

--modal-box-shadow: 0 0 5px #ffffff40;
--container-box-shadow: 0 0 5px #ffffff40;

--standard-border-radius: 0.75em;
--standard-border: 1px solid #ffffff40;
--backdrop-filter: blur(5px);
}
1 change: 1 addition & 0 deletions src/styles/layouts/modern-flat-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@

--standard-border-radius: 0.75em;
--standard-border: 0;
--backdrop-filter: 0;
}
1 change: 1 addition & 0 deletions src/styles/layouts/modern-flat-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@

--standard-border-radius: 0.75em;
--standard-border: 0;
--backdrop-filter: 0;
}
1 change: 1 addition & 0 deletions src/styles/layouts/neobruthalism.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@

--standard-border-radius: 0.75em;
--standard-border: 1px solid black;
--backdrop-filter: 0;
}

1 comment on commit 6ed0da9

@vercel
Copy link

@vercel vercel bot commented on 6ed0da9 Jan 25, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.