Skip to content

Commit 1e87a4b

Browse files
authored
Merge pull request #167 from traPtitech/feat/use-fontsource-variable
Feat/use fontsource variable
2 parents 8626b9a + 0c831ab commit 1e87a4b

File tree

15 files changed

+63
-48
lines changed

15 files changed

+63
-48
lines changed

index.html

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,6 @@
88
<meta name="apple-mobile-web-app-title" content="rucQ" />
99
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
12-
<link rel="preconnect" href="https://fonts.googleapis.com" />
13-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14-
<link
15-
href="https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@100;300;400;500;700;800;900&display=swap"
16-
rel="stylesheet"
17-
/>
18-
<link
19-
href="https://fonts.googleapis.com/css2?family=M+PLUS+Code+Latin:wdth,wght@120,100..700&display=swap"
20-
rel="stylesheet"
21-
/>
22-
<link
23-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
24-
rel="stylesheet"
25-
/>
26-
<link
27-
href="https://fonts.googleapis.com/css2?family=Reddit+Sans:ital,wght@0,200..900;1,200..900&display=swap"
28-
rel="stylesheet"
29-
/>
3011
<title>rucQ</title>
3112
</head>
3213
<body>

package-lock.json

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

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"generate:api": "npx openapi-typescript https://raw.githubusercontent.com/traPtitech/rucQ/main/openapi.yaml -o src/api/schema.d.ts && npm run format"
1616
},
1717
"dependencies": {
18+
"@fontsource-variable/m-plus-2": "^5.2.9",
19+
"@fontsource-variable/m-plus-code-latin": "^5.2.7",
20+
"@fontsource-variable/reddit-sans": "^5.2.7",
21+
"@fontsource-variable/roboto": "^5.2.9",
1822
"@mdi/font": "^7.4.47",
1923
"@tanstack/query-async-storage-persister": "^5.85.9",
2024
"@tanstack/query-persist-client-core": "^5.85.9",

src/components/event/EventDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const planner = computed(() => {
9494
}
9595
9696
.timeInfo {
97-
font-family: Roboto;
97+
font-family: 'Roboto Variable';
9898
font-weight: 500;
9999
font-size: 13px;
100100
}
@@ -108,7 +108,7 @@ const planner = computed(() => {
108108
font-size: 12px;
109109
font-weight: 500;
110110
letter-spacing: 0.05em;
111-
font-family: 'Reddit Sans';
111+
font-family: 'Reddit Sans Variable';
112112
font-variant-ligatures: none;
113113
}
114114

src/components/event/ScheduleRow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const momentEvent = computed(() => {
7474
margin-top: 1px;
7575
font-weight: 900;
7676
width: fit-content;
77-
font-family: Roboto;
77+
font-family: 'Roboto Variable';
7878
}
7979
8080
.line {

src/components/information/QuestionGroupEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const answerModel = (questionId: number) =>
131131
}
132132
133133
.deadline {
134-
font-family: 'Reddit Sans';
134+
font-family: 'Reddit Sans Variable';
135135
margin-right: 6px;
136136
font-size: 16px;
137137
font-weight: bold;

src/components/information/RoomInfo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ defineProps<{ room?: Room }>()
3838
}
3939
4040
.room {
41-
font-family: 'Reddit Sans';
41+
font-family: 'Reddit Sans Variable';
4242
font-size: 30px;
4343
font-weight: 800;
4444
letter-spacing: 3px;

src/components/markdown/MarkdownEditor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const enclose = (symbol: string) => {
139139
color: var(--color-text);
140140
width: 100%;
141141
height: 100%;
142-
font-family: 'M PLUS Code Latin', 'M PLUS 1p';
142+
font-family: 'M PLUS Code Latin Variable', 'M PLUS 2 Variable';
143143
font-weight: 400;
144144
display: flex;
145145
}
@@ -182,7 +182,7 @@ const enclose = (symbol: string) => {
182182
top: 0px;
183183
width: 100%;
184184
padding-bottom: 4em;
185-
font-family: 'M PLUS Code Latin', 'M PLUS 1p';
185+
font-family: 'M PLUS Code Latin Variable', 'M PLUS 2 Variable';
186186
z-index: 0;
187187
}
188188

src/components/markdown/MarkdownPreview.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ onMounted(async () => {
182182
}
183183
184184
.preview :global(code) {
185-
font-family: 'M PLUS Code Latin 60', 'M PLUS 1p';
185+
font-family: 'M PLUS Code Latin Variable', 'M PLUS 2 Variable';
186186
font-weight: 500;
187187
font-size: 10pt;
188188
}

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import 'vuetify/styles'
99
import '@mdi/font/css/materialdesignicons.css'
1010
import { useUserStore, useCampStore } from './store'
1111

12+
import '@fontsource-variable/m-plus-2' // 'M PLUS 2 Variable'
13+
import '@fontsource-variable/m-plus-code-latin' // 'M PLUS Code Latin Variable'
14+
import '@fontsource-variable/reddit-sans' // 'Reddit Sans Variable'
15+
import '@fontsource-variable/roboto' // 'Roboto Variable'
16+
1217
import App from './App.vue'
1318
import './styles/main.scss'
1419

@@ -24,7 +29,6 @@ app.use(pinia)
2429
app.use(vuetify)
2530
app.use(VueQueryPlugin, { queryClient })
2631

27-
2832
async function initializeApp() {
2933
if (import.meta.env.DEV && import.meta.env.MODE !== 'staging') {
3034
const { worker } = await import('./mocks/browser')

0 commit comments

Comments
 (0)