Merge branch 'fix-recipe-page' into main
This commit is contained in:
@@ -4,7 +4,7 @@ const SERVER_URL = 'http://localhost:9000'
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL : SERVER_URL,
|
||||
timeout: 1000
|
||||
timeout: 0
|
||||
})
|
||||
|
||||
export default {
|
||||
@@ -14,7 +14,19 @@ export default {
|
||||
transformResponse: [function (data) {
|
||||
return data? JSON.parse(data)._embedded.items : data;
|
||||
}]
|
||||
}),
|
||||
}),
|
||||
|
||||
getRecipesForFridge: () => instance.get('/api/v1/recipe/forFridge', {
|
||||
transformResponse: [function (data) {
|
||||
return data? JSON.parse(data) : data;
|
||||
}]
|
||||
}),
|
||||
|
||||
getRandom: () => instance.get('/api/v1/recipe/random', {
|
||||
transformResponse: [function (data) {
|
||||
return data? JSON.parse(data) : data;
|
||||
}]
|
||||
}),
|
||||
|
||||
removeForId: (id) => instance.delete('/api/v1/items/'+ id)
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
|
||||
|
||||
<script>
|
||||
import ItemModel from "@/components/ItemModel";
|
||||
import LoginPage from "@/components/LoginPage";
|
||||
import Custom404Page from "@/components/Custom404Page";
|
||||
import RecipePage from "@/components/RecipeModel";
|
||||
|
||||
const routes = {
|
||||
'/': ItemModel,
|
||||
'/login': LoginPage
|
||||
'/login': LoginPage,
|
||||
'/recipes' : RecipePage
|
||||
}
|
||||
|
||||
export default {
|
||||
@@ -31,7 +35,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="currentView" />
|
||||
|
||||
|
||||
|
||||
<v-app
|
||||
:is="currentView"
|
||||
>
|
||||
<v-main>
|
||||
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap");
|
||||
|
||||
*,
|
||||
*::before,
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: space-between;
|
||||
background-color: #213737;
|
||||
background-color: #006064;
|
||||
}
|
||||
|
||||
.text {
|
||||
@@ -83,7 +83,7 @@ h1::after{
|
||||
}
|
||||
|
||||
h1::before{
|
||||
background: #213737;
|
||||
background: #006064;
|
||||
animation: shifteffect 4s steps(22) forwards;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,31 +8,31 @@
|
||||
|
||||
<!-- navbar -->
|
||||
|
||||
<header class="navbar-header">
|
||||
<div class="logo">
|
||||
<a>Home</a>
|
||||
</div>
|
||||
<!-- <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>
|
||||
<!-- <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>
|
||||
<!-- <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>
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<li class="nav-link">
|
||||
<a href="/#/login">Sign up</a>
|
||||
</li>
|
||||
<li class="nav-link">
|
||||
<a href="/#/recipes">Recipes</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -32,14 +35,69 @@
|
||||
<!-- 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 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>-->
|
||||
<v-row>
|
||||
<v-col cols="3">
|
||||
<v-text-field
|
||||
label="Ingredient"
|
||||
value=""
|
||||
v-model="newItem"
|
||||
@keyup.enter="addItem"
|
||||
require
|
||||
dark
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="2">
|
||||
<v-text-field
|
||||
label="Quantity"
|
||||
required
|
||||
v-model="newQuantity"
|
||||
@keyup.enter="addItem"
|
||||
dark
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="1">
|
||||
<p>Unit</p>
|
||||
|
||||
<v-btn-toggle
|
||||
v-model="newUnit"
|
||||
tile
|
||||
color="deep-purple accent-3"
|
||||
group
|
||||
mandatory
|
||||
|
||||
>
|
||||
<v-btn value="units">
|
||||
units
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="g">
|
||||
g
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="ml">
|
||||
ml
|
||||
</v-btn>
|
||||
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
<v-col cols="1">
|
||||
<!-- <v-btn-->
|
||||
<!-- elevation="2"-->
|
||||
<!-- fab-->
|
||||
<!-- @click="addItem"-->
|
||||
<!-- ><v-icon>mdi-plus</v-icon>-->
|
||||
<!-- </v-btn>-->
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- response element -->
|
||||
|
||||
@@ -84,6 +142,8 @@ const Items = {
|
||||
return {
|
||||
items: [],
|
||||
newItem: '',
|
||||
newQuantity: 0,
|
||||
newUnit: '',
|
||||
editedItem: null,
|
||||
loading: true,
|
||||
error: null,
|
||||
@@ -109,29 +169,29 @@ const Items = {
|
||||
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'
|
||||
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) {
|
||||
const addableItem = this.newItem && this.newItem.trim();
|
||||
const addableQuantity = parseInt(this.newQuantity);
|
||||
const addableUnit = this.newUnit;
|
||||
if (!addableItem) {
|
||||
return
|
||||
}
|
||||
|
||||
var components = value.split(' ')
|
||||
|
||||
api.createNew(components[0],
|
||||
parseInt(components[1].replace(/[^\d.]/g, '')),
|
||||
components[1].replace(/[0-9]/g, '') === 'ml' ? 'MILLILETERS' : "GRAMMS"
|
||||
api.createNew(addableItem,
|
||||
addableQuantity,
|
||||
addableUnit
|
||||
).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'
|
||||
name: addableItem,
|
||||
quantity: addableQuantity,
|
||||
unit: addableUnit
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$log.debug(error);
|
||||
@@ -164,10 +224,6 @@ export default Items
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200&display=swap');
|
||||
@@ -194,7 +250,7 @@ export default Items
|
||||
body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #213737;
|
||||
background-color: #006064;
|
||||
}
|
||||
|
||||
.main {
|
||||
@@ -205,7 +261,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.25vh;
|
||||
background-color: #213737;
|
||||
background-color: #006064;
|
||||
}
|
||||
|
||||
/* navbar-background */
|
||||
@@ -215,13 +271,23 @@ body{
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
background: #213737;
|
||||
background: #006064;
|
||||
width: 100vw;
|
||||
height: 15vh;
|
||||
}
|
||||
|
||||
/* input field styling */
|
||||
|
||||
|
||||
|
||||
|
||||
.inputField-header {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
width: 20vh;
|
||||
height: 2vh;
|
||||
}
|
||||
|
||||
.field-header-box{
|
||||
z-index: 3;
|
||||
position: fixed;
|
||||
@@ -232,13 +298,7 @@ body{
|
||||
display: grid;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.inputField-header {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
width: 20vh;
|
||||
height: 3vh;
|
||||
color: white
|
||||
}
|
||||
|
||||
.newItemName {
|
||||
@@ -255,7 +315,7 @@ body{
|
||||
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;
|
||||
background: #006064;
|
||||
}
|
||||
|
||||
.newItemName:hover {
|
||||
|
||||
@@ -114,12 +114,13 @@ export default {
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #213737;
|
||||
background: #006064;
|
||||
}
|
||||
|
||||
.logo {
|
||||
left: -3vh;
|
||||
top: 1vh;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.logo a {
|
||||
|
||||
559
client/src/components/RecipeModel.vue
Normal file
559
client/src/components/RecipeModel.vue
Normal file
@@ -0,0 +1,559 @@
|
||||
<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>Recipes</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>
|
||||
<li class="nav-link">
|
||||
<a href="/#/">Storage</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- input field -->
|
||||
|
||||
<div>
|
||||
|
||||
<v-container
|
||||
fluid
|
||||
dark
|
||||
style="background-color: transparent; height: 100%"
|
||||
>
|
||||
<v-row
|
||||
align="align">
|
||||
<v-col
|
||||
v-for="recipe in recipes"
|
||||
:key="recipe.id"
|
||||
cols="4"
|
||||
sm="3"
|
||||
>
|
||||
<v-item>
|
||||
<v-card
|
||||
class="pa-2"
|
||||
min-width="350"
|
||||
max-width="350"
|
||||
min-height="400"
|
||||
max-height="400"
|
||||
tile
|
||||
rounded = true
|
||||
color="#385F73"
|
||||
dark
|
||||
>
|
||||
<v-img
|
||||
class="white--text align-end"
|
||||
height="200px"
|
||||
:src="recipe.image"
|
||||
>
|
||||
</v-img>
|
||||
|
||||
<v-card-title
|
||||
style="word-break: break-word"
|
||||
>{{ recipe.title }}</v-card-title>
|
||||
<v-card-subtitle class="pb-0">
|
||||
Ready in {{ recipe.readyInMinutes }} minutes
|
||||
</v-card-subtitle>
|
||||
|
||||
<!-- <v-card-text class="text--primary">-->
|
||||
<!-- <div>Whitehaven Beach</div>-->
|
||||
|
||||
<!-- <div>Whitsunday Island, Whitsunday Islands</div>-->
|
||||
<!-- </v-card-text>-->
|
||||
|
||||
<v-card-actions
|
||||
>
|
||||
<!-- <v-btn-->
|
||||
<!-- color="orange"-->
|
||||
<!-- text-->
|
||||
<!-- >-->
|
||||
<!-- Share-->
|
||||
<!-- </v-btn>-->
|
||||
|
||||
<v-btn
|
||||
:href="recipe.sourceUrl"
|
||||
text
|
||||
>
|
||||
<!-- @click = ""-->
|
||||
Cook
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-item>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import api from '../Api';
|
||||
|
||||
const Recipes = {
|
||||
name: 'Recipes',
|
||||
props: {
|
||||
activeUser: Object
|
||||
},
|
||||
|
||||
// app initial state
|
||||
data: function () {
|
||||
return {
|
||||
items: [],
|
||||
recipes: [],
|
||||
loading: true,
|
||||
error: null,
|
||||
id: 0
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.populateRecipes()
|
||||
},
|
||||
|
||||
methods: {
|
||||
populateFromFridge() {
|
||||
api.getRecipesForFridge()
|
||||
.then(response => {
|
||||
this.$log.debug("Data loaded: ", response.data)
|
||||
this.recipes = response.data
|
||||
})
|
||||
.catch(error => {
|
||||
this.$log.debug(error)
|
||||
this.error = "Failed to load recipes"
|
||||
})
|
||||
.finally(() => this.loading = false)
|
||||
},
|
||||
|
||||
populateRandom() {
|
||||
api.getRandom()
|
||||
.then(response => {
|
||||
this.$log.debug("Data loaded: ", response.data)
|
||||
this.recipes = response.data
|
||||
})
|
||||
.catch(error => {
|
||||
this.$log.debug(error)
|
||||
this.error = "Failed to load recipes"
|
||||
})
|
||||
.finally(() => this.loading = false)
|
||||
},
|
||||
|
||||
populateRecipes() {
|
||||
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(() => {
|
||||
if (this.items.length > 3) {
|
||||
this.populateFromFridge()
|
||||
} else {
|
||||
this.populateRandom()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export default Recipes
|
||||
</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: #006064;
|
||||
}
|
||||
|
||||
.main {
|
||||
position: relative;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.25vh;
|
||||
background-color: #006064;
|
||||
}
|
||||
|
||||
/* navbar-background */
|
||||
|
||||
.nav-background{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
background: #006064;
|
||||
width: 100vw;
|
||||
height: 15vh;
|
||||
}
|
||||
|
||||
/* input field styling */
|
||||
|
||||
//.field-header-box{
|
||||
// z-index: 3;
|
||||
// position: center;
|
||||
// width: 200vw;
|
||||
// height: 5vh;
|
||||
// left: 0;
|
||||
// top: 10vh;
|
||||
// display: grid;
|
||||
// align-content: center;
|
||||
// justify-content: center;
|
||||
//}
|
||||
|
||||
.inputField-header {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
width: 20vh;
|
||||
height: 2vh;
|
||||
}
|
||||
|
||||
.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: #006064;
|
||||
}
|
||||
|
||||
.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>
|
||||
@@ -1,5 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import vuetify from '@/plugins/vuetify' // path to vuetify export
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
@@ -22,4 +23,8 @@ new Vue({
|
||||
el: '#app',
|
||||
template: '<App/>',
|
||||
components: { App}
|
||||
});
|
||||
});
|
||||
|
||||
new Vue({
|
||||
vuetify,
|
||||
}).$mount('#app')
|
||||
11
client/src/plugins/vuetify.js
Normal file
11
client/src/plugins/vuetify.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// src/plugins/vuetify.js
|
||||
|
||||
import Vue from 'vue'
|
||||
import Vuetify from 'vuetify'
|
||||
import 'vuetify/dist/vuetify.min.css'
|
||||
|
||||
Vue.use(Vuetify)
|
||||
|
||||
const opts = {}
|
||||
|
||||
export default new Vuetify(opts)
|
||||
@@ -36,6 +36,7 @@
|
||||
.menu-icon {
|
||||
position: relative;
|
||||
padding: 0.5vh 0.5vh;
|
||||
top: 2vh;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
@@ -75,6 +76,7 @@
|
||||
.logo{
|
||||
position: relative;
|
||||
padding: 0.5vh 0.5vh;
|
||||
top: 2vh;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
|
||||
Reference in New Issue
Block a user