|
@@ -1,8 +1,17 @@
|
1
|
|
-import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonText } from '@ionic/react';
|
|
1
|
+import { IonContent, IonHeader,IonImg, IonCard, IonCardHeader, IonCardTitle, IonPage, IonTitle, IonToolbar, IonButton, IonIcon } from '@ionic/react';
|
|
2
|
+import { arrowDownCircle } from 'ionicons/icons';
|
2
|
3
|
import './styles/styles.css';
|
3
|
4
|
|
|
5
|
+// This is the date that is going to appear on the
|
|
6
|
+// card with the Motivational message
|
|
7
|
+const current = new Date();
|
|
8
|
+const date = `${current.toLocaleString('default', {month: 'long'}) } ${current.getDate()}`;
|
|
9
|
+
|
|
10
|
+
|
4
|
11
|
const Home: React.FC = () => {
|
|
12
|
+
|
5
|
13
|
return (
|
|
14
|
+
|
6
|
15
|
<IonPage>
|
7
|
16
|
<IonHeader>
|
8
|
17
|
<IonToolbar>
|
|
@@ -10,9 +19,28 @@ const Home: React.FC = () => {
|
10
|
19
|
</IonToolbar>
|
11
|
20
|
</IonHeader>
|
12
|
21
|
<IonContent fullscreen>
|
13
|
|
- <IonText>
|
14
|
|
- <p>Un texto</p>
|
15
|
|
- </IonText>
|
|
22
|
+
|
|
23
|
+ {/* Card 1 */}
|
|
24
|
+ <IonCard class="moti-card">
|
|
25
|
+ <IonCardHeader class="card-header">
|
|
26
|
+ <IonCardTitle class="card-date">
|
|
27
|
+ {date}
|
|
28
|
+ <IonButton fill="clear"> <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon></IonButton>
|
|
29
|
+ </IonCardTitle>
|
|
30
|
+ </IonCardHeader>
|
|
31
|
+ <IonImg class="moti-img" alt="Motivational messa ge" src={require("./generatedMsgs/moti1.jpeg")}></IonImg>
|
|
32
|
+ </IonCard>
|
|
33
|
+
|
|
34
|
+ {/* Card 2 */}
|
|
35
|
+ <IonCard class="moti-card">
|
|
36
|
+ <IonCardHeader class="card-header">
|
|
37
|
+ <IonCardTitle class="card-date">
|
|
38
|
+ {date}
|
|
39
|
+ <IonButton fill="clear"> <IonIcon slot="icon-only" icon={arrowDownCircle} class="moti-download"></IonIcon></IonButton>
|
|
40
|
+ </IonCardTitle>
|
|
41
|
+ </IonCardHeader>
|
|
42
|
+ <IonImg class="moti-img" alt="Motivational messa ge" src={require("./generatedMsgs/moti1.jpeg")}></IonImg>
|
|
43
|
+ </IonCard>
|
16
|
44
|
</IonContent>
|
17
|
45
|
</IonPage>
|
18
|
46
|
);
|