144bfb2ba7
This commit introduces a complete overhaul of the application, replacing the previous simple Markdown editor with a powerful, Google Docs-style editor with a live preview and ODT export. The new features include: - A new three-pane UI with a Markdown editor, a live preview, and a styles panel. - A powerful styling engine that allows users to create, edit, and apply custom styles to the document. - A persistent storage mechanism for styles using a JSON file. - Support for advanced Markdown features, including code blocks and blockquotes. - A hyperlinked table of contents that is automatically generated from the headings in the document. - Auto-captioning for tables and images. - Pagination for large tables. - Secure image embedding with a domain whitelist and size limits to prevent SSRF and DoS attacks. - An improved live preview that correctly renders multi-line Markdown elements.
124 lines
1.9 KiB
CSS
124 lines
1.9 KiB
CSS
body {
|
|
font-family: 'Arial', sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f8f9fa;
|
|
color: #202124;
|
|
}
|
|
|
|
.main-container {
|
|
display: flex;
|
|
height: 100vh;
|
|
}
|
|
|
|
.editor-pane {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-right: 1px solid #dadce0;
|
|
}
|
|
|
|
.toolbar {
|
|
padding: 8px 16px;
|
|
background-color: #edf2fa;
|
|
border-bottom: 1px solid #dadce0;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.toolbar button {
|
|
background-color: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
margin-right: 16px;
|
|
padding: 4px;
|
|
}
|
|
|
|
.toolbar button:hover {
|
|
background-color: #d2e3fc;
|
|
}
|
|
|
|
.markdown-input {
|
|
flex: 1;
|
|
padding: 48px;
|
|
border: none;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
resize: none;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.preview-pane {
|
|
flex: 1;
|
|
padding: 48px;
|
|
background-color: #f8f9fa;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.preview-output {
|
|
max-width: 8.5in;
|
|
margin: 0 auto;
|
|
background-color: #fff;
|
|
padding: 1in;
|
|
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.styles-pane {
|
|
width: 250px;
|
|
padding: 20px;
|
|
background-color: #edf2fa;
|
|
border-left: 1px solid #dadce0;
|
|
}
|
|
|
|
#styles-list {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.style-item {
|
|
padding: 10px;
|
|
margin-bottom: 10px;
|
|
background-color: #fff;
|
|
border: 1px solid #dadce0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.style-item:hover {
|
|
background-color: #d2e3fc;
|
|
}
|
|
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
background-color: rgba(0,0,0,0.4);
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: #fefefe;
|
|
margin: 15% auto;
|
|
padding: 20px;
|
|
border: 1px solid #888;
|
|
width: 80%;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.close-button {
|
|
color: #aaa;
|
|
float: right;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.close-button:hover,
|
|
.close-button:focus {
|
|
color: black;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|