Skip to content

Commit 149c8f5

Browse files
authored
Batch fix 4 (#193)
Description: * closes #191: replaced all animations that relied on gsap to use NGUIX and removed GSAP from the * updated the README to state the changes made * Removed unused code in the Officer's page * Made the arrow in the README page clickable, which scrolls the page to the President's address
1 parent 300f1d1 commit 149c8f5

File tree

16 files changed

+121
-194
lines changed

16 files changed

+121
-194
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ You will need:
88
- `node` v22
99
- `npm` v10
1010
- Install the Angular CLI globally
11-
```
11+
```sh
12+
# use Angular v20.2
1213
npm install -g @angular/cli
1314
```
1415
- SSH keys
@@ -26,23 +27,22 @@ npm ci
2627
```
2728

2829
3. Start the frontend server:
29-
```
30-
npm run start // will run some pre-build scripts
30+
```sh
31+
npm run start # will run some pre-build scripts
3132
or
32-
ng serve // only works after building
33+
ng serve # only works after building
3334
```
3435

3536
4. Serve the app over your local network
36-
```
37-
// Access the site on a device in your local network by going to `http://<IP of serving device>:8080`
37+
```sh
38+
# Access the site on a device in your local network by going to `http://<IP of serving device>:8080`
3839
ng serve --host=0.0.0.0 // only works after building
3940
```
4041

4142
To view other npm commands, look at `package.json` under the "scripts" key.
4243
### Local development
43-
This project uses:
44-
44+
If you'd like to contribute, you can start reading here https://github.com/CSSS/csss-site-frontend/wiki/Contributing
4545
### Libraries used
46-
* **FontAwesome**
47-
* **Material CDK**
48-
* **GSAP**
46+
* **FontAwesome 6.7.1** https://fontawesome.com/v6/icons
47+
* **Material CDK** https://material.angular.dev/cdk/categories
48+
* **NGXUI** https://ngxui.com/

package-lock.json

Lines changed: 29 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"@fortawesome/free-brands-svg-icons": "^6.7.1",
2727
"@fortawesome/free-regular-svg-icons": "^6.7.1",
2828
"@fortawesome/free-solid-svg-icons": "^6.7.1",
29-
"gsap": "^3.13.0",
29+
"@omnedia/ngx-fade": "^3.0.0",
30+
"@omnedia/ngx-typewriter": "^3.1.1",
3031
"rxjs": "~7.8.0",
3132
"tslib": "^2.3.0"
3233
},

public/images/president.jpg

-5.3 MB
Binary file not shown.
File renamed without changes.

src/app/pages/officers/officers.component.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ <h1>Officers</h1>
1212
<h2>Current Executives</h2>
1313
<div class="gallery">
1414
@for (exec of currentAdministration()?.members; track $index) {
15-
<code-card [bgImg]="exec.photoName" #execCard>
16-
<div class="card-footer">
17-
<h3>{{ exec.name }}</h3>
18-
<h4>{{ exec.position }}</h4>
19-
</div>
20-
</code-card>
15+
<om-fade direction="up" [animateOnlyOnce]="true">
16+
<code-card [bgImg]="exec.photoName" #execCard>
17+
<div class="card__footer">
18+
<strong class="card__name">{{ exec.name }}</strong>
19+
<strong class="card__position">{{ exec.position }}</strong>
20+
</div>
21+
</code-card>
22+
</om-fade>
2123
}
2224
</div>
2325
</section>
Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,8 @@
11
@use 'globals' as g;
2-
@use 'theme' as t;
3-
4-
.timeline {
5-
display: flex;
6-
column-gap: 0.2rem;
7-
width: 100%;
8-
margin-bottom: 2rem;
9-
10-
& > .timeslot {
11-
flex: 1 0 auto;
12-
13-
& > .time-label {
14-
text-align: right;
15-
}
16-
17-
& > .line {
18-
min-width: 6rem;
19-
height: 0.2rem;
20-
background-color: aquamarine;
21-
}
22-
}
23-
24-
& > .timeslot[aria-selected='true'] > .line {
25-
box-shadow: 0 0 10px 3px aquamarine;
26-
}
27-
}
282

293
.gallery {
304
display: grid;
31-
grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
5+
grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
326
gap: 1.8rem;
337
}
348

@@ -39,17 +13,23 @@
3913
grid-template-rows: auto auto;
4014
}
4115

42-
code-card > img {
43-
width: 100%;
44-
object-fit: contain;
45-
}
46-
47-
.card-footer {
16+
.card__footer {
4817
position: absolute;
4918
bottom: 0;
5019
width: 100%;
5120
height: fit-content;
52-
padding: 0.3rem;
21+
background-color: g.$bg3;
22+
23+
display: flex;
24+
flex-direction: column;
25+
gap: 0.5rem;
26+
}
27+
28+
.card__name,
29+
.card__position {
30+
width: fit-content;
31+
}
5332

54-
background-color: t.$bg3;
33+
.card__position {
34+
color: g.$code-text;
5535
}

src/app/pages/officers/officers.component.ts

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
import {
2-
ChangeDetectionStrategy,
3-
Component,
4-
computed,
5-
effect,
6-
signal,
7-
viewChildren
8-
} from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';
92
import { ArticleComponent } from '@csss-code/article/article.component';
103
import { CardComponent } from '@csss-code/card/card.component';
11-
import { gsap } from 'gsap';
4+
import { NgxFadeComponent } from '@omnedia/ngx-fade';
125
import { ExecutiveAdministration, executives, getRandomExecImage } from './officers.data';
136

147
@Component({
158
selector: 'cs-officers',
16-
imports: [CardComponent, ArticleComponent],
9+
imports: [CardComponent, ArticleComponent, NgxFadeComponent],
1710
templateUrl: './officers.component.html',
1811
styleUrl: './officers.component.scss',
1912
changeDetection: ChangeDetectionStrategy.OnPush
@@ -47,39 +40,12 @@ export class OfficersComponent {
4740
return newAdmin;
4841
});
4942

50-
private execCards = viewChildren<CardComponent>('execCard');
51-
5243
/**
5344
* Cache the admins so we don't need to fetch them each time.
5445
* Will probably need some way to remove older cached entries if memory becomes an issue.
5546
*/
5647
private cachedAdmins = new Map<number, ExecutiveAdministration>();
5748

58-
constructor() {
59-
effect(() => {
60-
if (!this.currentAdministration() || !this.execCards().length) {
61-
return;
62-
}
63-
64-
this.animateCards();
65-
});
66-
}
67-
68-
private animateCards(): void {
69-
const cards = this.execCards();
70-
if (!cards || !cards.length) {
71-
return;
72-
}
73-
74-
const targets = cards.map(el => el.elementRef.nativeElement);
75-
gsap.from(targets, {
76-
bottom: -50,
77-
opacity: 0,
78-
duration: 0.3,
79-
ease: 'power3.out'
80-
});
81-
}
82-
8349
/**
8450
* Changes the files name to one that can be used to set the background image.
8551
*

src/app/pages/readme/readme.component.html

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
<div class="wrapper">
2-
<header>
1+
<div class="parallax">
2+
<hgroup>
33
<img class="mural" src="images/mural.png" alt="Mural" />
44
<h1>
55
Welcome to the
6-
<div class="type-in" #typeIn>Computing Science Student Society</div>
6+
<om-typewriter
7+
styleClass="typed"
8+
[words]="['Computing Science Student Society']"
9+
[disableLoop]="true"
10+
></om-typewriter>
711
</h1>
8-
<fa-icon [icon]="arrowIcon" animation="bounce"></fa-icon>
9-
</header>
12+
<a (click)="scrollTo('intro')"><fa-icon [icon]="arrowIcon" animation="bounce"></fa-icon></a>
13+
</hgroup>
1014

1115
<article class="content">
12-
<section>
13-
<h2>History</h2>
14-
<p>
15-
Since its founding in the 1970s, the Computing Science Student Society has existed to
16-
promote the interests of students within the School of Computing Science at Simon Fraser
17-
University. The Society strives to support and build a vibrant community of individuals and
18-
create an environment that produces social, academic, and professional success. The CSSS
19-
continues this tradition today by running numerous social events throughout the school year,
20-
as well as hosting workshops, talks by industry speakers, and development contests for
21-
budding programmers.
22-
</p>
23-
</section>
24-
<section class="pres-container">
16+
<section id="intro" class="pres-container">
2517
<div class="pres-image-container">
26-
<img src="images/president-mabel.png" alt="President of the CSSS" />
18+
<img src="images/president.png" alt="President of the CSSS" />
2719
</div>
2820
<div class="pres-content">
2921
<h2>President's Address</h2>
@@ -45,6 +37,18 @@ <h2>President's Address</h2>
4537
</p>
4638
</div>
4739
</section>
40+
<section>
41+
<h2>History</h2>
42+
<p>
43+
Since its founding in the 1970s, the Computing Science Student Society has existed to
44+
promote the interests of students within the School of Computing Science at Simon Fraser
45+
University. The Society strives to support and build a vibrant community of individuals and
46+
create an environment that produces social, academic, and professional success. The CSSS
47+
continues this tradition today by running numerous social events throughout the school year,
48+
as well as hosting workshops, talks by industry speakers, and development contests for
49+
budding programmers.
50+
</p>
51+
</section>
4852
<section class="faq">
4953
<h2>FAQ</h2>
5054
<h3>How do I become a member?</h3>

src/app/pages/readme/readme.component.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
@use 'globals' as g;
22

3-
.wrapper {
4-
height: 96svh;
3+
.parallax {
4+
height: 100%;
55
overflow-y: auto;
66
overflow-x: hidden;
77
perspective: 10px;
8+
scroll-behavior: smooth;
89
}
910

10-
header {
11+
hgroup {
1112
position: relative;
1213
display: flex;
1314
justify-content: center;
@@ -37,11 +38,13 @@ header {
3738
mask-repeat: no-repeat;
3839
}
3940

40-
& > fa-icon {
41-
font-size: clamp(2rem, 3vw, 15rem);
41+
& > a {
4242
position: absolute;
4343
bottom: 30svh;
44-
filter: drop-shadow(0px 2px 5px black);
44+
& > fa-icon {
45+
font-size: clamp(2rem, 3vw, 15rem);
46+
filter: drop-shadow(0px 2px 5px black);
47+
}
4548
}
4649
}
4750

0 commit comments

Comments
 (0)