Skip to content

Commit ca6d705

Browse files
authored
Fix: Intermin DoMM Election 2025 Batch 1 (#224)
* Fixed the labels and browser titles on the Elections Schedule and Speeches pages * Changed the styling of the code button to be smaller, removed the borders on it, and it turns green when hovering * Added a button to jump from the Elections Schedule page to the Elections Speeches page
1 parent ecfec9b commit ca6d705

6 files changed

Lines changed: 28 additions & 17 deletions

File tree

src/app/app.routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const routes: Routes = [
103103
import('pages/elections/upcoming/elections-schedule.component').then(
104104
m => m.ElectionsScheduleComponent
105105
),
106-
title: makeTitle('Elections'),
106+
title: makeTitle('Election Schedule'),
107107
data: {
108108
description: 'View upcoming, current, and past elections.'
109109
}
@@ -114,7 +114,7 @@ export const routes: Routes = [
114114
import('./pages/elections/election-speeches/election-speeches.component').then(
115115
m => m.ElectionSpeechesComponent
116116
),
117-
title: makeTitle('Elections'),
117+
title: makeTitle('Speeches'),
118118
data: {
119119
description: 'Learn more about the candidates who want to make our society a better place.'
120120
}

src/app/pages/elections/upcoming/elections-schedule.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h2>Scheduled</h2>
1010
<div class="post">
1111
<h2 class="post__title">Director of Multi-Media</h2>
1212
<br />
13-
<p><strong>Nominations End: </strong>December 7th, 2025</p>
13+
<p><strong>Nominations Deadline: </strong>December 7th, 2025</p>
1414
<p><strong>Election Day: </strong>December 13th, 2025</p>
1515
<h3 class="post__title">Duties</h3>
1616
<ul class="post__list">
@@ -20,6 +20,10 @@ <h3 class="post__title">Duties</h3>
2020
</li>
2121
<li>Sit on committees as necessary, or upon request.</li>
2222
</ul>
23+
<hr />
24+
<div class="post__footer">
25+
<code-button label="Speeches" (click)="navigate()"></code-button>
26+
</div>
2327
</div>
2428
</section>
2529
</header>
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
import { ChangeDetectionStrategy, Component } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
2+
import { Router } from '@angular/router';
23
import { ArticleComponent } from '@csss-code/article/article.component';
4+
import { ButtonComponent } from '@csss-code/button/button.component';
5+
import { SiteRoute } from 'app/app.routes';
36

47
@Component({
58
selector: 'cs-upcoming',
6-
imports: [ArticleComponent],
9+
imports: [ArticleComponent, ButtonComponent],
710
templateUrl: './elections-schedule.component.html',
811
styleUrl: './elections-schedule.component.scss',
912
changeDetection: ChangeDetectionStrategy.OnPush
1013
})
1114
// FIXME: Make this dynamic
12-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
13-
export class ElectionsScheduleComponent {}
15+
export class ElectionsScheduleComponent {
16+
private router = inject(Router);
17+
18+
navigate(): void {
19+
console.log(SiteRoute.ElectionsSpeeches);
20+
this.router.navigate([SiteRoute.ElectionsSpeeches]);
21+
}
22+
}

src/app/pages/home/home.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
h2 {
1717
font-size: 1.5rem;
1818
}
19+
20+
code-button {
21+
color: white;
22+
}
1923
}
2024

2125
@keyframes pulse {

src/app/services/application/applications.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export const routeApplicationMap: Map<number, AppInfo> = new Map([
123123
8,
124124
{
125125
id: 8,
126-
label: 'Upcoming',
126+
label: 'Schedule',
127127
activityKey: '',
128-
key: 'elections-upcoming',
128+
key: 'elections-schedule',
129129
route: SiteRoute.ElectionsSchedule
130130
}
131131
],

src/ui/csss-code/button/button.component.scss

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
@use 'theme';
21
@use 'globals' as g;
32

43
button {
54
@include g.no-select;
6-
--border-cfg: 1px solid #adadad;
7-
border-top: var(--border-cfg);
8-
border-left: var(--border-cfg);
9-
border-right: var(--border-cfg);
10-
border-radius: 5px;
11-
padding: 1rem;
5+
padding: 0.5rem;
126
background-color: #111111;
137

148
transition: transform 0.1s ease;
159

1610
&:hover {
17-
background-color: #222222;
11+
background-color: g.$accent2;
1812
}
1913

2014
&:active {

0 commit comments

Comments
 (0)