Spaces:
Running
Running
File size: 11,509 Bytes
0c98e17 c10da68 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WanderScrawl - Travel Sketchbook Social</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script>
<script src="https://unpkg.com/roughjs@4.5.2/bundled/rough.js"></script>
<script src="https://cdn.jsdelivr.net/npm/excalidraw/dist/excalidraw.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Gochi+Hand&display=swap');
.handwritten {
font-family: 'Gochi Hand', cursive;
}
.sketch-border {
position: relative;
background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M10 10h80v80H10z' stroke='%23333' stroke-width='2' stroke-dasharray='6,4' fill='none'/%3E%3Cpath d='M15 15h70v70H15z' stroke='%23333' stroke-width='1' stroke-dasharray='3,2' fill='none'/%3E%3C/svg%3E");
background-size: 20px 20px;
border-radius: 8px;
}
.sketch-border::before {
content: '';
position: absolute;
top: -8px;
left: -8px;
right: -8px;
bottom: -8px;
background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M5 5h90v90H5z' stroke='%23333' stroke-width='1' stroke-dasharray='8,6' fill='none'/%3E%3C/svg%3E");
background-size: 30px 30px;
border-radius: 12px;
pointer-events: none;
z-index: -1;
opacity: 0.7;
}
</style>
</head>
<body class="bg-gray-50">
<div id="app" class="min-h-screen flex flex-col">
<!-- Hand-drawn header -->
<header class="bg-yellow-100 sketch-border p-4 shadow-md">
<div class="container mx-auto flex justify-between items-center">
<h1 class="text-3xl handwritten font-bold text-gray-800">WanderScrawl</h1>
<nav class="flex space-x-4">
<button @click="showLogin = !showLogin" class="handwritten px-4 py-2 bg-white sketch-border hover:bg-yellow-200 transition">
<i data-feather="log-in"></i> Sign In
</button>
<button class="handwritten px-4 py-2 bg-orange-300 sketch-border hover:bg-orange-400 transition">
<i data-feather="compass"></i> Explore
</button>
</nav>
</div>
</header>
<!-- Main content -->
<main class="flex-grow container mx-auto p-4">
<!-- Hero section -->
<section class="my-8 p-6 bg-white sketch-border">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-6 md:mb-0">
<h2 class="text-4xl handwritten font-bold mb-4">Sketch Your Journey ✈️</h2>
<p class="text-xl handwritten mb-6">Share your travel adventures with hand-drawn sketches and stories from around the world.</p>
<button @click="showSketchModal = true" class="handwritten text-xl px-6 py-3 bg-blue-400 text-white sketch-border hover:bg-blue-500 transition">
Start Drawing <i data-feather="edit-3"></i>
</button>
</div>
<div class="md:w-1/2 flex justify-center">
<div id="hero-sketch" class="w-full h-64 bg-gray-100 sketch-border" style="background-color: rgba(255, 255, 240, 0.8);"></div>
</div>
</div>
</section>
<!-- Featured sketches -->
<section class="my-8">
<h3 class="text-2xl handwritten font-bold mb-4">Recent WanderScrawls</h3>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div v-for="(sketch, index) in featuredSketches" :key="index" class="bg-white p-4 sketch-border hover:shadow-lg transition">
<div class="h-48 bg-gray-100 mb-3 sketch-border overflow-hidden" style="background-color: rgba(255, 255, 240, 0.8);">
<img :src="sketch.image" alt="Travel sketch" class="w-full h-full object-cover">
</div>
<h4 class="handwritten text-xl font-semibold">{{ sketch.title }}</h4>
<p class="text-sm text-gray-600 mb-2">By @{{ sketch.user }}</p>
<div class="flex items-center text-gray-500">
<i data-feather="map-pin" class="mr-1 w-4 h-4"></i>
<span class="text-sm">{{ sketch.location }}</span>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="bg-yellow-100 sketch-border p-4 text-center">
<p class="handwritten">Made with ❤️ for travelers who sketch ✏️</p>
</footer>
<!-- Login Modal -->
<div v-if="showLogin" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white sketch-border p-6 max-w-md w-full">
<div class="flex justify-between items-center mb-4">
<h3 class="text-2xl handwritten">Join the Adventure</h3>
<button @click="showLogin = false" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div class="space-y-4">
<input type="text" placeholder="Username" class="w-full p-2 sketch-border handwritten">
<input type="password" placeholder="Password" class="w-full p-2 sketch-border handwritten">
<button class="w-full handwritten p-2 bg-green-400 sketch-border hover:bg-green-500">
Sign In <i data-feather="arrow-right"></i>
</button>
<p class="text-center handwritten">or continue with</p>
<div class="flex justify-center space-x-4">
<button class="p-2 sketch-border bg-blue-50">
<i data-feather="facebook"></i>
</button>
<button class="p-2 sketch-border bg-red-50">
<i data-feather="google"></i>
</button>
<button class="p-2 sketch-border bg-gray-50">
<i data-feather="twitter"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Sketch Modal -->
<div v-if="showSketchModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white sketch-border p-4 w-full max-w-4xl h-3/4 overflow-hidden">
<div class="flex justify-between items-center mb-2">
<h3 class="text-xl handwritten">Create Your Travel Sketch</h3>
<button @click="showSketchModal = false" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div id="sketch-canvas" class="w-full h-5/6 bg-gray-100 sketch-border" style="background-color: rgba(255, 255, 240, 0.8);"></div>
<div class="flex justify-end mt-2 space-x-2">
<button @click="clearCanvas" class="handwritten px-3 py-1 bg-red-100 sketch-border">
<i data-feather="trash-2"></i> Clear
</button>
<button @click="saveSketch" class="handwritten px-3 py-1 bg-green-100 sketch-border">
<i data-feather="save"></i> Save
</button>
</div>
</div>
</div>
</div>
<script>
const { createApp, ref, onMounted } = Vue;
createApp({
setup() {
const showLogin = ref(false);
const showSketchModal = ref(false);
const featuredSketches = ref([
{
title: "Parisian Morning",
user: "sketchytraveler",
location: "Paris, France",
image: "http://static.photos/travel/640x360/1"
},
{
title: "Tokyo Streets",
user: "wanderlust_artist",
location: "Tokyo, Japan",
image: "http://static.photos/cityscape/640x360/2"
},
{
title: "Mountain Retreat",
user: "nature_sketcher",
location: "Swiss Alps",
image: "http://static.photos/nature/640x360/3"
}
]);
const initHeroSketch = () => {
const rc = rough.canvas(document.getElementById('hero-sketch'));
rc.rectangle(10, 10, 280, 200, { roughness: 1.2, fill: 'rgba(255, 255, 200, 0.8)' });
rc.rectangle(30, 30, 240, 150, { roughness: 1.5, fill: 'white' });
rc.circle(200, 60, 40, { roughness: 1.8, fill: 'rgba(173, 216, 230, 0.7)' });
rc.line(60, 80, 180, 80, { roughness: 1.5 });
rc.line(120, 80, 120, 150, { roughness: 1.5 });
rc.rectangle(60, 100, 120, 60, { roughness: 1.5 });
};
const initSketchCanvas = () => {
const rc = rough.canvas(document.getElementById('sketch-canvas'));
// This would be replaced with actual drawing functionality
rc.rectangle(10, 10, 100, 100, { roughness: 2, fill: 'rgba(255, 200, 200, 0.5)' });
};
const clearCanvas = () => {
const canvas = document.getElementById('sketch-canvas');
const ctx = canvas.getContext('2d');
ctx.clearRect(0, 0, canvas.width, canvas.height);
};
const saveSketch = () => {
alert("Sketch saved! (This would connect to your backend in a real app)");
showSketchModal.value = false;
};
onMounted(() => {
feather.replace();
initHeroSketch();
});
return {
showLogin,
showSketchModal,
featuredSketches,
initSketchCanvas,
clearCanvas,
saveSketch
};
},
mounted() {
feather.replace();
}
}).mount('#app');
</script>
<script>
feather.replace();
</script>
</body>
</html>
|