Skip to content

Commit

Permalink
chore: remove some trash code
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Sep 19, 2024
1 parent 713a5c9 commit 8f172d4
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 251 deletions.
84 changes: 68 additions & 16 deletions blog-archived/client/assets/scss/global.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@use './constants.scss' as C;
@use './util.scss' as Util;
@use './theme/light.scss' as Light;

// @use '../font/index.scss' as *;
@import '../font/index.scss';
@import '../font/index';

// @import './theme.scss';
@import './prose.scss';
@import './prose';

:root {
@each $var, $color in C.$root-vars {
Expand All @@ -16,16 +18,29 @@
@each $var, $color in Light.$light-vars {
#{$var}: Util.getRgbaString($color);
}

.hover-scroll-bar {
&:hover {
&::-webkit-scrollbar-thumb {
@apply bg-border-muted;
}
}

// 滚动条上的滚动滑块
}
}

body,
html {
transition: background-color 0.3s ease;
}

@mixin better-scrollbar {
// 滚动条高宽及背景
&::-webkit-scrollbar {
width: 12px;
}

// 滚动条上的滚动滑块
&::-webkit-scrollbar-thumb {
@apply bg-header-bg;
Expand All @@ -37,35 +52,72 @@ html {
// }
}

.better-scroll-bar {
@include better-scrollbar;
}

.hover-scroll-bar {
&::-webkit-scrollbar {
width: 12px;
}

&::-webkit-scrollbar-thumb {
@apply transition-colors;
}

&:hover {
&::-webkit-scrollbar-thumb {
@apply bg-header-bg;
}
}

// 滚动条上的滚动滑块
}

[data-color-mode='light'] {
.hover-scroll-bar {
&:hover {
&::-webkit-scrollbar-thumb {
@apply bg-border-muted;
}
}
// 滚动条上的滚动滑块
}
/* 隐藏 Chrome、Edge、Safari 浏览器的滚动条 */
body::-webkit-scrollbar {
width: 0;
background: transparent;
}

/* 自定义滚动条的轨道 */
body::-webkit-scrollbar-track {
background: transparent;
}

/* 自定义滚动条的滑块 */
body::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 10px;
transition:
background-color 0.3s,
width 0.3s;
}

/* 滚动的时候显示滚动条 */
body:active::-webkit-scrollbar-thumb {
background-color: rgb(0 0 0 / 40%);
}

/* 鼠标悬停时,滚动条变宽和颜色加深 */
body::-webkit-scrollbar-thumb:hover {
background-color: rgb(0 0 0 / 80%);
width: 8px;
}

/* 滚动条不占用空间 (Chrome, Edge, Safari) */
html {
@include better-scrollbar;
scrollbar-gutter: stable;
}

/* 针对 Firefox 的放大效果 */
@media (hover: hover) {
body {
scrollbar-color: transparent transparent;
}

body:active {
scrollbar-color: rgb(0 0 0 / 40%) transparent;
}

body:hover {
scrollbar-color: rgb(0 0 0 / 80%) transparent;
scrollbar-width: thin; /* 确保宽度变化的效果 */
}
}
Empty file.
4 changes: 0 additions & 4 deletions blog-archived/client/assets/sprite/svg/github-file.svg

This file was deleted.

4 changes: 0 additions & 4 deletions blog-archived/client/assets/sprite/svg/github-folder.svg

This file was deleted.

17 changes: 0 additions & 17 deletions blog-archived/client/components/global/SomImage.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<script>
import { mapActions } from 'vuex'
import { isCloudbaseUrl } from '@/utils/validate'
const watch = {}
if (process.client) {
watch.src = {
async handler(src) {
let tSrc = src
if (isCloudbaseUrl(tSrc)) {
tSrc = await this.getSingleUrl(tSrc)
}
this.innerSrc = tSrc
},
immediate: true,
}
}
export default {
name: 'SomImage',
props: {
Expand Down Expand Up @@ -59,7 +45,6 @@ export default {
return obj
},
},
watch,
methods: {
...mapActions('user', ['getSingleUrl']),
},
Expand All @@ -83,5 +68,3 @@ export default {
</template>
</el-image>
</template>

<style></style>
43 changes: 0 additions & 43 deletions blog-archived/client/components/home/ArticlePagedList/Body.vue

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions blog-archived/client/components/home/ArticlePagedList/Header.vue

This file was deleted.

This file was deleted.

93 changes: 0 additions & 93 deletions blog-archived/client/components/home/ArticlePagedList/index.vue

This file was deleted.

2 changes: 1 addition & 1 deletion blog-archived/client/components/layout/CommonSlot.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import AppHeader from '@/components/layout/Header'
import AppFooter from '@/components/layout/Footer'
import AppHeader from '@/components/layout/Header'
export default {
name: 'CommonSlot',
Expand Down
2 changes: 0 additions & 2 deletions blog-archived/client/components/layout/DarkModeToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,3 @@ export default {
/>
</div>
</template>

<style></style>
Loading

0 comments on commit 8f172d4

Please sign in to comment.