-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from kaito3desuyo/refactor/dashboard
ダッシュボードのリファクタリング
- Loading branch information
Showing
40 changed files
with
417 additions
and
316 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
...pages/dashboard/components/dashboard-description-p/dashboard-description-p.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<mat-card fxLayout="column" fxFlex="auto"> | ||
<mat-card-title> このサイトは? </mat-card-title> | ||
<mat-card-content> | ||
<p> | ||
<article | ||
class="tw-box-border tw-flex tw-h-full tw-w-full tw-flex-col tw-gap-4 tw-bg-white tw-p-4 tw-shadow-md" | ||
> | ||
<header> | ||
<h2 class="tw-m-0 tw-text-2xl tw-font-normal">このサイトは?</h2> | ||
</header> | ||
<section class="tw-flex-grow"> | ||
<p class="tw-m-0 tw-text-sm"> | ||
Sotetsu Lab. | ||
は、神奈川県を走る大手私鉄、相模鉄道に関する情報を提供するWebサービスです。<br /> | ||
相鉄線を走る車両の1日の動き(これを運用と呼びます)や、全駅における特定車両の発車時刻等の情報を提供しています。 | ||
</p> | ||
</mat-card-content> | ||
</mat-card> | ||
</section> | ||
</article> |
20 changes: 7 additions & 13 deletions
20
...p/pages/dashboard/components/dashboard-description-p/dashboard-description-p.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-dashboard-description-p', | ||
templateUrl: './dashboard-description-p.component.html', | ||
styleUrls: ['./dashboard-description-p.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
standalone: true, | ||
selector: 'app-dashboard-description-p', | ||
templateUrl: './dashboard-description-p.component.html', | ||
styleUrls: ['./dashboard-description-p.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class DashboardDescriptionPComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} | ||
export class DashboardDescriptionPComponent {} |
56 changes: 27 additions & 29 deletions
56
src/app/pages/dashboard/components/dashboard-main-c/dashboard-main-c.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,43 @@ | ||
<div | ||
[gdAreas.lt-md]=" | ||
'description | operation-search-card | operation-post-card | adsense | timetable-search-card | timetable-post-card | library-list-card' | ||
" | ||
[gdAreas.gt-sm]=" | ||
'description description description | operation-search-card operation-post-card library-list-card | adsense adsense library-list-card | timetable-search-card timetable-post-card library-list-card' | ||
" | ||
gdGap="16px" | ||
[gdColumns.lt-md]="'100%'" | ||
[gdColumns.gt-sm]="'1fr 1fr 1fr'" | ||
[gdRows.lt-md]="'auto'" | ||
[gdRows.gt-sm]="'auto auto auto'" | ||
class="tw-grid tw-auto-cols-fr tw-gap-4 tw-grid-areas-dashboard-slim md:tw-grid-areas-dashboard-medium xl:tw-grid-areas-dashboard-full" | ||
> | ||
<div gdArea="description" fxLayout="column"> | ||
<div class="tw-grid-in-description"> | ||
<app-dashboard-description-p | ||
fxFlex="auto" | ||
class="tw-h-full tw-w-full" | ||
></app-dashboard-description-p> | ||
</div> | ||
<div gdArea="operation-search-card" fxLayout="column"> | ||
|
||
<div class="tw-grid-in-operation-search-card"> | ||
<app-operation-search-card-c | ||
fxFlex="auto" | ||
class="tw-h-full tw-w-full" | ||
></app-operation-search-card-c> | ||
</div> | ||
<div gdArea="operation-post-card" fxLayout="column"> | ||
<app-operation-post-card-c fxFlex="auto"></app-operation-post-card-c> | ||
|
||
<div class="tw-grid-in-operation-post-card"> | ||
<app-operation-post-card-c | ||
class="tw-h-full tw-w-full" | ||
></app-operation-post-card-c> | ||
</div> | ||
<div gdArea="timetable-search-card" fxLayout="column"> | ||
|
||
<div class="tw-grid-in-timetable-search-card"> | ||
<app-timetable-search-card-c | ||
fxFlex="auto" | ||
class="tw-h-full tw-w-full" | ||
></app-timetable-search-card-c> | ||
</div> | ||
<div gdArea="timetable-post-card" fxLayout="column"> | ||
<app-timetable-post-card-c fxFlex="auto"></app-timetable-post-card-c> | ||
|
||
<div class="tw-grid-in-timetable-post-card"> | ||
<app-timetable-post-card-c | ||
class="tw-h-full tw-w-full" | ||
></app-timetable-post-card-c> | ||
</div> | ||
<div gdArea="library-list-card" fxLayout="column"> | ||
<app-library-list-card-c fxFlex="auto"></app-library-list-card-c> | ||
|
||
<div class="tw-grid-in-library-list-card"> | ||
<app-library-list-card-c | ||
class="tw-h-full tw-w-full" | ||
></app-library-list-card-c> | ||
</div> | ||
<div gdArea="adsense"> | ||
<ng-adsense | ||
[adSlot]="7813861593" | ||
[adFormat]="'horizontal'" | ||
[fullWidthResponsive]="false" | ||
></ng-adsense> | ||
|
||
<div class="tw-grid-in-adsense"> | ||
<ng-adsense [adSlot]="7813861593"></ng-adsense> | ||
</div> | ||
</div> |
36 changes: 24 additions & 12 deletions
36
src/app/pages/dashboard/components/dashboard-main-c/dashboard-main-c.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component } from '@angular/core'; | ||
import { AdsenseModule } from 'ng2-adsense'; | ||
import { LibraryListCardCComponent } from 'src/app/shared/library-list-card/components/library-list-card-c/library-list-card-c.component'; | ||
import { OperationPostCardCComponent } from 'src/app/shared/operation-post-card/components/operation-post-card-c/operation-post-card-c.component'; | ||
import { OperationSearchCardCComponent } from 'src/app/shared/operation-search-card/components/operation-search-card-c/operation-search-card-c.component'; | ||
import { TimetablePostCardCComponent } from 'src/app/shared/timetable-post-card/components/timetable-post-card-c/timetable-post-card-c.component'; | ||
import { TimetableSearchCardCComponent } from 'src/app/shared/timetable-search-card/components/timetable-search-card-c/timetable-search-card-c.component'; | ||
import { DashboardDescriptionPComponent } from '../dashboard-description-p/dashboard-description-p.component'; | ||
|
||
@Component({ | ||
selector: 'app-dashboard-main-c', | ||
templateUrl: './dashboard-main-c.component.html', | ||
styleUrls: ['./dashboard-main-c.component.scss'] | ||
standalone: true, | ||
selector: 'app-dashboard-main-c', | ||
templateUrl: './dashboard-main-c.component.html', | ||
styleUrls: ['./dashboard-main-c.component.scss'], | ||
imports: [ | ||
AdsenseModule, | ||
// | ||
DashboardDescriptionPComponent, | ||
// | ||
OperationSearchCardCComponent, | ||
OperationPostCardCComponent, | ||
TimetableSearchCardCComponent, | ||
TimetablePostCardCComponent, | ||
LibraryListCardCComponent, | ||
], | ||
}) | ||
export class DashboardMainCComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} | ||
export class DashboardMainCComponent {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<main [ngClass.lt-md]="['p-16']" [ngClass.gt-sm]="['p-64']"> | ||
<main class="tw-p-4 md:tw-p-16"> | ||
<app-dashboard-main-c></app-dashboard-main-c> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
:host { | ||
.center { | ||
margin: auto; | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Route } from '@angular/router'; | ||
|
||
export const DASHBOARD_ROUTES: Route[] = [ | ||
{ | ||
path: '', | ||
loadComponent: () => | ||
import('./dashboard.component').then( | ||
(mod) => mod.DashboardComponent | ||
), | ||
}, | ||
]; |
2 changes: 1 addition & 1 deletion
2
...hared/library-list-card/components/library-list-card-c/library-list-card-c.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<app-library-list-card-p></app-library-list-card-p> | ||
<app-library-list-card-p class="tw-h-full tw-w-full"></app-library-list-card-p> |
5 changes: 0 additions & 5 deletions
5
...hared/library-list-card/components/library-list-card-c/library-list-card-c.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
:host { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
} | ||
7 changes: 4 additions & 3 deletions
7
.../shared/library-list-card/components/library-list-card-c/library-list-card-c.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
import { LibraryListCardPComponent } from '../library-list-card-p/library-list-card-p.component'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'app-library-list-card-c', | ||
templateUrl: './library-list-card-c.component.html', | ||
styleUrls: ['./library-list-card-c.component.scss'], | ||
imports: [LibraryListCardPComponent], | ||
}) | ||
export class LibraryListCardCComponent { | ||
constructor() {} | ||
} | ||
export class LibraryListCardCComponent {} |
Oops, something went wrong.