modified: main_dc/yalarba/easySite/easySite/app/composables/useTheme.ts

modified:   main_dc/yalarba/easySite/easySite/app/pages/index.vue
add call to action card words
This commit is contained in:
2025-10-30 07:49:47 +05:00
parent 3a138924c3
commit e19bf32ac4
2 changed files with 33 additions and 20 deletions
@@ -5,7 +5,7 @@ export const useTheme = () => {
const setTheme = (newTheme: 'light' | 'dark') => { const setTheme = (newTheme: 'light' | 'dark') => {
theme.value = newTheme theme.value = newTheme
if (process.client) { if (import.meta.client) {
document.documentElement.setAttribute('data-theme', newTheme) document.documentElement.setAttribute('data-theme', newTheme)
localStorage.setItem('theme', newTheme) localStorage.setItem('theme', newTheme)
} }
@@ -18,7 +18,7 @@ export const useTheme = () => {
const setFontSet = (newFontSet: 'modern' | 'elegant') => { const setFontSet = (newFontSet: 'modern' | 'elegant') => {
fontSet.value = newFontSet fontSet.value = newFontSet
if (process.client) { if (import.meta.client) {
document.documentElement.setAttribute('data-font-set', newFontSet) document.documentElement.setAttribute('data-font-set', newFontSet)
localStorage.setItem('font-set', newFontSet) localStorage.setItem('font-set', newFontSet)
} }
@@ -31,7 +31,7 @@ export const useTheme = () => {
// Инициализация при загрузке // Инициализация при загрузке
onMounted(() => { onMounted(() => {
if (process.client) { if (import.meta.client) {
const savedTheme = localStorage.getItem('theme') as 'light' | 'dark' const savedTheme = localStorage.getItem('theme') as 'light' | 'dark'
const savedFontSet = localStorage.getItem('font-set') as 'modern' | 'elegant' const savedFontSet = localStorage.getItem('font-set') as 'modern' | 'elegant'
const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
@@ -8,9 +8,18 @@
<div class="container"> <div class="container">
<div class="hero-content"> <div class="hero-content">
<div class="hero-text"> <div class="hero-text">
<h1 class="hero-title T1">аккаунт</h1> <div>
<h1 class="hero-title T2">услуги</h1> <text class="T1 T">создавай</text>
<h1 class="hero-title T3">сайт</h1> <h1 class="hero-title">аккаунт</h1>
</div>
<div class="T2 T">
<text>добавляй</text>
<h1 class="hero-title">услуги</h1>
</div>
<div class="T3 T">
<text>получай</text>
<h1 class="hero-title">сайт</h1>
</div>
<p class="hero-subtitle T4">легко и доступно</p> <p class="hero-subtitle T4">легко и доступно</p>
</div> </div>
</div> </div>
@@ -77,17 +86,20 @@ import Footer from '~/components/layout/Footer.vue'
align-items: flex-start; align-items: flex-start;
gap: 1rem; gap: 1rem;
width: 100%; width: 100%;
border: 1px solid #ffffff50; border: 1px solid #ffffff20;
border-radius: 1rem; border-radius: 1rem;
padding: 2rem; padding: 2rem;
box-shadow: 2px 2px 4px #638370; box-shadow: 2px 2px 4px #42b7d19a;
} }
.hero-title { .hero-title {
font-size: 3rem; font-size: 3rem;
font-weight: bold; font-weight: bold;
margin-bottom: 1.5rem; }
line-height: 1.2;
.T {
color: var(--text-secondary);
font-family: var(--font-accent);
} }
.T1 { .T1 {
@@ -103,7 +115,7 @@ import Footer from '~/components/layout/Footer.vue'
} }
.T4 { .T4 {
margin: 0 auto; margin: 0 auto;
} }
.hero-subtitle { .hero-subtitle {
@@ -154,31 +166,32 @@ import Footer from '~/components/layout/Footer.vue'
/* Футер остается внизу, но не влияет на высоту hero */ /* Футер остается внизу, но не влияет на высоту hero */
.footer { .footer {
flex-shrink: 0; /* Не сжимается */ flex-shrink: 0;
/* Не сжимается */
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.hero-section { .hero-section {
min-height: calc(100vh - 70px); min-height: calc(100vh - 70px);
} }
.hero-title { .hero-title {
font-size: 2rem; font-size: 2rem;
} }
.hero-subtitle { .hero-subtitle {
font-size: 1rem; font-size: 1rem;
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.search-box { .search-box {
flex-direction: column; flex-direction: column;
} }
.search-button { .search-button {
width: 100%; width: 100%;
} }
.hero-content { .hero-content {
padding: 1rem 0; padding: 1rem 0;
} }
@@ -188,16 +201,16 @@ import Footer from '~/components/layout/Footer.vue'
.hero-title { .hero-title {
font-size: 1.75rem; font-size: 1.75rem;
} }
.hero-subtitle { .hero-subtitle {
font-size: 0.9rem; font-size: 0.9rem;
} }
.search-input { .search-input {
padding: 0.75rem; padding: 0.75rem;
font-size: 1rem; font-size: 1rem;
} }
.hero-section { .hero-section {
min-height: calc(100vh - 60px); min-height: calc(100vh - 60px);
} }