Skip to content

Commit

Permalink
feat: add empty pages
Browse files Browse the repository at this point in the history
  • Loading branch information
yamashita-kenngo committed Apr 13, 2024
1 parent 8f54388 commit a37c6ca
Show file tree
Hide file tree
Showing 24 changed files with 181 additions and 133 deletions.
5 changes: 4 additions & 1 deletion cats/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@
}
},
"cli": {
"schematicCollections": ["@ionic/angular-toolkit"]
"schematicCollections": [
"@ionic/angular-toolkit"
],
"analytics": "1ffad300-b71d-4d66-85ac-62468f244079"
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title>
Tab 1
</ion-title>
<ion-title>cats</ion-title>
</ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">Tab 1</ion-title>
<ion-title size="large">cats</ion-title>
</ion-toolbar>
</ion-header>

<app-explore-container name="Tab 1 page"></app-explore-container>
</ion-content>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CatsPage } from './cats.page';

import { Tab1Page } from './tab1.page';
describe('CatsPage', () => {
let component: CatsPage;
let fixture: ComponentFixture<CatsPage>;

describe('Tab1Page', () => {
let component: Tab1Page;
let fixture: ComponentFixture<Tab1Page>;

beforeEach(async () => {
fixture = TestBed.createComponent(Tab1Page);
beforeEach(() => {
fixture = TestBed.createComponent(CatsPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
20 changes: 20 additions & 0 deletions cats/src/app/cats/cats.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-cats',
templateUrl: './cats.page.html',
styleUrls: ['./cats.page.scss'],
standalone: true,
imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule]
})
export class CatsPage implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title>
Tab 3
</ion-title>
<ion-title>informations</ion-title>
</ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">Tab 3</ion-title>
<ion-title size="large">informations</ion-title>
</ion-toolbar>
</ion-header>

<app-explore-container name="Tab 3 page"></app-explore-container>
</ion-content>
File renamed without changes.
17 changes: 17 additions & 0 deletions cats/src/app/informations/informations.page.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InformationsPage } from './informations.page';

describe('InformationsPage', () => {
let component: InformationsPage;
let fixture: ComponentFixture<InformationsPage>;

beforeEach(() => {
fixture = TestBed.createComponent(InformationsPage);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
20 changes: 20 additions & 0 deletions cats/src/app/informations/informations.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-informations',
templateUrl: './informations.page.html',
styleUrls: ['./informations.page.scss'],
standalone: true,
imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule]
})
export class InformationsPage implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title>
Tab 2
</ion-title>
<ion-title>supporters</ion-title>
</ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">Tab 2</ion-title>
<ion-title size="large">supporters</ion-title>
</ion-toolbar>
</ion-header>

<app-explore-container name="Tab 2 page"></app-explore-container>
</ion-content>
File renamed without changes.
17 changes: 17 additions & 0 deletions cats/src/app/supporters/supporters.page.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SupportersPage } from './supporters.page';

describe('SupportersPage', () => {
let component: SupportersPage;
let fixture: ComponentFixture<SupportersPage>;

beforeEach(() => {
fixture = TestBed.createComponent(SupportersPage);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
20 changes: 20 additions & 0 deletions cats/src/app/supporters/supporters.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-supporters',
templateUrl: './supporters.page.html',
styleUrls: ['./supporters.page.scss'],
standalone: true,
imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule]
})
export class SupportersPage implements OnInit {

constructor() { }

ngOnInit() {
}

}
14 changes: 0 additions & 14 deletions cats/src/app/tab1/tab1.page.ts

This file was deleted.

18 changes: 0 additions & 18 deletions cats/src/app/tab2/tab2.page.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions cats/src/app/tab2/tab2.page.ts

This file was deleted.

18 changes: 0 additions & 18 deletions cats/src/app/tab3/tab3.page.spec.ts

This file was deleted.

14 changes: 0 additions & 14 deletions cats/src/app/tab3/tab3.page.ts

This file was deleted.

38 changes: 28 additions & 10 deletions cats/src/app/tabs/tabs.page.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
<ion-tabs>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="tab1" href="/tabs/tab1">
<ion-icon aria-hidden="true" name="triangle"></ion-icon>
<ion-label>Tab 1</ion-label>
<ion-tab-button
tab="supporters"
href="/tabs/supporters"
>
<ion-icon
aria-hidden="true"
name="people"
></ion-icon>
<ion-label>サポーター</ion-label>
</ion-tab-button>

<ion-tab-button tab="tab2" href="/tabs/tab2">
<ion-icon aria-hidden="true" name="ellipse"></ion-icon>
<ion-label>Tab 2</ion-label>
<ion-tab-button
tab="cats"
href="/tabs/cats"
>
<ion-icon
aria-hidden="true"
name="logo-octocat"
></ion-icon>
<ion-label>地域の猫</ion-label>
</ion-tab-button>

<ion-tab-button tab="tab3" href="/tabs/tab3">
<ion-icon aria-hidden="true" name="square"></ion-icon>
<ion-label>Tab 3</ion-label>
<ion-tab-button
tab="informations"
href="/tabs/informations"
>
<ion-icon
aria-hidden="true"
name="information-circle"
></ion-icon>
<ion-label>お知らせ</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-tabs>
4 changes: 2 additions & 2 deletions cats/src/app/tabs/tabs.page.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, EnvironmentInjector, inject } from '@angular/core';
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { triangle, ellipse, square } from 'ionicons/icons';
import { people, logoOctocat, informationCircle } from 'ionicons/icons';

@Component({
selector: 'app-tabs',
Expand All @@ -14,6 +14,6 @@ export class TabsPage {
public environmentInjector = inject(EnvironmentInjector);

constructor() {
addIcons({ triangle, ellipse, square });
addIcons({ people, logoOctocat, informationCircle });
}
}
16 changes: 10 additions & 6 deletions cats/src/app/tabs/tabs.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ export const routes: Routes = [
component: TabsPage,
children: [
{
path: 'tab1',
path: 'supporters',
loadComponent: () =>
import('../tab1/tab1.page').then((m) => m.Tab1Page),
import('../supporters/supporters.page').then(
(m) => m.SupportersPage
),
},
{
path: 'tab2',
path: 'cats',
loadComponent: () =>
import('../tab2/tab2.page').then((m) => m.Tab2Page),
import('../cats/cats.page').then((m) => m.CatsPage),
},
{
path: 'tab3',
path: 'informations',
loadComponent: () =>
import('../tab3/tab3.page').then((m) => m.Tab3Page),
import('../informations/informations.page').then(
(m) => m.InformationsPage
),
},
{
path: '',
Expand Down
Binary file added cats/src/assets/icon/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed cats/src/assets/icon/favicon.png
Binary file not shown.
Loading

0 comments on commit a37c6ca

Please sign in to comment.