diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a5242e0..93b7b49 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -4,14 +4,13 @@ name: Node.js CI on: -# push: -# branches: [ main ] + # push: + # branches: [ main ] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest strategy: @@ -20,18 +19,18 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run lint - - run: npm run build --if-present - env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - NEXT_PUBLIC_URL_CMS: ${{ secrets.NEXT_PUBLIC_URL_CMS }} - NEXT_PUBLIC_URL_IMG: ${{ secrets.NEXT_PUBLIC_URL_IMG }} - NEXT_PUBLIC_URL_SELF: ${{ secrets.NEXT_PUBLIC_URL_SELF }} - URL_GRAPHQL: ${{ secrets.URL_GRAPHQL }} + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm ci + - run: npm run lint + - run: npm run build --if-present + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + NEXT_PUBLIC_URL_CMS: ${{ secrets.NEXT_PUBLIC_URL_CMS }} + NEXT_PUBLIC_URL_IMG: ${{ secrets.NEXT_PUBLIC_URL_IMG }} + NEXT_PUBLIC_URL_SELF: ${{ secrets.NEXT_PUBLIC_URL_SELF }} + URL_GRAPHQL: ${{ secrets.URL_GRAPHQL }} diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index a2a68c7..fd73e7c 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -218,7 +218,15 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { > {appLayout.mainPanelOpen ? "close" : "menu"} -
{props.navTitle}
+30 + ? "text-xl max-h-14" + : "text-2xl max-h-16" + }`} + > + {props.navTitle} +
{ diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 2307c27..8f4e6a3 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -1,44 +1,167 @@ import AppLayout from "components/AppLayout"; import Button from "components/Button"; +import Chip from "components/Chip"; import ThumbnailHeader from "components/Content/ThumbnailHeader"; import HorizontalLine from "components/HorizontalLine"; +import LanguageSwitcher from "components/LanguageSwitcher"; +import Markdawn from "components/Markdown/Markdawn"; +import TOC from "components/Markdown/TOC"; import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import { getContent, getContentsSlugs } from "graphql/operations"; -import { GetContentQuery } from "graphql/operations-types"; +import RecorderChip from "components/RecorderChip"; +import ToolTip from "components/ToolTip"; +import { getContentsSlugs, getContentText } from "graphql/operations"; +import { GetContentTextQuery } from "graphql/operations-types"; import { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, } from "next"; +import { useRouter } from "next/router"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettyinlineTitle, prettySlug } from "queries/helpers"; +import { + getLocalesFromLanguages, + getStatusDescription, + prettyinlineTitle, + prettyLanguage, + prettySlug, + prettyTestError, + prettyTestWarning, +} from "queries/helpers"; -interface ContentIndexProps extends AppStaticProps { - content: GetContentQuery["contents"]["data"][number]["attributes"]; +interface Props extends AppStaticProps { + content: GetContentTextQuery["contents"]["data"][number]["attributes"]; + contentId: GetContentTextQuery["contents"]["data"][number]["id"]; } -export default function ContentIndex(props: ContentIndexProps): JSX.Element { - const { content, langui } = props; +export default function Content(props: Props): JSX.Element { + useTesting(props); + const { langui, content, languages } = props; + const router = useRouter(); + const locales = getLocalesFromLanguages(content.text_set_languages); + const subPanel = ({langui.source_language}:
+ +{langui.status}:
+ +{langui.transcribers}:
+{langui.translators}:
+{langui.proofreaders}:
+