Skip to content

Commit

Permalink
Run npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikhorluck committed Jul 30, 2024
1 parent b4dbba9 commit 278b49b
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 85 deletions.
8 changes: 4 additions & 4 deletions src/core/components/Footer/footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

.mailinglists {
grid-column: span 3;
grid-column: span 3;
display: grid;
justify-content: center;
margin: 0;
Expand Down Expand Up @@ -109,9 +109,9 @@
}

.infoSites {
grid-column: span 3;
grid-column: span 3;
display: flex;
justify-content: space-around;
margin: 0;
margin: 0;
height: auto;
}
}
4 changes: 1 addition & 3 deletions src/core/less/core.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,4 @@ body {
input[type='search'] {
appearance: textfield;
}


}
}
2 changes: 1 addition & 1 deletion src/events/components/EventsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const EventContainer = () => {
const View = getView(eventView);

return (
<section style={{ width: '100%' }}>
<section style={{ width: '100%' }}>
<EventsHeader changeView={setEventView} view={eventView} />
<View />
</section>
Expand Down
74 changes: 48 additions & 26 deletions src/frontpage/components/AprilFoolsCaptcha/Stage2/stage2.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
justify-content: center;
background-color: #f7f7f7;
padding: 20px;
border-radius: 10px;
border-radius: 10px;
}

.imageToClick {
Expand Down Expand Up @@ -34,24 +34,46 @@
}

@keyframes shake {
0% { transform: translate(1px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(3px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 2px) rotate(-1deg); }
60% { transform: translate(-3px, 1px) rotate(0deg); }
70% { transform: translate(3px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -1px) rotate(1deg); }
90% { transform: translate(1px, 2px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
0% {
transform: translate(1px, 1px) rotate(0deg);
}
10% {
transform: translate(-1px, -2px) rotate(-1deg);
}
20% {
transform: translate(-3px, 0px) rotate(1deg);

Check failure on line 44 in src/frontpage/components/AprilFoolsCaptcha/Stage2/stage2.less

View workflow job for this annotation

GitHub Actions / stylelint

src/frontpage/components/AprilFoolsCaptcha/Stage2/stage2.less#L44

Unexpected unit (length-zero-no-unit)
}
30% {
transform: translate(3px, 2px) rotate(0deg);
}
40% {
transform: translate(1px, -1px) rotate(1deg);
}
50% {
transform: translate(-1px, 2px) rotate(-1deg);
}
60% {
transform: translate(-3px, 1px) rotate(0deg);
}
70% {
transform: translate(3px, 1px) rotate(-1deg);
}
80% {
transform: translate(-1px, -1px) rotate(1deg);
}
90% {
transform: translate(1px, 2px) rotate(0deg);
}
100% {
transform: translate(1px, -2px) rotate(-1deg);
}
}

// pulsing yellow outline
.imageClickHelp {
border: 4px solid #FFD700;
border-radius: 10px;
animation: pulse 1s infinite;
border: 4px solid #ffd700;
border-radius: 10px;
animation: pulse 1s infinite;
}

@keyframes pulse {
Expand All @@ -73,19 +95,19 @@

.checkCorrectButton {
width: 120px;
height: 60px;
background-color: #498FE2;
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
margin-top: 20px;
height: 60px;
background-color: #498fe2;
color: white;

Check failure on line 100 in src/frontpage/components/AprilFoolsCaptcha/Stage2/stage2.less

View workflow job for this annotation

GitHub Actions / stylelint

src/frontpage/components/AprilFoolsCaptcha/Stage2/stage2.less#L100

Unexpected named color "white" (color-named)
border: none;
border-radius: 10px;
cursor: pointer;
margin-top: 20px;
}

.aprilfoolsSpinner {
animation: spin 1s linear infinite;
width: 60px;
height: 60px;
animation: spin 1s linear infinite;
width: 60px;
height: 60px;
}

@keyframes spin {
Expand All @@ -95,4 +117,4 @@
100% {
transform: rotate(360deg);
}
}
}
19 changes: 9 additions & 10 deletions src/frontpage/components/AprilFoolsCaptcha/aprilfools.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
min-height: 400px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
align-items: center;
flex-direction: column;
align-items: center;
}

@media (max-width: 600px) {
Expand All @@ -47,10 +47,10 @@
}

.aprilfoolsCaptcha > img {
width: 70px;
height: 70px;
border-radius: 10px;
margin-left: 20px;
width: 70px;
height: 70px;
border-radius: 10px;
margin-left: 20px;
}

.aprilfoolsCaptchaInput {
Expand All @@ -64,9 +64,9 @@
}

.aprilfoolsSpinner {
animation: spin 1s linear infinite;
width: 60px;
height: 60px;
animation: spin 1s linear infinite;
width: 60px;
height: 60px;
}

@keyframes spin {
Expand All @@ -77,4 +77,3 @@
transform: rotate(360deg);
}
}

68 changes: 34 additions & 34 deletions src/frontpage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import EventsContainer from "events/components/EventsContainer";
import React, { FC } from "react";
import Articles from "./components/Articles";
import ForCompanies from "./components/ForCompanies";
import Offline from "./components/Offline";
import { IOfflineIssue } from "./models/Offline";
import AprilFoolsCaptcha from "./components/AprilFoolsCaptcha";
import EventsContainer from 'events/components/EventsContainer';
import React, { FC } from 'react';
import Articles from './components/Articles';
import ForCompanies from './components/ForCompanies';
import Offline from './components/Offline';
import { IOfflineIssue } from './models/Offline';
import AprilFoolsCaptcha from './components/AprilFoolsCaptcha';

interface FrontpageProps {
offlines: IOfflineIssue[];
offlines: IOfflineIssue[];
}

const Frontpage: FC<FrontpageProps> = ({ offlines }) => (
<>
<AprilFoolsCaptcha />
<div
style={{
padding: "20px",
borderRadius: "8px",
textAlign: "center",
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
marginBottom: "20px",
}}
>
<p
style={{
fontSize: "1.1rem",
}}
>
Ser du etter informasjon om fadderukene?
<br />
<a href="https://splash.online.ntnu.no/">Gå til programmet</a>
</p>
</div>
<EventsContainer />
<Articles />
<Offline issues={offlines} />
<ForCompanies />
</>
<>
<AprilFoolsCaptcha />
<div
style={{
padding: '20px',
borderRadius: '8px',
textAlign: 'center',
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
marginBottom: '20px',
}}
>
<p
style={{
fontSize: '1.1rem',
}}
>
Ser du etter informasjon om fadderukene?
<br />
<a href="https://splash.online.ntnu.no/">Gå til programmet</a>
</p>
</div>
<EventsContainer />
<Articles />
<Offline issues={offlines} />
<ForCompanies />
</>
);

export default Frontpage;
14 changes: 7 additions & 7 deletions src/pages/applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import style from '../../applications/committee.less';
import crypto from 'crypto';

const getHourlyUpdatedSortKey = (key: string) => {
const hash = crypto.createHash('sha256');
const hour = Math.floor((+new Date()) / 3600000);
hash.update(key + hour.toString());
return hash.digest('hex');
}
const hash = crypto.createHash('sha256');
const hour = Math.floor(+new Date() / 3600000);
hash.update(key + hour.toString());
return hash.digest('hex');
};

const Committees: React.FC = () => {
const [committees, setCommittees] = useState<IOnlineGroup[]>([]);
Expand All @@ -29,7 +29,7 @@ const Committees: React.FC = () => {
) {
CommitteeList.push(groups[i]);
}
}
}

CommitteeList.sort((a, b) => {
return getHourlyUpdatedSortKey(a.name_short) > getHourlyUpdatedSortKey(b.name_short) ? 1 : -1;
Expand All @@ -43,7 +43,7 @@ const Committees: React.FC = () => {
<div className={style.intro}>
Komitémedlemmene våre får Online til å gå rundt, og arbeider for at alle informatikkstudenter skal ha en flott
studiehverdag.
{/* <br /> <a href={applicationFormUrl}>Her</a> kan du søke om å bli en av oss! */ }
{/* <br /> <a href={applicationFormUrl}>Her</a> kan du søke om å bli en av oss! */}
</div>
{committees.map((com) => {
return (
Expand Down

0 comments on commit 278b49b

Please sign in to comment.