Skip to content

Header tailwind fix #70

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions components/account/AccountIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<nuxt-link :to="link" class="account-link">
<nuxt-link :to="localePath({ path: link })" class="account-link">
<div class="account-link__icon">
<icon :name="icon" />
</div>
Expand All @@ -8,28 +8,28 @@
</template>
<script lang="ts">
export default {
name: 'AccountIcon',
name: "AccountIcon",
props: {
icon: {
required: true,
type: String
type: String,
},
label: {
required: false,
type: String,
default: ''
default: "",
},
link: {
required: false,
type: String,
default: ''
}
}
}
default: "",
},
},
};
</script>
<style lang="scss">
.account-link {
@apply flex w-auto cursor-pointer flex-col items-center justify-center card card-body bg-base-100 p-5 ;
@apply flex w-auto cursor-pointer flex-col items-center justify-center card card-body bg-base-100 p-5;
&__icon {
@apply my-5 rounded-full bg-primary p-4 text-4xl text-white;
}
Expand Down
2 changes: 1 addition & 1 deletion components/global/header/HeaderUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const auth = useShopinvaderService('auth')
const user = auth?.getUser()
const next = () => {
const localePath = useLocalePath()
auth?.loginRedirect(localePath({name: 'account'}))
auth?.loginRedirect(localePath({name: 'login'}))
}
</script>
<style lang="scss">
Expand Down
11 changes: 11 additions & 0 deletions components/product/ProductVariants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
v-if="product?.images?.[0]"
:image="product.images[0]"
class="hit__image"
:class="{'hit__image--selected': selected === product.id}"
>
</product-image>
<div class="hit__title">
Expand All @@ -36,9 +37,16 @@ export default {
return this.variants.filter((variant) => variant.id !== null)
}
},
data() {
return {
selected: null as number | null
}
},
methods: {
selectVariant(product: Product) {
this.selected = product.id
this.$emit('selectVariant', product)

},
mouseoverVariant(product: Product) {
this.$emit('mouseover', product)
Expand All @@ -56,6 +64,9 @@ export default {
@apply w-1/5 pr-2;
.hit__image {
@apply cursor-pointer border p-2;
&--selected {
@apply border-primary;
}
}
.hit__title {
@apply text-center text-xs font-bold uppercase;
Expand Down
2 changes: 2 additions & 0 deletions models/Product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export class Product extends Model {
let price = data?.price?.[priceLists?.[0]] || null
if(price) {
this.price = new ProductPrice(price) || null
} else {
this.price = data?.price?.default || null
}

this.images = [] as ProductImageSet[]
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
{
mytheme: {
fontFamily: 'Montserrat,"sanssecondaryerif"',
primary: '#13263d',
primary: colors.primary.DEFAULT,
secondary: '#dca11d',
accent: '#def2ff',
neutral: '#42536d',
Expand Down