diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e22c248 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine:edge +MAINTAINER gltron +RUN apk --update add openjdk8-jre +COPY cloud32.jar /home/cloud32.jar +CMD ["java","-jar","/home/cloud32.jar"] +EXPOSE 8181 \ No newline at end of file diff --git a/buildDocker.sh b/buildDocker.sh new file mode 100644 index 0000000..142e14f --- /dev/null +++ b/buildDocker.sh @@ -0,0 +1 @@ +docker build . -t thomsb/c32java \ No newline at end of file diff --git a/buildJar.sh b/buildJar.sh new file mode 100644 index 0000000..85786eb --- /dev/null +++ b/buildJar.sh @@ -0,0 +1,8 @@ +cd client +npm run build +cp -r dist/* ../server/src/main/resources/public +cd ../server +mvn package +cp target/cloud32-0.0.1-SNAPSHOT.jar ../cloud32.jar +rm -rf ../client/dist +rm -rf src/main/resources/public/* \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index 342b067..f7ff8cc 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -7313,6 +7313,11 @@ "object-visit": "^1.0.0" } }, + "material-design-icons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/material-design-icons/-/material-design-icons-3.0.1.tgz", + "integrity": "sha1-mnHEh0chjrylHlGmbaaCA4zct78=" + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", diff --git a/client/package.json b/client/package.json index e0a7399..ec389b8 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ "@chenfengyuan/vue-qrcode": "^1.0.2", "buefy": "^0.8.20", "core-js": "^3.6.5", + "material-design-icons": "^3.0.1", "register-service-worker": "^1.7.1", "vue": "^2.6.11", "vue-qrcode-reader": "^2.3.11", diff --git a/client/public/index.html b/client/public/index.html index e9bb139..96ea543 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -4,7 +4,7 @@ - + <%= htmlWebpackPlugin.options.title %> diff --git a/client/src/App.vue b/client/src/App.vue index c077d53..7de07d6 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -3,17 +3,3 @@ - - diff --git a/client/src/assets/Gravity-Regular.otf b/client/src/assets/Gravity-Regular.otf new file mode 100644 index 0000000..7aedaa2 Binary files /dev/null and b/client/src/assets/Gravity-Regular.otf differ diff --git a/client/src/assets/_overrides.scss b/client/src/assets/_overrides.scss new file mode 100644 index 0000000..504ade2 --- /dev/null +++ b/client/src/assets/_overrides.scss @@ -0,0 +1,289 @@ +// Overrides +@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=swap"); + +@font-face { + font-family: 'Gravity Regular'; + src: url('Gravity-Regular.otf') format('opentype'); +} + +hr { + height: $border-width; +} + +h6 { + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.hero { + background-color: $grey-dark; +} + +a { + transition: all 200ms ease; +} + +.button { + transition: all 200ms ease; + border-width: $border-width; + color: $white; + + &.is-active, + &.is-focused, + &:active, + &:focus { + box-shadow: 0 0 0 2px rgba($button-focus-border-color, 0.5); + } + @each $name, $pair in $colors { + $color: nth($pair, 1); + $color-invert: nth($pair, 2); + + &.is-#{$name} { + &.is-hovered, + &:hover { + background-color: lighten($color, 7.5%); + } + + &.is-active, + &.is-focused, + &:active, + &:focus { + border-color: $color; + box-shadow: 0 0 0 2px rgba($color, 0.5); + } + } + } +} + +.label { + color: $grey-lighter; +} + +.input, +.textarea { + transition: all 200ms ease; + box-shadow: none; + border-width: $border-width; + padding-left: 1em; + padding-right: 1em; +} + +.select { + &:after, + select { + border-width: $border-width; + } +} + +.control { + &.has-addons { + .button, + .input, + .select { + margin-right: -$border-width; + } + } +} + +.notification { + background-color: $grey-dark; +} + +.card { + $card-border-color: lighten($grey-darker, 5); + box-shadow: none; + border: $border-width solid $card-border-color; + background-color: $grey-darker; + border-radius: $radius; + + .card-image { + img { + border-radius: $radius $radius 0 0; + } + } + + .card-header { + box-shadow: none; + background-color: rgba($black-bis, 0.2); + border-radius: $radius $radius 0 0; + } + + .card-footer { + background-color: rgba($black-bis, 0.2); + } + + .card-footer, + .card-footer-item { + border-width: $border-width; + border-color: $card-border-color; + } +} + +.notification { + @each $name, $pair in $colors { + $color: nth($pair, 1); + $color-invert: nth($pair, 2); + + &.is-#{$name} { + a:not(.button) { + color: $color-invert; + text-decoration: underline; + } + } + } +} + +.tag { + border-radius: $radius; +} + +.menu-list { + a { + transition: all 300ms ease; + } +} + +.modal-card-body { + background-color: $grey-darker; +} + +.modal-card-foot, +.modal-card-head { + border-color: $grey-dark; +} + +.message-header { + font-weight: $weight-bold; + background-color: $grey-dark; + color: $white; +} + +.message-body { + border-width: $border-width; + border-color: $grey-dark; +} + +.navbar { + border-radius: $radius; + + &.is-transparent { + background: none; + } + + &.is-primary { + .navbar-dropdown { + a.navbar-item.is-active { + background-color: $link; + } + } + } + + @include touch { + .navbar-menu { + background-color: $navbar-background-color; + border-radius: 0 0 $radius $radius; + } + } +} + +.hero .navbar, +body > .navbar { + border-radius: 0; +} + +.pagination-link, +.pagination-next, +.pagination-previous { + border-width: $border-width; +} + +.panel-block, +.panel-heading, +.panel-tabs { + border-width: $border-width; + + &:first-child { + border-top-width: $border-width; + } +} + +.panel-heading { + font-weight: $weight-bold; +} + +.panel-tabs { + a { + border-width: $border-width; + margin-bottom: -$border-width; + + &.is-active { + border-bottom-color: $link-active; + } + } +} + +.panel-block { + &:hover { + color: $link-hover; + + .panel-icon { + color: $link-hover; + } + } + + &.is-active { + .panel-icon { + color: $link-active; + } + } +} + +.tabs { + a { + border-bottom-width: $border-width; + margin-bottom: -$border-width; + } + + ul { + border-bottom-width: $border-width; + } + + &.is-boxed { + a { + border-width: $border-width; + } + + li.is-active a { + background-color: darken($grey-darker, 4); + } + } + + &.is-toggle { + li a { + border-width: $border-width; + margin-bottom: 0; + } + + li + li { + margin-left: -$border-width; + } + } +} + +.hero { + // Colors + @each $name, $pair in $colors { + $color: nth($pair, 1); + $color-invert: nth($pair, 2); + + &.is-#{$name} { + .navbar { + .navbar-dropdown { + .navbar-item:hover { + background-color: $navbar-dropdown-item-hover-background-color; + } + } + } + } + } +} \ No newline at end of file diff --git a/client/src/assets/_variables.scss b/client/src/assets/_variables.scss new file mode 100644 index 0000000..e6216b7 --- /dev/null +++ b/client/src/assets/_variables.scss @@ -0,0 +1,114 @@ +$grey-lighter: #dbdee0; +$grey-light: #8c9b9d; +$grey: darken($grey-light, 18); +$grey-dark: darken($grey, 18); +$grey-darker: darken($grey, 23); + +$orange: #e67e22; +$yellow: #f1b70e; +$green: #2ecc71; +$turquoise: #26a8a2; +$blue: #3498db; +$purple: #8e44ad; +$red: #e74c3c; +$white-ter: #ecf0f1; +$primary: $turquoise; +$yellow-invert: #fff; + +$family-sans-serif: "Gravity Regular", "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", +"Helvetica Neue", "Helvetica", "Arial", sans-serif; +$family-monospace: "Inconsolata", "Consolas", "Monaco", monospace; + +$radius-small: 3px; +$radius: 0.4em; +$radius-large: 8px; +$size-6: 15px; +$size-7: 0.85em; +$title-weight: 500; +$subtitle-weight: 400; +$subtitle-color: $grey-dark; + +$border-width: 2px; +$border: $grey; + +$body-background-color: darken($grey-darker, 4); +$body-size: 15px; + +$background: $grey-darker; +$footer-background-color: $background; +$button-background-color: $background; +$button-border-color: lighten($button-background-color, 15); + +$title-color: #fff; +$subtitle-color: $grey-light; +$subtitle-strong-color: $grey-light; + +$text: #fff; +$text-light: lighten($text, 10); +$text-strong: darken($text, 5); + +$box-color: $text; +$box-background-color: $grey-dark; +$box-shadow: none; + +$link: $turquoise; +$link-hover: lighten($link, 5); +$link-focus: darken($link, 5); +$link-active: darken($link, 5); +$link-focus-border: $grey-light; + +$button-color: $primary; +$button-hover-color: darken($text, 5); // text-dark +$button-focus: darken($text, 5); // text-dark +$button-active-color: darken($text, 5); // text-dark +$button-disabled-background-color: $grey-light; + +$control-height: 2.5em; + +$input-color: $grey-darker; +$input-icon-color: $grey; +$input-icon-active-color: $input-color; +$input-hover-color: $grey-light; +$input-disabled-background-color: $grey-light; +$input-disabled-border: $grey-lighter; + +$table-color: $text; +$table-head: $grey-lighter; +$table-background-color: $grey-dark; +$table-cell-border: 1px solid $grey; + +$table-row-hover-background-color: $grey-darker; +$table-striped-row-even-background-color: $grey-darker; +$table-striped-row-even-hover-background-color: lighten($grey-darker, 2); + +$pagination-color: $link; +$pagination-border-color: $border; + +$navbar-height: 4rem; + +$navbar-background-color: $primary; +$navbar-item-color: $text; +$navbar-item-hover-color: $link; +$navbar-item-hover-background-color: transparent; +$navbar-item-active-color: $link; +$navbar-dropdown-arrow: #fff; +$navbar-divider-background-color: rgba(0, 0, 0, 0.2); +$navbar-dropdown-border-top: 1px solid $navbar-divider-background-color; +$navbar-dropdown-background-color: $primary; +$navbar-dropdown-item-hover-color: $grey-lighter; +$navbar-dropdown-item-hover-background-color: transparent; +$navbar-dropdown-item-active-background-color: transparent; +$navbar-dropdown-item-active-color: $link; + +$dropdown-content-background-color: $background; +$dropdown-item-color: $text; + +$progress-value-background-color: $grey-lighter; + +$file-cta-background-color: $grey-darker; + +$progress-bar-background-color: $grey-dark; + +$panel-heading-background-color: $grey-dark; + +$control-label: $grey-lighter; \ No newline at end of file diff --git a/client/src/assets/style.scss b/client/src/assets/style.scss new file mode 100644 index 0000000..dfab408 --- /dev/null +++ b/client/src/assets/style.scss @@ -0,0 +1,6 @@ +@import "~bulma/sass/utilities/_all"; +@import "variables"; +@import "~bulma"; +@import "~buefy/src/scss/buefy"; +@import "overrides"; +// @import "~/node_modules/material-design-icons/iconfont/material-icons.css"; \ No newline at end of file diff --git a/client/src/components/Admin.vue b/client/src/components/Admin.vue index b6fb27b..8218644 100644 --- a/client/src/components/Admin.vue +++ b/client/src/components/Admin.vue @@ -1,6 +1,7 @@