1
0
mirror of https://github.com/sendevia/website.git synced 2026-03-07 16:22:34 +08:00

11 Commits

9 changed files with 296 additions and 57 deletions

View File

@@ -43,6 +43,8 @@ const getButtonIcon = (type: string) => {
<div v-if="links && links.length > 0" class="ButtonGroup" :class="[props.size, props.layout]">
<MaterialButton
v-for="(item, index) in links"
class="group"
:class="props.layout"
:key="index"
:href="item.link"
:size="props.size"

View File

@@ -22,7 +22,9 @@ const siteVersion = theme.value.siteVersion;
<a href="https://github.com/sendevia/website" target="_blank">sendevia's material theme</a>
主题
</p>
<a :href="'https://github.com/sendevia/website/tags/v' + siteVersion" target="_blank"> 版本:{{ siteVersion }}</a>
<a :href="'https://github.com/sendevia/website/releases/tag/' + siteVersion" target="_blank">
版本{{ siteVersion }}</a
>
</div>
<div class="beian-info">
<div class="beian-gongan">

View File

@@ -215,13 +215,9 @@ if (isClient()) {
</div>
</hgroup>
<Content />
<ButtonGroup v-if="frontmatter?.external_links" :links="frontmatter.external_links" />
<PrevNext />
</main>
<div id="article-beside">
<MaterialButton v-if="articleId" :color="'text'" :icon="'content_copy'" @click="copyShortLink">
复制短链
</MaterialButton>
<div id="article-aside">
<div class="post-info">
<p class="date-publish" v-if="formattedPublishDate">发布于 {{ formattedPublishDate }}</p>
<ClientOnly>
@@ -231,7 +227,11 @@ if (isClient()) {
</ClientOnly>
<p class="id" v-if="articleId">文章ID {{ articleId }}</p>
</div>
<ButtonGroup v-if="frontmatter?.external_links" :links="frontmatter.external_links" size="m" layout="vertical" />
<PageIndicator />
<MaterialButton v-if="articleId" :color="'text'" :icon="'content_copy'" @click="copyShortLink">
复制短链
</MaterialButton>
</div>
<ImageViewer
v-if="showImageViewer"

View File

@@ -38,7 +38,7 @@
}
&.round {
border-radius: var(--md-sys-shape-corner-full);
border-radius: var(--md-sys-shape-corner-large);
}
&.square {
@@ -48,6 +48,50 @@
&:active {
border-radius: var(--md-sys-shape-corner-medium);
}
&.group {
&.round {
border-radius: var(--md-sys-shape-corner-small);
}
&.horizontal {
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small)
var(--md-sys-shape-corner-large);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-small);
}
}
}
&.vertical {
width: 100%;
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-small)
var(--md-sys-shape-corner-small);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-large);
}
}
}
&:active {
border-radius: var(--md-sys-shape-corner-large) !important;
}
}
}
&.s {
@@ -66,7 +110,7 @@
}
&.round {
border-radius: var(--md-sys-shape-corner-full);
border-radius: var(--md-sys-shape-corner-extra-large);
}
&.square {
@@ -76,6 +120,50 @@
&:active {
border-radius: var(--md-sys-shape-corner-medium);
}
&.group {
&.round {
border-radius: var(--md-sys-shape-corner-small);
}
&.horizontal {
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-medium)
var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-extra-large);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-extra-large)
var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-medium);
}
}
}
&.vertical {
width: 100%;
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium)
var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large);
}
}
}
&:active {
border-radius: var(--md-sys-shape-corner-extra-large) !important;
}
}
}
&.m {
@@ -94,7 +182,7 @@
}
&.round {
border-radius: var(--md-sys-shape-corner-full);
border-radius: var(--md-sys-shape-corner-extra-large);
}
&.square {
@@ -104,6 +192,50 @@
&:active {
border-radius: var(--md-sys-shape-corner-large);
}
&.group {
&.round {
border-radius: var(--md-sys-shape-corner-small);
}
&.horizontal {
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-extra-large);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-extra-large)
var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-large);
}
}
}
&.vertical {
width: 100%;
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large)
var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small)
var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large);
}
}
}
&:active {
border-radius: var(--md-sys-shape-corner-extra-large) !important;
}
}
}
&.l {
@@ -132,6 +264,50 @@
&:active {
border-radius: var(--md-sys-shape-corner-extra-large);
}
&.group {
&.round {
border-radius: var(--md-sys-shape-corner-medium);
}
&.horizontal {
&:first-child {
&.round {
border-radius: calc(var(--md-sys-shape-corner-full) / 2) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-large) calc(var(--md-sys-shape-corner-full) / 2);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) calc(var(--md-sys-shape-corner-full) / 2)
calc(var(--md-sys-shape-corner-full) / 2) var(--md-sys-shape-corner-large);
}
}
}
&.vertical {
width: 100%;
&:first-child {
&.round {
border-radius: calc(var(--md-sys-shape-corner-full) / 2) calc(var(--md-sys-shape-corner-full) / 2)
var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium)
calc(var(--md-sys-shape-corner-full) / 2) calc(var(--md-sys-shape-corner-full) / 2);
}
}
}
&:active {
border-radius: var(--md-sys-shape-corner-full) !important;
}
}
}
&.xl {
@@ -160,6 +336,50 @@
&:active {
border-radius: var(--md-sys-shape-corner-extra-large);
}
&.group {
&.round {
border-radius: var(--md-sys-shape-corner-medium);
}
&.horizontal {
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large)
var(--md-sys-shape-corner-full);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full)
var(--md-sys-shape-corner-large);
}
}
}
&.vertical {
width: 100%;
&:first-child {
&.round {
border-radius: var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-medium)
var(--md-sys-shape-corner-medium);
}
}
&:last-child {
&.round {
border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium)
var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full);
}
}
}
&:active {
border-radius: var(--md-sys-shape-corner-full) !important;
}
}
}
&.elevated {

View File

@@ -3,44 +3,16 @@
.ButtonGroup {
display: inline-flex;
align-items: center;
justify-content: flex-end;
justify-content: center;
gap: 2px;
position: relative;
.MaterialButton {
&:nth-child(1n) {
&.xs {
border-radius: 4px;
}
&.horizontal {
flex-direction: row;
}
&.s {
border-radius: 8px;
}
}
&:nth-child(1) {
&.xs {
border-radius: var(--md-sys-shape-corner-full) 20px 20px var(--md-sys-shape-corner-full);
}
&.s {
border-radius: var(--md-sys-shape-corner-full) 40px 40px var(--md-sys-shape-corner-full);
}
}
&:last-child {
&.xs {
border-radius: 16px var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) 20px;
}
&.s {
border-radius: 32px var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) 40px;
}
}
&:active {
border-radius: var(--md-sys-shape-corner-full) !important;
}
&.vertical {
flex-direction: column;
}
}

View File

@@ -1,6 +1,6 @@
@use "../mixin";
main#article-content {
#article-content {
display: flex;
flex-direction: column;
grid-column: 1 / 10;
@@ -8,6 +8,10 @@ main#article-content {
& {
> div {
width: 100%;
> div > :first-child {
margin-block-start: 0px;
}
}
> hgroup {
@@ -789,11 +793,14 @@ main#article-content {
}
}
div#article-beside {
#article-aside {
display: flex;
flex-direction: column;
gap: 24px;
grid-column: 10 / 13;
position: sticky;
top: 120px;
top: 12px;
.post-info {
display: flex;
@@ -801,7 +808,6 @@ div#article-beside {
gap: 3px;
margin-inline-start: 16px;
margin-bottom: 18px;
p {
@include mixin.typescale-style("label-small");
@@ -834,17 +840,17 @@ div#article-beside {
}
@media screen and (max-width: 1600px) {
main#article-content {
#article-content {
grid-column: 1 / 10;
}
div#article-beside {
#article-aside {
grid-column: 10 / 13;
}
}
@media screen and (max-width: 1200px) {
main#article-content {
#article-content {
grid-column: 1 / 7;
.headline-block a.title-anchor {
@@ -855,13 +861,13 @@ div#article-beside {
}
}
div#article-beside {
#article-aside {
grid-column: 7 / 9;
}
}
@media screen and (max-width: 840px) {
main#article-content {
#article-content {
grid-column: 1 / 7;
.custom-block > * {
@@ -873,13 +879,13 @@ div#article-beside {
}
}
div#article-beside {
#article-aside {
grid-column: 1 / 7;
}
}
@media screen and (max-width: 600px) {
main#article-content {
#article-content {
grid-column: 1 / 5;
p:has(img) {
@@ -887,7 +893,7 @@ div#article-beside {
}
}
div#article-beside {
#article-aside {
grid-column: 1 / 5;
}
}

View File

@@ -1,6 +1,7 @@
{
"version": "26.1.7 (1)",
"version": "26.1.9(232)",
"scripts": {
"update-version": "node scripts/update-version.js",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:build-cf": "git fetch --unshallow && vitepress build",

View File

@@ -16,8 +16,11 @@ external_links:
label: 直连下载
link: https://github.com/sendevia/AincradMix/releases/latest/download/AincradMix.osk
- type: normal
label: github
label: Github 仓库
link: https://github.com/sendevia/AincradMix
- type: normal
label: Bilibili
link: https://www.bilibili.com/video/BV1gYiRYiEZ6
---
::: tip 简介

33
scripts/update-version.js Normal file
View File

@@ -0,0 +1,33 @@
import fs from "node:fs";
import { execSync } from "node:child_process";
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
// 获取提交数
const commitCount = parseInt(execSync("git rev-list --count HEAD").toString().trim(), 10);
// 检查是否有暂存的更改
const hasStagedChanges = execSync("git diff --cached --quiet || echo 'changed'").toString().trim() === "changed";
// 版本号中的提交数 = 当前提交数 + 1 (即将进行的提交) + (如果有暂存更改则额外+1)
const nextCommitCount = commitCount + 1 + (hasStagedChanges ? 1 : 0);
// 获取当前日期
const now = new Date();
const year = now.getFullYear().toString().slice(-2);
const month = now.getMonth() + 1;
const date = now.getDate();
const newVersion = `${year}.${month}.${date}(${nextCommitCount})`;
pkg.version = newVersion;
fs.writeFileSync("./package.json", JSON.stringify(pkg, null, 2) + "\n");
console.log(`Version updated to: ${newVersion}`);
// 自动执行 git add 和 git commit
try {
execSync("git add package.json");
execSync(`git commit -m "chore(package): update to version ${newVersion}"`);
console.log(`Committed: chore(package): update to version ${newVersion}`);
} catch (error) {
console.error("Failed to commit version update:", error.message);
}