Skip to content

Commit ca64f98

Browse files
committed
fix(template): center content in single file mode
- Reset body max-width to allow full-width container - Content now properly centered with margin: 0 auto
1 parent b41ee64 commit ca64f98

4 files changed

Lines changed: 26 additions & 2 deletions

File tree

CHANGELOG-en.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [0.5.9] - 2026-01-28
11+
12+
### Fixed
13+
14+
- **Single file mode layout fix**
15+
- Fixed content being left-aligned instead of centered
16+
- Resolved conflict with theme CSS body styles
17+
- Content now properly centered on the page
18+
1019
## [0.5.8] - 2026-01-28
1120

1221
### Changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
フォーマットは [Keep a Changelog](https://keepachangelog.com/ja/1.0.0/) に基づいており、
88
このプロジェクトは [Semantic Versioning](https://semver.org/lang/ja/) に準拠しています。
99

10+
## [0.5.9] - 2026-01-28
11+
12+
### 修正
13+
14+
- **シングルファイルモードのレイアウト修正**
15+
- コンテンツが左寄りになる問題を修正
16+
- テーマCSSの `body` スタイルとの競合を解決
17+
- コンテンツが正しく中央に配置されるように
18+
1019
## [0.5.8] - 2026-01-28
1120

1221
### 変更

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vimd",
3-
"version": "0.5.8",
3+
"version": "0.5.9",
44
"description": "Real-time Markdown preview tool with pandoc (view markdown)",
55
"type": "module",
66
"keywords": [

templates/single-file.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@
1414
box-sizing: border-box;
1515
}
1616

17-
html, body {
17+
html {
1818
margin: 0;
1919
padding: 0;
2020
width: 100%;
2121
height: 100%;
2222
}
2323

24+
/* Reset theme's body constraints for full-width container */
2425
body {
26+
margin: 0 !important;
27+
padding: 0 !important;
28+
max-width: none !important;
29+
width: 100% !important;
30+
height: 100%;
2531
overflow: hidden;
2632
}
2733

0 commit comments

Comments
 (0)