Knuger commited on
Commit
4abb2ac
·
verified ·
1 Parent(s): e5dd30c

Ändra om sidan så att bilderna är kaffebönor, kaffepåsar, och ta bort prenumeration delen. Ändra det till en mer kontakt sida, lite info om kaffet (SOM JAG SKRIVER SJÄLV EFTER).

Browse files
Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +46 -0
  3. components/navbar.js +62 -0
  4. index.html +175 -19
  5. script.js +40 -0
  6. style.css +19 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Kaffekompis
3
- emoji: 🌍
4
- colorFrom: pink
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: KaffeKompis ☕
3
+ colorFrom: green
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .social-icon {
7
+ transition: transform 0.3s ease;
8
+ }
9
+ .social-icon:hover {
10
+ transform: translateY(-3px);
11
+ }
12
+ </style>
13
+ <footer class="bg-primary text-white py-8">
14
+ <div class="container mx-auto px-4">
15
+ <div class="flex flex-col md:flex-row justify-between items-center">
16
+ <div class="mb-6 md:mb-0">
17
+ <div class="flex items-center">
18
+ <i data-feather="coffee" class="mr-2"></i>
19
+ <span class="text-xl font-bold">KaffeKompis</span>
20
+ </div>
21
+ <p class="mt-2 text-amber-100">Premium kaffe för den verkliga kaffeälskaren</p>
22
+ </div>
23
+
24
+ <div class="flex space-x-4">
25
+ <a href="#" class="social-icon">
26
+ <i data-feather="instagram"></i>
27
+ </a>
28
+ <a href="#" class="social-icon">
29
+ <i data-feather="facebook"></i>
30
+ </a>
31
+ <a href="#" class="social-icon">
32
+ <i data-feather="twitter"></i>
33
+ </a>
34
+ </div>
35
+ </div>
36
+
37
+ <div class="border-t border-amber-700 mt-8 pt-8 text-center text-amber-100">
38
+ <p>&copy; ${new Date().getFullYear()} KaffeKompis. Alla rättigheter förbehållna.</p>
39
+ </div>
40
+ </div>
41
+ </footer>
42
+ `;
43
+ }
44
+ }
45
+
46
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .nav-link {
7
+ position: relative;
8
+ }
9
+ .nav-link:after {
10
+ content: '';
11
+ position: absolute;
12
+ width: 0;
13
+ height: 2px;
14
+ bottom: -2px;
15
+ left: 0;
16
+ background-color: #6F4E37;
17
+ transition: width 0.3s ease;
18
+ }
19
+ .nav-link:hover:after {
20
+ width: 100%;
21
+ }
22
+ </style>
23
+ <nav class="bg-white shadow-md">
24
+ <div class="container mx-auto px-4 py-4 flex justify-between items-center">
25
+ <a href="#" class="flex items-center">
26
+ <i data-feather="coffee" class="text-primary mr-2"></i>
27
+ <span class="text-xl font-bold text-primary">KaffeKompis</span>
28
+ </a>
29
+
30
+ <div class="hidden md:flex space-x-8">
31
+ <a href="#" class="nav-link text-gray-700 hover:text-primary">Hem</a>
32
+ <a href="#products" class="nav-link text-gray-700 hover:text-primary">Produkter</a>
33
+ <a href="#contact" class="nav-link text-gray-700 hover:text-primary">Kontakt</a>
34
+ </div>
35
+
36
+ <button id="mobile-menu-button" class="md:hidden text-gray-700 focus:outline-none">
37
+ <i data-feather="menu"></i>
38
+ </button>
39
+ </div>
40
+
41
+ <!-- Mobile menu -->
42
+ <div id="mobile-menu" class="hidden md:hidden bg-white px-4 pb-4">
43
+ <a href="#" class="block py-2 text-gray-700 hover:text-primary">Hem</a>
44
+ <a href="#products" class="block py-2 text-gray-700 hover:text-primary">Produkter</a>
45
+ <a href="#contact" class="block py-2 text-gray-700 hover:text-primary">Kontakt</a>
46
+ </div>
47
+ </nav>
48
+ `;
49
+
50
+ // Initialize mobile menu toggle
51
+ const mobileMenuButton = this.shadowRoot.getElementById('mobile-menu-button');
52
+ const mobileMenu = this.shadowRoot.getElementById('mobile-menu');
53
+
54
+ mobileMenuButton.addEventListener('click', () => {
55
+ const isHidden = mobileMenu.classList.contains('hidden');
56
+ mobileMenu.classList.toggle('hidden', !isHidden);
57
+ feather.replace();
58
+ });
59
+ }
60
+ }
61
+
62
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,175 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="sv">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>KaffeKompis | Premium Kaffe</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: '#6F4E37',
17
+ secondary: '#C4A484',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-amber-50">
25
+ <custom-navbar></custom-navbar>
26
+
27
+ <main class="container mx-auto px-4 py-8">
28
+ <!-- Hero Section -->
29
+ <section class="flex flex-col md:flex-row items-center mb-16">
30
+ <div class="md:w-1/2 mb-8 md:mb-0 md:pr-8">
31
+ <h1 class="text-4xl md:text-5xl font-bold text-primary mb-4">Vårt Premium Kaffe</h1>
32
+ <p class="text-lg text-gray-700 mb-6">
33
+ Upptäck smaken av vårt noggrant utvalda kaffe, rostade med omsorg för att ge dig den perfekta koppen varje gång.
34
+ </p>
35
+ <a href="#contact" class="bg-primary hover:bg-amber-800 text-white font-semibold py-3 px-6 rounded-lg transition duration-300 inline-flex items-center">
36
+ Kontakta oss <i data-feather="arrow-right" class="ml-2"></i>
37
+ </a>
38
+ </div>
39
+ <div class="md:w-1/2">
40
+ <img src="http://static.photos/food/1024x576/1" alt="Kaffebönor" class="rounded-lg shadow-xl w-full">
41
+ </div>
42
+ </section>
43
+
44
+ <!-- Coffee Info Section -->
45
+ <section class="mb-16">
46
+ <h2 class="text-3xl font-bold text-primary mb-8 text-center">Vårt Kaffe</h2>
47
+
48
+ <div class="grid md:grid-cols-3 gap-8">
49
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
50
+ <div class="bg-secondary rounded-full w-16 h-16 flex items-center justify-center mb-4 mx-auto">
51
+ <i data-feather="coffee" class="text-white text-2xl"></i>
52
+ </div>
53
+ <h3 class="text-xl font-semibold text-primary mb-2 text-center">Bönor</h3>
54
+ <p class="text-gray-700">
55
+ Våra arabica-bönor odlas på höga höjder i Etiopien och Colombia, vilket ger en mild och aromatisk smak.
56
+ </p>
57
+ </div>
58
+
59
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
60
+ <div class="bg-secondary rounded-full w-16 h-16 flex items-center justify-center mb-4 mx-auto">
61
+ <i data-feather="sun" class="text-white text-2xl"></i>
62
+ </div>
63
+ <h3 class="text-xl font-semibold text-primary mb-2 text-center">Rostning</h3>
64
+ <p class="text-gray-700">
65
+ Rostas för hand i små batchar för att säkerställa jämn kvalitet och perfekt smakutveckling.
66
+ </p>
67
+ </div>
68
+
69
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
70
+ <div class="bg-secondary rounded-full w-16 h-16 flex items-center justify-center mb-4 mx-auto">
71
+ <i data-feather="package" class="text-white text-2xl"></i>
72
+ </div>
73
+ <h3 class="text-xl font-semibold text-primary mb-2 text-center">Förpackning</h3>
74
+ <p class="text-gray-700">
75
+ Lufttäta förpackningar som bevarar färskheten och aromen tills du är redo att brygga.
76
+ </p>
77
+ </div>
78
+ </div>
79
+ </section>
80
+
81
+ <!-- Coffee Products -->
82
+ <section class="mb-16">
83
+ <h2 class="text-3xl font-bold text-primary mb-8 text-center">Våra Produkter</h2>
84
+
85
+ <div class="grid md:grid-cols-3 gap-8">
86
+ <div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
87
+ <img src="http://static.photos/food/640x360/2" alt="Etiopien Single Origin" class="w-full h-48 object-cover">
88
+ <div class="p-6">
89
+ <h3 class="text-xl font-semibold text-primary mb-2">Etiopien Single Origin</h3>
90
+ <p class="text-gray-700 mb-4">
91
+ En lättrostad kaffe med toner av bär, citrus och en lätt sötma.
92
+ </p>
93
+ <div class="flex justify-between items-center">
94
+ <span class="font-bold text-primary">149 kr</span>
95
+ </div>
96
+ </div>
97
+ </div>
98
+
99
+ <div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
100
+ <img src="http://static.photos/food/640x360/3" alt="Colombia Excelso" class="w-full h-48 object-cover">
101
+ <div class="p-6">
102
+ <h3 class="text-xl font-semibold text-primary mb-2">Colombia Excelso</h3>
103
+ <p class="text-gray-700 mb-4">
104
+ Medelrostad med en balanserad smak av mörk choklad och nötter.
105
+ </p>
106
+ <div class="flex justify-between items-center">
107
+ <span class="font-bold text-primary">159 kr</span>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
113
+ <img src="http://static.photos/food/640x360/4" alt="Mörkrost Espresso" class="w-full h-48 object-cover">
114
+ <div class="p-6">
115
+ <h3 class="text-xl font-semibold text-primary mb-2">Mörkrost Espresso</h3>
116
+ <p class="text-gray-700 mb-4">
117
+ Kraftfull och intensiv med toner av mörk choklad och karamell.
118
+ </p>
119
+ <div class="flex justify-between items-center">
120
+ <span class="font-bold text-primary">169 kr</span>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </section>
126
+
127
+ <!-- Contact Section -->
128
+ <section id="contact" class="py-12 bg-primary rounded-lg px-8 mb-16">
129
+ <h2 class="text-3xl font-bold text-white mb-8 text-center">Kontakta Oss</h2>
130
+
131
+ <div class="max-w-2xl mx-auto bg-white rounded-lg shadow-lg p-8">
132
+ <form class="space-y-6">
133
+ <div>
134
+ <label for="name" class="block text-gray-700 font-medium mb-1">Namn</label>
135
+ <input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
136
+ </div>
137
+
138
+ <div>
139
+ <label for="email" class="block text-gray-700 font-medium mb-1">E-post</label>
140
+ <input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
141
+ </div>
142
+
143
+ <div>
144
+ <label for="message" class="block text-gray-700 font-medium mb-1">Meddelande</label>
145
+ <textarea id="message" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"></textarea>
146
+ </div>
147
+
148
+ <button type="submit" class="w-full bg-primary hover:bg-amber-800 text-white font-semibold py-3 px-4 rounded-lg transition duration-300">
149
+ Skicka meddelande
150
+ </button>
151
+ </form>
152
+
153
+ <div class="mt-8 pt-8 border-t border-gray-200">
154
+ <div class="flex items-center mb-4">
155
+ <i data-feather="mail" class="text-primary mr-3"></i>
156
+ <span>carlhugolind@gmail.com</span>
157
+ </div>
158
+ <div class="flex items-center">
159
+ <i data-feather="phone" class="text-primary mr-3"></i>
160
+ <span>08-123 456 78</span>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </section>
165
+ </main>
166
+
167
+ <custom-footer></custom-footer>
168
+
169
+ <script src="components/navbar.js"></script>
170
+ <script src="components/footer.js"></script>
171
+ <script src="script.js"></script>
172
+ <script>feather.replace();</script>
173
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
174
+ </body>
175
+ </html>
script.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Form submission handling
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ const contactForm = document.querySelector('form');
4
+
5
+ if (contactForm) {
6
+ contactForm.addEventListener('submit', function(e) {
7
+ e.preventDefault();
8
+
9
+ // Get form values
10
+ const name = document.getElementById('name').value;
11
+ const email = document.getElementById('email').value;
12
+ const message = document.getElementById('message').value;
13
+
14
+ // Here you would typically send the data to a server
15
+ console.log('Form submitted:', { name, email, message });
16
+
17
+ // Show success message
18
+ alert('Tack för ditt meddelande! Vi återkommer så snart vi kan.');
19
+ contactForm.reset();
20
+ });
21
+ }
22
+
23
+ // Add animations to coffee products on scroll
24
+ const observerOptions = {
25
+ threshold: 0.1
26
+ };
27
+
28
+ const observer = new IntersectionObserver(function(entries) {
29
+ entries.forEach(entry => {
30
+ if (entry.isIntersecting) {
31
+ entry.target.classList.add('animate-fadeIn');
32
+ }
33
+ });
34
+ }, observerOptions);
35
+
36
+ document.querySelectorAll('.bg-white.rounded-lg').forEach(card => {
37
+ observer.observe(card);
38
+ card.classList.add('opacity-0', 'transition-opacity', 'duration-500');
39
+ });
40
+ });
style.css CHANGED
@@ -1,28 +1,28 @@
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
 
 
 
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
 
1
+ /* Custom styles that can't be achieved with Tailwind */
2
  body {
3
+ font-family: 'Inter', sans-serif;
 
4
  }
5
 
6
+ /* Smooth scrolling */
7
+ html {
8
+ scroll-behavior: smooth;
9
  }
10
 
11
+ /* Coffee section animations */
12
+ @keyframes float {
13
+ 0%, 100% {
14
+ transform: translateY(0);
15
+ }
16
+ 50% {
17
+ transform: translateY(-10px);
18
+ }
19
  }
20
 
21
+ .float-animation {
22
+ animation: float 3s ease-in-out infinite;
 
 
 
 
23
  }
24
 
25
+ /* Coffee bean background pattern */
26
+ .coffee-pattern {
27
+ background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4A484' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
28
+ }