Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Feb 3, 2022
1 parent 2f8963a commit e019f4e
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 49 deletions.
2 changes: 1 addition & 1 deletion components/AddToCartButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
}
</script>

<style lang="postcss">
<style lang="postcss" scoped>
button {
outline: none !important;
transition: all 150ms ease-in;
Expand Down
10 changes: 5 additions & 5 deletions components/Cart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<CloseModals class="bg-white rounded-xl shadow-xl p-1.5" />
<EmptyCart
v-if="!cart.isEmpty"
class="rounded-xl hover:bg-red-400 shadow-xl hover:text-white p-1.5"
class="rounded-xl shadow-xl p-1.5 hover:bg-red-400 hover:text-white"
/>

<div class="mt-8 text-center">Basket</div>
Expand All @@ -19,20 +19,20 @@
:item="item"
@has-swiped="removeItemFromCart(item.key)"
>
<CartCard :item="item" />
<LazyCartCard :item="item" />
</SwipeCard>
</ul>

<ShippingOptions
:options="cart.availableShippingMethods[0].rates"
:active-option="cart.chosenShippingMethods[0]"
class="px-8 mb-4"
class="mb-4 px-8"
@setActiveOption="setActiveOption"
/>

<div class="px-8 mb-8">
<div class="mb-8 px-8">
<NuxtLink
class="bg-primary text-white rounded-2xl shadow-md text-lg text-center p-3 block justify-evenly hover:bg-primary-dark"
class="bg-primary rounded-2xl shadow-md text-white text-lg text-center p-3 block justify-evenly hover:bg-primary-dark"
to="/checkout"
>
<span class="mx-2">Checkout</span>
Expand Down
4 changes: 2 additions & 2 deletions components/CookieBanner.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<transition name="scale-y">
<LazyCookieControl ref="cookiecontrol" v-if="loaded">
<CookieControl ref="cookiecontrol" v-if="loaded">
<template v-slot:bar>
<div class="right-8 bottom-8 left-8 z-10 fixed">
<div
Expand Down Expand Up @@ -33,7 +33,7 @@
</div>
</div>
</template>
</LazyCookieControl>
</CookieControl>
</transition>
</template>

Expand Down
2 changes: 1 addition & 1 deletion components/Filters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
}
</script>

<style lang="postcss">
<style lang="postcss" scoped>
#filters {
@apply bg-white border-r border-gray-100 py-8 pr-8 w-[225px];
box-shadow: -100px 0 0 white, -200px 0 0 white, -300px 0 0 white;
Expand Down
8 changes: 3 additions & 5 deletions components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<template>
<footer class="bg-white">
<a
href="https://woonuxt.com"
class="border-t text-xs text-center py-8 text-gray-700 block"
>WooNuxt Version {{ $config.clientVersion }}</a>
<footer class="bg-white border-t text-xs text-center py-8 text-gray-700 block">
<a href="https://woonuxt.com" class>WooNuxt v{{ $config.clientVersion }}</a> - by
<a href="https://scottyzen.com" target="_blank">Scottyzen</a>
</footer>
</template>
22 changes: 6 additions & 16 deletions components/ProductGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
products: { type: Array, default: null }
},
computed: {
// postWithPagination() { return this.pager(this.products) },
perPage() {
return this.$config.perPage
},
Expand All @@ -66,18 +65,9 @@ export default {
},
watch: {
page() {
console.log('Products.vue page', this.page);
this.$emit('setPage', this.page)
// scroll to top
window.scrollTo(0, 0)
}
},
methods: {
// pager(products) {
// const pageNum = this.page || this.$route.params.pageNumber
// return products.slice(this.perPage * (pageNum - 1), this.perPage * pageNum)
// }
}
}
</script>

Expand All @@ -90,12 +80,6 @@ export default {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
}
.pagination {
@apply flex mb-8 p-8 gap-2 items-center justify-center;
}
.pagination a {
@apply rounded-xl cursor-pointer bg-purple-100 leading-none py-2 px-4 text-purple-900 hover:bg-purple-200 hover:text-purple-900;
}
.shrink-move {
transition: all 500ms;
}
Expand All @@ -113,4 +97,10 @@ export default {
opacity: 0;
transform: scale(0.75) translateY(25%);
}
.pagination {
@apply flex mb-8 p-8 gap-2 items-center justify-center;
}
.pagination a {
@apply rounded-xl bg-purple-100 leading-none py-2 px-4 text-purple-900 hover:bg-purple-200;
}
</style>
2 changes: 1 addition & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
<style lang="postcss">
.page-enter-active,
.page-leave-active {
transition: opacity 300ms ease-in-out;
transition: opacity 250ms ease-in-out;
}
.page-enter,
.page-leave-active {
Expand Down
10 changes: 1 addition & 9 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# [build]
# functions = "functions"

[template.environment]
WORDPRESS_URL = "WordPress URL without trailing slash. http://example.com"
STRIPE_PUBLISHABLE_KEY = "Stripe Publishable Key"


[build]
command = "npm run generate"
publish = "dist"


[[headers]]
for = "*.js" # js files should be set this way
[headers.values]
Expand All @@ -29,9 +24,6 @@
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "no-referrer"
X-Content-Type-Options = "nosniff"
# Strict-Transport-Security = "max-age=15780000; includeSubDomains; preload"
# Feature-Policy = "geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; fullscreen 'none'; payment 'none'"
# Content-Security-Policy = "default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline'"

[[headers]]
for = "/_nuxt/*"
Expand All @@ -42,6 +34,6 @@

[[redirects]]
from = "/*"
to = "https://testing.2cubedtest.com/:splat"
to = "https://secure.woonuxt.com/:splat"
status = 200
headers = {Access-Control-Allow-Origin = "*", Access-Control-Allow-Headers = "Content-Type, *", Access-Control-Allow-Methods = "GET, POST", Access-Control-Allow-Credentials= "true"}
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineNuxtConfig({
[ "nuxt-cookie-control", {
barPosition: "bottom-left",
blockIframe: true,
controlButton: true,
controlButton: false,
css: false,
optional: [{
name: 'Google Analitycs',
Expand Down Expand Up @@ -66,6 +66,7 @@ export default defineNuxtConfig({
'@nuxtjs/composition-api/module'
],


graphql: {
clients: {
default: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woonuxt",
"version": "0.3.31",
"version": "0.3.32",
"private": true,
"scripts": {
"dev": "nuxi dev",
Expand Down
8 changes: 1 addition & 7 deletions pages/products.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<main class="container flex">
<Filters
<LazyFilters
@filter-updated="filterProducts"
:activeFilters="this.$store.state.filter"
:showFilters="showFilters"
Expand Down Expand Up @@ -134,12 +134,6 @@ export default {
</script>

<style lang="postcss" >
.pagination {
@apply flex mb-8 p-8 gap-2 items-center justify-center;
}
.pagination a {
@apply rounded-xl bg-purple-100 leading-none py-2 px-4 text-purple-900 hover:bg-purple-200;
}
input[type="search"] {
@apply border rounded-xl max-w-md outline-none leading-tight w-full p-2 px-4 pl-10 transition-all;
background: url("/images/search.svg") no-repeat center left 0.75em;
Expand Down

0 comments on commit e019f4e

Please sign in to comment.