Skip to content

Commit a995d56

Browse files
authored
Merge pull request #11 from MedVIC-Lab/style-fixes-logo-colors
Style fixes and logo colors
2 parents 2cdf22d + 9149663 commit a995d56

File tree

5 files changed

+70
-6
lines changed

5 files changed

+70
-6
lines changed

.vitepress/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ export default defineConfig({
99
description: "MedVIC Lab's Website",
1010
appearance: false, // disable dark mode
1111
themeConfig: {
12+
logo: "/logo.png",
13+
lastUpdated: {
14+
text: 'Updated at',
15+
formatOptions: {
16+
dateStyle: 'short',
17+
timeStyle: 'short'
18+
}
19+
},
1220
nav: [
1321
{ text: 'Home', link: '/' },
1422
{ text: 'About', link: '/pages/about' },

.vitepress/theme/custom.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
:root {
2+
--darkblue: #272260;
3+
--lightblue: #4E7FE3;
4+
--orange: #C16D27;
5+
}
6+
7+
:root {
8+
--vp-c-brand-1: var(--darkblue);
9+
--vp-c-brand-2: var(--lightblue);
10+
--vp-c-brand-3: var(--orange);
11+
12+
--vp-c-text-1: var(--darkblue);
13+
}
14+
15+
/********** Custom styles **********/
16+
17+
/* NOTE:
18+
- You can add your own custom styles here.
19+
- It is recommended to use this file to override the default styles.
20+
21+
- **Often, !important is required to override the default styles.
22+
*/
23+
24+
/* Container widths */
25+
@media (min-width: 1440px) {
26+
.VPDoc:not(.has-sidebar) .content {
27+
max-width: 1200px !important;
28+
}
29+
.VPDoc:not(.has-sidebar) .container {
30+
max-width: 1200px !important;
31+
}
32+
}
33+
34+
/* Team page */
35+
.VPTeamPage {
36+
margin: 0 !important;
37+
}
38+
39+
vpi-social-website {
40+
display: none !important;
41+
}

.vitepress/theme/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import DefaultTheme from 'vitepress/theme'
2-
import './custom.css'
32
import 'vuetify/styles'
43
import '@mdi/font/css/materialdesignicons.css'
54
import * as components from 'vuetify/components'
65
import * as directives from 'vuetify/directives'
76
import { createVuetify } from 'vuetify'
7+
import './custom.css'
88

99
const vuetify = createVuetify({ components, directives })
1010

pages/people.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ onMounted(async () => {
6464
</VPTeamPageSection>
6565

6666
<VPTeamPageSection v-if="members.phdStudents.length">
67-
<template #title>PhD Students</template>
67+
<template #title>PhD Candidates/Students</template>
6868
<template #members>
6969
<VPTeamMembers :members="members.phdStudents" size="small" />
7070
</template>

scripts/generateMembers.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import * as fs from 'fs';
33
import * as path from 'path';
44
import fm from 'front-matter';
55

6+
// for whatever reason, the web icon must be imported as a string
7+
const WEB_SVG_STRING = '<?xml version="1.0" encoding="iso-8859-1"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --><svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M256,0C114.62,0,0,114.62,0,256s114.62,256,256,256s256-114.62,256-256S397.38,0,256,0z M172.211,41.609c-24.934,27.119-44.68,66.125-56.755,111.992H49.749C75.179,102.741,118.869,62.524,172.211,41.609z M25.6,256c0-26.999,5.077-52.727,13.662-76.8h70.494c-4.608,24.294-7.356,49.963-7.356,76.8s2.748,52.506,7.347,76.8H39.262C30.677,308.727,25.6,283,25.6,256z M49.749,358.4h65.707c12.083,45.867,31.821,84.872,56.755,111.991C118.869,449.476,75.179,409.259,49.749,358.4z M243.2,485.188c-43.81-8.252-81.877-58.24-101.359-126.788H243.2V485.188zM243.2,332.8H135.74c-4.924-24.166-7.74-49.997-7.74-76.8s2.816-52.634,7.74-76.8H243.2V332.8z M243.2,153.6H141.841C161.323,85.052,199.39,35.063,243.2,26.812V153.6z M462.251,153.6h-65.707c-12.083-45.867-31.821-84.873-56.755-111.992C393.131,62.524,436.821,102.741,462.251,153.6z M268.8,26.812c43.81,8.252,81.877,58.24,101.359,126.788H268.8V26.812zM268.8,179.2h107.46c4.924,24.166,7.74,49.997,7.74,76.8s-2.816,52.634-7.74,76.8H268.8V179.2z M268.8,485.188V358.4h101.359C350.677,426.948,312.61,476.937,268.8,485.188z M339.789,470.391c24.934-27.127,44.672-66.125,56.755-111.991h65.707C436.821,409.259,393.131,449.476,339.789,470.391z M402.244,332.8c4.608-24.294,7.356-49.963,7.356-76.8s-2.748-52.506-7.347-76.8h70.494c8.576,24.073,13.653,49.801,13.653,76.8c0,27-5.077,52.727-13.662,76.8H402.244z"/></g></g></svg>';
8+
69
const generateMembersPlugin = (): Plugin => {
710
return {
811
name: 'generate-members',
@@ -17,10 +20,22 @@ const generateMembersPlugin = (): Plugin => {
1720
const fileContent = fs.readFileSync(filePath, 'utf-8');
1821
const data = fm(fileContent);
1922

20-
const links = (data.attributes.links || []).map((link: { icon?: string; link?: string }) => ({
21-
icon: link.icon || '',
22-
link: link.link || ''
23-
}));
23+
const links = (data.attributes.links || []).map((link: { icon?: string | {}; link?: string }) => {
24+
25+
const retVal = {
26+
icon: link.icon || '',
27+
link: link.link || '',
28+
}
29+
30+
if (link.icon === "website") {
31+
retVal.icon = {
32+
svg: WEB_SVG_STRING,
33+
}
34+
retVal['ariaLabel'] = "Personal Website"
35+
}
36+
37+
return retVal;
38+
});
2439

2540
members.push({
2641
avatar: `../assets/images/people/${data.attributes.avatar}` || '',

0 commit comments

Comments
 (0)