mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 10:00:17 +05:30
- Enhanced PDF export with multiple LaTeX engine fallbacks - Fixed file association and direct file opening from OS - Removed redundant converter menu, moved import to File menu - Implemented comprehensive tabbed interface for multiple files - Added tab management with keyboard shortcuts (Ctrl+N, Ctrl+W, Ctrl+Tab) - Enhanced UI with tab bar and improved navigation - Updated to version 1.3.0 with new features - Improved main process and renderer architecture for multi-file support
719 lines
12 KiB
CSS
719 lines
12 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
}
|
|
|
|
.container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* Tab Bar */
|
|
.tab-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
background: #f0f0f0;
|
|
border-bottom: 1px solid #ddd;
|
|
padding: 0 8px;
|
|
min-height: 36px;
|
|
}
|
|
|
|
.tab {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 12px;
|
|
background: #e8e8e8;
|
|
border: 1px solid #ccc;
|
|
border-bottom: none;
|
|
border-radius: 6px 6px 0 0;
|
|
margin-right: 2px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
max-width: 200px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.tab.active {
|
|
background: #fff;
|
|
border-color: #999;
|
|
z-index: 1;
|
|
}
|
|
|
|
.tab-title {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.tab-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
margin-left: 8px;
|
|
width: 16px;
|
|
height: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 3px;
|
|
color: #666;
|
|
}
|
|
|
|
.tab-close:hover {
|
|
background: #ddd;
|
|
color: #000;
|
|
}
|
|
|
|
.new-tab-button {
|
|
background: none;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
margin-left: 8px;
|
|
color: #666;
|
|
}
|
|
|
|
.new-tab-button:hover {
|
|
background: #e8e8e8;
|
|
}
|
|
|
|
/* Tab Content */
|
|
.tab-content {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.tab-content:not(.active) {
|
|
display: none;
|
|
}
|
|
|
|
/* Toolbar */
|
|
.toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
background: #f5f5f5;
|
|
border-bottom: 1px solid #ddd;
|
|
gap: 4px;
|
|
}
|
|
|
|
.toolbar button {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 1px solid transparent;
|
|
background: transparent;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.toolbar button:hover {
|
|
background: #e0e0e0;
|
|
border-color: #ccc;
|
|
}
|
|
|
|
.toolbar button:active {
|
|
background: #d0d0d0;
|
|
}
|
|
|
|
.toolbar-separator {
|
|
width: 1px;
|
|
height: 24px;
|
|
background: #ccc;
|
|
margin: 0 8px;
|
|
}
|
|
|
|
/* Editor Container */
|
|
.editor-container {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.pane {
|
|
flex: 1;
|
|
overflow: auto;
|
|
}
|
|
|
|
#editor-pane {
|
|
border-right: 1px solid #ddd;
|
|
}
|
|
|
|
#editor {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 20px;
|
|
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
border: none;
|
|
outline: none;
|
|
resize: none;
|
|
}
|
|
|
|
#preview-pane {
|
|
padding: 20px;
|
|
background: #fff;
|
|
}
|
|
|
|
#preview {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* Status Bar */
|
|
.status-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 4px 12px;
|
|
background: #f5f5f5;
|
|
border-top: 1px solid #ddd;
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
/* Preview Styles */
|
|
#preview h1, #preview h2, #preview h3, #preview h4, #preview h5, #preview h6 {
|
|
margin-top: 24px;
|
|
margin-bottom: 16px;
|
|
font-weight: 600;
|
|
line-height: 1.25;
|
|
}
|
|
|
|
#preview h1 {
|
|
font-size: 2em;
|
|
border-bottom: 1px solid #eaecef;
|
|
padding-bottom: 0.3em;
|
|
}
|
|
|
|
#preview h2 {
|
|
font-size: 1.5em;
|
|
border-bottom: 1px solid #eaecef;
|
|
padding-bottom: 0.3em;
|
|
}
|
|
|
|
#preview p {
|
|
margin-bottom: 16px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
#preview code {
|
|
padding: 0.2em 0.4em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(27,31,35,0.05);
|
|
border-radius: 3px;
|
|
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
|
|
}
|
|
|
|
#preview pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f6f8fa;
|
|
border-radius: 3px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
#preview pre code {
|
|
display: inline;
|
|
max-width: auto;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: visible;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
#preview blockquote {
|
|
padding: 0 1em;
|
|
color: #6a737d;
|
|
border-left: 0.25em solid #dfe2e5;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
#preview ul, #preview ol {
|
|
padding-left: 2em;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
#preview li {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#preview a {
|
|
color: #0366d6;
|
|
text-decoration: none;
|
|
}
|
|
|
|
#preview a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
#preview img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
#preview table {
|
|
border-collapse: collapse;
|
|
margin-bottom: 16px;
|
|
width: 100%;
|
|
}
|
|
|
|
#preview table th,
|
|
#preview table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #dfe2e5;
|
|
}
|
|
|
|
#preview table th {
|
|
font-weight: 600;
|
|
background-color: #f6f8fa;
|
|
}
|
|
|
|
#preview table tr:nth-child(2n) {
|
|
background-color: #f6f8fa;
|
|
}
|
|
|
|
/* Theme: Dark */
|
|
body.theme-dark {
|
|
background: #1e1e1e;
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
body.theme-dark .tab-bar {
|
|
background: #2d2d30;
|
|
border-bottom-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark .tab {
|
|
background: #3c3c3c;
|
|
border-color: #555;
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
body.theme-dark .tab.active {
|
|
background: #1e1e1e;
|
|
border-color: #666;
|
|
}
|
|
|
|
body.theme-dark .tab-close {
|
|
color: #ccc;
|
|
}
|
|
|
|
body.theme-dark .tab-close:hover {
|
|
background: #555;
|
|
color: #fff;
|
|
}
|
|
|
|
body.theme-dark .new-tab-button {
|
|
border-color: #555;
|
|
color: #ccc;
|
|
}
|
|
|
|
body.theme-dark .new-tab-button:hover {
|
|
background: #3c3c3c;
|
|
}
|
|
|
|
body.theme-dark .toolbar {
|
|
background: #2d2d30;
|
|
border-bottom-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark .toolbar button {
|
|
color: #cccccc;
|
|
}
|
|
|
|
body.theme-dark .toolbar button:hover {
|
|
background: #3e3e42;
|
|
border-color: #464647;
|
|
}
|
|
|
|
body.theme-dark .toolbar-separator {
|
|
background: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark #editor-pane {
|
|
border-right-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark #editor {
|
|
background: #1e1e1e;
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
body.theme-dark #preview-pane {
|
|
background: #252526;
|
|
}
|
|
|
|
body.theme-dark #preview {
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
body.theme-dark #preview h1,
|
|
body.theme-dark #preview h2 {
|
|
border-bottom-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark #preview code {
|
|
background-color: rgba(255,255,255,0.1);
|
|
}
|
|
|
|
body.theme-dark #preview pre {
|
|
background-color: #2d2d30;
|
|
}
|
|
|
|
body.theme-dark #preview blockquote {
|
|
color: #808080;
|
|
border-left-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark #preview a {
|
|
color: #569cd6;
|
|
}
|
|
|
|
body.theme-dark #preview table th,
|
|
body.theme-dark #preview table td {
|
|
border-color: #3e3e42;
|
|
}
|
|
|
|
body.theme-dark #preview table th {
|
|
background-color: #2d2d30;
|
|
}
|
|
|
|
body.theme-dark #preview table tr:nth-child(2n) {
|
|
background-color: #2d2d30;
|
|
}
|
|
|
|
body.theme-dark .status-bar {
|
|
background: #2d2d30;
|
|
border-top-color: #3e3e42;
|
|
color: #969696;
|
|
}
|
|
|
|
/* Theme: Solarized */
|
|
body.theme-solarized {
|
|
background: #fdf6e3;
|
|
color: #657b83;
|
|
}
|
|
|
|
body.theme-solarized .toolbar {
|
|
background: #eee8d5;
|
|
border-bottom-color: #93a1a1;
|
|
}
|
|
|
|
body.theme-solarized .toolbar button {
|
|
color: #586e75;
|
|
}
|
|
|
|
body.theme-solarized .toolbar button:hover {
|
|
background: #fdf6e3;
|
|
border-color: #93a1a1;
|
|
}
|
|
|
|
body.theme-solarized #editor {
|
|
background: #fdf6e3;
|
|
color: #657b83;
|
|
}
|
|
|
|
body.theme-solarized #preview {
|
|
color: #586e75;
|
|
}
|
|
|
|
body.theme-solarized #preview code {
|
|
background-color: #eee8d5;
|
|
}
|
|
|
|
body.theme-solarized #preview pre {
|
|
background-color: #eee8d5;
|
|
}
|
|
|
|
body.theme-solarized #preview a {
|
|
color: #268bd2;
|
|
}
|
|
|
|
/* Theme: Monokai */
|
|
body.theme-monokai {
|
|
background: #272822;
|
|
color: #f8f8f2;
|
|
}
|
|
|
|
body.theme-monokai .toolbar {
|
|
background: #3e3d32;
|
|
border-bottom-color: #75715e;
|
|
}
|
|
|
|
body.theme-monokai .toolbar button {
|
|
color: #f8f8f2;
|
|
}
|
|
|
|
body.theme-monokai .toolbar button:hover {
|
|
background: #49483e;
|
|
border-color: #75715e;
|
|
}
|
|
|
|
body.theme-monokai #editor {
|
|
background: #272822;
|
|
color: #f8f8f2;
|
|
}
|
|
|
|
body.theme-monokai #preview-pane {
|
|
background: #272822;
|
|
}
|
|
|
|
body.theme-monokai #preview {
|
|
color: #f8f8f2;
|
|
}
|
|
|
|
body.theme-monokai #preview h1,
|
|
body.theme-monokai #preview h2 {
|
|
border-bottom-color: #75715e;
|
|
}
|
|
|
|
body.theme-monokai #preview code {
|
|
background-color: #3e3d32;
|
|
}
|
|
|
|
body.theme-monokai #preview pre {
|
|
background-color: #3e3d32;
|
|
}
|
|
|
|
body.theme-monokai #preview blockquote {
|
|
color: #75715e;
|
|
border-left-color: #75715e;
|
|
}
|
|
|
|
body.theme-monokai #preview a {
|
|
color: #66d9ef;
|
|
}
|
|
|
|
body.theme-monokai .status-bar {
|
|
background: #3e3d32;
|
|
border-top-color: #75715e;
|
|
color: #75715e;
|
|
}
|
|
|
|
/* Theme: GitHub */
|
|
body.theme-github {
|
|
background: #fff;
|
|
color: #24292e;
|
|
}
|
|
|
|
body.theme-github .toolbar {
|
|
background: #fafbfc;
|
|
border-bottom-color: #e1e4e8;
|
|
}
|
|
|
|
body.theme-github .toolbar button {
|
|
color: #586069;
|
|
}
|
|
|
|
body.theme-github .toolbar button:hover {
|
|
background: #f6f8fa;
|
|
border-color: #e1e4e8;
|
|
}
|
|
|
|
body.theme-github #editor {
|
|
background: #fff;
|
|
color: #24292e;
|
|
}
|
|
|
|
body.theme-github #preview {
|
|
color: #24292e;
|
|
}
|
|
|
|
body.theme-github #preview h1,
|
|
body.theme-github #preview h2 {
|
|
border-bottom-color: #eaecef;
|
|
}
|
|
|
|
body.theme-github #preview code {
|
|
background-color: rgba(27,31,35,0.05);
|
|
}
|
|
|
|
body.theme-github #preview pre {
|
|
background-color: #f6f8fa;
|
|
}
|
|
|
|
body.theme-github #preview blockquote {
|
|
color: #6a737d;
|
|
border-left-color: #dfe2e5;
|
|
}
|
|
|
|
body.theme-github #preview a {
|
|
color: #0366d6;
|
|
}
|
|
|
|
body.theme-github .status-bar {
|
|
background: #fafbfc;
|
|
border-top-color: #e1e4e8;
|
|
color: #586069;
|
|
}
|
|
|
|
/* Hide preview pane by default */
|
|
#preview-pane.hidden {
|
|
display: none;
|
|
}
|
|
|
|
#editor-pane.full-width {
|
|
border-right: none;
|
|
}
|
|
|
|
/* Find & Replace Dialog */
|
|
.find-dialog {
|
|
position: absolute;
|
|
top: 60px;
|
|
right: 20px;
|
|
background: #fff;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
z-index: 1000;
|
|
min-width: 400px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.find-dialog.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.find-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.find-controls input {
|
|
flex: 1;
|
|
padding: 6px 8px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.find-controls button {
|
|
padding: 6px 10px;
|
|
border: 1px solid #ddd;
|
|
background: #f5f5f5;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.find-controls button:hover {
|
|
background: #e5e5e5;
|
|
}
|
|
|
|
.find-info {
|
|
font-size: 12px;
|
|
color: #666;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Editor Wrapper with Line Numbers */
|
|
.editor-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
height: 100%;
|
|
}
|
|
|
|
.line-numbers {
|
|
min-width: 40px;
|
|
padding: 8px 4px;
|
|
background: #f8f8f8;
|
|
border-right: 1px solid #ddd;
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
color: #666;
|
|
text-align: right;
|
|
user-select: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.line-numbers.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.line-numbers .line-number {
|
|
display: block;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Adjust editor when line numbers are shown */
|
|
.editor-wrapper #editor {
|
|
flex: 1;
|
|
}
|
|
|
|
/* Theme support for find dialog */
|
|
body.theme-dark .find-dialog {
|
|
background: #2d2d2d;
|
|
border-color: #555;
|
|
color: #f0f0f0;
|
|
}
|
|
|
|
body.theme-dark .find-controls input {
|
|
background: #333;
|
|
border-color: #555;
|
|
color: #f0f0f0;
|
|
}
|
|
|
|
body.theme-dark .find-controls button {
|
|
background: #404040;
|
|
border-color: #555;
|
|
color: #f0f0f0;
|
|
}
|
|
|
|
body.theme-dark .find-controls button:hover {
|
|
background: #4a4a4a;
|
|
}
|
|
|
|
body.theme-dark .line-numbers {
|
|
background: #2a2a2a;
|
|
border-right-color: #555;
|
|
color: #888;
|
|
}
|
|
|
|
/* Additional theme support for line numbers */
|
|
body.theme-solarized .line-numbers {
|
|
background: #fdf6e3;
|
|
border-right-color: #eee8d5;
|
|
color: #93a1a1;
|
|
}
|
|
|
|
body.theme-monokai .line-numbers {
|
|
background: #2f2f2f;
|
|
border-right-color: #555;
|
|
color: #75715e;
|
|
}
|
|
|
|
body.theme-github .line-numbers {
|
|
background: #fafbfc;
|
|
border-right-color: #e1e4e8;
|
|
color: #586069;
|
|
} |