From 8a5e25a7300d48b8641dd9e1b84aa274dc414c76 Mon Sep 17 00:00:00 2001 From: Bao Zhiyuan Date: Wed, 18 Sep 2024 17:40:28 +0800 Subject: [PATCH] tweak vote --- src/build.mts | 30 ++++++++++--------- .../README.md" | 1 + 2 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 "teams/MoonBit\345\256\230\346\226\271\346\240\267\344\276\2131/README.md" diff --git a/src/build.mts b/src/build.mts index 2487967..4fbdf36 100644 --- a/src/build.mts +++ b/src/build.mts @@ -302,19 +302,18 @@ function gameIndexHtml(metaInfo: MetaInfo): string { const control = metaInfo.control ?? '' const readme = metaInfo.readme ? md.render(metaInfo.readme) : '' const authorName = metaInfo.prInfo.head.user.login + const repoName = metaInfo.prInfo.head.repo?.name const authorUrl = metaInfo.prInfo.head.user.html_url const avatarUrl = metaInfo.prInfo.head.user.avatar_url - const starUrl = metaInfo.prInfo.head.repo?.html_url const updateTime = metaInfo.prInfo.merged_at - if (starUrl === undefined || updateTime === null) { + if (repoName === undefined || updateTime === null) { throw new Error( JSON.stringify( { title, control, readme, - starUrl, avatarUrl, updateTime, }, @@ -399,16 +398,11 @@ function gameIndexHtml(metaInfo: MetaInfo): string { color: rgb(245, 246, 247) } - .icons { - margin-left: 0.5rem - } - - .icons a { - color: white - } - - .icons a:hover { - color: #f44cd5 + .vote { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 1.125rem; } .avatar { @@ -454,7 +448,15 @@ function gameIndexHtml(metaInfo: MetaInfo): string {

${control}

-

${title} ${starSvg}

+

${title}

+

Star仓库,为ta投票 + +

${avatar}
${readme} diff --git "a/teams/MoonBit\345\256\230\346\226\271\346\240\267\344\276\2131/README.md" "b/teams/MoonBit\345\256\230\346\226\271\346\240\267\344\276\2131/README.md" new file mode 100644 index 0000000..cd1f76e --- /dev/null +++ "b/teams/MoonBit\345\256\230\346\226\271\346\240\267\344\276\2131/README.md" @@ -0,0 +1 @@ +# MoonBit 官方样例 1