ソースを参照

Merge branch 'master' of http://git2.simplico.net/tum/fm99-app-rev

tum 3 年 前
コミット
1469410df6
共有4 個のファイルを変更した50 個の追加38 個の削除を含む
  1. 5 5
      src/app/navtabs/navtabs.page.html
  2. 39 30
      src/app/navtabs/navtabs.page.scss
  3. 4 1
      src/app/news-detail/news-detail.page.html
  4. 2 2
      src/app/services/wpdata.service.ts

+ 5 - 5
src/app/navtabs/navtabs.page.html

@@ -6,23 +6,23 @@
6 6
 <ion-tabs>
7 7
   <ion-tab-bar slot="bottom">
8 8
     <ion-tab-button tab="home" layout="icon-top">
9
-      <ion-icon name="globe"></ion-icon>
9
+      <ion-icon name="globe" ></ion-icon>
10 10
       <!-- <ion-label>Home</ion-label> -->
11 11
     </ion-tab-button>
12 12
     <ion-tab-button tab="news" layout="icon-top">
13
-      <ion-icon name="football"></ion-icon>
13
+      <ion-icon name="football" ></ion-icon>
14 14
       <!-- <ion-label>News</ion-label> -->
15 15
     </ion-tab-button>
16 16
     <ion-tab-button tab="#" layout="icon-top">
17
-      <ion-icon name="play-circle" size="large"></ion-icon>
17
+      <ion-icon name="play-circle" class="icon-big"></ion-icon>
18 18
       <!-- <ion-label>Audio</ion-label> -->
19 19
     </ion-tab-button>
20 20
     <ion-tab-button tab="youtube" layout="icon-top">
21
-      <ion-icon name="logo-youtube"></ion-icon>
21
+      <ion-icon name="logo-youtube" ></ion-icon>
22 22
       <!-- <ion-label>Youtube</ion-label> -->
23 23
     </ion-tab-button>
24 24
     <ion-tab-button tab="#" layout="icon-top">
25
-      <ion-icon name="videocam"></ion-icon>
25
+      <ion-icon name="videocam" ></ion-icon>
26 26
       <!-- <ion-label>Video</ion-label> -->
27 27
     </ion-tab-button>
28 28
   </ion-tab-bar>

+ 39 - 30
src/app/navtabs/navtabs.page.scss

@@ -8,19 +8,19 @@
8 8
 //     position: unset!important;
9 9
 //     contain: size style!important;
10 10
 //   }
11
-  
11
+
12 12
 //   .bottom-tab-bar {
13 13
 //     --background: transparent;
14 14
 //     --border: 0;
15 15
 //   }
16
-  
16
+
17 17
 //   ion-tab-button {
18 18
 //     --background: #134d80;
19 19
 //     --color:white;
20 20
 //     --color-selected: red;
21 21
 //     --ripple-color: white;
22 22
 //   }
23
-  
23
+
24 24
 
25 25
 // .button-center {
26 26
 //     --background: transparent!important;
@@ -40,7 +40,7 @@
40 40
 //       content: '';
41 41
 //     }
42 42
 //   }
43
-  
43
+
44 44
 // .inner-left-btn {
45 45
 //     border-radius: 0 50% 0 0; 
46 46
 //     //create the curved style on the left side of the center
@@ -51,7 +51,7 @@
51 51
 //     border-radius: 50% 0 0 0; 
52 52
 //     // create the curved style on the right side of the center
53 53
 // }
54
-  
54
+
55 55
 // .inner-center-btn {
56 56
 //     position: absolute;
57 57
 //     left: calc(50% - 35px); // position your button in the center
@@ -103,30 +103,39 @@
103 103
 //     border-radius: 16px;
104 104
 //     width: 92%;
105 105
 //     margin: 0 auto;
106
-    
106
+
107 107
 //   }
108 108
 
109
-  ion-tab-button {
110
-    --color: var(--ion-color-medium);
111
-    --color-selected: var(--ion-color-primary);
112
-    --background-focused:#ff600d;
113
-    --background-focused-opacity:0.5;
114
-  
115
-    &::before {
116
-      background-color: transparent;
117
-      display: block;
118
-      content: "";
119
-      margin: 0 auto;
120
-      width: 20px;
121
-      height: 2px;
122
-    }
123
-  
124
-    &.tab-selected::before {
125
-      background-color: var(--ion-color-primary);
126
-    }
127
-  } 
128
-
129
-  // ion-tab-button.tab-selected {
130
-  //   --background: var(--ion-color-dark) !important;
131
-  //   --color-selected: var(--ion-color-light);
132
-  // }
109
+ion-tab-button {
110
+  --color: var(--ion-color-medium);
111
+  --color-selected: var(--ion-color-primary);
112
+  --background-focused: #ff600d;
113
+  --background-focused-opacity: 0.5;
114
+
115
+  &::before {
116
+    background-color: transparent;
117
+    display: block;
118
+    content: "";
119
+    margin: 0 auto;
120
+    width: 20px;
121
+    height: 2px;
122
+  }
123
+
124
+  &.tab-selected::before {
125
+    background-color: var(--ion-color-primary);
126
+  }
127
+}
128
+
129
+.icon-big {
130
+  font-size: 90px;
131
+  display: block;
132
+  color: rgb(255, 106, 0);
133
+  // margin-bottom: 10px;
134
+}
135
+
136
+
137
+
138
+// ion-tab-button.tab-selected {
139
+//   --background: var(--ion-color-dark) !important;
140
+//   --color-selected: var(--ion-color-light);
141
+// }

+ 4 - 1
src/app/news-detail/news-detail.page.html

@@ -18,11 +18,14 @@
18 18
   </ion-grid>
19 19
   <div *ngIf="data">
20 20
     <img [src]="data.better_featured_image.source_url" [style.width]="'100%'" />
21
-    <ion-grid >
21
+    <ion-grid>
22 22
       <ion-row>
23 23
         <ion-col class="bg-color-1">
24 24
           <h2 [innerHTML]="data?.title.rendered" class="title-txt-1"></h2>
25 25
           <div [innerHTML]="data.content.rendered" class="content-txt-1"></div>
26
+          <div *ngIf="data.acf.youtube_url_for_app" class="">
27
+            <a href="{{data.acf.youtube_url_for_app}}" targrt="_blank">รับชมคลิปผ่าน youtube</a>
28
+          </div>
26 29
         </ion-col>
27 30
       </ion-row>
28 31
     </ion-grid>

+ 2 - 2
src/app/services/wpdata.service.ts

@@ -30,8 +30,8 @@ export class WpdataService {
30 30
 
31 31
   getAllYoutube() {
32 32
     return this.http.get(
33
-      // "../assets/api/youtube-data.json"
34
-      "https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=UCfZdHbI3pIN4uselPFzzbOg&maxResults=5&order=date&key=AIzaSyDsRrS_dUxT_3PFaMZIBBdrbl37p_fqrNY"
33
+       "../assets/api/youtube-data.json"
34
+     // "https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=UCfZdHbI3pIN4uselPFzzbOg&maxResults=5&order=date&key=AIzaSyDsRrS_dUxT_3PFaMZIBBdrbl37p_fqrNY"
35 35
     );
36 36
   }
37 37
 }