Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/bug#138 fix footer position #141

Merged
merged 6 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<app-header></app-header>
<app-shell></app-shell>
<app-footer></app-footer>
<div class="app-wrapper">
<app-header></app-header>
<app-shell></app-shell>
<app-footer></app-footer>
</div>
6 changes: 6 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.app-wrapper {
min-height: 100%;
position: relative;
padding-bottom: 117px;
box-sizing: border-box;
}
14 changes: 11 additions & 3 deletions src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<div class="footer" fxLayoutAlign="space-between center">
<a target="_blank" rel="noreferrer" href="https://mon.gov.ua/">
<img src="../../assets/images/MES.png" alt="Ministry of Education">
</a>
<div fxLayoutGap="3rem" fxLayoutAlign=" center">
<a target="_blank" rel="noreferrer" href="https://mon.gov.ua/">
<img id="mon-logo" src="../../assets/images/MES.png" alt="Ministry of Education and Science of Ukraine">
</a>
<a target="_blank" rel="noreferrer" href="https://mkip.gov.ua/">
<img id="mkip-logo" src="../../assets/images/MinCultInfoPolicy.png" alt="Ministry of Culture and Information Policy of Ukraine">
</a>
<a target="_blank" rel="noreferrer" href="https://sport.gov.ua/">
<img id="min-sport-logo" src="../../assets/images/MinMolodSport.png" alt="Ministry of Youth and Sports of Ukraine">
</a>
</div>
<a target="_blank" rel="noreferrer" href="https://www.softserveinc.com/">
<img src="../../assets/images/SoftServeLogo.png" alt="SoftServe">
</a>
Expand Down
19 changes: 18 additions & 1 deletion src/app/footer/footer.component.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
.footer {
background-color: #EBEBEB;
padding: 2rem 5rem;
padding: 0 5rem;
height: 117px;
position: absolute;
bottom: 0;
z-index: 1;
width: 100%;
#mon-logo {
width: 230px;
height: 41px;
}
#mkip-logo {
width: 323px;
height: 96px;
}
#min-sport-logo {
width: 83px;
height: 41px;
}
}
@media(max-width: 415px) {
.footer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 class="title">{{ categoryCard.title }}</h3>
<div class="link">
<a routerLink="/result" (click)="selectCategory(categoryCard.id)">
254 гуртки <span class="material-icons arrow">arrow_forward</span>
{{ workshopsAmount }} {{ getWord() }} <span class="material-icons arrow">arrow_forward</span>
</a>
</div>
</div>
Expand Down
22 changes: 22 additions & 0 deletions src/app/shared/components/category-card/category-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,35 @@ export class CategoryCardComponent implements OnInit {

@Input() categoryCard: Category;
@Input() icons: {};
workshopsAmount = Math.floor(Math.random()*300);

constructor(private store: Store) { }

ngOnInit(): void {
this.getWord();
}

selectCategory(id: number){
this.store.dispatch(new SetCategory(id));
}

/**
* Returns correct form of the ukrainian word "гурток" depending on the amount of workshops by category.
*
* @returns correct form of the word
*
*/
getWord() : string {
if(this.workshopsAmount % 100 >= 10 && this.workshopsAmount % 100 <= 20){
return "гуртків";
} else {
if(this.workshopsAmount % 10 === 0 || this.workshopsAmount % 10 > 4){
return "гуртків";
} else if(this.workshopsAmount % 10 === 1){
return "гурток";
} else if(this.workshopsAmount % 10 > 1 && this.workshopsAmount % 10 < 5){
return "гуртки";
}
}
}
}
2 changes: 1 addition & 1 deletion src/app/shell/main/main.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h3>Найпопулярніші напрямки</h3>
</div>
<div class="categories-wrapper" fxLayout="row" fxLayoutAlign="space-between" fxLayoutGap="1.5rem grid">
<app-category-card *ngFor="let categoryCard of categoriesCards$ | async "
[categoryCard]=categoryCard
[categoryCard]="categoryCard"
[icons]="icons$ | async">
</app-category-card>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/shell/result/ordering/ordering.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
border-radius: 20px;
border: none;
font-weight: bold;
font-family: "Open Sans", sans-serif;
}
.options{
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.placeholder {
min-width: 285px;
}
.pagination-wrapper {
margin-bottom: 62px;
}
pagination-controls {
font-family: "Innerspace";
font-weight: bold;
Expand All @@ -19,6 +22,8 @@ pagination-controls {
display: flex;
align-items: center;
padding-inline-start: 0px;
margin-block-start: 0;
margin-block-end: 0;
}

.pagination ::ng-deep .ngx-pagination a {
Expand Down
Binary file added src/assets/images/MinCultInfoPolicy.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 added src/assets/images/MinMolodSport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.