|
@@ -1,14 +1,70 @@
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
|
|
|
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent,IonButtons, IonButton, IonIcon,IonDatetime } from '@ionic/angular/standalone';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
-
|
|
|
|
|
|
+import { addIcons } from 'ionicons';
|
|
|
|
+import { calendar } from 'ionicons/icons';
|
|
|
|
+import { FormsModule } from '@angular/forms';
|
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
|
+import { Router } from '@angular/router';
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-tab1',
|
|
selector: 'app-tab1',
|
|
templateUrl: 'tab1.page.html',
|
|
templateUrl: 'tab1.page.html',
|
|
styleUrls: ['tab1.page.scss'],
|
|
styleUrls: ['tab1.page.scss'],
|
|
standalone: true,
|
|
standalone: true,
|
|
- imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],
|
|
|
|
|
|
+ imports: [FormsModule,CommonModule,IonHeader, IonToolbar, IonTitle, IonContent,IonButtons, IonButton,IonDatetime, IonIcon,ExploreContainerComponent],
|
|
})
|
|
})
|
|
export class Tab1Page {
|
|
export class Tab1Page {
|
|
- constructor() {}
|
|
|
|
|
|
+
|
|
|
|
+ selectedDate!: string; // 定义 selectedDate
|
|
|
|
+ contentItems = [
|
|
|
|
+ {
|
|
|
|
+ title: '清平调',
|
|
|
|
+ snippet: '云想衣裳花想容,春风拂槛露华浓。若非群玉山头见,会向瑶台月下逢。',
|
|
|
|
+ image: '../assets/image/01/Vx_03.jpg'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '短歌行',
|
|
|
|
+ snippet: '对酒当歌,人生几何!譬如朝露,去日苦多。...',
|
|
|
|
+ image: '../assets/image/02/duangexing.jpg'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '念奴娇·赤壁怀古',
|
|
|
|
+ snippet: '赤壁之战的还原视频...',
|
|
|
|
+ image: '../assets/image/03/chibizhizhan.jpg' // 替换为视频封面图
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '出师表',
|
|
|
|
+ snippet: '对出师表进行的精彩扩写...',
|
|
|
|
+ image: '../assets/image/04/chushibiao.jpg' // 替换为文章封面图
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '吟诵音频',
|
|
|
|
+ snippet: '一段优美的吟诵音频...',
|
|
|
|
+ image: '' // 替换为音频封面图
|
|
|
|
+ }
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // poems = []; // 假设有一些诗
|
|
|
|
+ // pastPoems = []; // 假设有一些往期诗篇
|
|
|
|
+
|
|
|
|
+ constructor(private router:Router) {
|
|
|
|
+ addIcons({calendar});
|
|
|
|
+ }
|
|
|
|
+ navigateToDiary() {
|
|
|
|
+ this.router.navigateByUrl('/daily-content')
|
|
|
|
+ // 导航到日历页面的逻辑
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ navigateToToday() {
|
|
|
|
+ // 返回到今天内容的逻辑
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ onDateChange(event: any) {
|
|
|
|
+ // 处理日期改变的逻辑
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ viewItemDetails(card: any) {
|
|
|
|
+ this.router.navigate(['/card-detail'], { queryParams: { id: card.id } }); // 传递卡片ID
|
|
|
|
+ }
|
|
}
|
|
}
|