Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Soul Amada
soul-amada-frontend
Commits
c7fc617f
Commit
c7fc617f
authored
5 months ago
by
Gabriel de Pinho das Neves Rodrigues
Browse files
Options
Download
Email Patches
Plain Diff
card devocional
parent
f4397261
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
App.tsx
+1
-0
App.tsx
src/assets/devocionalday/2.jpg
+0
-0
src/assets/devocionalday/2.jpg
src/assets/devocionalday/3.jpg
+0
-0
src/assets/devocionalday/3.jpg
src/assets/devocionalday/4.jpg
+0
-0
src/assets/devocionalday/4.jpg
src/assets/devocionalday/5.jpg
+0
-0
src/assets/devocionalday/5.jpg
src/assets/devocionalday/6.jpg
+0
-0
src/assets/devocionalday/6.jpg
src/assets/devocionalday/7.jpg
+0
-0
src/assets/devocionalday/7.jpg
src/assets/devocionalday/8.jpg
+0
-0
src/assets/devocionalday/8.jpg
src/components/DevocionalCard/index.tsx
+53
-0
src/components/DevocionalCard/index.tsx
src/components/DevocionalCard/styles.ts
+33
-0
src/components/DevocionalCard/styles.ts
src/screens/initialPage/index.tsx
+6
-0
src/screens/initialPage/index.tsx
src/screens/initialPage/styles.ts
+5
-0
src/screens/initialPage/styles.ts
with
98 additions
and
0 deletions
+98
-0
App.tsx
View file @
c7fc617f
...
...
@@ -32,6 +32,7 @@ const StackNavigator: React.FC<StackNavigatorProps> = ({ isAuthenticated }) => {
return
(
<
Stack
.
Navigator
initialRouteName
=
{
isAuthenticated
?
"
InitialPage
"
:
"
Login
"
}
// initialRouteName={"Home"}
screenOptions
=
{
{
headerStyle
:
{
backgroundColor
:
AppStyles
.
colors
.
background
,
...
...
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/2.jpg
0 → 100644
View file @
c7fc617f
956 KB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/3.jpg
0 → 100644
View file @
c7fc617f
1000 KB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/4.jpg
0 → 100644
View file @
c7fc617f
867 KB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/5.jpg
0 → 100644
View file @
c7fc617f
753 KB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/6.jpg
0 → 100644
View file @
c7fc617f
1.08 MB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/7.jpg
0 → 100644
View file @
c7fc617f
859 KB
This diff is collapsed.
Click to expand it.
src/assets/devocionalday/8.jpg
0 → 100644
View file @
c7fc617f
777 KB
This diff is collapsed.
Click to expand it.
src/components/DevocionalCard/index.tsx
0 → 100644
View file @
c7fc617f
import
React
from
"
react
"
;
import
{
View
,
Image
,
TouchableWithoutFeedback
,
ImageSourcePropType
,
}
from
"
react-native
"
;
import
{
LinearGradient
}
from
"
expo-linear-gradient
"
;
import
styles
from
"
./styles
"
;
interface
EventCardProps
{
onPress
:
()
=>
void
;
}
export
default
function
EventCard
({
onPress
}:
EventCardProps
)
{
// Obter o dia atual da semana em formato compatível com as chaves do mapa
const
date
=
new
Date
();
const
currentDay
=
date
.
toLocaleDateString
(
"
pt-BR
"
,
{
weekday
:
"
long
"
})
.
replace
(
/^
\w
/
,
(
c
)
=>
c
.
toUpperCase
());
// Ajusta a primeira letra para maiúscula
// Mapeamento das imagens
const
images
:
{
[
key
:
string
]:
ImageSourcePropType
}
=
{
"
Segunda-feira
"
:
require
(
"
../../assets/devocionalday/2.jpg
"
),
"
Terça-feira
"
:
require
(
"
../../assets/devocionalday/3.jpg
"
),
"
Quarta-feira
"
:
require
(
"
../../assets/devocionalday/4.jpg
"
),
"
Quinta-feira
"
:
require
(
"
../../assets/devocionalday/5.jpg
"
),
"
Sexta-feira
"
:
require
(
"
../../assets/devocionalday/6.jpg
"
),
"
Sábado
"
:
require
(
"
../../assets/devocionalday/7.jpg
"
),
"
Domingo
"
:
require
(
"
../../assets/devocionalday/8.jpg
"
),
};
// Imagem de fallback caso o dia não seja encontrado
const
fallbackImage
=
require
(
"
../../assets/icon.png
"
);
return
(
<
TouchableWithoutFeedback
onPress
=
{
onPress
}
>
<
View
style
=
{
styles
.
cardContainer
}
>
{
/* Imagem do evento */
}
<
Image
source
=
{
images
[
currentDay
]
||
fallbackImage
}
style
=
{
styles
.
image
}
/>
{
/* Gradiente de sobreposição para melhorar o contraste visual */
}
<
LinearGradient
colors
=
{
[
"
transparent
"
,
"
rgba(0,0,0,0.6)
"
]
}
style
=
{
styles
.
gradient
}
/>
</
View
>
</
TouchableWithoutFeedback
>
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/components/DevocionalCard/styles.ts
0 → 100644
View file @
c7fc617f
import
{
StyleSheet
}
from
"
react-native
"
;
import
AppStyles
from
"
../../theme/AppStyles
"
;
const
styles
=
StyleSheet
.
create
({
cardContainer
:
{
width
:
350
,
height
:
200
,
borderRadius
:
8
,
overflow
:
'
hidden
'
,
marginVertical
:
10
,
shadowColor
:
AppStyles
.
colors
.
black
,
shadowOffset
:
{
width
:
0
,
height
:
2
,
},
shadowOpacity
:
0.15
,
shadowRadius
:
3.84
,
elevation
:
5
,
},
image
:
{
width
:
'
100%
'
,
height
:
'
100%
'
,
position
:
'
absolute
'
,
},
gradient
:
{
flex
:
1
,
justifyContent
:
'
flex-end
'
,
paddingHorizontal
:
10
,
paddingVertical
:
20
,
},
});
export
default
styles
;
This diff is collapsed.
Click to expand it.
src/screens/initialPage/index.tsx
View file @
c7fc617f
...
...
@@ -9,6 +9,7 @@ import { isAdmin as checkAdminStatus } from "../../services/api";
import
{
useFocusEffect
}
from
"
@react-navigation/native
"
;
import
Loading
from
"
../../components/Loading/Loading
"
;
import
{
LinearGradient
}
from
"
expo-linear-gradient
"
;
import
DevocionalCard
from
"
../../components/DevocionalCard/
"
;
interface
LoginViewProps
{
navigation
:
any
;
...
...
@@ -77,6 +78,11 @@ export default function InitialPage({ navigation }: LoginViewProps) {
</
Text
>
</
TouchableOpacity
>
</
View
>
<
View
style
=
{
styles
.
devocional
}
>
<
DevocionalCard
onPress
=
{
()
=>
alert
(
"
testando
"
)
}
/>
</
View
>
<
View
style
=
{
styles
.
studyContainer
}
>
<
Text
style
=
{
styles
.
title
}
>
Sua Jornada
</
Text
>
<
ScrollView
...
...
This diff is collapsed.
Click to expand it.
src/screens/initialPage/styles.ts
View file @
c7fc617f
...
...
@@ -90,6 +90,11 @@ const styles = StyleSheet.create({
fontSize
:
20
,
color
:
"
white
"
,
},
devocional
:
{
alignItems
:
"
center
"
,
justifyContent
:
"
center
"
,
display
:
"
flex
"
,
},
});
export
default
styles
;
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help