mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
Initial commit: Pan Converter - Cross-platform Markdown editor
This commit is contained in:
+462
@@ -0,0 +1,462 @@
|
||||
* {
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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 .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;
|
||||
}
|
||||
Reference in New Issue
Block a user