-
Notifications
You must be signed in to change notification settings - Fork 0
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
added bulma css buttons #4
Open
Lysianedon
wants to merge
74
commits into
preprod
Choose a base branch
from
lysiane-bulma
base: preprod
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
16c8b75
working on cart
Lysianedon efc501a
merged computed
Lysianedon 90a0d1b
added article item to cart view
Lysianedon fde9aa1
updated cart css
Lysianedon a3a1275
added bulma css buttons
Lysianedon 5dcb4e0
added tabs bulms
Lysianedon c4409af
added tabs bulms
Lysianedon f686c8f
added tabs bulma
Lysianedon c017d80
added tabs bulma
Lysianedon 574a9a8
all clrean
Lysianedon 19e55e7
Merge branch 'cart' of https://github.com/multi-coop/shopping-cart-vu…
Lysianedon 862a867
added nav functions
Lysianedon ff7d42c
working on Article css
Lysianedon 2eb58a9
Merge branch 'lysiane-bulma' of https://github.com/multi-coop/shoppin…
Lysianedon 464ec45
added redirection to full article page
Lysianedon 53002ee
working on responsive homeview
Lysianedon 13ce1c8
working on notification display
Lysianedon 5611cc7
working on notification
Lysianedon 5ebfb05
adding notificationDisplay function
Lysianedon ebe013e
working on responsive
Lysianedon c2c51bb
working on responsive
Lysianedon 2706c76
added notification on added article
Lysianedon cb46f89
fixing bug responsive homeview
Lysianedon 48d42e4
merged lysiane bukma css
Lysianedon d9bc798
adding emptyCart function
Lysianedon caf8d22
adding emptycart function
Lysianedon e471dfd
merge from lysiane-bulma
Lysianedon 0a6f772
pulling from every branches
Lysianedon b876ff8
pulling from every branches
Lysianedon a0cdc32
working on store
Lysianedon 85af097
working on responsive homeview
Lysianedon 50f814e
working on cart css
Lysianedon 56e0f02
working on css cartview
Lysianedon 4a2f08e
added deleteArticle function
Lysianedon 5383c52
merged from lysiane-store
Lysianedon 756dbb4
merged from lysiane-store
Lysianedon 68eef85
added deleteArticle function
Lysianedon 4315a52
working on cart functions
Lysianedon 99e66d8
debugged function addarticle
Lysianedon b4591cd
merged branch lysiane-store
Lysianedon 965fbb9
added function delete + finished component cartArticle
Lysianedon 534e63b
working on cartview
Lysianedon 67ca15f
added total
Lysianedon a966fb9
added getter totalPrice
Lysianedon 85182a8
added total
Lysianedon 0070494
test
Lysianedon 482c547
math round getter total
Lysianedon 2e75e1c
merged from lysiane-store
Lysianedon 1df914f
working on responsive cartview
Lysianedon 3fe25c0
update nav
Lysianedon 10d0d37
finished articleview
Lysianedon bd55c74
added addToCart function to articleview
Lysianedon d1a007d
added notification
Lysianedon feed3c0
finished responsive articleview
Lysianedon e2bf08c
finished responsive articleview
Lysianedon ba96a03
working on article
Lysianedon cd64911
refactoring functions with mixins
Lysianedon 068064c
added mountingAPI function
Lysianedon 9c54b33
added mountingAPI
Lysianedon 098d0dc
mounting API : all good
Lysianedon 056dee3
added mountingAPI
Lysianedon 8c06005
removed mountingAPI
Lysianedon 81bc074
merged with branch lysiane-bulma
Lysianedon 8bfc5b0
merged with branch lysiane-bulma
Lysianedon 69f24ed
cleaning code
Lysianedon 80a7ae0
updated mixins + added it to cartview
Lysianedon e8dae63
updated mixins
Lysianedon dbc0e3d
cleaning code
Lysianedon 4e59477
cleaned code
Lysianedon a94363a
cleaned code + refactoring
Lysianedon c8336ca
cleaned code + refactoring
Lysianedon 848c1af
cleaned code + refactoring
Lysianedon 51ec14f
added modale buefy
Lysianedon c914a99
added zoom in function
Lysianedon 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,45 +1,151 @@ | ||
<template> | ||
<div id="app"> | ||
<h1>Your shopping Website</h1> | ||
<nav> | ||
<router-link | ||
to="/" class="onglet"> | ||
Inventory | ||
</router-link> | ||
<router-link | ||
to="/cart" class="onglet"> | ||
Cart : {{ $store.state.addedArticlesCount }} article(s) | ||
</router-link> | ||
</nav> | ||
|
||
<div class="tabs p-4 is-medium is-right"> | ||
<!-- Title --> | ||
<h1 class="is-hidden-mobile p-2 is-size-3 has-text-weight-bold">Green Shopping</h1> | ||
<!-- Logo --> | ||
<span class="icon icon-leaf is-large p-4"></span> | ||
<!-- Navbar --> | ||
<ul class="is-flex-desktop"> | ||
<li | ||
:class="tab1 === true ? 'is-active' : '' " | ||
@click="activateTab1" | ||
> | ||
<router-link | ||
to="/" | ||
> | ||
<span class="icon icon-apparel"></span> | ||
<div class="is-hidden-mobile">Collections</div> | ||
</router-link> | ||
</li> | ||
<li | ||
:class="tab2 ? 'is-active' : '' " | ||
@click="activateTab2" | ||
> | ||
<router-link | ||
to="/cart"> | ||
<span class="icon icon-cart"></span> | ||
<div class="mobile is-hidden-tablet">{{ $store.state.addedArticlesCount }}</div> | ||
<div class="is-hidden-mobile">{{ $store.state.addedArticlesCount }} {{singOrPlur}}</div> | ||
</router-link> | ||
</li> | ||
</ul> | ||
|
||
</div> | ||
<router-view /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import 'bulma' | ||
// import 'buefy' | ||
import { mapGetters } from 'vuex' | ||
export default{ | ||
name: 'App', | ||
data(){ | ||
return{ | ||
tab1 : true, | ||
tab2: false | ||
} | ||
}, | ||
methods : { | ||
activateTab1 : function(){ | ||
this.tab1 = true | ||
this.tab2 = false | ||
}, | ||
activateTab2 : function(){ | ||
this.tab2 = true | ||
this.tab1 = false | ||
}, | ||
}, | ||
computed: { | ||
...mapGetters({ | ||
singOrPlur: 'singularOrPlurial', | ||
}) | ||
}, | ||
} | ||
</script> | ||
|
||
<style> | ||
|
||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
} | ||
html{ | ||
background-color: #f7f6f2; | ||
} | ||
|
||
nav { | ||
padding: 30px; | ||
h1{ | ||
color: #5c7061; | ||
} | ||
|
||
nav a { | ||
font-weight: bold; | ||
color: #2c3e50; | ||
.tabs{ | ||
background-color:#d8d4cc; | ||
} | ||
/*------- ICONMOON CSS ----- */ | ||
@font-face { | ||
font-family: 'icomoon'; | ||
src: url('@/fonts/icomoon.eot?2q5z0o'); | ||
src: url('@/fonts/icomoon.eot?2q5z0o#iefix') format('embedded-opentype'), | ||
url('@/fonts/icomoon.ttf?2q5z0o') format('truetype'), | ||
url('@/fonts/icomoon.woff?2q5z0o') format('woff'), | ||
url('@/fonts/icomoon.svg?2q5z0o#icomoon') format('svg'); | ||
font-weight: normal; | ||
font-style: normal; | ||
font-display: block; | ||
} | ||
|
||
[class^="icon-"], [class*=" icon-"] { | ||
/* use !important to prevent issues with browser extensions that change fonts */ | ||
font-family: 'icomoon' !important; | ||
speak: never; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
line-height: 1; | ||
|
||
/* Better Font Rendering =========== */ | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
nav a.router-link-exact-active { | ||
color: #42b983; | ||
.icon-leaf:before { | ||
content: "\e9a4"; | ||
} | ||
|
||
.onglet{ | ||
border: 1px solid black; | ||
padding: 1%; | ||
margin: 1%; | ||
.icon-basket:before { | ||
content: "\e901"; | ||
} | ||
.icon-shopping:before { | ||
content: "\e901"; | ||
} | ||
.icon-cart:before { | ||
content: "\e901"; | ||
} | ||
.icon-ecommerce:before { | ||
content: "\e901"; | ||
} | ||
.icon-cart1:before { | ||
content: "\e93a"; | ||
} | ||
.icon-apparel:before { | ||
content: "\e903"; | ||
} | ||
.icon-shopping-cart:before { | ||
content: "\e900"; | ||
} | ||
.icon-view-show:before { | ||
content: "\e902"; | ||
} | ||
|
||
.icon-zoom-in:before { | ||
content: "\e987"; | ||
} | ||
|
||
</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 |
---|---|---|
@@ -1,74 +1,106 @@ | ||
<template> | ||
<div class="wrapper"> | ||
<h2> {{ articleInfo.title }} </h2> | ||
<div class="wrapper p-3"> | ||
<router-link :to="`/article/${articleInfo.id}`"> | ||
<h2 class="title is-size-4-tablet is-size-5 m-4"> {{ articleInfo.title }} </h2> | ||
</router-link> | ||
|
||
<router-link :to="`/article/${articleInfo.id}`"> | ||
<img :src="articleInfo.image" alt="" srcset=""> | ||
</router-link> | ||
<h2> {{ articleInfo.price }}€ </h2> | ||
<h2 class="has-text-weight-bold is-size-4 m-4"> {{ articleInfo.price }}€ </h2> | ||
|
||
<button | ||
@click="addArticleToCart(articleInfo.id), incrementCount()" | ||
:class="articleInfo.id"> | ||
Ajouter | ||
@click="addArticleToCart(articleInfo.id), incrementCount(), displayNotification()" | ||
:class="articleInfo.id" | ||
class="button m-2 has-text-weight-bold is-medium btn-buy is-hidden-mobile has-text-white"> | ||
Add to cart | ||
</button> | ||
|
||
<router-link :to="`/article/${articleInfo.id}`"> | ||
<button>Voir</button> | ||
<button class="button m-2 has-text-weight-bold is-outlined is-medium is-hidden-mobile"> | ||
See details | ||
</button> | ||
</router-link> | ||
|
||
<!-- MOBILE VERSION --> | ||
<div class="mobile-btns"> | ||
<button | ||
@click="addArticleToCart(articleInfo.id), incrementCount(), displayNotification()" | ||
:class="articleInfo.id" | ||
class="button m-2 is-medium has-text-weight-bold btn-buy mobile is-hidden-tablet has-text-white"> | ||
<span class="icon-basket"></span> | ||
</button> | ||
<!-- Check indentation with Julien --> | ||
<router-link :to="`/article/${articleInfo.id}`"> | ||
<button class="button m-2 has-text-weight-bold is-outlined is-medium mobile is-hidden-tablet"> | ||
<span class="icon-view-show"></span> | ||
</button> | ||
</router-link> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapActions } from 'vuex' | ||
import {mixinArticles} from '@/mixins/mixins' | ||
export default{ | ||
name: 'ArticleItem', | ||
mixins : [mixinArticles], | ||
props : { | ||
articleInfo : { | ||
type : Object, | ||
default : Object | ||
} | ||
}, | ||
data(){ | ||
return{ | ||
|
||
} | ||
}, | ||
methods : mapActions([ | ||
'incrementCount', | ||
'decrementCount', | ||
'addArticleToCart' | ||
]), | ||
|
||
// async mounted(){ | ||
// const data = await fetch('https://fakestoreapi.com/products') | ||
// const response = await data.json() | ||
// console.log(response) | ||
// } | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.wrapper{ | ||
border: 1px solid black; | ||
width: 30vw; | ||
margin: auto; | ||
min-width: 30vw; | ||
box-sizing: border-box; | ||
padding: 2%; | ||
margin-bottom: 2%; | ||
height:60vh; | ||
height:58.5vh; | ||
overflow-y: scroll; | ||
border: 1px solid grey; | ||
margin: 3% 15%; | ||
border: 1px solid #D0C9C0; | ||
} | ||
|
||
.wrapper:hover{ | ||
border-color: #6D8B74;; | ||
} | ||
|
||
.title:hover{ | ||
color: #6D8B74; | ||
} | ||
|
||
img{ | ||
max-width: 30%; | ||
width:9vw; | ||
max-width: 9vw; | ||
height: 22vh; | ||
max-height: 22vh; | ||
} | ||
|
||
.btn-buy{ | ||
background-color: #6D8B74; | ||
} | ||
/*-- MEDIA QUERIES ---------- */ | ||
@media(max-width: 1024px){ | ||
.wrapper{ | ||
width: 40vw; | ||
} | ||
|
||
button{ | ||
font-weight: bold; | ||
padding: 1%; | ||
width: 5vw; | ||
margin: 2%; | ||
img{ | ||
width: fit-content; | ||
max-width: 20vw; | ||
} | ||
} | ||
|
||
@media(max-width: 425px){ | ||
.wrapper{ | ||
width: 80vw; | ||
} | ||
|
||
img{ | ||
max-width: 55vw; | ||
} | ||
} | ||
|
||
</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,39 @@ | ||
<template> | ||
<div class="wrapper p-3 my-2-tablet my-4 mx-auto is-flex is-justify-content-space-between"> | ||
<h1 class="is-size-4-tablet is-size-5 has-text-weight-bold">{{ articleInfo.title }} <span class="has-text-black">- {{ articleInfo.price }}€</span> </h1> | ||
<button | ||
class="button is-danger has-text-weight-bold" | ||
@click="deleteArticle(articleInfo.id)" | ||
> Remove </button> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mixinArticles } from '@/mixins/mixins' | ||
export default{ | ||
name:'CartArticle', | ||
mixins : [mixinArticles], | ||
props : { | ||
articleInfo : { | ||
type : Object, | ||
default : Object | ||
} | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.wrapper{ | ||
border: 1px solid #D0C9C0; | ||
width: 98%; | ||
height: fit-content !important; | ||
} | ||
|
||
/* MEDIA QUERIES */ | ||
@media(max-width:470px){ | ||
button{ | ||
margin-top: 1rem; | ||
margin-left: 4%; | ||
} | ||
} | ||
</style> |
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.
@Lysianedon on peut enlever ça non ?