Skip to content

Commit 4494789

Browse files
authored
Merge branch 'develop' into update-editor-settings
2 parents 6b7c0d4 + 9743a51 commit 4494789

File tree

38 files changed

+345
-313
lines changed

38 files changed

+345
-313
lines changed
4.12 KB
Loading
4.53 KB
Loading
5.47 KB
Loading

src/app.global.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ a {
6060
}
6161
}
6262

63+
.gc360_header {
64+
background-color: var(--mui-palette-primary-main);
65+
color: var(--mui-palette-primary-contrastText);
66+
}
67+
6368
@media (max-width: $break-md) {
6469
.gc360_a_link {
6570
color: var(--mui-palette-secondary-main) !important;

src/components/Header/index.jsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ import GordonNavButtonsRightCorner from './components/NavButtonsRightCorner';
2121
import GordonQuickSearch from './components/QuickSearch';
2222
import styles from './Header.module.css';
2323

24+
// Define header logo image - special image for Pi Day
25+
const todaysDate = new Date(); // Months: 0 = Jan, 1 = Feb, 2 = Mar, etc.
26+
const isPiDay = todaysDate.getMonth() === 2 && todaysDate.getDate() === 14; // March 14 (3/14)
27+
const angleMode = isPiDay ? "2pi" : "360";
28+
const headerLogo72dpi = "images/gc_" + angleMode + "_yellow_logo_72.png";
29+
const headerLogo64dpi = "images/gc_" + angleMode + "_yellow_logo_64.png";
30+
const headerLogo56dpi = "images/gc_" + angleMode + "_yellow_logo_56.png";
31+
2432
const ForwardNavLink = forwardRef((props, ref) => <NavLink innerRef={ref} {...props} />);
2533

2634
// Tab url regular expressions must be listed in the same order as the tabs, since the
@@ -152,12 +160,11 @@ const GordonHeader = ({ onDrawerToggle }) => {
152160
</IconButton>
153161
<Link to="/" component={ForwardNavLink} value={tabIndex}>
154162
<picture>
155-
<source srcset="images/gc_360_yellow_logo_72.png" media="(min-width: 900px)" />
156-
<source srcset="images/gc_360_yellow_logo_64.png" media="(min-width: 600px)" />
157-
<img src="images/gc_360_yellow_logo_56.png"></img>
163+
<source srcset={headerLogo72dpi} media="(min-width: 900px)" />
164+
<source srcset={headerLogo64dpi} media="(min-width: 600px)" />
165+
<img src={headerLogo56dpi} alt="Gordon 360 Logo"></img>
158166
</picture>
159167
</Link>
160-
161168
<Typography className={`disable_select ${styles.title}`} variant="h6" color="inherit">
162169
<Routes>
163170
{routes.map((route) => (

src/components/Profile/components/Identification/components/SocialMediaLinks/components/LinksDialog/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const LinksDialog = ({ links, createSnackbar, onClose, setLinks }) => {
2626
const { prefix, prefix2 } = socialMediaInfo[platform];
2727
const isValid =
2828
value === '' || value.indexOf(prefix) === 0 || (prefix2 && value.indexOf(prefix2) === 0);
29+
2930
if (isValid) {
3031
setFormErrors(formErrors.filter((error) => error !== platform));
3132
} else if (!formErrors.includes(platform)) {

src/components/Profile/components/OfficeInfoList/index.jsx

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
import { useState, Fragment } from 'react';
2-
import { Card, CardContent, CardHeader, Grid, List, Typography, IconButton } from '@mui/material';
1+
import { Card, CardContent, CardHeader, Grid, List, Typography } from '@mui/material';
32
import ProfileInfoListItem from '../ProfileInfoListItem';
4-
import { Markup } from 'interweave';
53
import styles from './OfficeInfoList.module.css';
6-
import { gordonColors } from 'theme';
74
import UpdateOffice from './UpdateOfficeLocationDialog';
85
import UpdateOfficeHours from './UpdateOfficeHoursDialog';
96
import UpdateMail from './UpdateMailDestinationDialog';
107
import GordonTooltip from 'components/GordonTooltip';
11-
import user from 'services/user';
12-
import EditIcon from '@mui/icons-material/Edit';
138

149
const OfficeInfoList = ({
1510
myProf,
1611
profile: {
17-
AD_Username,
1812
BuildingDescription,
1913
OnCampusDepartment,
2014
OnCampusRoom,
@@ -63,7 +57,7 @@ const OfficeInfoList = ({
6357
}
6458
/>
6559
) : office_hours ? (
66-
<ProfileInfoListItem title="Office Hours:" contentText={`${office_hours}`} />
60+
<ProfileInfoListItem title="Office Hours:" contentText={office_hours} />
6761
) : null;
6862

6963
const room = myProf ? (
@@ -83,7 +77,7 @@ const OfficeInfoList = ({
8377
}
8478
/>
8579
) : BuildingDescription || OnCampusRoom ? (
86-
<ProfileInfoListItem title="Room:" contentText={({ BuildingDescription }, { OnCampusRoom })} />
80+
<ProfileInfoListItem title="Room:" contentText={`${BuildingDescription}, ${OnCampusRoom}`} />
8781
) : null;
8882

8983
const mailstop = myProf ? (
@@ -110,24 +104,9 @@ const OfficeInfoList = ({
110104
}
111105
/>
112106
) : Mail_Location ? (
113-
<ProfileInfoListItem title="Mailstop:" contentText={{ Mail_Location }} />
107+
<ProfileInfoListItem title="Mailstop:" contentText={Mail_Location} />
114108
) : null;
115109

116-
const updateOfficeInfo =
117-
myProf && PersonType?.includes('fac') ? (
118-
<Typography align="left" className={styles.note}>
119-
NOTE: Update your office info{' '}
120-
<a
121-
href="https://go.gordon.edu/general/myaccount.cfm"
122-
target="_blank"
123-
rel="noopener noreferrer"
124-
style={{ color: gordonColors.primary.blue }}
125-
>
126-
here
127-
</a>
128-
</Typography>
129-
) : null;
130-
131110
return (
132111
<Grid item xs={12} lg={12}>
133112
<Card className={styles.office_info_list}>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.quick_links_dialog {
2+
&_link_text {
3+
color: var(--mui-palette-neutral-600);
4+
}
5+
}

src/components/QuickLinksDialog/index.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
import GordonDialogBox from 'components/GordonDialogBox';
22
import LinkIcon from '@mui/icons-material/InsertLink';
3-
import { ListItemIcon, ListItemText, ListSubheader, List, ListItem } from '@mui/material';
3+
import {
4+
ListItemIcon,
5+
ListItemText,
6+
ListSubheader,
7+
List,
8+
ListItem,
9+
CardHeader,
10+
} from '@mui/material';
411
import CanvasIcon from './images/Canvas.ico';
512
import GordonIcon from './images/favicon.ico';
613
import GOIcon from './images/GoGordonFavicon.ico';
714
import MyGordonIcon from './images/MyGordonFavicon.ico';
815
import { PropsWithChildren } from 'react';
16+
import styles from './QuickLinksDialog.module.css';
917

1018
type ListItemProps = {
1119
name: string;
@@ -60,14 +68,19 @@ const GordonQuickLinksDialog = ({ linkopen, handleLinkClose }: Props) => {
6068
<GordonDialogBox
6169
aria-labelledby="useful-links"
6270
open={linkopen}
63-
title="Useful Links"
71+
title=""
6472
buttonClicked={handleLinkClose}
6573
buttonName="Close"
6674
>
75+
<CardHeader title="Useful Links" className="gc360_header" />
6776
<List
6877
component="nav"
6978
subheader={
70-
<ListSubheader component="div" disableSticky>
79+
<ListSubheader
80+
component="div"
81+
className={styles.quick_links_dialog_link_text}
82+
disableSticky
83+
>
7184
Academics
7285
</ListSubheader>
7386
}
@@ -79,7 +92,11 @@ const GordonQuickLinksDialog = ({ linkopen, handleLinkClose }: Props) => {
7992
<List
8093
component="nav"
8194
subheader={
82-
<ListSubheader component="div" disableSticky>
95+
<ListSubheader
96+
component="div"
97+
className={styles.quick_links_dialog_link_text}
98+
disableSticky
99+
>
83100
Information
84101
</ListSubheader>
85102
}

src/services/socialMedia.tsx

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,33 @@ export type SocialMediaInfo = {
2525
};
2626

2727
export const socialMediaInfo: {
28-
[Platform.Facebook]: SocialMediaInfo;
29-
[Platform.Twitter]: SocialMediaInfo;
30-
[Platform.LinkedIn]: SocialMediaInfo;
31-
[Platform.Instagram]: SocialMediaInfo;
32-
[Platform.Handshake]: SocialMediaInfo;
33-
[Platform.Calendar]: SocialMediaInfo;
28+
[key in Platform]: SocialMediaInfo;
3429
} = {
3530
Facebook: {
3631
Icon: <FaFacebookF />,
37-
prefix: 'https://www.facebook.com/',
32+
prefix: 'https://facebook.com',
33+
prefix2: 'https://www.facebook.com',
3834
},
3935
Twitter: {
4036
Icon: <FaTwitter />,
41-
prefix: 'https://twitter.com/',
37+
prefix: 'https://twitter.com',
38+
prefix2: 'https://www.twitter.com',
4239
},
4340
LinkedIn: {
4441
Icon: <FaLinkedin />,
45-
prefix: 'https://www.linkedin.com/in/',
42+
prefix: 'https://linkedin.com/in/',
43+
prefix2: 'https://www.linkedin.com/in/',
4644
},
4745
Instagram: {
4846
Icon: <FaInstagram />,
49-
prefix: 'https://www.instagram.com/',
47+
prefix: 'https://www.instagram.com',
48+
prefix2: 'https://instagram.com',
5049
},
5150
Handshake: {
5251
Icon: <FaHandshake />,
53-
prefix: 'https://gordon.joinhandshake.com/users/',
54-
prefix2: 'https://app.joinhandshake.com/users/',
52+
prefix: 'https://gordon.joinhandshake.com/',
53+
prefix2: 'https://app.joinhandshake.com/',
5554
},
56-
// TODO - Validation
57-
// Maybe exclusively a certain URL
5855
Calendar: {
5956
Icon: <FaCalendar />,
6057
prefix: 'https://',

0 commit comments

Comments
 (0)