rename modules according to rules
This commit is contained in:
23
client/.gitignore
vendored
Normal file
23
client/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
24
client/README.md
Normal file
24
client/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# frontend
|
||||
|
||||
## Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
5
client/babel.config.js
Normal file
5
client/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
19
client/jsconfig.json
Normal file
19
client/jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
||||
22408
client/package-lock.json
generated
Normal file
22408
client/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
48
client/package.json
Normal file
48
client/package.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "whattocook",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.27.2",
|
||||
"core-js": "^3.8.3",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^4.0.15",
|
||||
"vuejs-logger": "^1.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"node-sass": "^7.0.1",
|
||||
"sass-loader": "^13.0.0",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
BIN
client/public/favicon.ico
Normal file
BIN
client/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
18
client/public/index.html
Normal file
18
client/public/index.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<link rel="stylesheet" type="text/css" href="<%= BASE_URL %>style.css">
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
0
client/public/style.css
Normal file
0
client/public/style.css
Normal file
20
client/src/Api.js
Normal file
20
client/src/Api.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import axios from 'axios'
|
||||
|
||||
const SERVER_URL = 'http://localhost:9000'
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL : SERVER_URL,
|
||||
timeout: 1000
|
||||
})
|
||||
|
||||
export default {
|
||||
createNew: (name, quantity, unit) => instance.post("/api/v1/items", {name: name, quantity : quantity, unit : unit}),
|
||||
|
||||
getAll: () => instance.get('/api/v1/items', {
|
||||
transformResponse: [function (data) {
|
||||
return data? JSON.parse(data)._embedded.items : data;
|
||||
}]
|
||||
}),
|
||||
|
||||
removeForId: (id) => instance.delete('/api/v1/items/'+ id)
|
||||
}
|
||||
43
client/src/App.vue
Normal file
43
client/src/App.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<script>
|
||||
import ItemModel from "@/components/ItemModel";
|
||||
import LoginPage from "@/components/LoginPage";
|
||||
import Custom404Page from "@/components/Custom404Page";
|
||||
|
||||
const routes = {
|
||||
'/': ItemModel,
|
||||
'/login': LoginPage
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentPath: window.location.hash
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentView() {
|
||||
return routes[this.currentPath.slice(1) || '/'] || Custom404Page
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('hashchange', () => {
|
||||
this.currentPath = window.location.hash
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="currentView" />
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
128
client/src/components/Custom404Page.vue
Normal file
128
client/src/components/Custom404Page.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<span class="text">404</span>
|
||||
<h1>Maybe going home helps</h1>
|
||||
<a href="#">Home</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Custom404Page"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: space-between;
|
||||
background-color: #213737;
|
||||
}
|
||||
|
||||
.text {
|
||||
cursor: default;
|
||||
position: absolute;
|
||||
align-self: center;
|
||||
top: 25%;
|
||||
right: 50%;
|
||||
transform: translate(50%,50%);
|
||||
text-transform: uppercase;
|
||||
font-family: Montserrat, sans-serif;
|
||||
font-size: 16vh;
|
||||
font-weight: 700;
|
||||
color: #F5F5F5;
|
||||
|
||||
text-shadow:
|
||||
1px 1px 1px #919191,
|
||||
1px 2px 1px #919191,
|
||||
1px 3px 1px #919191,
|
||||
1px 4px 1px #919191,
|
||||
1px 5px 1px #919191,
|
||||
1px 6px 1px #919191,
|
||||
1px 7px 1px #919191,
|
||||
1px 8px 1px #919191,
|
||||
1px 9px 1px #919191,
|
||||
1px 10px 1px #919191,
|
||||
1px 18px 6px rgba(16,16,16,0.4),
|
||||
1px 22px 10px rgba(16,16,16,0.2),
|
||||
1px 25px 35px rgba(16,16,16,0.2),
|
||||
1px 30px 60px rgba(16,16,16,0.4);
|
||||
}
|
||||
|
||||
h1{
|
||||
color: #F5F5F5;
|
||||
position: relative;
|
||||
font-family: "Source Code Pro", monospace;
|
||||
font-size: 1.5vh;
|
||||
top: 53.5vh;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h1::before,
|
||||
h1::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
h1::before{
|
||||
background: #213737;
|
||||
animation: shifteffect 4s steps(22) forwards;
|
||||
}
|
||||
|
||||
h1::after{
|
||||
width: 0.1vh;
|
||||
background: white;
|
||||
animation:
|
||||
shifteffect 4s steps(22) forwards,
|
||||
blinkeffect 600ms steps(22) infinite;
|
||||
}
|
||||
|
||||
a{
|
||||
font-family: Montserrat, sans-serif;
|
||||
position: absolute;
|
||||
top: 4%;
|
||||
right: 5%;
|
||||
font-size: 2vh;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
color: #F5F5F5;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
cursor: pointer;
|
||||
font-size: 2.5vh;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
@keyframes shifteffect{
|
||||
to{
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blinkeffect{
|
||||
to{
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
71
client/src/components/HomePage.vue
Normal file
71
client/src/components/HomePage.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
|
||||
<div v-if="loading">
|
||||
<h1 class="loading">Loading...</h1>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<!-- navbar -->
|
||||
|
||||
<header class="navbar-header">
|
||||
<div class="logo">
|
||||
<a>Home</a>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" class="menu-btn" id="menu-btn">
|
||||
<label for="menu-btn" class="menu-icon">
|
||||
<span class="menu-icon__line"></span>
|
||||
</label>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li class="nav-link">
|
||||
<a href="#">Profile</a>
|
||||
</li>
|
||||
<li class="nav-link">
|
||||
<a href="#">Storage</a>
|
||||
</li>
|
||||
<li class="nav-link">
|
||||
<a href="#">Recipes</a>
|
||||
</li>
|
||||
<li class="nav-link">
|
||||
<a href="#">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "HomePage"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
@import 'src/styling/navbar';
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.main {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.25rem;
|
||||
background-color: darkcyan;
|
||||
}
|
||||
|
||||
</style>
|
||||
538
client/src/components/ItemModel.vue
Normal file
538
client/src/components/ItemModel.vue
Normal file
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1 class="email">{{ userEmail }}</h1>
|
||||
<section class="itemapp">
|
||||
<div v-if="loading">
|
||||
<h1 class="loading">Loading...</h1>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<!-- navbar -->
|
||||
|
||||
<div class="navbar-header">
|
||||
<div class="logo">
|
||||
<a>Storage</a>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" class="menu-btn" id="menu-btn">
|
||||
<label for="menu-btn" class="menu-icon">
|
||||
<span class="menu-icon__line"></span>
|
||||
</label>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li class="nav-link">
|
||||
<a href="/#/login">Sign up</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="nav-background"/>
|
||||
|
||||
<!-- input field -->
|
||||
|
||||
<div class="field-header-box">
|
||||
<div class="inputField-header">
|
||||
<input class="newItemName" id="inputTextField" autofocus autocomplete="off" placeholder="Add here..." v-model="newItem"
|
||||
@keyup.enter="addItem"/>
|
||||
<label for="inputTextField" class="formLabel">
|
||||
Add here ...
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- response element -->
|
||||
|
||||
<div class="item-section" v-show="items.length" v-cloak>
|
||||
<ul class="item-list">
|
||||
<li v-for="item in items"
|
||||
class="item"
|
||||
:key="item.id">
|
||||
<div class="view">
|
||||
<label class="item-name" @dblclick="editItem(item)">
|
||||
<span class="item-name-fame">{{ item.name.toUpperCase() }} </span>
|
||||
<span class="item-information-frame">{{ item.quantity }} {{ item.unit.toLowerCase() }}</span>
|
||||
</label>
|
||||
<button class="destroy" @click="removeItem(item)"></button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
import api from '../Api';
|
||||
|
||||
const Items = {
|
||||
name: 'Items',
|
||||
props: {
|
||||
activeUser: Object
|
||||
},
|
||||
|
||||
// app initial state
|
||||
data: function () {
|
||||
return {
|
||||
items: [],
|
||||
newItem: '',
|
||||
editedItem: null,
|
||||
loading: true,
|
||||
error: null,
|
||||
id: 0
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
api.getAll()
|
||||
.then(response => {
|
||||
this.$log.debug("Data loaded: ", response.data)
|
||||
this.items = response.data
|
||||
})
|
||||
.catch(error => {
|
||||
this.$log.debug(error)
|
||||
this.error = "Failed to load items"
|
||||
})
|
||||
.finally(() => this.loading = false)
|
||||
},
|
||||
|
||||
computed: {
|
||||
userEmail: function () {
|
||||
return this.activeUser ? this.activeUser.email : ''
|
||||
},
|
||||
inputPlaceholder: function () {
|
||||
return this.activeUser ? this.activeUser.given_name + ', what do you want to add?' : 'What needs to be added'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
addItem: function () {
|
||||
var value = this.newItem && this.newItem.trim()
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
|
||||
var components = value.split(' ')
|
||||
|
||||
api.createNew(components[0],
|
||||
parseInt(components[1].replace(/[^\d.]/g, '')),
|
||||
components[1].replace(/[0-9]/g, '') === 'ml' ? 'MILLILETERS' : "GRAMMS"
|
||||
).then((response) => {
|
||||
this.$log.debug("New item created:", response);
|
||||
this.items.push({
|
||||
id: response.data.id,
|
||||
name: components[0],
|
||||
quantity: parseInt(components[1].replace(/[^\d.]/g, '')),
|
||||
unit: components[1].replace(/[0-9]/g, '') === 'MILLILETERS' ? 'ml' : 'g'
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$log.debug(error);
|
||||
this.error = "Failed to add item"
|
||||
});
|
||||
|
||||
this.newItem = ''
|
||||
},
|
||||
|
||||
removeItem: function (item) { // notice NOT using "=>" syntax
|
||||
api.removeForId(item.id).then(() => {
|
||||
this.$log.debug("Item removed:", item);
|
||||
this.items.splice(this.items.indexOf(item), 1)
|
||||
}).catch((error) => {
|
||||
this.$log.debug(error);
|
||||
this.error = "Failed to remove item"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
directives: {
|
||||
'item-focus': function (el, binding) {
|
||||
if (binding.value) {
|
||||
el.focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default Items
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
@import 'src/styling/navbar';
|
||||
|
||||
:root{
|
||||
--globalFontSize: 20px; // 1/108
|
||||
--globalFontSizeHalf: var(--globalFontSize) * 0.5;
|
||||
--globalFontSizeOneAndHalf: var(--globalFontSize) * 1.5;
|
||||
|
||||
--globalFontSizeTenth: var(--globalFontSize) * 0.1;
|
||||
--globalFontSizeFifth: var(--globalFontSize) * 0.2;
|
||||
--globalFontSizeFourFiths: var(--globalFontSize) * 0.8;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #213737;
|
||||
}
|
||||
|
||||
.main {
|
||||
position: relative;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.25vh;
|
||||
background-color: #213737;
|
||||
}
|
||||
|
||||
/* navbar-background */
|
||||
|
||||
.nav-background{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
background: #213737;
|
||||
width: 100vw;
|
||||
height: 15vh;
|
||||
}
|
||||
|
||||
/* input field styling */
|
||||
|
||||
.field-header-box{
|
||||
z-index: 3;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 5vh;
|
||||
left: 0;
|
||||
top: 10vh;
|
||||
display: grid;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.inputField-header {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
width: 20vh;
|
||||
height: 3vh;
|
||||
}
|
||||
|
||||
.newItemName {
|
||||
z-index: 3;
|
||||
position: relative;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0.07352941176470588vh solid white; // 0.10 of font size // u cannot use var here
|
||||
border-radius: 0.4411764705882353vh; // times 2 of border
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
color: white;
|
||||
outline: none;
|
||||
padding: 0.5vh;// size of font
|
||||
box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.4); // 0.5 size of font and 1.5 size of font
|
||||
background: #213737;
|
||||
}
|
||||
|
||||
.newItemName:hover {
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
.newItemName:focus {
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
.formLabel {
|
||||
z-index: 3;
|
||||
position: relative;
|
||||
top: -67.75vh;
|
||||
left: 0.75vh;
|
||||
padding: 0.1vh;
|
||||
font-size: 0.1vh;
|
||||
color: white;
|
||||
cursor: text;
|
||||
transition: top 200ms ease-in, left 200ms ease-in, font-size 200ms ease-in;
|
||||
background-color: darkcyan;
|
||||
}
|
||||
|
||||
.newItemName:hover ~ .formLabel, .newItemName:not(:placeholder-shown).newItemName:not(:hover) ~ .formLabel {
|
||||
top: -69.30vh;
|
||||
left: 0.15vw;
|
||||
font-size: 0.1vh;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.newItemName:focus ~ .formLabel, .newItemName:not(:placeholder-shown).newItemName:not(:focus) ~ .formLabel {
|
||||
top: -69.30vh;
|
||||
left: 0.15vw;
|
||||
font-size: 0.1vh;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Workaround for below WQHD resolution */
|
||||
|
||||
@media screen and (max-height: 1400px) {
|
||||
.formLabel{
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* item section */
|
||||
|
||||
.item-section{
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
top: 80%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
font-size: 20px;
|
||||
margin-left: 30px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.item-list{
|
||||
z-index: 2;
|
||||
align-self: center;
|
||||
position: relative;
|
||||
display: grid;
|
||||
top: -60vh;
|
||||
left: -44.33vw;
|
||||
|
||||
row-gap: 75px;
|
||||
column-gap: 340px;
|
||||
|
||||
.item{
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-top: 0;
|
||||
font-family: Montserrat, sans-serif;
|
||||
list-style: none;
|
||||
background: darkslategrey;
|
||||
display: flex;
|
||||
padding: 100px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.item-name{
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
.item-name-fame{
|
||||
z-index: 2;
|
||||
|
||||
letter-spacing: 4px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.item-name-fame:after{
|
||||
content:'';
|
||||
display:block;
|
||||
border-bottom:2px solid #000;
|
||||
height:0;
|
||||
position:relative;
|
||||
|
||||
top: 16px;
|
||||
width:250px;
|
||||
}
|
||||
|
||||
.item-information-frame{
|
||||
position: relative;
|
||||
|
||||
letter-spacing: 2px;
|
||||
top: 32px;
|
||||
}
|
||||
|
||||
.view{
|
||||
position: relative;
|
||||
color: white;
|
||||
|
||||
top: -60px;
|
||||
left: -52px;
|
||||
}
|
||||
|
||||
.destroy{
|
||||
display: block;
|
||||
position: relative;
|
||||
left: 0;
|
||||
border-radius: 1px;
|
||||
border: solid black 1px;
|
||||
transform: rotate(45deg);
|
||||
|
||||
height: 50px;
|
||||
width: 2px;
|
||||
top: 140px;
|
||||
}
|
||||
|
||||
.destroy:after{
|
||||
content: '';
|
||||
border-radius: 1px;
|
||||
border: solid black 1px;
|
||||
position: fixed;
|
||||
transform: rotate(-90deg);
|
||||
|
||||
height: 50px;
|
||||
width: 2px;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.destroy:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 2100px) {
|
||||
.item-list{
|
||||
grid-template-columns: repeat(7, 2vh);
|
||||
}
|
||||
|
||||
.item{
|
||||
right: 4.1vw;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 2100px) {
|
||||
.item-list{
|
||||
grid-template-columns: repeat(8, 2vh);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 2560px) {
|
||||
.item-list{
|
||||
grid-template-columns: repeat(8, 2vh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 3800px) {
|
||||
.item-list{
|
||||
grid-template-columns: repeat(9, 2vh);
|
||||
border-collapse: separate;
|
||||
border-spacing: 0 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* responsive */
|
||||
|
||||
@media (max-height: 1440px) and (min-width: 720px) {
|
||||
|
||||
.item-section{
|
||||
|
||||
font-size: 40/3 px;
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.item-list{
|
||||
z-index: 2;
|
||||
align-self: center;
|
||||
position: relative;
|
||||
display: grid;
|
||||
top: -60vh;
|
||||
left: -44.33vw;
|
||||
|
||||
row-gap: 50px;
|
||||
column-gap: 230px;
|
||||
|
||||
.item{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.item-name{
|
||||
left: -30px;
|
||||
}
|
||||
|
||||
.item-name-fame{
|
||||
position: relative;
|
||||
letter-spacing: 4px;
|
||||
font-size: 12px;
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
.item-name-fame:after{
|
||||
content:'';
|
||||
display:block;
|
||||
border-bottom:2px solid #000;
|
||||
height:0;
|
||||
position:relative;
|
||||
|
||||
top: 8px;
|
||||
width:170px;
|
||||
}
|
||||
|
||||
.item-information-frame{
|
||||
|
||||
font-size: 8px;
|
||||
|
||||
letter-spacing: 1px;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.view{
|
||||
position: relative;
|
||||
color: white;
|
||||
|
||||
top: -50px;
|
||||
left: -52px;
|
||||
}
|
||||
|
||||
.destroy{
|
||||
display: block;
|
||||
position: relative;
|
||||
left: -10px;
|
||||
border-radius: 1px;
|
||||
border: solid black 1px;
|
||||
transform: rotate(45deg);
|
||||
|
||||
height: 35px;
|
||||
width: 2px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
.destroy:after{
|
||||
content: '';
|
||||
border-radius: 1px;
|
||||
border: solid black 1px;
|
||||
position: fixed;
|
||||
transform: rotate(-90deg);
|
||||
|
||||
height: 35px;
|
||||
width: 2px;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.destroy:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
626
client/src/components/LoginPage.vue
Normal file
626
client/src/components/LoginPage.vue
Normal file
@@ -0,0 +1,626 @@
|
||||
<template>
|
||||
|
||||
<div class="main">
|
||||
|
||||
<div v-if="loading">
|
||||
<h1 class="loading">Loading...</h1>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<!-- navbar -->
|
||||
|
||||
<header class="navbar-header">
|
||||
<div class="logo">
|
||||
<a>Login</a>
|
||||
</div>
|
||||
|
||||
<input id="menu-btn" class="menu-btn" type="checkbox">
|
||||
<label class="menu-icon" for="menu-btn">
|
||||
<span class="menu-icon__line"></span>
|
||||
</label>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li class="nav-link">
|
||||
<a href="/">Storage</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<div class="container">
|
||||
|
||||
<div id="user-sign-in" class="user-login">
|
||||
<div class="site-background"/>
|
||||
<div class="form-background">
|
||||
<form>
|
||||
|
||||
<h2>Sign In</h2>
|
||||
<input placeholder="Username" type="text">
|
||||
<input placeholder="Password" type="password">
|
||||
<input class="login-btn-apple" type="submit" value="Login Apple">
|
||||
<input class="login-btn" type="submit" value="Login">
|
||||
<p class="signup">Don't have an account?
|
||||
<a href="#/login" v-on:click="isSignUp = !isSignUp">Sign up</a>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :style="{'display': isSignUp ? 'none' : ''}" class="user-signup">
|
||||
<div class="site-background"/>
|
||||
<div class="form-background">
|
||||
<form>
|
||||
|
||||
<h2>Create Account</h2>
|
||||
<input placeholder="Username" type="text">
|
||||
<input placeholder="Email Address" type="text">
|
||||
<input placeholder="Create Password" type="password">
|
||||
<input placeholder="Confirm Password" type="password">
|
||||
<input type="submit" value="Sign Up" class="submit">
|
||||
<p class="signup">Have an account?
|
||||
<br>
|
||||
<a href="#/login" v-on:click="isSignUp = !isSignUp">Sign in</a>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet"
|
||||
type='text/css'/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "LoginPage",
|
||||
data() {
|
||||
return {
|
||||
isSignUp: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
@import 'src/styling/navbar';
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.main {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #213737;
|
||||
}
|
||||
|
||||
.logo {
|
||||
left: -3vh;
|
||||
top: 1vh;
|
||||
}
|
||||
|
||||
.logo a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
left: 3vh;
|
||||
top: 1vh;
|
||||
|
||||
&__line, &__line:before, &__line::after {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
/* login / signin styling */
|
||||
|
||||
section {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 40px;
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
width: 2800px;
|
||||
height: 1700px;
|
||||
background: white;
|
||||
box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.user-login {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
.site-background {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
transition: 0.5s;
|
||||
//background: url('../ressouce/5008bf96009ea69ba157815061bce4f2.png');
|
||||
background: brown;
|
||||
}
|
||||
|
||||
.form-background {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 160px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
position: relative;
|
||||
font-size: 60px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 8px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
color: black;
|
||||
top: -30px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
content: '';
|
||||
display: block;
|
||||
border-bottom: 4px solid #000;
|
||||
height: 0;
|
||||
position: relative;
|
||||
top: 50px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
background: lightgrey;
|
||||
border: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
font-size: 1vh;
|
||||
letter-spacing: 4px;
|
||||
margin: 20px 0;
|
||||
top: 50px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
cursor: pointer;
|
||||
max-width: 520px;
|
||||
transition: 0.5s;
|
||||
background-color: darkslategrey;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
position: relative;
|
||||
left: 40px;
|
||||
box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.login-btn-apple {
|
||||
box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.login-btn:hover, .login-btn-apple:hover {
|
||||
background: brown;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.signup {
|
||||
text-align: center;
|
||||
justify-content: right;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-top: 550px;
|
||||
top: 50px;
|
||||
font-size: 40px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 4px;
|
||||
//border: 1px solid black;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
color: darkslategrey;
|
||||
letter-spacing: 2px;
|
||||
font-size: 50px;
|
||||
transition: color 0.5s ease-in-out;
|
||||
//border: 1px solid black;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
left: 30%;
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
color: brown;
|
||||
}
|
||||
}
|
||||
|
||||
.user-signup {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transition: display 0.5s ease-in-out;
|
||||
|
||||
.site-background {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
left: 50%;
|
||||
transition: 0.5s;
|
||||
//background: url('../ressouce/5008bf96009ea69ba157815061bce4f2.png');
|
||||
background: brown;
|
||||
}
|
||||
|
||||
.form-background {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 160px;
|
||||
top: -100%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
position: relative;
|
||||
font-size: 60px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 8px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
color: black;
|
||||
top: 150px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
content: '';
|
||||
display: block;
|
||||
border-bottom: 4px solid #000;
|
||||
height: 0;
|
||||
position: relative;
|
||||
top: 50px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
background: lightgrey;
|
||||
border: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
font-size: 40px;
|
||||
letter-spacing: 4px;
|
||||
margin: 20px 0;
|
||||
top: 230px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.submit{
|
||||
box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.submit:hover{
|
||||
background: brown;
|
||||
color: black;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
cursor: pointer;
|
||||
max-width: 520px;
|
||||
transition: 0.5s;
|
||||
background-color: darkslategrey;
|
||||
color: white;
|
||||
left: 51.8%;
|
||||
}
|
||||
|
||||
.signup {
|
||||
text-align: center;
|
||||
justify-content: left;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-top: 560px;
|
||||
font-size: 20px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 4px;
|
||||
top: -130px;
|
||||
//border: 1px solid black;
|
||||
}
|
||||
|
||||
a {
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
color: darkslategrey;
|
||||
letter-spacing: 2px;
|
||||
font-size: 50px;
|
||||
top: -10px;
|
||||
left: 30%;
|
||||
transition: color 0.5s ease-in-out;
|
||||
//border: 1px solid black;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
color: brown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-device-height: 1440px) {
|
||||
|
||||
/* login / signin styling */
|
||||
|
||||
section {
|
||||
padding: 52px;
|
||||
|
||||
.container {
|
||||
width: 1800px;
|
||||
height: 1200px;
|
||||
box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.user-login {
|
||||
|
||||
.form-background {
|
||||
padding: 106px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 40px;
|
||||
letter-spacing: 6px;
|
||||
margin-bottom: 14px;
|
||||
top: -40px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
border-bottom: 4px solid #000;
|
||||
top: 26px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 26px;
|
||||
letter-spacing: 4px;
|
||||
margin: 14px 0;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
max-width: 330px;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
left: 28px;
|
||||
}
|
||||
|
||||
.signup {
|
||||
margin-top: 400px;
|
||||
letter-spacing: 2px;
|
||||
font-size: 20px;
|
||||
top: 20px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
letter-spacing: 4px;
|
||||
font-size: 40px;
|
||||
top: 50px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.user-signup {
|
||||
|
||||
.form-background {
|
||||
padding: 106px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 40px;
|
||||
letter-spacing: 6px;
|
||||
margin-bottom: 140px;
|
||||
top: 120px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
border-bottom: 4px solid #000;
|
||||
top: 26px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 26px;
|
||||
font-size: 26px;
|
||||
letter-spacing: 4px;
|
||||
margin: 14px 0;
|
||||
top: 27px;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
max-width: 330px;
|
||||
left: 52%;
|
||||
}
|
||||
|
||||
.signup {
|
||||
margin-top: 374px;
|
||||
letter-spacing: 2px;
|
||||
top: -154px;
|
||||
font-size: 20px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
letter-spacing: 4px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
font-size: 40px;
|
||||
top: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-device-height: 1080px) {
|
||||
|
||||
/* login / signin styling */
|
||||
|
||||
section {
|
||||
padding: 40px;
|
||||
|
||||
.container {
|
||||
width: 1500px;
|
||||
height: 900px;
|
||||
box-shadow: 0 7.5px 25px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.user-login {
|
||||
|
||||
.form-background {
|
||||
padding: 80px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
letter-spacing: 4px;
|
||||
margin-bottom: 10px;
|
||||
top: -25px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
border-bottom: 2px solid #000;
|
||||
top: 25px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 12px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 2px;
|
||||
margin: 10px 0;
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
max-width: 285px;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.signup {
|
||||
position: relative;
|
||||
margin-top: 300px;
|
||||
letter-spacing: 2px;
|
||||
font-size: 0.05vh;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
letter-spacing: 1px;
|
||||
align-content: center;
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-signup {
|
||||
|
||||
.form-background {
|
||||
padding: 80px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
letter-spacing: 4px;
|
||||
margin-bottom: 10px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
border-bottom: 2px solid #000;
|
||||
top: 25px;
|
||||
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 12px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 2px;
|
||||
margin: 10px 0;
|
||||
top: 90px;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
max-width: 260px;
|
||||
left: 55.8%;
|
||||
}
|
||||
|
||||
.signup {
|
||||
margin-top: 280px;
|
||||
letter-spacing: 2px;
|
||||
top: -60px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
letter-spacing: 2px;
|
||||
font-size: 40px;
|
||||
align-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
25
client/src/main.js
Normal file
25
client/src/main.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
import VueLogger from 'vuejs-logger';
|
||||
|
||||
const options = {
|
||||
isEnabled: true,
|
||||
logLevel : 'debug',
|
||||
stringifyArguments : false,
|
||||
showLogLevel : true,
|
||||
showMethodName : false,
|
||||
separator: '|',
|
||||
showConsoleColors: true
|
||||
};
|
||||
|
||||
Vue.use(VueLogger, options);
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
template: '<App/>',
|
||||
components: { App}
|
||||
});
|
||||
268
client/src/styling/navbar.scss
Normal file
268
client/src/styling/navbar.scss
Normal file
@@ -0,0 +1,268 @@
|
||||
.navbar-header {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
top: 2vh;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
padding: 0 5vw;
|
||||
color: black;
|
||||
z-index: 4;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
text-transform: uppercase;
|
||||
font-size: 2vh;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
|
||||
a {
|
||||
margin: 0.2vh;
|
||||
padding: 1vh 0.5vh;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
font-size: 3vh;
|
||||
transition: all 300ms;
|
||||
color: brown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
position: relative;
|
||||
padding: 0.5vh 0.5vh;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
|
||||
&__line {
|
||||
display: block;
|
||||
position: relative;
|
||||
background: black;
|
||||
height: 0.2vh;
|
||||
width: 3vh;
|
||||
border-radius: 2vh;
|
||||
|
||||
&::before, &::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: 2vh;
|
||||
background: black;
|
||||
transition: background .8s ease;
|
||||
}
|
||||
|
||||
&::before {
|
||||
transform: translateY(-0.75vh);
|
||||
}
|
||||
|
||||
&::after {
|
||||
transform: translateY(0.75vh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.logo{
|
||||
position: relative;
|
||||
padding: 0.5vh 0.5vh;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
|
||||
.navbar-header {
|
||||
|
||||
.menu-icon {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
|
||||
&__line {
|
||||
animation: closedButton 1s backwards;
|
||||
animation-direction: reverse;
|
||||
|
||||
&::before {
|
||||
animation: closedButtonBefore 1s backwards;
|
||||
animation-direction: reverse;
|
||||
}
|
||||
|
||||
&::after {
|
||||
animation: closedButtonAfter 1s backwards;
|
||||
animation-direction: reverse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
position: absolute;
|
||||
top: -2vh;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
padding: 5vh 0;
|
||||
width: 100vw;
|
||||
height: 120vh;
|
||||
font-weight: bolder;
|
||||
letter-spacing: 0.25vh;
|
||||
color: white;
|
||||
background: #272727;
|
||||
align-content: center;
|
||||
transition: opacity 0.8s 0.5s, clip-path 1s 0.5s;
|
||||
clip-path: circle(9.615384615384615vh at top right);
|
||||
|
||||
.nav-links {
|
||||
opacity: 0;
|
||||
transform: translateX(100%);
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
display: grid;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 2vh 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-btn:checked{
|
||||
body{
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-btn:checked ~ .nav-links {
|
||||
opacity: 1;
|
||||
clip-path: circle(100% at center);
|
||||
|
||||
.nav-link {
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
display: flex;
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
right: -0.2vh;
|
||||
top: -11.5vh;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-btn:checked ~ .menu-icon {
|
||||
|
||||
.menu-icon__line {
|
||||
background: white;
|
||||
animation: openButton 1s forwards;
|
||||
|
||||
&::before {
|
||||
background: white;
|
||||
animation: openButtonBefore 1s forwards;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background: white;
|
||||
animation: openButtonAfter 1s forwards;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logo{
|
||||
a {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
font-size: 4vh;
|
||||
top: -0.68vh;
|
||||
}
|
||||
a:hover{
|
||||
font-size: 4vh;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes openButtonBefore {
|
||||
0% {
|
||||
transform: translateY(-0.75vh) rotate(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(0px) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes openButton {
|
||||
50% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes openButtonAfter {
|
||||
0% {
|
||||
transform: translateY(0.75vh) rotate(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(0px) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes closedButtonBefore {
|
||||
0% {
|
||||
transform: translateY(-0.75vh) rotate(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(0px) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes closedButton {
|
||||
50% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes closedButtonAfter {
|
||||
0% {
|
||||
transform: translateY(0.75vh) rotate(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(0px) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px) rotate(90deg);
|
||||
}
|
||||
}
|
||||
5
client/vue.config.js
Normal file
5
client/vue.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
runtimeCompiler: true
|
||||
})
|
||||
7007
client/yarn.lock
Normal file
7007
client/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user