Skip to content

Commit

Permalink
Move to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Feb 20, 2023
1 parent 4a8974a commit 598a11a
Show file tree
Hide file tree
Showing 204 changed files with 4,667 additions and 15,551 deletions.
24 changes: 19 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
WORDPRESS_URL = https://wordpress.example.com
GRAPHQL_ENDPOINT = https://wordpress.example.com/graphql
DOMAIN = example.com
STRIPE_PUBLISHABLE_KEY = pk_test_hYushiff8SDLQBTdWpHx5s192OzMpEh6o
GOOGLE_TAG_MANAGER_ID = G-80Z4HSDMGR
# GraphQL endpoint
GQL_HOST="https://example.com/graphql"
# If you have the WooNuxt-Settings plugin installed this is all you need. Everything else is optional and can be configured in the WordPress admin under Settings > WooNuxt.


# If you don't have the plugin installed, you can configure the rest of the settings here.

# number of products to be displayed per page
PRODUCTS_PER_PAGE="24"

# Stripe API key
STRIPE_PUBLISHABLE_KEY="pk_test_abcdefghijklmnopqrstuvwxyz"

# Color of input and button elements
PRIMARY_COLOR="#ff0000"

# Needed for nuxt-image to work with external images
NUXT_IMAGE_DOMAINS="example.com"

99 changes: 8 additions & 91 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,95 +1,12 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
node_modules
.nuxt
nuxt.d.ts
.output
.env

# parcel-bundler cache (https://parceljs.org/)
.env.local
.DS_Store
*.log*
.nitro
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp

.output

# VSCode
.vscode
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"semi": true,
"singleQuote": true
"singleQuote": true,
"bracketSameLine": true,
"printWidth": 140
}
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
![Preview of WooNuxt](http://woonuxt.com/preview.png)

This branch is for WooNuxt v2 built on Nuxt 2.15.8.
![full](https://user-images.githubusercontent.com/5116925/218879668-f4c1f9fd-bef4-44b0-bc7f-e87d994aa3a1.png)

# Next Generation Front-End for WooCommerce

- [Live Demo](https://demo.woonuxt.com/) ⚡️
- [Second Demo](https://demo2-woonuxt.netlify.app/) ⚡️ ([Fork](https://github.com/zackha/woonuxt) by [@zackha](https://github.com/zackha))
> **Note** This is the first iteration of the new WooNuxt built on Nuxt 3. It's under active development and has a lot of features still to be added. You can use the old version of WooNuxt on the [v2 branch](https://github.com/scottyzen/woonuxt/tree/v2) which is more stable.
### Required WordPress Plugins
## Introduction

- [WPGraphQL](https://www.wpgraphql.com)
- [WooGraphQL](https://woographql.com)
- [WPGraphQL Cors](https://github.com/funkhaus/wp-graphql-cors)
The goal of WooNuxt is to provide a modern, fast, and SEO friendly front-end for WooCommerce. It's built on top of Nuxt 3 and uses the WPGraphQL API to retrieve all the data it needs. It's also fully customizable and can be extended with your own components and modules. You can see a live demo of WooNuxt by clicking the button below.

[Live Demo of WooNuxt](https://v3.woonuxt.com/) ⚡️

## Get Started

- Download the [WooNuxt Settings](https://github.com/scottyzen/woonuxt-settings/releases/download/1.0.8/woonuxt-settings.zip) plugin.
- Install and activate the plugin on your WordPress site. This will install all the required plugins for WooNuxt, add some useful fields to the WPGraphQL schema, and automatically retrieve the WooCommerce payment gateway settings for Stripe and PayPal.
- Once the plugin is activated your ready to deploy WooNuxt on a whatever hosting you like, or click one onf the fast deploy button below.

[![button](https://user-images.githubusercontent.com/5116925/218880214-a16287a7-fd8c-4299-9e65-0871136f0771.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/scottyzen/woonuxt)

### Progress

Expand All @@ -22,18 +27,31 @@ This branch is for WooNuxt v2 built on Nuxt 2.15.8.
- Shipping ✅
- Checkout
- Stripe ✅
- Paypal ⏳
- Click & Collect
- Paypal ✅
- Cash on Delivery ✅
- Filtering ✅
- Wishlists ✅
- Account ⏳
- Coupons
- Account ✅
- Coupons ✅

### Required WordPress Plugins

- [WPGraphQL](https://www.wpgraphql.com)
- [WooGraphQL](https://woographql.com)
- [WPGraphQL Cors](https://github.com/funkhaus/wp-graphql-cors)

#### Tested up to:

- WordPress 6.1.1
- WooCommerce 7.3.0
- WPGraphQL 1.13.8
- WooGraphQL 0.12.1
- WooCommerce 7.1.1
- WPGraphQL 1.13.7
- WooGraphQL 0.12.0
- Node 16.18.1

### Todos

- Product Reviews
- product Category Pages
- WooNuxt Settings - Module
- Better Typescript Support
- Mobile layout
159 changes: 159 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<script setup>
const { toggleCart, isShowingCart, cart } = useCart();
</script>

<template>
<div class="flex flex-col min-h-screen">
<AppHeader />

<Transition name="slide">
<Cart v-if="isShowingCart && cart" />
</Transition>

<NuxtPage />

<Transition name="fade">
<div
v-if="isShowingCart && cart"
class="bg-black opacity-25 inset-0 z-40 fixed"
@click="toggleCart(false)"
></div>
</Transition>

<AppFooter />
</div>
</template>

<style lang="postcss">
html,
body {
/* @apply bg-gradient-to-t to-white from-gray-50 text-gray-900; */
@apply bg-gray-100 text-gray-900;
scroll-behavior: smooth;
}
img {
image-rendering: crisp-edges;
image-rendering: -webkit-optimize-contrast;
}
pre {
@apply rounded bg-gray-800 my-8 text-xs text-white p-4 whitespace-pre-wrap overflow-auto;
}
select {
@apply border-2 rounded-2xl py-2 px-4 appearance-none;
background: url('/images/chevron-down.svg') center right 10px no-repeat;
background-size: 1rem;
padding-right: 2.5rem;
}
/* Slide */
.slide-leave-active,
.slide-enter-active {
transition: transform 400ms ease-in-out;
}
.slide-enter-from,
.slide-leave-to {
transform: translateX(500px);
}
/* Fade */
.fade-enter-active,
.fade-leave-active {
transition: opacity 400ms ease-in-out;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
/* Scale Y */
.scale-y-enter-active,
.scale-y-leave-active {
transition: all 500ms linear;
will-change: max-height, opacity;
max-height: 9999px;
overflow: hidden;
opacity: 1;
}
.scale-y-enter-from,
.scale-y-leave-to {
max-height: 0;
opacity: 0;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.custom-scrollbar::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar {
@apply rounded bg-gray-100 w-1.5;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
@apply rounded bg-gray-400;
}
@keyframes fadeIn {
0% {
opacity: 0.001;
}
100% {
opacity: 1;
}
}
@keyframes fadeDisabledIn {
0% {
opacity: 0.001;
}
100% {
opacity: 0.7;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0.001;
}
}
.page-enter-active,
.page-leave-active {
transition: opacity 250ms;
}
.page-enter,
.page-leave-to {
opacity: 0;
}
.page-enter-active {
animation-duration: 250ms;
animation-name: fadeIn;
animation-timing-function: linear;
backface-visibility: hidden;
}
.page-leave-active {
animation-name: fadeOut;
animation-duration: 0.25s;
}
</style>
Loading

0 comments on commit 598a11a

Please sign in to comment.