Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/update font family #278

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added vue/src/assets/font/SourceSansPro-Regular.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions vue/src/layouts/ExperimentLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="experiment-title transition-marging duration-300" :class="{ 'ml-8': !isSideBarShow }">
<div class="flex items-center gap-3">
<!-- 项目标题/实验标题 -->
<h1 class="text-xl items-center gap-1 truncate max-w-sm sm:max-w-lg 2xl:max-w-5xl">
<h1 class="text-2xl items-center gap-1 truncate max-w-sm sm:max-w-lg 2xl:max-w-5xl">
<span class="font-semibold">{{ experimentStore.name }}</span>
</h1>
<!-- 编辑按钮 -->
Expand Down Expand Up @@ -142,7 +142,7 @@ const navs = [
display: none;
}
.nav-item {
@apply px-1 pt-2 pb-1.5 relative text-sm text-dimmer whitespace-nowrap ring-0 outline-none;
@apply px-1 pt-2 pb-1.5 relative text-dimmer whitespace-nowrap ring-0 outline-none;
@apply mb-1 rounded flex items-center gap-1.5;
&:hover {
@apply bg-higher;
Expand Down
2 changes: 1 addition & 1 deletion vue/src/layouts/HomeLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="project-title transition-marging duration-300" :class="{ 'ml-8': !isSideBarShow }">
<div class="flex items-center gap-3">
<!-- 项目标题/实验标题 -->
<h1 class="text-xl items-center gap-1 font-semibold max-w-md truncate">
<h1 class="text-2xl items-center gap-1 font-semibold max-w-md truncate">
{{ projectStore.name }}
</h1>
<!-- 编辑按钮 -->
Expand Down
2 changes: 1 addition & 1 deletion vue/src/layouts/main/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const getExperimentColor = (experiment) => {
}

a {
@apply flex items-center px-4 h-11 text-sm text-default hover:bg-positive-dimmest rounded-lg;
@apply flex items-center px-4 h-11 text-default hover:bg-positive-dimmest rounded-lg;
}

.active-router {
Expand Down
9 changes: 8 additions & 1 deletion vue/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@tailwind utilities;

body {
font-family: PingFang SC, DFPKingGothicGB-Medium, sans-serif;
font-family: Source Sans Pro, PingFang SC, DFPKingGothicGB-Medium, sans-serif;
// 设置任何元素的默认边框颜色、文字颜色
@apply text-default;
* {
Expand All @@ -22,6 +22,13 @@ body {
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'Source Sans Pro';
src: url('@swanlab-vue/assets/font/SourceSansPro-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
}

// 弹跳进入动画
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const navs = [

<style lang="scss" scoped>
a {
@apply flex items-center px-4 h-11 text-sm text-default hover:bg-positive-dimmest rounded-lg mb-2;
@apply flex items-center px-4 h-11 text-default hover:bg-positive-dimmest rounded-lg mb-2;
}

.active-router {
Expand Down