Spaces:
Running
Running
Download src/app/app.component.ts from ABSHERBH/deepsite-project-e3t8a: direct link, hf CLI and curl.
- Browser
- Download file 5.77 kB
-
https://huggingface.co/spaces/ABSHERBH/deepsite-project-e3t8a/resolve/main/src/app/app.component.ts
- Command line
-
hf download hf://spaces/ABSHERBH/deepsite-project-e3t8a/src/app/app.component.ts
-
curl -L -o app.component.ts https://huggingface.co/spaces/ABSHERBH/deepsite-project-e3t8a/resolve/main/src/app/app.component.ts
5.77 kB
| import { Component } from '@angular/core'; | |
| import { Platform } from '@ionic/angular'; | |
| import { SplashScreen } from '@capacitor/splash-screen'; | |
| import { StatusBar } from '@capacitor/status-bar'; | |
| ({ | |
| selector: 'app-root', | |
| template: ` | |
| <ion-app> | |
| <ion-split-pane contentId="main-content"> | |
| <ion-menu contentId="main-content" type="overlay" dir="rtl"> | |
| <ion-content class="menu-content"> | |
| <div class="menu-header"> | |
| <div class="logo-section"> | |
| <div class="logo-circle"> | |
| <ion-icon name="shield-checkmark" color="light" size="large"></ion-icon> | |
| </div> | |
| <h2>أبشر البحرين</h2> | |
| <p>الخدمات الإلكترونية</p> | |
| </div> | |
| </div> | |
| <ion-list lines="none" class="menu-list"> | |
| <ion-menu-toggle auto-hide="false"> | |
| <ion-item routerLink="/home" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="home" slot="start" color="primary"></ion-icon> | |
| <ion-label>الرئيسية</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/services" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="apps" slot="start" color="primary"></ion-icon> | |
| <ion-label>الخدمات الإلكترونية</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/appointments" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="calendar" slot="start" color="primary"></ion-icon> | |
| <ion-label>حجز المواعيد</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/transactions" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="document-text" slot="start" color="primary"></ion-icon> | |
| <ion-label>المعاملات</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/guide" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="book" slot="start" color="primary"></ion-icon> | |
| <ion-label>الدليل الإرشادي</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/faq" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="help-circle" slot="start" color="primary"></ion-icon> | |
| <ion-label>الأسئلة الشائعة</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/contact" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="call" slot="start" color="primary"></ion-icon> | |
| <ion-label>اتصل بنا</ion-label> | |
| </ion-item> | |
| <ion-item routerLink="/about" routerLinkActive="selected" detail="false"> | |
| <ion-icon name="information-circle" slot="start" color="primary"></ion-icon> | |
| <ion-label>حول المنصة</ion-label> | |
| </ion-item> | |
| </ion-menu-toggle> | |
| </ion-list> | |
| <div class="menu-footer"> | |
| <ion-button expand="block" routerLink="/login" class="login-btn"> | |
| <ion-icon name="log-in" slot="start"></ion-icon> | |
| تسجيل الدخول | |
| </ion-button> | |
| </div> | |
| </ion-content> | |
| </ion-menu> | |
| <ion-router-outlet id="main-content"></ion-router-outlet> | |
| </ion-split-pane> | |
| </ion-app> | |
| `, | |
| styles: [` | |
| .menu-content { | |
| --background: #ffffff; | |
| } | |
| .menu-header { | |
| background: linear-gradient(135deg, #006C35 0%, #009F4D 100%); | |
| padding: 30px 20px; | |
| color: white; | |
| text-align: center; | |
| } | |
| .logo-section { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| .logo-circle { | |
| width: 70px; | |
| height: 70px; | |
| background: rgba(255,255,255,0.2); | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-bottom: 15px; | |
| border: 2px solid rgba(255,255,255,0.3); | |
| } | |
| .logo-section h2 { | |
| margin: 0; | |
| font-size: 20px; | |
| font-weight: bold; | |
| font-family: 'Tajawal', sans-serif; | |
| } | |
| .logo-section p { | |
| margin: 5px 0 0; | |
| font-size: 14px; | |
| opacity: 0.9; | |
| font-family: 'Tajawal', sans-serif; | |
| } | |
| .menu-list { | |
| padding: 20px 0; | |
| } | |
| .menu-list ion-item { | |
| --padding-start: 20px; | |
| --padding-end: 20px; | |
| --min-height: 50px; | |
| font-family: 'Tajawal', sans-serif; | |
| margin: 5px 10px; | |
| border-radius: 10px; | |
| } | |
| .menu-list ion-item.selected { | |
| --background: rgba(0, 108, 53, 0.1); | |
| --color: #006C35; | |
| font-weight: bold; | |
| } | |
| .menu-list ion-icon { | |
| margin-left: 10px; | |
| } | |
| .menu-footer { | |
| padding: 20px; | |
| position: absolute; | |
| bottom: 0; | |
| width: 100%; | |
| } | |
| .login-btn { | |
| --background: #006C35; | |
| --background-hover: #005a2d; | |
| --border-radius: 10px; | |
| font-family: 'Tajawal', sans-serif; | |
| font-weight: bold; | |
| } | |
| `] | |
| }) | |
| export class AppComponent { | |
| constructor(private platform: Platform) { | |
| this.initializeApp(); | |
| } | |
| async initializeApp() { | |
| await this.platform.ready(); | |
| if (this.platform.is('hybrid')) { | |
| await StatusBar.setBackgroundColor({ color: '#006C35' }); | |
| await StatusBar.setStyle({ style: 'light' }); | |
| await SplashScreen.hide(); | |
| } | |
| } | |
| } |