11import React from 'react' ;
2- import { View , Text , StyleSheet , ImageBackground , TouchableOpacity } from 'react-native' ;
2+ import { View , Text , StyleSheet , ImageBackground , TouchableOpacity , SafeAreaView , StatusBar } from 'react-native' ;
33import { Ionicons } from '@expo/vector-icons' ;
44import { useRouter } from 'expo-router' ;
55
6- const bgImage = require ( '../../assets/images/gaziantep.jpg' ) ;
7-
8- export const unstable_settings = { initialRouteName : 'hatlar' } ;
6+ // Arka plan resmini buraya ekliyoruz
7+ const backgroundImage = require ( '../../assets/images/tram_stop.jpg' ) ;
98
109export default function HatlarScreen ( ) {
1110 const router = useRouter ( ) ;
11+
1212 return (
13- < View style = { styles . container } >
14- < Text style = { styles . title } > Hatlar</ Text >
15- < Text style = { styles . desc } > Gaziantep'teki tüm otobüs ve tramvay hatlarını keşfet.</ Text >
16- < TouchableOpacity style = { styles . card } activeOpacity = { 0.85 } onPress = { ( ) => router . push ( '/hatlar/ara' ) } >
17- < ImageBackground source = { bgImage } style = { styles . cardBg } imageStyle = { { borderRadius : 18 , opacity : 0.7 } } >
18- < View style = { styles . cardContent } >
19- < Ionicons name = "search" size = { 38 } color = "#1976D2" style = { { marginBottom : 8 } } />
20- < Text style = { styles . cardTitle } > Hatları Ara</ Text >
21- < Text style = { styles . cardDesc } > Kod veya isimle otobüs/tramvay bul</ Text >
22- </ View >
23- </ ImageBackground >
24- </ TouchableOpacity >
25- </ View >
13+ < ImageBackground source = { backgroundImage } style = { styles . container } >
14+ { /* Arka plan resminin üzerine gelen durum çubuğu metinlerini beyaz yapar */ }
15+ < StatusBar barStyle = "light-content" />
16+
17+ { /* SafeAreaView, içeriğin telefon çentikleri altına girmesini engeller */ }
18+ < SafeAreaView style = { styles . safeArea } >
19+ < View style = { styles . header } >
20+ < Text style = { styles . title } > Hatlar</ Text >
21+ < Text style = { styles . subtitle } > Gaziantep'teki tüm otobüs ve tramvay hatlarını keşfet.</ Text >
22+ </ View >
23+
24+ < View style = { styles . content } >
25+ < TouchableOpacity
26+ style = { styles . card }
27+ activeOpacity = { 0.8 }
28+ onPress = { ( ) => router . push ( '/hatlar/ara' ) }
29+ >
30+ < View style = { styles . cardIconContainer } >
31+ < Ionicons name = "search" size = { 28 } color = "#FFFFFF" />
32+ </ View >
33+ < View style = { styles . cardTextContainer } >
34+ < Text style = { styles . cardTitle } > Hatları Ara</ Text >
35+ < Text style = { styles . cardDescription } > Kod veya isimle otobüs/tramvay bul</ Text >
36+ </ View >
37+ < Ionicons name = "chevron-forward" size = { 24 } color = "#555" />
38+ </ TouchableOpacity >
39+ </ View >
40+ </ SafeAreaView >
41+ </ ImageBackground >
2642 ) ;
2743}
2844
2945// Hatlar ana sayfasında header'ı gizle
3046HatlarScreen . options = {
3147 headerShown : false ,
3248} ;
49+
3350const styles = StyleSheet . create ( {
3451 container : {
3552 flex : 1 ,
36- alignItems : 'center' ,
37- justifyContent : 'flex-start' ,
38- backgroundColor : '#F7FAFC' ,
39- paddingTop : 48 ,
40- paddingHorizontal : 18 ,
53+ // Arka plan resminin tüm alanı kaplamasını sağlar
54+ } ,
55+ safeArea : {
56+ flex : 1 ,
57+ // Arka plan resminin üzerine hafif bir karartma ekleyerek metin okunabilirliğini artırır
58+ backgroundColor : 'rgba(0, 0, 0, 0.35)' ,
59+ } ,
60+ header : {
61+ paddingTop : 60 ,
62+ paddingHorizontal : 24 ,
63+ alignItems : 'flex-start' , // Metinleri sola hizala
4164 } ,
4265 title : {
43- fontSize : 28 ,
66+ fontSize : 36 ,
4467 fontWeight : 'bold' ,
45- color : '#1976D2' ,
46- marginBottom : 8 ,
68+ color : '#FFFFFF' ,
69+ textShadowColor : 'rgba(0, 0, 0, 0.5)' ,
70+ textShadowOffset : { width : 1 , height : 2 } ,
71+ textShadowRadius : 3 ,
72+ } ,
73+ subtitle : {
74+ fontSize : 18 ,
75+ color : '#E0E0E0' ,
4776 marginTop : 8 ,
48- letterSpacing : 0.2 ,
77+ textShadowColor : 'rgba(0, 0, 0, 0.7)' ,
78+ textShadowOffset : { width : 1 , height : 1 } ,
79+ textShadowRadius : 2 ,
4980 } ,
50- desc : {
51- fontSize : 16 ,
52- color : '#333' ,
53- textAlign : 'center' ,
54- marginBottom : 24 ,
55- opacity : 0.85 ,
81+ content : {
82+ flex : 1 ,
83+ justifyContent : 'center' , // Kartı dikeyde ortalar
84+ alignItems : 'center' ,
85+ paddingHorizontal : 20 ,
5686 } ,
5787 card : {
5888 width : '100%' ,
59- maxWidth : 400 ,
60- borderRadius : 18 ,
61- overflow : 'hidden' ,
62- marginTop : 12 ,
63- shadowColor : '#1976D2' ,
64- shadowOpacity : 0.10 ,
65- shadowRadius : 8 ,
66- elevation : 4 ,
89+ maxWidth : 500 ,
90+ flexDirection : 'row' , // İçerikleri yatayda hizalar
91+ alignItems : 'center' ,
92+ // "Buzlu Cam" (Frosted Glass) efekti
93+ backgroundColor : 'rgba(255, 255, 255, 0.85)' ,
94+ borderRadius : 20 ,
95+ padding : 16 ,
96+ // Modern ve yumuşak bir gölge
97+ shadowColor : '#000' ,
98+ shadowOffset : {
99+ width : 0 ,
100+ height : 4 ,
101+ } ,
102+ shadowOpacity : 0.15 ,
103+ shadowRadius : 12 ,
104+ elevation : 8 ,
105+ // Cam efektini güçlendirmek için ince bir çerçeve
106+ borderWidth : 1 ,
107+ borderColor : 'rgba(255, 255, 255, 0.4)' ,
67108 } ,
68- cardBg : {
69- width : '100%' ,
70- height : 170 ,
109+ cardIconContainer : {
110+ width : 50 ,
111+ height : 50 ,
112+ borderRadius : 25 , // Daire şekli için
113+ backgroundColor : '#1976D2' , // Ana tema rengi
71114 justifyContent : 'center' ,
72115 alignItems : 'center' ,
116+ marginRight : 16 ,
73117 } ,
74- cardContent : {
75- alignItems : 'center' ,
76- justifyContent : 'center' ,
77- backgroundColor : 'rgba(255,255,255,0.82)' ,
78- borderRadius : 18 ,
79- padding : 18 ,
80- margin : 10 ,
118+ cardTextContainer : {
119+ flex : 1 , // Kalan tüm boşluğu doldurur
81120 } ,
82121 cardTitle : {
83- fontSize : 20 ,
122+ fontSize : 18 ,
84123 fontWeight : 'bold' ,
85- color : '#1976D2' ,
86- marginBottom : 2 ,
124+ color : '#1A202C' , // Koyu renk metin
87125 } ,
88- cardDesc : {
89- fontSize : 15 ,
90- color : '#333' ,
91- opacity : 0.85 ,
126+ cardDescription : {
127+ fontSize : 14 ,
128+ color : '#4A5568' , // Daha yumuşak bir gri
129+ marginTop : 2 ,
92130 } ,
93- } ) ;
131+ } ) ;
0 commit comments