Skip to content

Phase5 mobile header fix#8

Merged
ogwata merged 18 commits intomainfrom
phase5-mobile-header-fix
Jan 20, 2026
Merged

Phase5 mobile header fix#8
ogwata merged 18 commits intomainfrom
phase5-mobile-header-fix

Conversation

@ogwata
Copy link
Copy Markdown
Member

@ogwata ogwata commented Jan 19, 2026

概要

本番環境(docs.vivliostyle.org)へのデプロイメント準備として、ドメイン設定、アクセントカラー変更、およびサイドバーリンクの色修正を実施しました。

主な変更内容

1. ドメイン設定の更新

  • docs2.vivliostyle.orgdocs.vivliostyle.org への移行準備
  • CNAMEファイルとAstro設定の更新
  • 各種Vivliostyleビルド設定ファイルのbaseURL更新

2. アクセントカラーの変更

  • 旧: 紫色 (#6b4fa2)
  • 新: 明るい青色 (#3b9eff)
  • グローバルCSS変数の更新
  • 全ページで一貫したカラースキームの適用

3. サイドバーリンク色の修正

  • ブラウザデフォルトの紫色リンクが残っていた問題を解決
  • グローバルCSSに包括的なサイドバーリンクスタイルを追加
  • 通常状態、訪問済み状態、ホバー状態すべてに対応
  • 13ページ以上で動作確認済み

技術的詳細

Astroスロットスコープの課題

  • Astroのslot機構により、ページコンポーネントのスタイルがスロットコンテンツに適用されない制約を確認
  • :global()疑似クラスでも不十分
  • 解決策: public/styles/global.cssにスタイルを追加し、!importantでブラウザデフォルトを上書き

変更ファイル(13ファイル)

  • public/styles/global.css - サイドバーリンクスタイル追加
  • public/CNAME - ドメイン設定
  • astro.config.mjs - サイトURL設定
  • 各種vivliostyle.config-*.jsファイル(6ファイル)- baseURL更新
  • src/pages/{ja,en}/index.astro - ナビゲーションスタイル
  • src/pages/{ja,en}/viewer/[...slug].astro - 戻るリンクスタイル
  • src/pages/{ja,en}/{cli,vfm,themes}/[...slug].astro(6ファイル)- フォールバックカラー更新

テスト済み項目

  • ✅ サイドバーリンクの色(全ページ)
  • ✅ ライトモード/ダークモード両方で確認
  • ✅ Chrome、Firefox、Safariでの動作確認
  • ✅ ホバー状態の動作確認
  • ✅ 訪問済みリンクの色が紫にならないことを確認

デプロイ後の確認事項

  • docs.vivliostyle.org でのアクセス確認
  • DNS設定の確認
  • HTTPS証明書の確認
  • サイトマップの生成確認
  • 全ページでアクセントカラーの適用確認
  • サイドバーリンクの色確認
  • 検索機能の動作確認

関連コミット

  • 1145061: アクセントカラーを紫から青に変更
  • 683aa50: docs.vivliostyle.orgドメインの設定とサイトマップ統合
  • dba87c8: サイドバーリンク色の修正(全ページ対応)

参考資料

  • 開発計画: _investigation/DEVELOPMENT_PLAN-2.md
  • カラー提案: _investigation/COLOR_PROPOSAL.md

ogwata added 11 commits January 15, 2026 21:09
スマホ表示時のヘッダー要素のレイアウト問題を修正。

変更内容:
- ダークモードトグルと言語スイッチをモバイル時はサイドバー上部に移動
- 検索ボックスの幅を柔軟に調整し、画面幅に収まるように改善
- ThemeToggleコンポーネントを複数インスタンスに対応(querySelectorAll使用)

これにより、スマホでヘッダー要素が画面外にはみ出す問題が解消され、
すべてのコントロールに容易にアクセスできるようになった。

修正ファイル:
- src/layouts/DocsLayout.astro
- src/components/ThemeToggle.astro
- src/components/SearchBox.astro

Closes #7 (Task 0)
- Vivliostyle CLI (@vivliostyle/cli)を追加
- 10個のPDF生成config作成(cli/vfm/themes/viewer/reference × ja/en)
- packages/theme-PDFカスタムテーマ作成(package.json, theme.css, README.md)
- @media printでPageNavigation非表示化
- ページ番号を中央のみに修正
- インライン画像(width/height属性, style="width:1.5em")対応
- float画像と後続ul要素の回り込み対応
- 画像ファイルをdist配下にコピー
- .vivliostyleキャッシュディレクトリを.gitignoreに追加
- npm run build:pdfスクリプト群追加
- Analyzed HTML structure of 5 products (CLI, VFM, Themes, Viewer, Reference)
- Created quantitative comparison table (lines, headings, images, special elements)
- Classified products by complexity (lightweight 30-42 lines vs heavyweight 326 lines)
- Identified 3-level image complexity taxonomy (none/simple/styled)
- Evaluated 3 theme design options (single/base+ext/modular)
- Recommended modular theme approach for maintainability

This analysis forms the foundation for Phase 5 theme design strategy.
- Added pros/cons analysis for all 3 options (single/base+ext/modular)
- Explained why Option C (Modular Theme) is recommended
- Added implementation priority phases (Phase 1-4)
- Clarified that modular approach aligns with SSMO design philosophy
- Documented use cases for each option
- Identified current issue: purple (#6b4fa2) has low visibility in dark mode
- Proposed 3 color candidates:
  1. Bright Blue (#3b9eff) - Recommended for brand alignment
  2. Cyan/Teal (#22d3ee) - Modern and fresh appearance
  3. Coral/Orange (#ff7849) - High visibility warm tone
- Added comparison table with contrast ratios and use cases
- Included implementation guide for global.css
- Recommended Bright Blue for best balance of accessibility and brand consistency
- Added HTML color swatches for all 3 candidates
- Displayed current color (#6b4fa2) with visual chip
- Created comparison table with before/after color swatches
- Improved visual clarity for color selection decision
…b compatibility

- Replaced HTML spans with via.placeholder.com color swatches
- GitHub Markdown sanitizes inline styles, so using external images instead
- All color chips now display properly on GitHub
- Converted comparison table to use image-based color swatches
- GitHub was blocking via.placeholder.com images
- Switched to img.shields.io which is widely supported on GitHub
- Used 'for-the-badge' style for better visibility
- All color chips should now display properly
- Changed CNAME from docs2.vivliostyle.org to docs.vivliostyle.org
- Updated site URL in astro.config.mjs
- Added @astrojs/sitemap integration for SEO
- Verified build succeeds (57 pages generated)
- All internal links use relative paths (no hardcoded domains)
- Ready for production deployment to docs.vivliostyle.org
- Changed primary color from #6b4fa2 (purple) to #3b9eff (bright blue)
- Updated primary-light: #5eb0ff
- Updated primary-dark: #2080e0
- Improves visibility in dark mode
- Better alignment with Vivliostyle brand colors
- See _investigation/COLOR_PROPOSAL.md for detailed analysis
- Add sidebar link styles to global.css for all sidebar links
- Update fallback colors from #0066cc to #3b9eff in themes/vfm/cli pages
- Add link styles to index and viewer pages
- Apply :global() to reference page sidebar styles to ensure proper scoping
- All sidebar links now use var(--color-text) for normal state and var(--color-primary) for hover state
@ogwata ogwata self-assigned this Jan 19, 2026
@ogwata ogwata added the documentation Improvements or additions to documentation label Jan 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the documentation site for production deployment to docs.vivliostyle.org with three main improvements: domain configuration updates, accent color changes for better dark mode visibility, and mobile header layout fixes.

Changes:

  • Updated domain from docs2.vivliostyle.org to docs.vivliostyle.org in CNAME and Astro config
  • Changed accent color from purple (#6b4fa2) to bright blue (#3b9eff) for improved dark mode accessibility
  • Fixed mobile header by moving theme toggle and language switcher into the sidebar menu for better responsive design
  • Added comprehensive PDF generation support with 10 Vivliostyle config files and a new PDF theme
  • Fixed sidebar link colors across all pages to use consistent theming instead of browser defaults

Reviewed changes

Copilot reviewed 36 out of 48 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
public/CNAME Updated domain to docs.vivliostyle.org
astro.config.mjs Updated site URL and added sitemap integration
public/styles/global.css Changed accent colors and added comprehensive sidebar link styling
src/layouts/DocsLayout.astro Added mobile controls in sidebar with theme toggle and language switcher
src/components/ThemeToggle.astro Updated to support multiple toggle instances (header + sidebar)
src/components/SearchBox.astro Removed min-width constraint for better mobile flexibility
vivliostyle.config-*.js (10 files) Added PDF generation configurations for all documentation sections
packages/theme-PDF/* New PDF theme with print-optimized styles and web element removal
public/styles/pdf.css PDF-specific styles (duplicate of theme-PDF/theme.css)
package.json Added Vivliostyle CLI dependencies and PDF build scripts
src/pages/*/[...slug].astro (12 files) Updated fallback colors and added sidebar link styling
_investigation/*.md Documentation for Phase 5 planning and color proposals

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/en/reference/[...slug].astro Outdated
Comment thread package.json
Comment thread public/styles/pdf.css
Comment thread packages/theme-PDF/theme.css
Comment thread src/components/ThemeToggle.astro
Comment thread public/styles/global.css Outdated
Comment thread vivliostyle.config-viewer-ja.js
Comment thread packages/theme-PDF/theme.css
Comment thread src/components/SearchBox.astro
Comment thread src/pages/ja/reference/[...slug].astro Outdated
- Remove duplicate sidebar link styles in reference pages (en/ja)
- Internationalize ThemeToggle aria-labels for ja/en support
- Remove duplicate max-width rule in global.css @media print
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 48 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread public/styles/global.css Outdated
Comment thread src/pages/ja/reference/[...slug].astro Outdated
Comment thread packages/theme-PDF/package.json Outdated
Comment thread src/pages/ja/reference/[...slug].astro Outdated
Comment thread src/pages/en/reference/[...slug].astro Outdated
Comment thread src/pages/en/reference/[...slug].astro Outdated
Comment thread _investigation/phase5-issue.md Outdated
Comment thread _investigation/phase5-issue.md Outdated
Comment thread _investigation/PRODUCT_STRUCTURE_ANALYSIS.md
- Remove duplicate sidebar link styles from reference pages (global.css already handles)
- Update repository URLs from docs2 to docs for consistency
- Update internal documentation URLs in _investigation files
- Remove overly broad .sidebar a selector
- Remove important to allow active/selected link states to work properly
- Keep specific selectors for navigation links only
Comment thread README.md Outdated
@MurakamiShinyu
Copy link
Copy Markdown
Member

ダークモードで、「前へ」・「次へ」のリンクのボタンをホーバーしたとき、背景色が白くなりますがタイトルがダークモードでの通常テキストの色のままなので、見えにくくなります。

これはこのプルリクエストの内容ではないですが気になったのでコメントしておきます。

修正案:

src/components/PageNavigation.astro#83 の .nav-link:not(.nav-disabled):hover {…}color: var(--color-text-light, #808080); を追加。

src/components/PageNavigation.astro#108 の .nav-title {…}color: var(--color-text, #1f2937); を削除する(親要素の .nav-link で同じ color が指定されているので不要。親要素のhoverで変わったcolorが継承されるように)。

- Add lighter text color on hover for better contrast with white background
- Remove redundant color declaration from nav-title to inherit hover state
@ogwata
Copy link
Copy Markdown
Member Author

ogwata commented Jan 20, 2026

ありがとうございます。c6380a2で対応しました。

Copy link
Copy Markdown
Member

@MurakamiShinyu MurakamiShinyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よいと思います

@ogwata ogwata merged commit 2f95088 into main Jan 20, 2026
3 checks passed
@ogwata ogwata deleted the phase5-mobile-header-fix branch January 20, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants