-
Notifications
You must be signed in to change notification settings - Fork 10
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
New UI main page #98
Merged
Merged
New UI main page #98
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3754f32
Integrate tailwindcss.
amclain 86bbb76
Move the application css customizations into xebow.scss.
amclain fc9f304
Bring the UI back up to parity.
amclain 40751a3
Add fontawesome for icons.
amclain 98f1afe
Remove stale html for LiveView telemetry.
amclain 26f90ee
Move boilerplate LiveView scss to dedicated file.
amclain 696c98d
Add lato font.
amclain 28dff68
Create nav bar.
amclain 5324aa3
Lay out configuration controls.
amclain 17a4744
Add key styling.
amclain d5b0f23
Style sliders.
amclain 81a9840
Remove outline from button and select box.
amclain c1ddc59
Preliminary dropdown styling.
amclain 9407cf0
Add frame around keypad and enlarge keys.
amclain 9caae94
Refactor dropdown arrow to use CSS content rather than a DOM element.
amclain 2b366ac
Adjust LED size and position in the live component.
amclain 347cf68
Rename xebow.scss to keypad.scss.
amclain 428fbf4
Move nav CSS into HTML template. It's one-off styling.
amclain e17f0aa
Convert more CSS properties to tailwind utility classes.
amclain 3733b42
Capitalize animation config option names.
amclain 878fc5e
Adjust select box styling.
amclain b024604
Adjust button styling.
amclain 10cfe9b
Modify option component to format atoms with underscores.
amclain 3c19330
Merge branch 'master' into feature/ui-main-page
vanvoljg 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 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,120 +1,22 @@ | ||
/* This file is for your main application css. */ | ||
@import './phoenix.css'; | ||
@import '../node_modules/nprogress/nprogress.css'; | ||
@import "./fontawesome.scss"; | ||
@import "./lato.scss"; | ||
|
||
/* LiveView specific classes for your customizations */ | ||
.invalid-feedback { | ||
color: #a94442; | ||
display: block; | ||
margin: -1rem 0 2rem; | ||
} | ||
|
||
.phx-no-feedback.invalid-feedback, | ||
.phx-no-feedback .invalid-feedback { | ||
display: none; | ||
} | ||
|
||
.phx-click-loading { | ||
opacity: 0.5; | ||
transition: opacity 1s ease-out; | ||
} | ||
|
||
.phx-disconnected { | ||
cursor: wait; | ||
} | ||
.phx-disconnected * { | ||
pointer-events: none; | ||
} | ||
|
||
.phx-modal { | ||
opacity: 1 !important; | ||
position: fixed; | ||
z-index: 1; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgb(0, 0, 0); | ||
background-color: rgba(0, 0, 0, 0.4); | ||
} | ||
|
||
.phx-modal-content { | ||
background-color: #fefefe; | ||
margin: 15% auto; | ||
padding: 20px; | ||
border: 1px solid #888; | ||
width: 80%; | ||
} | ||
|
||
.phx-modal-close { | ||
color: #aaa; | ||
float: right; | ||
font-size: 28px; | ||
font-weight: bold; | ||
} | ||
|
||
.phx-modal-close:hover, | ||
.phx-modal-close:focus { | ||
color: black; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
@import "tailwindcss/base"; | ||
@import "tailwindcss/components"; | ||
@import "tailwindcss/utilities"; | ||
|
||
/* Alerts and form errors */ | ||
.alert { | ||
padding: 15px; | ||
margin-bottom: 20px; | ||
border: 1px solid transparent; | ||
border-radius: 4px; | ||
} | ||
.alert-info { | ||
color: #31708f; | ||
background-color: #d9edf7; | ||
border-color: #bce8f1; | ||
} | ||
.alert-warning { | ||
color: #8a6d3b; | ||
background-color: #fcf8e3; | ||
border-color: #faebcc; | ||
} | ||
.alert-danger { | ||
color: #a94442; | ||
background-color: #f2dede; | ||
border-color: #ebccd1; | ||
} | ||
.alert p { | ||
margin-bottom: 0; | ||
} | ||
.alert:empty { | ||
display: none; | ||
} | ||
@import "../node_modules/nprogress/nprogress.css"; | ||
|
||
// my styles | ||
|
||
.container { | ||
max-width: 120rem; | ||
color: white; | ||
} | ||
@import "./button.scss"; | ||
@import "./live_view.scss"; | ||
@import "./keypad.scss"; | ||
@import "./select.scss"; | ||
@import "./slider.scss"; | ||
|
||
body { | ||
background-color: #222; | ||
} | ||
|
||
div.screen { | ||
position: relative; | ||
top: 25px; | ||
left: 25px; | ||
height: 325px; | ||
} | ||
|
||
span.key, | ||
span.led { | ||
display: inline-block; | ||
position: absolute; | ||
border: 1px solid #222; | ||
} | ||
|
||
span.led { | ||
border-radius: 25px; | ||
@apply text-white font-light bg-gray-900; | ||
@apply mx-8; | ||
font-family: lato, sans-serif; | ||
font-size: 1.375rem; | ||
} |
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,15 @@ | ||
button { | ||
@apply text-lg bg-blue-800 text-white font-normal pt-2 pb-1 px-4 rounded; | ||
|
||
.svg-inline--fa { | ||
@apply text-base; | ||
} | ||
|
||
&:hover { | ||
@apply bg-blue-600; | ||
} | ||
|
||
&:focus { | ||
@apply outline-none; | ||
} | ||
} |
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,11 @@ | ||
/*! | ||
* Font Awesome Free 5.14.0 by @fontawesome - https://fontawesome.com | ||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) | ||
*/ | ||
@font-face { | ||
font-family: 'Font Awesome 5 Free'; | ||
font-style: normal; | ||
font-weight: 900; | ||
font-display: block; | ||
src: url("/fonts/fa-solid-900.woff2") format("woff2"), url("/fonts/fa-solid-900.woff") format("woff"); | ||
} |
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,32 @@ | ||
.keypad { | ||
@apply relative; | ||
|
||
.frame { | ||
@apply relative; | ||
@apply border border-gray-700 border-solid; | ||
border-radius: .625rem; | ||
width: 250px; | ||
height: 320px; | ||
top: -53px; | ||
left: -53px; | ||
} | ||
} | ||
|
||
.key, | ||
.led { | ||
display: inline-block; | ||
position: absolute; | ||
} | ||
|
||
.key { | ||
border-radius: 6px; | ||
box-shadow: inset 0 -1px 0 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.3); | ||
border-left: 1px solid rgba(0, 0, 0, 0.1); | ||
border-right: 1px solid rgba(0, 0, 0, 0.1); | ||
|
||
padding-top: 6px; | ||
} | ||
|
||
.led { | ||
border-radius: 25px; | ||
} |
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,179 @@ | ||
/*! | ||
Lato font. | ||
*/ | ||
/* Lato (hairline, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 100; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-hairline.woff2") format("woff2"), url("/fonts/lato-hairline.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (hairline, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 100; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-hairline-italic.woff2") format("woff2"), url("/fonts/lato-hairline-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (thin, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 200; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-thin.woff2") format("woff2"), url("/fonts/lato-thin.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (thin, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 200; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-thin-italic.woff2") format("woff2"), url("/fonts/lato-thin-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (light, regular) */ | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 300; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-light.woff2") format("woff2"), url("/fonts/lato-light.woff") format("woff"); | ||
} | ||
/* Lato (light, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 300; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-light-italic.woff2") format("woff2"), url("/fonts/lato-light-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (normal, regular) */ | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 400; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-normal.woff2") format("woff2"), url("/fonts/lato-normal.woff") format("woff"); | ||
} | ||
/* Lato (normal, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 400; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-normal-italic.woff2") format("woff2"), url("/fonts/lato-normal-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (medium, regular) */ | ||
/* | ||
@font-face { | ||
font-family: "Lato Medium"; | ||
font-weight: 400; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-medium.woff2") format("woff2"), url("/fonts/lato-medium.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (medium, italic) */ | ||
/* | ||
@font-face { | ||
font-family: "Lato Medium"; | ||
font-weight: 400; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-medium-italic.woff2") format("woff2"), url("/fonts/lato-medium-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (semibold, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 500; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-semibold.woff2") format("woff2"), url("/fonts/lato-semibold.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (semibold, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 500; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-semibold-italic.woff2") format("woff2"), url("/fonts/lato-semibold-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (bold, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 600; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-bold.woff2") format("woff2"), url("/fonts/lato-bold.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (bold, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 600; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-bold-italic.woff2") format("woff2"), url("/fonts/lato-bold-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (heavy, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 800; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-heavy.woff2") format("woff2"), url("/fonts/lato-heavy.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (heavy, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 800; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-heavy-italic.woff2") format("woff2"), url("/fonts/lato-heavy-italic.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (black, regular) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 900; | ||
font-style: normal; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-black.woff2") format("woff2"), url("/fonts/lato-black.woff") format("woff"); | ||
} | ||
*/ | ||
/* Lato (black, italic) */ | ||
/* | ||
@font-face { | ||
font-family: Lato; | ||
font-weight: 900; | ||
font-style: italic; | ||
text-rendering: optimizeLegibility; | ||
src: url("/fonts/lato-black-italic.woff2") format("woff2"), url("/fonts/lato-black-italic.woff") format("woff"); | ||
} | ||
*/ |
Oops, something went wrong.
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.
I copied in the entire
lato.scss
file, made the necessary changes for this project, and commented out the fonts we aren't using. As much as I try to avoid committing commented code, this should be at low-risk of changing and sets the next developer up to only have to uncomment the code if we add another lato font to the project (like italics).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.
I'm pretty okay with it. There's not a lack of space in these devices, so this is fine.