-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add titlebar and first theme support (#74)
* refactor: Moved titlebar logo to div * feat: Added global font setting * bug: Removed misplaced question mark * feat: First titlebar implementation * feat: Lowered near clipping value * feat: first titlebar and theme implementation * feat: Increased theme support * bugfix: added overscroll-behavior Co-authored-by: Samuel Höra <[email protected]>
- Loading branch information
Showing
7 changed files
with
140 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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,37 @@ | ||
// Variables for color schemes | ||
@mixin theme-light { | ||
--theme-font-color: hsl(0,0%,13%); | ||
--theme-main-bg-color: hsl(0,0%,100%); | ||
--theme-titlebar-bg-color: hsl(0,0%,100%); | ||
--theme-titlebar-bg-highlight: hsl(0,0%,85%); | ||
--theme-titlebar-bg-logo: linear-gradient(to top right, hsl(304, 100%, 32%), hsl(0, 87%, 69%)); | ||
} | ||
|
||
@mixin theme-dark { | ||
--theme-font-color: hsla(0,0%,95%) ; | ||
--theme-main-bg-color: hsl(0,0%,10%); | ||
--theme-titlebar-bg-color: hsl(0,0%,15%); | ||
--theme-titlebar-bg-highlight: hsl(0,0%,25%); | ||
--theme-titlebar-bg-logo: linear-gradient(to top right, hsl(304, 100%, 27%), hsl(0, 87%, 64%)); | ||
} | ||
|
||
@mixin theme-midnight{ | ||
--theme-font-color: #hsla(0,0%,95%) ; | ||
--theme-main-bg-color: hsl(0,0%,5%); | ||
--theme-titlebar-bg-color: hsl(0,0%,5%); | ||
--theme-titlebar-bg-highlight: hsl(0,0%,10%); | ||
--theme-titlebar-bg-logo: linear-gradient(to top right, hsl(304, 100%, 32%), hsl(0, 87%, 69%)); | ||
} | ||
|
||
@mixin bg-color-transition{ | ||
transition: background-color 0.5s ease-in-out; | ||
} | ||
@mixin bg-highlight-color-transition{ | ||
transition: background-color 0.05s ease-in-out; | ||
} | ||
@mixin bg-img-transition{ | ||
transition: background-image 2s ease-in-out; | ||
} | ||
@mixin color-transition{ | ||
transition: color 0.5s ease-in-out; | ||
} |
This file contains 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 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 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 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 |
---|---|---|
@@ -1 +1,12 @@ | ||
<img src="assets/logo_monochrome_white.svg" class="app-titlebar-logo" height="32px" draggable="false"/> | ||
<div class="app-titlebar-logo-area"> | ||
<input type="image" src="assets/logo_monochrome_white.svg" class="app-titlebar-logo" disabled=True /> | ||
</div> | ||
|
||
<div class="app-titlebar-button-container"> | ||
<button class="app-titelbar-button">Datei</button> | ||
<button class="app-titelbar-button">Bearbeiten</button> | ||
<button class="app-titelbar-button">Ausführen</button> | ||
<button class="app-titelbar-button">Editor</button> | ||
<button class="app-titelbar-button">Welt</button> | ||
<button class="app-titelbar-button">Hilfe</button> | ||
</div> |
This file contains 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 |
---|---|---|
@@ -1,6 +1,42 @@ | ||
.app-titlebar-logo { | ||
padding: 6px 16px 6px 16px; | ||
border-radius: 0 5px 5px 0; | ||
background-image: linear-gradient(to top right, #A20098, #F56B6B); | ||
@use "sass:math"; | ||
@use "../../themes" as themes; | ||
|
||
.app-titlebar-logo-area { | ||
width: 3.5rem; | ||
height: inherit; | ||
text-align: center; | ||
border-radius: 0 math.div(5rem, 16) math.div(5rem, 16) 0; | ||
background-image: var(--theme-titlebar-bg-logo); | ||
box-shadow: 0 0 5px rgba(0,0,0,0.5); | ||
@include themes.bg-img-transition; | ||
} | ||
|
||
.app-titlebar-logo { | ||
height: inherit; | ||
padding: 0.4rem; | ||
user-select: none; | ||
cursor: default; | ||
} | ||
|
||
.app-titlebar-button-container{ | ||
height: inherit; | ||
display: grid; | ||
grid-template-columns: repeat(6, [col-start] auto [col-end]); | ||
margin: 0 0 0 0.75rem; | ||
} | ||
|
||
.app-titelbar-button{ | ||
color: var(--theme-font-color); | ||
height: inherit; | ||
border-color: transparent; | ||
background-color: transparent; | ||
padding-left: 0.5rem; | ||
padding-right: 0.5rem; | ||
border-radius: 0.25rem; | ||
|
||
@include themes.bg-highlight-color-transition; | ||
} | ||
|
||
.app-titelbar-button:hover{ | ||
background-color: var(--theme-titlebar-bg-highlight); | ||
} |
This file contains 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