Skip to content

Commit b57604e

Browse files
committed
Enhance styling and accessibility across components
- Updated Tailwind color palette for better contrast. - Modified app.html to include viewport-fit for improved mobile display and added resource hints for performance. - Improved Footer and Navigation components with consistent logo dimensions and enhanced link accessibility. - Added critical CSS for above-the-fold content in app.html to optimize loading performance. - Refactored error handling button to use Svelte's event binding for better functionality.
1 parent 690c9ba commit b57604e

5 files changed

Lines changed: 38 additions & 21 deletions

File tree

src/app.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
77

88
<!-- Web App Manifest -->
99
<link rel="manifest" href="%sveltekit.assets%/site.webmanifest" />
1010

11+
<!-- Resource hints -->
12+
<link rel="dns-prefetch" href="//docs.shugur.com">
13+
<link rel="dns-prefetch" href="//github.com">
14+
1115
<!-- Apple Touch Icons -->
1216
<link rel="apple-touch-icon" href="%sveltekit.assets%/shugur-logo.svg" />
1317

1418
<!-- Fonts -->
1519
<link rel="preconnect" href="https://fonts.googleapis.com">
1620
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17-
<link href="https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&family=Inter:wght@100..900&display=swap" rel="stylesheet">
21+
<link href="https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&family=Inter:wght@100..900&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
22+
<noscript><link href="https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&family=Inter:wght@100..900&display=swap" rel="stylesheet"></noscript>
1823

1924
<!-- SEO Meta Tags -->
2025
<meta name="robots" content="index, follow" />
@@ -86,6 +91,18 @@
8691
}
8792
</script>
8893

94+
<!-- Critical CSS for above-the-fold content -->
95+
<style>
96+
.h-full{height:100%}
97+
.min-h-screen{min-height:100vh}
98+
.bg-white{background-color:#fff}
99+
.text-4xl{font-size:2.25rem;line-height:2.5rem}
100+
.font-bold{font-weight:700}
101+
.text-gray-900{color:#111827}
102+
.animate-fade-in{animation:fadeIn 0.5s ease-in-out}
103+
@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
104+
</style>
105+
89106
%sveltekit.head%
90107
</head>
91108
<body data-sveltekit-preload-data="hover" class="h-full">

src/lib/components/Footer.svelte

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
<div class="grid md:grid-cols-4 gap-8">
88
<div class="md:col-span-2">
99
<a href="/" class="logo mb-2">
10-
<img src="/shugur-logo-full-light.svg" alt="Shugur" style="width: 170px; height: auto;" />
10+
<img src="/shugur-logo-full-light.svg" alt="Shugur Relay Logo" width="170" height="40" style="width: 170px; height: auto;" />
1111
</a>
1212
<p class="text-gray-400 text-sm mb-6">
1313
Build open, resilient tech for everyone.
1414
</p>
1515
<!-- Social Media Links -->
1616
<div class="flex gap-4">
17-
<a href="https://github.com/Shugur-Network" class="text-gray-400 hover:text-shugur-500 transition-colors" aria-label="GitHub">
17+
<a href="https://github.com/Shugur-Network" class="text-gray-400 hover:text-shugur-500 transition-colors p-2 min-h-[48px] min-w-[48px] flex items-center justify-center" aria-label="GitHub">
1818
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
1919
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
2020
</svg>
2121
</a>
22-
<a href="https://twitter.com/ShugurNetwork" class="text-gray-400 hover:text-shugur-500 transition-colors" aria-label="Twitter">
22+
<a href="https://twitter.com/ShugurNetwork" class="text-gray-400 hover:text-shugur-500 transition-colors p-2 min-h-[48px] min-w-[48px] flex items-center justify-center" aria-label="Twitter">
2323
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
2424
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/>
2525
</svg>
@@ -30,27 +30,27 @@
3030
<div>
3131
<h3 class="font-semibold mb-3 text-white">Resources</h3>
3232
<ul class="space-y-2 text-sm text-gray-400">
33-
<li><a href="https://docs.shugur.com" class="hover:text-shugur-500 transition-colors">Documentation</a></li>
34-
<li><a href="https://github.com/Shugur-Network" class="hover:text-shugur-500 transition-colors">GitHub</a></li>
33+
<li><a href="https://docs.shugur.com" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">Documentation</a></li>
34+
<li><a href="https://github.com/Shugur-Network" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">GitHub</a></li>
3535
</ul>
3636
</div>
3737

3838
<div>
3939
<h3 class="font-semibold mb-3 text-white">Company</h3>
4040
<ul class="space-y-2 text-sm text-gray-400">
41-
<li><a href="/about" class="hover:text-shugur-500 transition-colors">About Us</a></li>
42-
<li><a href="mailto:contact@shugur.com" class="hover:text-shugur-500 transition-colors">Contact</a></li>
43-
<li><a href="/privacy" class="hover:text-shugur-500 transition-colors">Privacy Policy</a></li>
44-
<li><a href="/terms" class="hover:text-shugur-500 transition-colors">Terms of Service</a></li>
41+
<li><a href="/about" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">About Us</a></li>
42+
<li><a href="mailto:contact@shugur.com" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">Contact</a></li>
43+
<li><a href="/privacy" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">Privacy Policy</a></li>
44+
<li><a href="/terms" class="hover:text-shugur-500 transition-colors py-2 block min-h-[48px] flex items-center">Terms of Service</a></li>
4545
</ul>
4646
</div>
4747
</div>
4848

4949
<div class="border-t border-gray-800 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center text-sm text-gray-400">
5050
<div>&copy; {currentYear} Shugur. Simple where it matters, open where it counts.</div>
5151
<div class="mt-4 md:mt-0 flex gap-6">
52-
<a href="/privacy" class="hover:text-shugur-500 transition-colors">Privacy</a>
53-
<a href="/terms" class="hover:text-shugur-500 transition-colors">Terms</a>
52+
<a href="/privacy" class="hover:text-shugur-500 transition-colors py-2 px-2 min-h-[48px] flex items-center">Privacy</a>
53+
<a href="/terms" class="hover:text-shugur-500 transition-colors py-2 px-2 min-h-[48px] flex items-center">Terms</a>
5454
</div>
5555
</div>
5656
</div>

src/lib/components/Navigation.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div class="max-w-7xl mx-auto px-4 py-2 flex items-center justify-between" aria-label="Global navigation">
2323
<div class="flex lg:flex-1">
2424
<a href="/" class="logo" aria-label="Shugur Relay Homepage">
25-
<img src="/shugur-logo-full.svg" alt="Shugur Relay Logo" class="logo-img" style="width: 170px; height: auto;" />
25+
<img src="/shugur-logo-full.svg" alt="Shugur Relay Logo" class="logo-img" width="170" height="40" style="width: 170px; height: auto;" />
2626
</a>
2727
</div>
2828
<div class="flex lg:hidden">
@@ -86,7 +86,7 @@
8686
>
8787
<div class="flex items-center justify-between">
8888
<a href="/" class="logo" aria-label="Shugur Relay Homepage" on:click={closeMobileMenu}>
89-
<img src="/shugur-logo-full.svg" alt="Shugur Relay Logo" class="logo-img" style="width: 120px; height: auto;" />
89+
<img src="/shugur-logo-full.svg" alt="Shugur Relay Logo" class="logo-img" width="120" height="28" style="width: 120px; height: auto;" />
9090
</a>
9191
<button
9292
type="button"

src/routes/+error.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
<button
4747
type="button"
48-
onclick="history.back()"
48+
on:click={() => history.back()}
4949
class="inline-flex items-center justify-center w-full px-6 py-3 border border-gray-300 text-gray-700 font-medium rounded-lg hover:bg-gray-50 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-shugur-500 focus:ring-offset-2"
5050
>
5151
<ArrowLeft class="w-5 h-5 mr-2" />

tailwind.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export default {
1010
200: '#99f6e4',
1111
300: '#5eead4',
1212
400: '#2dd4bf',
13-
500: '#36BA98', // Primary Shugur Green
14-
600: '#0d9488',
15-
700: '#0f766e',
16-
800: '#115e59',
17-
900: '#134e4a',
13+
500: '#059669', // Darker primary for better contrast
14+
600: '#047857', // Darker for better contrast
15+
700: '#065f46',
16+
800: '#064e3b',
17+
900: '#022c22',
1818
950: '#042f2e'
1919
},
2020
primary: {

0 commit comments

Comments
 (0)