From 5cb10426689e2bdf0c5b524c6931f743edc3c721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Conde?= Date: Sun, 3 Sep 2023 14:40:49 +0200 Subject: [PATCH] adding responsive 1 --- package.json | 2 +- src/App.vue | 54 ++++++++--- src/components/Certifications.vue | 30 +++++-- src/components/CoffeeFarmer.vue | 14 ++- src/components/Different.vue | 14 ++- src/components/DifferentBox.vue | 19 ++-- src/components/Employee.vue | 6 ++ src/components/Footer.vue | 43 +++++++-- src/components/Menu.vue | 139 +++++++++++++++++++++++------ src/components/ProductBox.vue | 8 +- src/components/ProductCarousel.vue | 19 +++- src/components/ProductTable.vue | 1 - src/style.css | 8 +- src/views/about/About.vue | 10 +++ src/views/social/Social.vue | 39 +++++--- vite.config.js | 1 + 16 files changed, 322 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index a17be49..ff7183b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "vite build", "preview": "vite preview" }, diff --git a/src/App.vue b/src/App.vue index b2de361..212c6ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,9 @@ export default { data() { return { - stickyClass: '' + stickyClass: '', + deviceClass: this.$isMobile() ? 'mobile' : 'desktop', + width: window.innerWidth } }, components: { Footer, Menu }, @@ -24,15 +26,15 @@ }, methods: { handleScroll() { - console.log('this.$route.name :>> ', this.$route.name); + const limit = 430; if (!pagesWithCarousel.includes(this.$route.name)) { this.stickyClass = 'has-sticky has-sticky-1' return; } - if (window.scrollY > 0 && window.scrollY <= 574) { + if (window.scrollY > 0 && window.scrollY <= limit) { this.stickyClass = 'has-sticky has-sticky-0'; - } else if(window.scrollY > 574) { + } else if(window.scrollY > limit) { this.stickyClass = 'has-sticky has-sticky-1'; } else { this.stickyClass = ''; @@ -43,8 +45,9 @@ diff --git a/src/components/Certifications.vue b/src/components/Certifications.vue index 3b378cd..ae0b330 100644 --- a/src/components/Certifications.vue +++ b/src/components/Certifications.vue @@ -2,11 +2,11 @@

{{ $t('certifications.title1') }}

-

+

{{ $t('certifications.title2') }}

-

+

@@ -19,22 +19,40 @@ export default { \ No newline at end of file diff --git a/src/components/CoffeeFarmer.vue b/src/components/CoffeeFarmer.vue index 95a72f4..1b6d52d 100644 --- a/src/components/CoffeeFarmer.vue +++ b/src/components/CoffeeFarmer.vue @@ -13,7 +13,7 @@ export default { \ No newline at end of file diff --git a/src/components/Different.vue b/src/components/Different.vue index 3043829..1d631c2 100644 --- a/src/components/Different.vue +++ b/src/components/Different.vue @@ -19,11 +19,11 @@ import DifferentBox from './DifferentBox.vue'; .different { color: #fff; background-color: #000; - padding: 72px 0; + padding: 0 0 72px; } h2 { - padding: 0 150px; + padding-bottom: 26px !important; font-size: 52px; text-align: center; } @@ -41,4 +41,14 @@ import DifferentBox from './DifferentBox.vue'; display: flex; justify-content: space-between; } + + +@media only screen and (max-width: 767px) { + h3 { + padding: 0; + } + .boxes { + flex-direction: column; + } +} \ No newline at end of file diff --git a/src/components/DifferentBox.vue b/src/components/DifferentBox.vue index 238c2ab..1f0703b 100644 --- a/src/components/DifferentBox.vue +++ b/src/components/DifferentBox.vue @@ -18,29 +18,36 @@ export default { \ No newline at end of file diff --git a/src/components/Employee.vue b/src/components/Employee.vue index a657ea6..22c261a 100644 --- a/src/components/Employee.vue +++ b/src/components/Employee.vue @@ -36,4 +36,10 @@ export default { line-height: 23.44px; padding: 0; } + + @media only screen and (max-width: 767px) { + .role { + margin-top: 8px; + } + } \ No newline at end of file diff --git a/src/components/Footer.vue b/src/components/Footer.vue index f30777d..a1bd65b 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -11,14 +11,16 @@ alejandro@tayronafoods.com jose@tayronafoods.com

-

+49(0)176 321 368 59

-

+49(0)152 549 389 62

-

+

+

+49(0)176 321 368 59

+

+49(0)152 549 389 62

+
+

{{ $t('social.paragraph2') }}

-
-

{{ $t('social.paragraph3') }}

-

{{ $t('social.paragraph4') }}

-
-
- -
+ +

{{ $t('social.paragraph3') }}

{{ $t('social.paragraph4') }}

@@ -26,19 +21,35 @@ import { slides } from '../../data'; padding: 40px 98px; background-image: url('@images/bg_1.jpg'); background-position: top left; - background-size: contain; - height: 600px; - display: grid; - grid-template-columns: 1fr 1fr; + // display: grid; + // grid-template-columns: 1fr 1fr; .left { - padding: 52px 32px 0 0 + padding: 0 32px 0 0 + } + + img { + float: right; + width: 50%; + padding: 16px } p { font-weight: 500; color: #603809; - font-size: 32px; - line-height: 50px; + font-size: 24px; + line-height: 40px; } } + + @media only screen and (max-width: 767px) { + .social-bottom { + padding: 16px; + + img { + float: none; + width: 100%; + padding: 0; + } + } + } \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index f785f65..a546e3e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,6 +6,7 @@ import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], + // base: '/beta', resolve: { alias: { '@images': fileURLToPath(new URL('./src/assets/images',