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

生配信準備画面への遷移バナーを作成しました #111

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Binary file added src/assets/move-live.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Balloon from "src/components/Balloon.astro";
import { Image } from "astro:assets";
import sopotan1 from "src/assets/sopotan1.png";
import sopotan4_r from "src/assets/sopotan4_reversed.png";
import move_live from "src/assets/move-live.png";
min-63 marked this conversation as resolved.
Show resolved Hide resolved

import { DEFAULT_TIMEZONE } from "src/consts";
import { getCollection } from "astro:content";
Expand Down Expand Up @@ -46,6 +47,11 @@ const xAccountURL = "https://twitter.com/" + SOPOTAN_TWITTER_ID.replace("@", "")

<TopLayout>
<Container>
<div class="to-live">
<a href="https://live.sohosai.com/" target="_blank"
><Image src={move_live} alt="雙峰祭生配信はこちら!" width="25%" height="25%" /></a
>
</div>
<section>
<h2>{t("top.お知らせ")}</h2>
<div class="news">
Expand Down Expand Up @@ -90,6 +96,10 @@ const xAccountURL = "https://twitter.com/" + SOPOTAN_TWITTER_ID.replace("@", "")
</TopLayout>

<style lang="scss">
.to-live {
padding-block: 2rem;
}

.news {
display: grid;
grid-template-rows: max-content 1fr;
Expand Down
10 changes: 10 additions & 0 deletions src/utils/i18n/core/integration.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらの変更はどのようなものでしょうか?

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ export default function i18nPlus({ locales, POSIXlocalesMap, defaultLocale }: i1
.filter((i) => i !== defaultLocale)
.forEach((locale) => {
const locale_dir = dir.pathname + locale;
try {
const target = fs.statSync(`${locale_dir}/404`);
if (!target.isDirectory()) {
console.log(`Skip "${locale}"`);
return;
}
} catch (err) {
console.log(`Skip "${locale}"`);
return;
}
fs.rename(`${locale_dir}/404/index.html`, `${locale_dir}/404.html`, (err) => {
if (err) {
console.log("Failed to rename path of 404 files");
Expand Down