generated from open-template-hub/web-ui-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9bc343
commit 15c21ad
Showing
11 changed files
with
242 additions
and
120 deletions.
There are no files selected for viewing
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
9 changes: 0 additions & 9 deletions
9
src/app/component/activity-history/activity-history.component.html
This file was deleted.
Oops, something went wrong.
71 changes: 0 additions & 71 deletions
71
src/app/component/activity-history/activity-history.component.scss
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/app/component/activity-history/activity-history.component.spec.ts
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/app/component/card/activity-history-card/activity-history-card.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<app-card [headerTemplate]="headerTemplate" [bodyTemplate]="bodyTemplate" class="activity-history-card"> | ||
<!-- Header --> | ||
<ng-template #headerTemplate> | ||
<div class="header"> | ||
<p class="title">{{ title }}</p> | ||
</div> | ||
</ng-template> | ||
|
||
<!-- Body --> | ||
<ng-template #bodyTemplate> | ||
<div class="body"> | ||
<div class="activity-content"> | ||
<ng-container *ngFor="let j of days"> | ||
<div class="day" [class]="getDayClass(j)"> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</div> | ||
</ng-template> | ||
</app-card> |
101 changes: 101 additions & 0 deletions
101
src/app/component/card/activity-history-card/activity-history-card.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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
@use '../../../../styles/util/util'; | ||
@use '../card.component'; | ||
|
||
.activity-history-card { | ||
|
||
& .header { | ||
@include card.default-header; | ||
|
||
align-items: flex-start; | ||
|
||
color: var(--color); | ||
font-size: 19px; | ||
box-shadow: none; | ||
|
||
& p { | ||
margin-left: 15px; | ||
padding-bottom: 3px; | ||
border-bottom: 2px solid var(--theme-color-lighter-5); | ||
} | ||
} | ||
|
||
& .body { | ||
@include card.default-body; | ||
|
||
align-items: flex-start; | ||
justify-content: flex-start; | ||
|
||
margin-left: 20px; | ||
margin-right: 20px; | ||
margin-top: 10px; | ||
overflow-x: auto; | ||
|
||
& .activity-content { | ||
@include util.flex-layout-column; | ||
|
||
align-items: center; | ||
justify-content: flex-start; | ||
|
||
flex-wrap: wrap; | ||
box-sizing: border-box; | ||
|
||
height: calc(20px * 7); | ||
|
||
& .day { | ||
box-sizing: border-box; | ||
margin: 1px; | ||
|
||
border-radius: 4px; | ||
|
||
width: 18px; | ||
height: 18px; | ||
|
||
background-color: var(--darker-contrast); | ||
border: 1px solid var(--contrast); | ||
|
||
&.number-of-activity-4 { | ||
background-color: var(--theme-color-lighter-2); | ||
border-color: var(--theme-color); | ||
} | ||
|
||
&.number-of-activity-3 { | ||
background-color: var(--theme-color-lighter-3); | ||
border-color: var(--theme-color-lighter-2); | ||
} | ||
|
||
&.number-of-activity-2 { | ||
background-color: var(--theme-color-lighter-6); | ||
border-color: var(--theme-color-lighter-5); | ||
} | ||
|
||
&.number-of-activity-1 { | ||
background-color: var(--theme-color-lighter-8); | ||
border-color: var(--theme-color-lighter-7); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
@media only screen and (max-width: 999px) { | ||
.activity-history-card { | ||
|
||
& .body { | ||
& .activity-content { | ||
max-width: calc(20px * 53); | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media only screen and (min-width: 1000px) { | ||
.activity-history-card { | ||
& .body { | ||
|
||
& .activity-content { | ||
width: calc(20px * 53); | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/component/card/activity-history-card/activity-history-card.component.spec.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ActivityHistoryCardComponent } from './activity-history-card.component'; | ||
|
||
describe( 'ActivityHistoryCardComponent', () => { | ||
let component: ActivityHistoryCardComponent; | ||
let fixture: ComponentFixture<ActivityHistoryCardComponent>; | ||
|
||
beforeEach( async () => { | ||
await TestBed.configureTestingModule( { | ||
declarations: [ ActivityHistoryCardComponent ] | ||
} ) | ||
.compileComponents(); | ||
} ); | ||
|
||
beforeEach( () => { | ||
fixture = TestBed.createComponent( ActivityHistoryCardComponent ); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
} ); | ||
|
||
it( 'should create', () => { | ||
expect( component ).toBeTruthy(); | ||
} ); | ||
} ); |
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
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
Oops, something went wrong.