This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Implement screen ui #20
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0b6690b
Start adding styles to UI
manolobevia f7b0a54
Refactor display location
manolobevia 6db4ecd
Add susy
manolobevia ca06ecd
Add a cross-browser, numerically stable algorithm to add floats accur…
manolobevia 0132b8b
Add more styles to layout.
manolobevia 56e3f1d
Add moment package
manolobevia 3196565
Remove export statement, since there is nothing to be exported
manolobevia 396bb22
Add font awesome package
manolobevia 880fec9
Continue adding UI styles
manolobevia 0ca3a39
Sync yarn.lock after adding moment & font-awesome
cappadona 14bf210
Remove @nuxtjs/font-awesome
manolobevia c560ba8
Change layout depending on unit library
manolobevia 2a901fe
Add styles for secondary unit display
manolobevia 12cd65d
Remove yarn as dependency
manolobevia 0d8cbbd
Add susy as dev dependency
manolobevia 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,40 +1,52 @@ | ||
<template> | ||
<div class="oku-circ"> | ||
<h1>{{ locationUpper }}</h1> | ||
<div class="oku-circ" v-bind:class="'oku-circ__' + location"> | ||
<h1>{{ location }}</h1> | ||
|
||
<!-- <time>{{ dateNow }}</time> --> | ||
<section class="device-type"> | ||
|
||
<section class="laptops"> | ||
<h2>Laptops:</h2> | ||
<h2 class="device-type__header"><i class="fa fa-laptop device-type__header--icon-laptop" aria-hidden="true"></i> Laptops: </h2> | ||
|
||
<ul> | ||
<li><span>{{ laptops[location].windowsAvailable }}</span> PC available {{ laptops[location].windowsNextDue }}</li> | ||
<li><span>{{ laptops[location].macAvailable }}</span> <i class="fa fa-apple" aria-hidden="true"></i> available {{ laptops[location].macNextDue }}</li> | ||
<li class="device-type__info"> | ||
<span class="device-type__info--count">{{ laptops[location].windowsAvailable }}</span> | ||
<i class="fa fa-apple device-type__info--icon" aria-hidden="true"></i> | ||
available <!--{{ laptops[location].windowsNextDue }}--> | ||
</li> | ||
|
||
<li class="device-type__info"> | ||
<span class="device-type__info--count">{{ laptops[location].macAvailable }}</span> | ||
<i class="fa fa-windows device-type__info--icon" aria-hidden="true"></i> | ||
available <!--{{ laptops[location].macNextDue }}--> | ||
</li> | ||
</ul> | ||
</section> | ||
|
||
<section class="chargers"> | ||
<h2>Phone Chargers:</h2> | ||
<section class="device-type"> | ||
|
||
<h2 class="device-type__header"><i class="fa fa-battery-quarter device-type__header--icon-charger" aria-hidden="true"></i> Phone Chargers: </h2> | ||
|
||
<ul> | ||
<li><span>{{ phoneChargers[location].iphone4Available }}</span> iPhone 4 available</li> | ||
<li><span>{{ phoneChargers[location].iphoneAvailable}}</span> iPhone 5 & up available</li> | ||
<li><span>{{ phoneChargers[location].microUsbAvailable }}</span> Micro USB available</li> | ||
<li><span>{{ phoneChargers[location].usbCAvailable }}</span> Micro USB-C available</li> | ||
<li class="device-type__info"> | ||
<span class="device-type__info--count">{{ phoneChargers[location].iphone4Available }}</span> iPhone 4 available | ||
</li> | ||
|
||
<li class="device-type__info"> | ||
<span class="device-type__info--count">{{ phoneChargers[location].iphoneAvailable}}</span> iPhone 5 & up available | ||
</li> | ||
|
||
<li class="device-type__info"><span class="device-type__info--count">{{ phoneChargers[location].microUsbAvailable }}</span> Micro USB available | ||
</li> | ||
|
||
<li class="device-type__info"><span class="device-type__info--count">{{ phoneChargers[location].usbCAvailable }}</span> USB-C available | ||
</li> | ||
</ul> | ||
</section> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import _ from 'lodash' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well played 😄 |
||
|
||
export default { | ||
data () { | ||
return { | ||
locationUpper: _.upperFirst(this.location) | ||
} | ||
}, | ||
computed: { | ||
laptops () { | ||
return this.$store.state.laptops.locations | ||
|
@@ -49,5 +61,130 @@ export default { | |
} | ||
</script> | ||
|
||
<style> | ||
<style lang="scss"> | ||
|
||
@import '~susy'; | ||
@import '~font-awesome/css/font-awesome.min.css'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once Nuxt |
||
|
||
// ========== | ||
// CSS VARIABLES | ||
// ========== | ||
$light-blue: #3C96D2; | ||
$red: #D0011B; | ||
|
||
.oku-circ { | ||
|
||
h1 { | ||
text-transform: capitalize; | ||
font-weight: normal; | ||
font-size: 50px; | ||
margin: 0; | ||
font-weight: 400; | ||
} | ||
|
||
.laptops, .chargers { | ||
padding-top: 20px; | ||
margin-bottom: 150px; | ||
} | ||
|
||
li { | ||
width: span(4 of 8); | ||
float: left; | ||
font-size: 30px; | ||
} | ||
} | ||
|
||
.oku-circ.oku-circ__uris { | ||
|
||
h1 { | ||
font-size: 30px; | ||
} | ||
|
||
li { | ||
font-size: 23px; | ||
} | ||
} | ||
|
||
.device-type { | ||
padding-top: 20px; | ||
margin-bottom: 150px; | ||
} | ||
|
||
.device-type__header { | ||
font-size: 40px; | ||
margin: 0; | ||
vertical-align: middle; | ||
padding-bottom: 20px; | ||
} | ||
|
||
.device-type__header--icon-laptop { | ||
font-size: 80px; | ||
vertical-align: middle; | ||
} | ||
|
||
.device-type__header--icon-charger { | ||
font-size: 60px; | ||
vertical-align: middle; | ||
} | ||
|
||
.device-type__info { | ||
width: span(4 of 8); | ||
float: left; | ||
font-size: 30px; | ||
color: $light-blue; | ||
padding-bottom: 20px; | ||
} | ||
|
||
.device-type__info--count { | ||
padding: 10px; | ||
color: $light-blue; | ||
border-radius: 50%; | ||
background-color: #fff; | ||
width: 60px; | ||
height: 60px; | ||
display: inline-block; | ||
text-align: center; | ||
font-size: 30px; | ||
vertical-align: middle; | ||
margin-right: 10px; | ||
} | ||
|
||
.device-type__info--icon { | ||
color: #fff; | ||
} | ||
|
||
.oku-circ.oku-circ__uris { | ||
|
||
h1 { | ||
font-size: 30px; | ||
} | ||
|
||
li { | ||
font-size: 23px; | ||
} | ||
|
||
.device-type__header { | ||
font-size: 30px; | ||
} | ||
|
||
.device-type__header--icon-laptop { | ||
font-size: 70px; | ||
} | ||
|
||
.device-type__header--icon-charger { | ||
font-size: 60px; | ||
} | ||
|
||
.device-type__info { | ||
font-size: 24px; | ||
} | ||
|
||
.device-type__info--count { | ||
padding: 10px; | ||
width: 50px; | ||
height: 50px; | ||
font-size: 26px; | ||
margin-right: 10px; | ||
} | ||
} | ||
</style> |
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,111 @@ | ||
<template> | ||
<nuxt/> | ||
</template> | ||
|
||
<style lang="scss"> | ||
|
||
@import '~susy'; | ||
|
||
// ========== | ||
// CSS VARIABLES | ||
// ========== | ||
$bg-dark-blue: rgba(18,29,46,.8); | ||
$bg-medium-blue: rgba(33,43,57,.3); | ||
|
||
// ========== | ||
// CSS MIXINS | ||
// ========== | ||
@mixin border($color) { | ||
border: 1px solid $color; | ||
} | ||
|
||
// ========== | ||
// CSS LAYOUT | ||
// ========== | ||
$susy:( | ||
columns: 12, | ||
container: auto, | ||
global-box-sizing: border-box, | ||
gutters: 0 | ||
); | ||
|
||
@include border-box-sizing; | ||
|
||
body { | ||
color: #fff; | ||
background-color: #121D2E; | ||
background: #121D2E url('~assets/insignia.png') no-repeat bottom right; | ||
background-size: contain; | ||
font-family: Montserrat, sans-serif; | ||
font-weight: 200; | ||
} | ||
|
||
ul { | ||
list-style: none; | ||
margin: 0; | ||
} | ||
time { | ||
position: absolute; | ||
width: 66%; | ||
top: 30px; | ||
color: #fff; | ||
padding-right: 20px; | ||
text-align: right; | ||
z-index: 9999; | ||
color: #3C96D2; | ||
} | ||
|
||
.oku-circ { | ||
position: relative; | ||
} | ||
|
||
.oku-circ__olin { | ||
width: span(8 of 12); | ||
padding: 20px; | ||
padding-left: 30px; | ||
float: left; | ||
background-color: $bg-dark-blue; | ||
} | ||
|
||
.oku-circ__uris { | ||
width: span(4 of 12); | ||
background-color: $bg-medium-blue; | ||
height: 100vh; | ||
float: right; | ||
border-left: 1px solid rgba(255,255,255,.2); | ||
padding-left: 3%; | ||
} | ||
|
||
.oku-circ.uris { | ||
|
||
display: flex; | ||
flex-flow: column; | ||
|
||
time { | ||
width: 100%; | ||
} | ||
|
||
.oku-circ__olin { | ||
padding: 20px; | ||
padding-left: 30px; | ||
background-color: $bg-medium-blue; | ||
height: auto; | ||
width: 100%; | ||
padding-top: 40px; | ||
order: 2; | ||
} | ||
|
||
.oku-circ__uris { | ||
background-color: $bg-dark-blue; | ||
border-bottom: 1px solid rgba(255,255,255,.2); | ||
border-left: none; | ||
padding-left: 30px; | ||
padding-top: 20px; | ||
padding-bottom: 40px; | ||
height: 100%; | ||
width: 100%; | ||
order: 1; | ||
} | ||
} | ||
|
||
</style> |
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 |
---|---|---|
|
@@ -8,10 +8,13 @@ | |
], | ||
"private": true, | ||
"dependencies": { | ||
"add": "^2.0.6", | ||
"axios": "^0.16.1", | ||
"lodash": "^4.17.4", | ||
"nuxt": "latest", | ||
"nuxt-helpers": "^0.10.0" | ||
"nuxt-helpers": "^0.10.0", | ||
"susy": "^2.2.12", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Susy should be a |
||
"yarn": "^0.24.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not necessary to include Yarn as a dependency |
||
}, | ||
"scripts": { | ||
"dev": "nuxt", | ||
|
@@ -29,6 +32,8 @@ | |
"eslint-plugin-html": "^2.0.0", | ||
"eslint-plugin-promise": "^3.4.1", | ||
"eslint-plugin-standard": "^2.0.1", | ||
"font-awesome": "^4.7.0", | ||
"moment": "^2.18.1", | ||
"node-sass": "^4.5.3", | ||
"sass-loader": "^6.0.5" | ||
} | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
</template> | ||
|
||
<script> | ||
export default {} | ||
|
||
</script> | ||
|
||
<style lang="scss"> | ||
|
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.
ripe for DRYing up via loop, but we can save that for later improvement