Bladeren bron

Added moti messages to home

Ángel G. Romero Rosario 2 jaren geleden
bovenliggende
commit
a22b412d0a
8 gewijzigde bestanden met toevoegingen van 66 en 5 verwijderingen
  1. BIN
      .DS_Store
  2. 3
    0
      .vscode/settings.json
  3. BIN
      src/.DS_Store
  4. BIN
      src/images/.DS_Store
  5. BIN
      src/pages/.DS_Store
  6. 32
    4
      src/pages/Home.tsx
  7. BIN
      src/pages/generatedMsgs/moti1.jpeg
  8. 31
    1
      src/pages/styles/styles.css

BIN
.DS_Store Bestand weergeven


+ 3
- 0
.vscode/settings.json Bestand weergeven

@@ -0,0 +1,3 @@
1
+{
2
+    "git.ignoreLimitWarning": true
3
+}

BIN
src/.DS_Store Bestand weergeven


BIN
src/images/.DS_Store Bestand weergeven


BIN
src/pages/.DS_Store Bestand weergeven


+ 32
- 4
src/pages/Home.tsx Bestand weergeven

@@ -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
   );

BIN
src/pages/generatedMsgs/moti1.jpeg Bestand weergeven


+ 31
- 1
src/pages/styles/styles.css Bestand weergeven

@@ -20,4 +20,34 @@
20 20
 
21 21
 .info-p {
22 22
     line-height: 1.5;
23
-}
23
+}
24
+
25
+/* Styles for home screen */
26
+
27
+.card-header {
28
+    padding-left: 5px;
29
+    padding-right: 5px;
30
+}
31
+
32
+.moti-download {
33
+    font-size: 40px;
34
+}
35
+
36
+.moti-card {
37
+    background-color: #fff;
38
+    border-radius: 15px !important;
39
+    padding: 15px;
40
+    margin: 15px;
41
+}
42
+
43
+.moti-img {
44
+    border-radius: 15px !important;
45
+    overflow: hidden;
46
+}
47
+.card-date {
48
+    color:#8f00ff;
49
+    display:flex;
50
+    justify-content: space-between;
51
+    align-items: center;
52
+}
53
+