From 496c22974df976c6a27100535bbcb958ab6bb6e3 Mon Sep 17 00:00:00 2001 From: Satsuki Akiba Date: Wed, 25 Oct 2023 20:55:58 +0900 Subject: [PATCH] Some style fixes --- .dockerignore | 5 +++++ .gitignore | 1 + .gitlab-ci.yml | 19 +++-------------- Dockerfile | 24 +++++++++++++++++++++ licese-report.json | 6 +----- src/EXTERNAL_LICENSE.md | 3 +++ src/LICENSE.md | 14 +++++------- src/README.md | 2 -- src/SUMMARY.md | 6 +++++- src/_layouts/ebook/page.html | 13 ++++++++++++ src/_styles/base.css | 41 ++++-------------------------------- src/_styles/ebook.css | 4 ++++ 12 files changed, 68 insertions(+), 70 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 src/EXTERNAL_LICENSE.md create mode 100644 src/_layouts/ebook/page.html create mode 100644 src/_styles/ebook.css diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3386a7a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +_book +target +EXTERNAL_LICENSE_REPORT.md +.pnpm-store diff --git a/.gitignore b/.gitignore index 02b2ecb..3386a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules _book target EXTERNAL_LICENSE_REPORT.md +.pnpm-store diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3ac2e23..6697af4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ release: --assets-link "{\"name\":\"book.epub\", \"url\":\"${PACKAGE_REGISTRY_URL}/book-${CI_COMMIT_TAG}.epub\"}" --assets-link "{\"name\":\"book.mobi\", \"url\":\"${PACKAGE_REGISTRY_URL}/book-${CI_COMMIT_TAG}.mobi\"}" -image: node:lts-bullseye +image: docker:24.0.5 pages: stage: build cache: @@ -38,21 +38,8 @@ pages: paths: - node_modules/ script: - - apt-get update && apt-get install -y calibre --no-install-recommends - - - apt-get update && apt-get install -y fontconfig unzip sudo - - unzip "./fonts/*.zip" -d /usr/share/fonts/ - && fc-cache -fv - - - mkdir -p /etc/fonts/conf.d && - cp -a ./fonts/fonts.conf /etc/fonts/conf.d/99-firgenerd.conf && - fc-cache -fv - - - sudo corepack enable - - sudo -u node pnpm install - - - sudo -u node env LANG=ja_JP.UTF-8 pnpm run build - + - docker build -t devlifefrommodernway . + - docker run -v ./:/build devlifefrommodernway - cp -a _book/. public/ artifacts: paths: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..38033dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM node:lts-bullseye + +WORKDIR /build + +RUN apt-get update && apt-get install -y calibre --no-install-recommends + +RUN apt-get update && apt-get install -y fontconfig unzip sudo + +COPY ./fonts /build/fonts + +RUN unzip "./fonts/*.zip" -d /usr/share/fonts/ && fc-cache -fv + +RUN mkdir -p /etc/fonts/conf.d && \ + cp -a ./fonts/fonts.conf /etc/fonts/conf.d/99-firgenerd.conf && fc-cache -fv + +RUN sudo corepack enable + + +ENV LANG=ja_JP.UTF-8 + +USER node + +ENTRYPOINT exec sh -c "pnpm install && pnpm run build" + diff --git a/licese-report.json b/licese-report.json index 7c832fc..46efed1 100644 --- a/licese-report.json +++ b/licese-report.json @@ -2,10 +2,6 @@ "fields": [ "name", "author", - "licenseType", - "link", - "installedVersion", - "licensePeriod", - "comment" + "link" ] } diff --git a/src/EXTERNAL_LICENSE.md b/src/EXTERNAL_LICENSE.md new file mode 100644 index 0000000..872120d --- /dev/null +++ b/src/EXTERNAL_LICENSE.md @@ -0,0 +1,3 @@ +# その他の使用ライブラリ等の外部ライセンス + +{% include "./EXTERNAL_LICENSE_REPORT.md" %} diff --git a/src/LICENSE.md b/src/LICENSE.md index 60f6495..acebd05 100644 --- a/src/LICENSE.md +++ b/src/LICENSE.md @@ -1,4 +1,4 @@ -# ライセンス情報 +# ページのライセンス情報 ## 本文 @@ -14,12 +14,8 @@ > You should have received a copy of the license along with this > work. If not, see . -# フォント +## フォント -| Name | Author | License type | Link | -| :---- | :----------- | :-------------------- | :----------------------------- | -| Firge | Yuko OTAWARA | SIL Open Font License | https://github.com/yuru7/Firge | - -## その他の使用ライブラリ等の外部ライセンス - -{%include "EXTERNAL_LICENSE_REPORT.md" %} +| Name | Author | Link | +| :---- | :----------- | :----------------------------- | +| Firge | Yuko OTAWARA | https://github.com/yuru7/Firge | diff --git a/src/README.md b/src/README.md index 26be243..0a428d2 100644 --- a/src/README.md +++ b/src/README.md @@ -12,8 +12,6 @@ > > **link: ** ---- - > [!danger] **注意**: > > 本リポジトリは余裕をもって、片手間にでも読み進めることを想定しています。 diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 627557b..de7c0e4 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -8,4 +8,8 @@ ## リポジトリ情報 -- [LICENSE](LICENSE.md) +### ライセンス情報 + +- [ページのライセンス情報](./LICENSE.md) + +- [その他の使用ライブラリ等の外部ライセンス](./EXTERNAL_LICENSE.md) diff --git a/src/_layouts/ebook/page.html b/src/_layouts/ebook/page.html new file mode 100644 index 0000000..95d8da7 --- /dev/null +++ b/src/_layouts/ebook/page.html @@ -0,0 +1,13 @@ + +{% extends template.self %} +{% extends "../layout.html" %} + + +{% block title %}{{ page.title }}{% endblock %} +{% block description %}{{ page.description }}{% endblock %} + + +{% block style %} + {{ super() }} + +{% endblock %} diff --git a/src/_styles/base.css b/src/_styles/base.css index 9a9dcb8..ae3497c 100644 --- a/src/_styles/base.css +++ b/src/_styles/base.css @@ -52,52 +52,19 @@ } /* Table responsive */ - table { - width: 100%; + width: 50%; border-top: 1px solid #ccc; border-left: 1px solid #ccc; border-collapse: collapse; border-spacing: 0; } -th, -td { +.markdown-section table td, +.markdown-section table th { width: 16.6%; padding: 0.6em 1em; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; -} - -@media screen and (max-width: 640px) { - body { - overflow: hidden; - } - - table { - display: flex; - } - - thead { - white-space: nowrap; - } - - tbody { - overflow-x: scroll; - white-space: nowrap; - } - - tbody tr { - display: inline-block; - } - - tbody tr:last-child { - margin-left: -5px; - } - - th, - td { - display: block; - width: auto; - } + word-break: break-word; } diff --git a/src/_styles/ebook.css b/src/_styles/ebook.css new file mode 100644 index 0000000..31fc4f3 --- /dev/null +++ b/src/_styles/ebook.css @@ -0,0 +1,4 @@ +.markdown-section table td, +.markdown-section table th { + word-wrap: break-word; +}