mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 10:00:17 +05:30
feat: reorganize toolbar into grouped sections with separators
- Grouped toolbar buttons into logical sections: Format, Structure, Insert, View - Added toolbar-group CSS class for visual grouping - Updated button titles with keyboard shortcut hints - Enhanced status bar HTML structure with left/right layout
This commit is contained in:
+56
-29
@@ -33,19 +33,32 @@
|
|||||||
<button class="new-tab-button" id="new-tab-btn" title="New tab">+</button>
|
<button class="new-tab-button" id="new-tab-btn" title="New tab">+</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<button id="btn-bold" title="Bold">
|
<div class="toolbar-group">
|
||||||
|
<!-- Format: Bold, Italic, Strikethrough -->
|
||||||
|
<button id="btn-bold" title="Bold (Ctrl+B)">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>
|
<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>
|
||||||
<path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>
|
<path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="btn-italic" title="Italic">
|
<button id="btn-italic" title="Italic (Ctrl+I)">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<line x1="19" y1="4" x2="10" y2="4"></line>
|
<line x1="19" y1="4" x2="10" y2="4"></line>
|
||||||
<line x1="14" y1="20" x2="5" y2="20"></line>
|
<line x1="14" y1="20" x2="5" y2="20"></line>
|
||||||
<line x1="15" y1="4" x2="9" y2="20"></line>
|
<line x1="15" y1="4" x2="9" y2="20"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<button id="btn-strikethrough" title="Strikethrough">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
|
<path d="M16 4H9a3 3 0 0 0-2.83 4"></path>
|
||||||
|
<path d="M14 12a4 4 0 0 1 0 8H6"></path>
|
||||||
|
<line x1="4" y1="12" x2="20" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="toolbar-separator"></div>
|
||||||
|
<div class="toolbar-group">
|
||||||
|
<!-- Structure: Heading, List, Quote -->
|
||||||
<button id="btn-heading" title="Heading">
|
<button id="btn-heading" title="Heading">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<polyline points="4 7 4 4 20 4 20 7"></polyline>
|
<polyline points="4 7 4 4 20 4 20 7"></polyline>
|
||||||
@@ -53,18 +66,6 @@
|
|||||||
<line x1="12" y1="4" x2="12" y2="20"></line>
|
<line x1="12" y1="4" x2="12" y2="20"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="btn-link" title="Link">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
||||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
||||||
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<button id="btn-code" title="Code">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
||||||
<polyline points="16 18 22 12 16 6"></polyline>
|
|
||||||
<polyline points="8 6 2 12 8 18"></polyline>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<button id="btn-list" title="List">
|
<button id="btn-list" title="List">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<line x1="8" y1="6" x2="21" y2="6"></line>
|
<line x1="8" y1="6" x2="21" y2="6"></line>
|
||||||
@@ -81,20 +82,20 @@
|
|||||||
<path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"></path>
|
<path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="btn-table" title="Insert Table">
|
</div>
|
||||||
|
<div class="toolbar-separator"></div>
|
||||||
|
<div class="toolbar-group">
|
||||||
|
<!-- Insert: Link, Code, Code Block, Table, HR -->
|
||||||
|
<button id="btn-link" title="Link">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
||||||
<line x1="3" y1="9" x2="21" y2="9"></line>
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||||
<line x1="3" y1="15" x2="21" y2="15"></line>
|
|
||||||
<line x1="9" y1="3" x2="9" y2="21"></line>
|
|
||||||
<line x1="15" y1="3" x2="15" y2="21"></line>
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="btn-strikethrough" title="Strikethrough">
|
<button id="btn-code" title="Inline Code (Ctrl+`)">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M16 4H9a3 3 0 0 0-2.83 4"></path>
|
<polyline points="16 18 22 12 16 6"></polyline>
|
||||||
<path d="M14 12a4 4 0 0 1 0 8H6"></path>
|
<polyline points="8 6 2 12 8 18"></polyline>
|
||||||
<line x1="4" y1="12" x2="20" y2="12"></line>
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button id="btn-code-block" title="Code Block">
|
<button id="btn-code-block" title="Code Block">
|
||||||
@@ -104,6 +105,15 @@
|
|||||||
<path d="m14 10 2 2-2 2"></path>
|
<path d="m14 10 2 2-2 2"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<button id="btn-table" title="Insert Table">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
||||||
|
<line x1="3" y1="9" x2="21" y2="9"></line>
|
||||||
|
<line x1="3" y1="15" x2="21" y2="15"></line>
|
||||||
|
<line x1="9" y1="3" x2="9" y2="21"></line>
|
||||||
|
<line x1="15" y1="3" x2="15" y2="21"></line>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
<button id="btn-horizontal-rule" title="Horizontal Rule">
|
<button id="btn-horizontal-rule" title="Horizontal Rule">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
@@ -111,7 +121,10 @@
|
|||||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
<div class="toolbar-separator"></div>
|
<div class="toolbar-separator"></div>
|
||||||
|
<div class="toolbar-group">
|
||||||
|
<!-- View: Find, Line Numbers, Preview -->
|
||||||
<button id="btn-find" title="Find & Replace (Ctrl+F)">
|
<button id="btn-find" title="Find & Replace (Ctrl+F)">
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<circle cx="11" cy="11" r="8"></circle>
|
<circle cx="11" cy="11" r="8"></circle>
|
||||||
@@ -125,14 +138,14 @@
|
|||||||
<path d="M3 18h18"></path>
|
<path d="M3 18h18"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="toolbar-separator"></div>
|
<button id="btn-preview-toggle" title="Toggle Preview (Ctrl+Shift+P)">
|
||||||
<button id="btn-preview-toggle" title="Toggle Preview">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
|
||||||
<circle cx="12" cy="12" r="3"></circle>
|
<circle cx="12" cy="12" r="3"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Find & Replace Dialog -->
|
<!-- Find & Replace Dialog -->
|
||||||
<div id="find-dialog" class="find-dialog hidden">
|
<div id="find-dialog" class="find-dialog hidden">
|
||||||
@@ -1448,9 +1461,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="status-bar">
|
<div class="status-bar" id="status-bar">
|
||||||
<span id="status-text">Ready</span>
|
<div class="status-bar-left">
|
||||||
<span id="word-count">Words: 0 | Characters: 0</span>
|
<span class="status-item" id="status-text">Ready</span>
|
||||||
|
<span class="status-separator">|</span>
|
||||||
|
<span class="status-item" id="status-file-path" title=""></span>
|
||||||
|
</div>
|
||||||
|
<div class="status-bar-right">
|
||||||
|
<span class="status-item" id="word-count">Words: 0</span>
|
||||||
|
<span class="status-separator">|</span>
|
||||||
|
<span class="status-item" id="char-count">Chars: 0</span>
|
||||||
|
<span class="status-separator">|</span>
|
||||||
|
<span class="status-item" id="line-col">Ln 1, Col 1</span>
|
||||||
|
<span class="status-separator">|</span>
|
||||||
|
<span class="status-item" id="encoding">UTF-8</span>
|
||||||
|
<span class="status-separator">|</span>
|
||||||
|
<span class="status-item" id="language-mode">Markdown</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user