feat(fonts): preset Sans uses Medeo Sans (replaces Geologica + PT Sans)
This commit is contained in:
1 parent
cd5aefbb14
commit
e5bead9104
106 files changed
+603
-589
No files matched your search
+3
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
## Генерация PDF
|
||||
|
||||
Скрипт `scripts/generate-resume-pdf.mjs` открывает `resume/` через Puppeteer, применяет шрифт geologica (PT Sans), убирает подложку/обводку блока `.resume-doc` и сохраняет PDF.
|
||||
Скрипт `scripts/generate-resume-pdf.mjs` открывает `resume/` через Puppeteer, применяет шрифт medeo (Medeo Sans), убирает подложку/обводку блока `.resume-doc` и сохраняет PDF.
|
||||
|
||||
**Важно**: скрипт требует запущенный dev-сервер (`npm run serve` → `localhost:4175`).
|
||||
|
||||
@@ -15,12 +15,12 @@ npm run generate:resume-pdf
|
||||
или вручную:
|
||||
|
||||
```bash
|
||||
node scripts/generate-resume-pdf.mjs http://localhost:4175/resume/ geologica
|
||||
node scripts/generate-resume-pdf.mjs http://localhost:4175/resume/ medeo
|
||||
```
|
||||
|
||||
Параметры:
|
||||
- `[url]` — URL страницы (по умолчанию `http://localhost:4175/resume/`)
|
||||
- `[font]` — ID шрифта: `geologica`, `merriweather`, `mono` (по умолчанию `geologica`)
|
||||
- `[font]` — ID шрифта: `medeo`, `merriweather`, `mono` (по умолчанию `medeo`)
|
||||
|
||||
### Выходной файл
|
||||
|
||||
|
||||
+51
-51
@@ -1,51 +1,51 @@
|
||||
# Локальные vendor-ассеты (шрифты и Plyr)
|
||||
|
||||
Сайт не использует Google Fonts и jsDelivr в рантайме. Файлы лежат в `public/` и попадают на хостинг через git push.
|
||||
|
||||
## Что где
|
||||
|
||||
| Путь | Содержимое |
|
||||
|------|------------|
|
||||
| `public/assets/fonts/*.css` | Три пресета темы: `merriweather`, `geologica`, `mono` |
|
||||
| `public/assets/fonts/files/*.woff2` | Файлы шрифтов (из `@fontsource/*`) |
|
||||
| `public/vendor/plyr/` | `plyr.css`, `plyr.min.mjs` (из `plyr@3.8.4`) |
|
||||
|
||||
Подключение:
|
||||
|
||||
- Шрифты — inline `theme-init-script` и [`theme-fonts.js`](../public/js/modules/theme/theme-fonts.js).
|
||||
- CSS Plyr — partial [`src/partials/head-plyr.html`](../src/partials/head-plyr.html) только на страницах с `video[data-case-video-player]`.
|
||||
- JS Plyr — [`video-player.js`](../public/js/modules/cases/video-player.js).
|
||||
|
||||
## Обновление
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run vendor:copy
|
||||
```
|
||||
|
||||
Скрипт: [`scripts/copy-vendor.mjs`](../scripts/copy-vendor.mjs). Пересобирает `public/assets/fonts/` и `public/vendor/plyr/` из `node_modules`.
|
||||
|
||||
Полная сборка (vendor + HTML):
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Только HTML из `src/`:
|
||||
|
||||
```bash
|
||||
npm run build:pages
|
||||
```
|
||||
|
||||
## Добавить или изменить шрифт
|
||||
|
||||
1. Установить пакет `@fontsource/...` или `@fontsource-variable/...`.
|
||||
2. Добавить источник в `FONT_BUNDLES` в `copy-vendor.mjs`.
|
||||
3. `npm run vendor:copy`.
|
||||
4. Проверить имена `font-family` в [`public/css/main.css`](../public/css/main.css) (`html[data-font=...]`).
|
||||
|
||||
## Обновить Plyr
|
||||
|
||||
1. Обновить версию в `package.json` (`dependencies.plyr`).
|
||||
2. `npm install` → `npm run vendor:copy`.
|
||||
3. При смене API — правки в `video-player.js`.
|
||||
# Локальные vendor-ассеты (шрифты и Plyr)
|
||||
|
||||
Сайт не использует Google Fonts и jsDelivr в рантайме. Файлы лежат в `public/` и попадают на хостинг через git push.
|
||||
|
||||
## Что где
|
||||
|
||||
| Путь | Содержимое |
|
||||
|------|------------|
|
||||
| `public/assets/fonts/*.css` | Три пресета темы: `merriweather`, `medeo`, `mono` |
|
||||
| `public/assets/fonts/files/*.woff2` | Файлы шрифтов (из `@fontsource/*`, `medeo-font`) |
|
||||
| `public/vendor/plyr/` | `plyr.css`, `plyr.min.mjs` (из `plyr@3.8.4`) |
|
||||
|
||||
Подключение:
|
||||
|
||||
- Шрифты — inline `theme-init-script` и [`theme-fonts.js`](../public/js/modules/theme/theme-fonts.js).
|
||||
- CSS Plyr — partial [`src/partials/head-plyr.html`](../src/partials/head-plyr.html) только на страницах с `video[data-case-video-player]`.
|
||||
- JS Plyr — [`video-player.js`](../public/js/modules/cases/video-player.js).
|
||||
|
||||
## Обновление
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run vendor:copy
|
||||
```
|
||||
|
||||
Скрипт: [`scripts/copy-vendor.mjs`](../scripts/copy-vendor.mjs). Пересобирает `public/assets/fonts/` и `public/vendor/plyr/` из `node_modules`.
|
||||
|
||||
Полная сборка (vendor + HTML):
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
Только HTML из `src/`:
|
||||
|
||||
```bash
|
||||
npm run build:pages
|
||||
```
|
||||
|
||||
## Добавить или изменить шрифт
|
||||
|
||||
1. Установить пакет `@fontsource/...` или `@fontsource-variable/...`.
|
||||
2. Добавить источник в `FONT_BUNDLES` в `copy-vendor.mjs`.
|
||||
3. `npm run vendor:copy`.
|
||||
4. Проверить имена `font-family` в [`public/css/main.css`](../public/css/main.css) (`html[data-font=...]`).
|
||||
|
||||
## Обновить Plyr
|
||||
|
||||
1. Обновить версию в `package.json` (`dependencies.plyr`).
|
||||
2. `npm install` → `npm run vendor:copy`.
|
||||
3. При смене API — правки в `video-player.js`.
|
||||
Reference in new issue
Block a user