Files
photobooth/src/views/SelectSourceView.vue

226 lines
5.2 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
const goToShooting = () => {
router.push('/shooting')
}
const goToUpload = () => {
router.push('/upload')
}
const goBack = () => {
router.push('/frame')
}
const goToHome = () => {
router.push('/frame')
}
</script>
<template>
<div class="source-container">
<!-- <header class="header">
<button @click="goBack" class="back-button"> กล</button>
<h1>เลอกแหลงภาพ</h1>
</header> -->
<section class="options-section">
<div class="option-card" @click="goToShooting">
<div class="option-icon">
📷
</div>
<!-- <h3>ายภาพใหม</h3> -->
<p>ายภาพจากกลองหรอเวบแคม</p>
<!-- <div class="arrow"></div> -->
</div>
<div class="option-card" @click="goToUpload">
<div class="option-icon">
🖼
</div>
<!-- <h3>พโหลดภาพ</h3> -->
<p>เลอกภาพจากคลงภาพในอปกรณ</p>
<!-- <div class="arrow"></div> -->
</div>
</section>
<section class="options-fillter">
<!-- switch filter black&white -->
</section>
<footer class="footer-actions">
<button @click="goToHome" class="start-button">กลบหนาแรก</button>
</footer>
</div>
</template>
<style scoped>
@import url('https://fonts.googleapis.com/css2?family=Crete+Round&family=Old+Standard+TT&display=swap');
.source-container {
min-height: 100vh;
padding: 1.5rem; /* Adjusted padding */
background: #fdfaf6; /* Light vintage paper color */
color: #3e2723; /* Dark brown for text */
font-family: 'Old Standard TT', serif;
display: flex;
flex-direction: column;
}
.header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 2.5rem; /* Adjusted margin */
background: #e0d8cf; /* Lighter vintage tone for header background */
padding: 1rem 1.5rem;
border-bottom: 1px solid #bcaaa4;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
border-radius: 8px; /* Slightly rounded corners */
}
.back-button {
background: #a1887f; /* Vintage brown */
color: #fdfaf6; /* Light text */
border: 1px solid #8d6e63; /* Darker border */
padding: 0.4rem 0.8rem;
border-radius: 5px; /* Softer border-radius */
cursor: pointer;
font-size: 1rem;
font-weight: bold;
box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
transition: background 0.2s ease, transform 0.2s ease;
}
.back-button:hover {
background: #8d6e63;
transform: translateY(-1px);
}
.header h1 {
margin: 0;
color: #5d4037; /* Darker brown for title */
font-family: 'Crete Round', serif;
font-size: 2rem;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.options-section {
display: flex;
flex-direction: column;
gap: 1.5rem; /* Adjusted gap */
max-width: 600px;
margin: 0 auto;
width: 100%;
}
.option-card {
background: #fdfaf6; /* Vintage paper background */
border-radius: 8px; /* Softer border-radius */
padding: 1.5rem; /* Adjusted padding */
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 3px 8px rgba(0,0,0,0.1); /* Softer shadow */
display: flex;
align-items: center;
gap: 1.5rem;
position: relative;
border: 2px solid #bcaaa4; /* Muted border */
}
.option-card:hover {
transform: translateY(-2px);
box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}
.option-icon {
font-size: 2.5rem; /* Slightly smaller icon */
width: 70px; /* Adjusted size */
height: 70px; /* Adjusted size */
display: flex;
align-items: center;
justify-content: center;
background: #a1887f; /* Vintage brown color */
border-radius: 50%;
color: #fdfaf6; /* Light text color */
box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); /* Inner shadow for depth */
}
.start-button {
background: #8d6e63; /* Vintage brown button */
margin-top: 2rem;
color: #fdfaf6;
border: none;
padding: 1.2rem 2.5rem;
font-size: 1.1rem;
font-weight: bold;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
text-transform: uppercase;
letter-spacing: 1px;
display: flex;
align-items: center;
}
.start-button:hover {
background: #795548;
margin-right: 0.5rem;
transform: translateY(-1px);
font-size: 1.2rem;
box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}
.option-card h3 {
margin: 0 0 0.5rem 0;
color: #5d4037; /* Darker brown for heading */
font-size: 1.4rem; /* Slightly smaller heading */
font-family: 'Crete Round', serif;
text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.option-card p {
margin: 0;
color: #6d4c41; /* Muted brown for paragraph */
flex: 1;
font-size: 0.95rem; /* Slightly smaller paragraph font */
}
.arrow {
font-size: 1.5rem;
color: #8d6e63; /* Vintage brown for arrow */
font-weight: bold;
}
.footer-actions {
display: flex;
justify-content: center;
margin-top: 2rem;
}
.option-card {
flex-direction: column;
text-align: center;
gap: 1rem;
padding: 1.2rem;
}
.option-icon {
width: 60px;
height: 60px;
font-size: 2rem;
}
.header h1 {
font-size: 1.8rem;
}
</style>