Compare commits

...
1 Commits
Author SHA1 Message Date
amitwhandClaude aac496923e Add font size adjustment menu and fix theme styling
Features:
• Added Font Size menu in View with increase/decrease/reset options
• Keyboard shortcuts: Ctrl+Shift+Plus/Minus/0 for font adjustment
• Font size persists between sessions using localStorage
• Font sizes adjustable from 10px to 24px

Theme Fixes:
• Fixed missing Monokai theme styles for tabs and editor
• Added complete tab styling for Solarized theme
• Added complete tab styling for GitHub theme
• All themes now have consistent tab bar appearance

Other Changes:
• Updated CLAUDE.md with v1.3.x features documentation
• Version bumped to 1.3.4

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 21:41:28 +05:30
5 changed files with 197 additions and 6 deletions
+35 -4
View File
@@ -4,7 +4,7 @@
**PanConverter** is a cross-platform Markdown editor and converter powered by Pandoc, built with Electron. It provides professional-grade editing capabilities with comprehensive export options. **PanConverter** is a cross-platform Markdown editor and converter powered by Pandoc, built with Electron. It provides professional-grade editing capabilities with comprehensive export options.
**Current Version**: v1.2.1 **Current Version**: v1.3.3
**Author**: Amit Haridas (amit.wh@gmail.com) **Author**: Amit Haridas (amit.wh@gmail.com)
**License**: MIT **License**: MIT
**Repository**: https://github.com/amitwh/pan-converter **Repository**: https://github.com/amitwh/pan-converter
@@ -23,14 +23,15 @@
``` ```
src/ src/
├── main.js # Electron main process, menu system, IPC handlers ├── main.js # Electron main process, menu system, IPC handlers
├── renderer.js # UI logic, editor functionality, event handling ├── renderer.js # TabManager class, multi-file editing, event handling
├── index.html # Application layout and components ├── index.html # Application layout with tabbed interface
└── styles.css # Comprehensive styling with multi-theme support └── styles.css # Comprehensive styling with multi-theme support
assets/ assets/
└── icon.png # Application icon └── icon.png # Application icon
package.json # Dependencies and build configuration package.json # Dependencies and build configuration
CLAUDE.md # Development documentation for AI assistants
``` ```
## Development Commands ## Development Commands
@@ -108,6 +109,36 @@ gh release create v1.2.1 --title "Title" --notes "Release notes" \
## Feature Implementation Guide ## Feature Implementation Guide
### v1.3.x Tabbed Interface & Enhanced Features
#### 🗂️ Tabbed Multi-File Support (v1.3.0)
**TabManager Class** (`src/renderer.js`)
- Complete tab management system for multiple files
- Tab switching, creation, and closure
- State preservation per tab (content, cursor position, scroll)
- File path tracking for each tab
- Keyboard shortcuts: `Ctrl/Cmd+T` (new tab), `Ctrl/Cmd+W` (close tab)
#### 🎯 Enhanced PDF Export (v1.3.0)
**Multi-Engine Fallback System** (`src/main.js:239-280`)
- Primary: XeLaTeX with proper margins
- Fallback 1: PDFLaTeX
- Fallback 2: wkhtmltopdf
- Automatic engine detection and switching
#### 📁 File Association Support (v1.3.1)
**OS Integration** (`src/main.js:452-498`, `package.json:50-65`)
- Double-click .md files to open in PanConverter
- Command-line argument handling
- Pending file queue for startup loading
#### 🎨 Typography & Spacing (v1.3.2-1.3.3)
**Preview Enhancement** (`src/styles.css`)
- Restored ideal text spacing from v1.0
- Font sizes increased to 15px for better readability
- Comprehensive selector coverage for legacy and new containers
- Theme-aware typography for all content types
### v1.2.1 Comprehensive Editor Enhancements ### v1.2.1 Comprehensive Editor Enhancements
#### ✨ Advanced Editor Features #### ✨ Advanced Editor Features
@@ -300,4 +331,4 @@ gh release create v1.2.1 --title "Title" --notes "Release notes" \
--- ---
**Last Updated**: September 1, 2025 **Last Updated**: September 1, 2025
**Claude Assistant**: Development completed for v1.2.1 comprehensive editor enhancements **Claude Assistant**: Development completed for v1.3.3 with tabbed interface, enhanced PDF export, file associations, and improved typography
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pan-converter", "name": "pan-converter",
"version": "1.3.3", "version": "1.3.4",
"description": "Cross-platform Markdown editor and converter using Pandoc", "description": "Cross-platform Markdown editor and converter using Pandoc",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {
+22 -1
View File
@@ -153,6 +153,27 @@ function createMenu() {
] ]
}, },
{ type: 'separator' }, { type: 'separator' },
{
label: 'Font Size',
submenu: [
{
label: 'Increase Font Size',
accelerator: 'CmdOrCtrl+Shift+Plus',
click: () => mainWindow.webContents.send('adjust-font-size', 'increase')
},
{
label: 'Decrease Font Size',
accelerator: 'CmdOrCtrl+Shift+-',
click: () => mainWindow.webContents.send('adjust-font-size', 'decrease')
},
{
label: 'Reset Font Size',
accelerator: 'CmdOrCtrl+Shift+0',
click: () => mainWindow.webContents.send('adjust-font-size', 'reset')
}
]
},
{ type: 'separator' },
{ label: 'Reload', accelerator: 'CmdOrCtrl+R', role: 'reload' }, { label: 'Reload', accelerator: 'CmdOrCtrl+R', role: 'reload' },
{ label: 'Toggle DevTools', accelerator: 'F12', role: 'toggleDevTools' }, { label: 'Toggle DevTools', accelerator: 'F12', role: 'toggleDevTools' },
{ type: 'separator' }, { type: 'separator' },
@@ -171,7 +192,7 @@ function createMenu() {
type: 'info', type: 'info',
title: 'About PanConverter', title: 'About PanConverter',
message: 'PanConverter', message: 'PanConverter',
detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 1.3.3\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nFeatures:\n• Tabbed interface for multiple files\n• Advanced markdown editing with live preview\n• Enhanced PDF export with LaTeX engines\n• File association support for .md files\n• Improved preview typography and spacing\n• Enhanced font sizes for better readability\n• Find & replace with match highlighting\n• Line numbers and auto-indentation\n• Export to multiple formats via Pandoc\n• PowerPoint & presentation export\n• Export tables to Excel/ODS spreadsheets\n• Document import & conversion\n• Table creation helper\n• Multiple themes support\n• Undo/redo functionality', detail: 'A cross-platform Markdown editor and converter using Pandoc.\n\nVersion: 1.3.4\nAuthor: Amit Haridas\nEmail: amit.wh@gmail.com\nLicense: MIT\n\nFeatures:\n• Tabbed interface for multiple files\n• Advanced markdown editing with live preview\n• Enhanced PDF export with LaTeX engines\n• File association support for .md files\n• Improved preview typography and spacing\n• Adjustable font sizes via menu (Ctrl+Shift+Plus/Minus)\n• Complete theme support including Monokai fixes\n• Find & replace with match highlighting\n• Line numbers and auto-indentation\n• Export to multiple formats via Pandoc\n• PowerPoint & presentation export\n• Export tables to Excel/ODS spreadsheets\n• Document import & conversion\n• Table creation helper\n• Multiple themes support\n• Undo/redo functionality',
buttons: ['OK'] buttons: ['OK']
}); });
} }
+32
View File
@@ -538,3 +538,35 @@ ipcRenderer.on('toggle-find', () => {
ipcRenderer.on('theme-changed', (event, theme) => { ipcRenderer.on('theme-changed', (event, theme) => {
document.body.className = `theme-${theme}`; document.body.className = `theme-${theme}`;
}); });
// Font size adjustment
let currentFontSize = parseInt(localStorage.getItem('fontSize')) || 15;
function updateFontSizes(size) {
const editors = document.querySelectorAll('#editor, .editor-textarea');
const previews = document.querySelectorAll('#preview, .preview-content');
editors.forEach(editor => {
editor.style.fontSize = `${size}px`;
});
previews.forEach(preview => {
preview.style.fontSize = `${size}px`;
});
localStorage.setItem('fontSize', size);
}
// Apply saved font size on load
updateFontSizes(currentFontSize);
ipcRenderer.on('adjust-font-size', (event, action) => {
if (action === 'increase' && currentFontSize < 24) {
currentFontSize++;
} else if (action === 'decrease' && currentFontSize > 10) {
currentFontSize--;
} else if (action === 'reset') {
currentFontSize = 15;
}
updateFontSizes(currentFontSize);
});
+107
View File
@@ -469,6 +469,40 @@ body.theme-solarized {
color: #657b83; color: #657b83;
} }
body.theme-solarized .tab-bar {
background: #eee8d5;
border-bottom-color: #93a1a1;
}
body.theme-solarized .tab {
background: #fdf6e3;
border-color: #93a1a1;
color: #657b83;
}
body.theme-solarized .tab.active {
background: #fdf6e3;
border-color: #859900;
}
body.theme-solarized .tab-close {
color: #657b83;
}
body.theme-solarized .tab-close:hover {
background: #93a1a1;
color: #dc322f;
}
body.theme-solarized .new-tab-button {
border-color: #93a1a1;
color: #657b83;
}
body.theme-solarized .new-tab-button:hover {
background: #eee8d5;
}
body.theme-solarized .toolbar { body.theme-solarized .toolbar {
background: #eee8d5; background: #eee8d5;
border-bottom-color: #93a1a1; border-bottom-color: #93a1a1;
@@ -510,6 +544,40 @@ body.theme-monokai {
color: #f8f8f2; color: #f8f8f2;
} }
body.theme-monokai .tab-bar {
background: #3e3d32;
border-bottom-color: #75715e;
}
body.theme-monokai .tab {
background: #49483e;
border-color: #75715e;
color: #f8f8f2;
}
body.theme-monokai .tab.active {
background: #272822;
border-color: #a6e22e;
}
body.theme-monokai .tab-close {
color: #f8f8f2;
}
body.theme-monokai .tab-close:hover {
background: #75715e;
color: #f92672;
}
body.theme-monokai .new-tab-button {
border-color: #75715e;
color: #f8f8f2;
}
body.theme-monokai .new-tab-button:hover {
background: #49483e;
}
body.theme-monokai .toolbar { body.theme-monokai .toolbar {
background: #3e3d32; background: #3e3d32;
border-bottom-color: #75715e; border-bottom-color: #75715e;
@@ -529,6 +597,11 @@ body.theme-monokai #editor {
color: #f8f8f2; color: #f8f8f2;
} }
body.theme-monokai .editor-textarea {
background: #272822;
color: #f8f8f2;
}
body.theme-monokai #preview-pane { body.theme-monokai #preview-pane {
background: #272822; background: #272822;
} }
@@ -571,6 +644,40 @@ body.theme-github {
color: #24292e; color: #24292e;
} }
body.theme-github .tab-bar {
background: #fafbfc;
border-bottom-color: #e1e4e8;
}
body.theme-github .tab {
background: #f6f8fa;
border-color: #e1e4e8;
color: #24292e;
}
body.theme-github .tab.active {
background: #fff;
border-color: #0366d6;
}
body.theme-github .tab-close {
color: #586069;
}
body.theme-github .tab-close:hover {
background: #e1e4e8;
color: #cb2431;
}
body.theme-github .new-tab-button {
border-color: #e1e4e8;
color: #586069;
}
body.theme-github .new-tab-button:hover {
background: #f6f8fa;
}
body.theme-github .toolbar { body.theme-github .toolbar {
background: #fafbfc; background: #fafbfc;
border-bottom-color: #e1e4e8; border-bottom-color: #e1e4e8;