1 Commits

Author SHA1 Message Date
496c22974d Some style fixes 2023-10-25 20:55:58 +09:00
12 changed files with 68 additions and 70 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
node_modules
_book
target
EXTERNAL_LICENSE_REPORT.md
.pnpm-store

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ node_modules
_book _book
target target
EXTERNAL_LICENSE_REPORT.md EXTERNAL_LICENSE_REPORT.md
.pnpm-store

View File

@ -28,7 +28,7 @@ release:
--assets-link "{\"name\":\"book.epub\", \"url\":\"${PACKAGE_REGISTRY_URL}/book-${CI_COMMIT_TAG}.epub\"}" --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\"}" --assets-link "{\"name\":\"book.mobi\", \"url\":\"${PACKAGE_REGISTRY_URL}/book-${CI_COMMIT_TAG}.mobi\"}"
image: node:lts-bullseye image: docker:24.0.5
pages: pages:
stage: build stage: build
cache: cache:
@ -38,21 +38,8 @@ pages:
paths: paths:
- node_modules/ - node_modules/
script: script:
- apt-get update && apt-get install -y calibre --no-install-recommends - docker build -t devlifefrommodernway .
- docker run -v ./:/build devlifefrommodernway
- 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
- cp -a _book/. public/ - cp -a _book/. public/
artifacts: artifacts:
paths: paths:

24
Dockerfile Normal file
View File

@ -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"

View File

@ -2,10 +2,6 @@
"fields": [ "fields": [
"name", "name",
"author", "author",
"licenseType", "link"
"link",
"installedVersion",
"licensePeriod",
"comment"
] ]
} }

3
src/EXTERNAL_LICENSE.md Normal file
View File

@ -0,0 +1,3 @@
# その他の使用ライブラリ等の外部ライセンス
{% include "./EXTERNAL_LICENSE_REPORT.md" %}

View File

@ -1,4 +1,4 @@
# ライセンス情報 # ページのライセンス情報
## 本文 ## 本文
@ -14,12 +14,8 @@
> You should have received a copy of the license along with this > You should have received a copy of the license along with this
> work. If not, see <https://creativecommons.org/licenses/by/4.0/>. > work. If not, see <https://creativecommons.org/licenses/by/4.0/>.
# フォント ## フォント
| Name | Author | License type | Link | | Name | Author | Link |
| :---- | :----------- | :-------------------- | :----------------------------- | | :---- | :----------- | :----------------------------- |
| Firge | Yuko OTAWARA | SIL Open Font License | https://github.com/yuru7/Firge | | Firge | Yuko OTAWARA | https://github.com/yuru7/Firge |
## その他の使用ライブラリ等の外部ライセンス
{%include "EXTERNAL_LICENSE_REPORT.md" %}

View File

@ -12,8 +12,6 @@
> >
> **link: <https://gitlab.com/DevLifeFromModernWay/devlifefrommodernway.gitlab.io/-/releases/permalink/latest>** > **link: <https://gitlab.com/DevLifeFromModernWay/devlifefrommodernway.gitlab.io/-/releases/permalink/latest>**
---
> [!danger] **注意**: > [!danger] **注意**:
> >
> 本リポジトリは余裕をもって、片手間にでも読み進めることを想定しています。 > 本リポジトリは余裕をもって、片手間にでも読み進めることを想定しています。

View File

@ -8,4 +8,8 @@
## リポジトリ情報 ## リポジトリ情報
- [LICENSE](LICENSE.md) ### ライセンス情報
- [ページのライセンス情報](./LICENSE.md)
- [その他の使用ライブラリ等の外部ライセンス](./EXTERNAL_LICENSE.md)

View File

@ -0,0 +1,13 @@
<!-- prettier-ignore -->
{% extends template.self %}
{% extends "../layout.html" %}
<!-- prettier-ignore -->
{% block title %}{{ page.title }}{% endblock %}
{% block description %}{{ page.description }}{% endblock %}
<!-- prettier-ignore -->
{% block style %}
{{ super() }}
<link rel="stylesheet" href="/_styles/ebook.css" />
{% endblock %}

View File

@ -52,52 +52,19 @@
} }
/* Table responsive */ /* Table responsive */
table { table {
width: 100%; width: 50%;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
th, .markdown-section table td,
td { .markdown-section table th {
width: 16.6%; width: 16.6%;
padding: 0.6em 1em; padding: 0.6em 1em;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} word-break: break-word;
@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;
}
} }

4
src/_styles/ebook.css Normal file
View File

@ -0,0 +1,4 @@
.markdown-section table td,
.markdown-section table th {
word-wrap: break-word;
}