diff --git a/public/img/featured.png b/public/img/featured.png new file mode 100644 index 0000000..94e7698 Binary files /dev/null and b/public/img/featured.png differ diff --git a/public/img/footer-payment.png b/public/img/footer-payment.png new file mode 100644 index 0000000..c71024c Binary files /dev/null and b/public/img/footer-payment.png differ diff --git a/public/img/footer-return.png b/public/img/footer-return.png new file mode 100644 index 0000000..be876aa Binary files /dev/null and b/public/img/footer-return.png differ diff --git a/src/pages/index.vue b/src/pages/index.vue index b384ee6..5b60997 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -6,248 +6,97 @@ } - - @@ -257,7 +106,10 @@ export default { return { post: {}, err:null, - itemByCategory: {}, + errorMessage:null, + ecomm55Banner: null, + ecom55Cat:null, + ecom55Official:null, totalVuePackages:null } }, @@ -270,42 +122,64 @@ export default { // }, created() { - // GET request using fetch with error handling fetch("https://api8.siliconpin.com/items/ecomm55banner") .then(async response => { const data = await response.json(); - - // check for error response if (!response.ok) { - // get error message from body or default to response statusText const error = (data && data.message) || response.statusText; this.err=error // return Promise.reject(error); } else{ - this.itemByCategory=data + this.ecomm55Banner=data console.log(data) } - - // this.totalVuePackages = data; - // console.log(data) }) .catch(error => { this.errorMessage = error; - this.err=error - // console.error("There was an error!", error); + }); + fetch("https://api8.siliconpin.com/items/ecom55cat") + .then(async response => { + const data = await response.json(); + if (!response.ok) { + const error = (data && data.message) || response.statusText; + this.err=error + // return Promise.reject(error); + } + else{ + this.ecom55Cat=data + // console.log(data) + } + }) + .catch(error => { + this.errorMessage = error; + }); + fetch("https://api8.siliconpin.com/items/ecom55official") + .then(async response => { + const data = await response.json(); + if (!response.ok) { + const error = (data && data.message) || response.statusText; + this.err=error + // return Promise.reject(error); + } + else{ + this.ecom55Official=data + // console.log(data) + } + }) + .catch(error => { + this.errorMessage = error; }); }, methods: { - getItemByCategory() { - fetch('https://api8.siliconpin.com/items/ecomm55banner' ) - // fetch('https://api8.siliconpin.com/items/ecom55?filter[category][_eq]=' + this.$route.params.id) - // fetch('https://api7.siliconpin.com/items/ecom55') - .then(response => response.json()) - .then(data => this.itemByCategory = data) - console.log(response) + // getItemByCategory() { + // fetch('https://api8.siliconpin.com/items/ecomm55banner' ) + // // fetch('https://api8.siliconpin.com/items/ecom55?filter[category][_eq]=' + this.$route.params.id) + // .then(response => response.json()) + // .then(data => this.itemByCategory = data) + // console.log(response) - } + // } } } \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index d545702..1117d99 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -5,6 +5,20 @@ module.exports = { content: ['./index.html', './src/**/*.{vue,js,ts}'], theme: { extend: { + animation: { + marquee: 'marquee 50s linear infinite', + marquee2: 'marquee2 25s linear infinite', + }, + keyframes: { + marquee: { + '0%': { transform: 'translateX(0%)' }, + '100%': { transform: 'translateX(-40%)' }, + }, + marquee2: { + '0%': { transform: 'translateX(100%)' }, + '100%': { transform: 'translateX(0%)' }, + }, + }, fontFamily: { sans: ['"Inter var"', ...defaultTheme.fontFamily.sans], },