Skip to content

Commit

Permalink
OSSに関する案内をソングページに追加 (#213)
Browse files Browse the repository at this point in the history
* OSSに関する案内をソングページに追加

* 不要なimportを削除

* 微調整

* Apply suggestions from code review

---------

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
jdkfx and Hiroshiba authored Jul 2, 2024
1 parent 54bb073 commit a51b279
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 69 deletions.
4 changes: 0 additions & 4 deletions src/components/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -869,10 +869,6 @@ $dropdown-item-active-background-color: $primary;
}
}
}

.explain-humming {
@extend .is-max-widescreen;
}
}

.markdown {
Expand Down
77 changes: 77 additions & 0 deletions src/components/ossGuidance.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { faGithub } from "@fortawesome/free-brands-svg-icons"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { Link } from "gatsby"
import React from "react"

export const OssGuidanceSection: React.FC<{
className?: string
isDark: boolean // Nemoやソングのページかどうか
}> = ({ className, isDark }) => {
return (
<section className="section">
<div
className={`${className} container is-max-desktop is-flex is-flex-direction-column`}
>
<h2 id="oss" className="jump-anchor-header-padding title">
<Link
to={`#oss`}
className={!isDark ? "has-text-black" : "has-text-white"}
>
オープンソース
</Link>
</h2>
<p className="is-size-5">
VOICEVOX は OSS(オープンソース・ソフトウェア)版 VOICEVOX
をもとに構築されています。
</p>
<p className="is-size-5">
製品版と OSS 版の違いやモジュール構成は&nbsp;
<a
href="https://github.com/VOICEVOX/voicevox/blob/main/docs/%E5%85%A8%E4%BD%93%E6%A7%8B%E6%88%90.md"
target="_blank"
rel="noreferrer"
className="has-text-weight-bold is-underlined"
>
VOICEVOX の全体構成
</a>
&nbsp;をご参照ください。
</p>
<p className="is-size-5">
ソフトウェア部分は Electron + Vue 、音声合成エンジン部分は Python +
FastAPI です。
</p>
<p className="is-size-5">
追加したい・改善したい機能があれば、ぜひ開発にご参加ください。
</p>
<div className="buttons mt-3">
<a
className={`button ${!isDark ? "is-outlined" : "is-dark"}`}
href="https://github.com/VOICEVOX/voicevox"
target="_blank"
rel="noreferrer"
type="button"
role={"button"}
>
<span className="icon">
<FontAwesomeIcon icon={faGithub} />
</span>
<span>VOICEVOX エディター</span>
</a>
<a
className={`button ${!isDark ? "is-outlined" : "is-dark"}`}
href="https://github.com/VOICEVOX/voicevox_engine"
target="_blank"
rel="noreferrer"
type="button"
role={"button"}
>
<span className="icon">
<FontAwesomeIcon icon={faGithub} />
</span>
<span>VOICEVOX エンジン</span>
</a>
</div>
</div>
</section>
)
}
2 changes: 1 addition & 1 deletion src/components/page-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react"

export const VVFooter: React.FC<{
privacyPolicyShower: () => void
isDark: boolean // Nemoのページかどうか
isDark: boolean // Nemoやソングのページかどうか
}> = ({ privacyPolicyShower, isDark }) => (
<>
<div className={`container is-flex is-justify-content-center`}>
Expand Down
64 changes: 2 additions & 62 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { faGithub } from "@fortawesome/free-brands-svg-icons"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { Link } from "gatsby"
import { GatsbyImage } from "gatsby-plugin-image"
import React, { useContext, useEffect, useRef, useState } from "react"
import AudioSample from "../components/audioSample"
import "../components/layout.scss"
import ModalReadmeLibrary from "../components/modalReadmeLibrary"
import { OssGuidanceSection } from "../components/ossGuidance"
import { Page } from "../components/page"
import Seo from "../components/seo"
import SoftwareFeature from "../components/softwareFeature"
Expand Down Expand Up @@ -203,66 +202,7 @@ const Main = React.memo(
</div>
</section>

<section className="section">
<div className="container is-max-desktop is-flex is-flex-direction-column">
<h2 id="oss" className="jump-anchor-header-padding title">
<Link to={`#oss`} className="has-text-black">
オープンソース
</Link>
</h2>
<p className="is-size-5">
VOICEVOX は OSS(オープンソース・ソフトウェア)版 VOICEVOX
をもとに構築されています。
</p>
<p className="is-size-5">
製品版と OSS 版の違いやモジュール構成は&nbsp;
<a
href="https://github.com/VOICEVOX/voicevox/blob/main/docs/%E5%85%A8%E4%BD%93%E6%A7%8B%E6%88%90.md"
target="_blank"
rel="noreferrer"
className="has-text-weight-bold is-underlined"
>
VOICEVOX の全体構成
</a>
&nbsp;をご参照ください。
</p>
<p className="is-size-5">
ソフトウェア部分は Electron + Vue 、音声合成エンジン部分は
Python + FastAPI です。
</p>
<p className="is-size-5">
追加したい・改善したい機能があれば、ぜひ開発にご参加ください。
</p>
<div className="buttons mt-3">
<a
className="button is-outlined"
href="https://github.com/VOICEVOX/voicevox"
target="_blank"
rel="noreferrer"
type="button"
role={"button"}
>
<span className="icon">
<FontAwesomeIcon icon={faGithub} />
</span>
<span>VOICEVOX エディター</span>
</a>
<a
className="button is-outlined"
href="https://github.com/VOICEVOX/voicevox_engine"
target="_blank"
rel="noreferrer"
type="button"
role={"button"}
>
<span className="icon">
<FontAwesomeIcon icon={faGithub} />
</span>
<span>VOICEVOX エンジン</span>
</a>
</div>
</div>
</section>
<OssGuidanceSection isDark={false} />

<section className="section">
<div className="container is-max-desktop is-flex is-flex-direction-column">
Expand Down
7 changes: 5 additions & 2 deletions src/pages/song/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { Link } from "gatsby"
import { GatsbyImage } from "gatsby-plugin-image"
import { OssGuidanceSection } from "../../components/ossGuidance"
import PlayButton from "../../components/playButton"
import { CharacterContext, GlobalContext } from "../../contexts/context"
import { useDetailedCharacterInfo } from "../../hooks/useDetailedCharacterInfo"
Expand Down Expand Up @@ -297,8 +298,10 @@ export default () => {
))}
</div>
</div>
</section>

<div className="container explain-humming">
<section className="section">
<div className="container is-max-desktop">
<h2 className="title">ハミングとは?</h2>
<p>
喋り声のデータを用いて音声ライブラリを作成し、
Expand All @@ -309,7 +312,7 @@ export default () => {
</div>
</section>

{/* TODO: トーク側にあるOSSとかの案内を追加 */}
<OssGuidanceSection isDark={true} />
</main>
</Page>
)
Expand Down

0 comments on commit a51b279

Please sign in to comment.