Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
gtag('config', 'G-77C1GEG9C8');
</script>

<body>

<body>
<header>
<div id="menu-items">
<div id="toggle-sidebar" style="margin-right: 12px; font-size: 16px; cursor: pointer;"><a href="#">☰</a></div>

<div><a href="/">Markdown Live Preview</a></div>
<div id="reset-button"><a href="#">Reset</a></div>
<div id="copy-button"><a href="#">Copy</a></div>
Expand All @@ -63,23 +64,31 @@
<div id="github"><a href="https://github.com/tanabe/markdown-live-preview"><img src="image/GitHub-Mark-Light-32px.webp"></a></div>
</header>

<div id="container" class="split-container">

<div id="edit" class="column editor-pane">
<div id="editor-wrapper">
<div id="editor"></div>
<div id="main-wrapper">

<aside id="sidebar" class="collapsed">
<div class="sidebar-header">
<h2>History</h2>
<button id="btn-new-doc">+ New</button>
</div>
</div>
<ul id="doc-list"></ul>
</aside>

<div id="split-divider" class="split-divider"></div>

<div id="preview" class="column preview-pane">
<div id="preview-wrapper">
<div id="output" class="content markdown-body"></div>
<div id="container" class="split-container">
<div id="edit" class="column editor-pane">
<div id="editor-wrapper">
<div id="editor"></div>
</div>
</div>
<div id="split-divider" class="split-divider"></div>
<div id="preview" class="column preview-pane">
<div id="preview-wrapper">
<div id="output" class="content markdown-body"></div>
</div>
</div>
</div>

</div>

<footer></footer>
</body>
</html>
91 changes: 91 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,94 @@ footer {
[data-theme="dark"] footer {
background-color: #333;
}

/* Sidebar Layout */
#main-wrapper {
display: flex;
flex-grow: 1;
overflow: hidden;
width: 100%;
}

#sidebar {
width: 250px;
flex-shrink: 0;
background: #f6f8fa;
border-right: 1px solid #e8e8e8;
transition: margin-left 0.2s ease-in-out;
display: flex;
flex-direction: column;
z-index: 10;
}

#sidebar.collapsed {
margin-left: -250px;
}

.sidebar-header {
padding: 16px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #e8e8e8;
}

.sidebar-header h2 {
font-size: 16px;
font-weight: 600;
margin: 0;
}

#btn-new-doc {
cursor: pointer;
padding: 4px 10px;
background: #0969da;
color: white;
border: none;
border-radius: 4px;
font-weight: bold;
}

#btn-new-doc:hover { background: #0550ae; }

#doc-list {
list-style: none;
padding: 0;
margin: 0;
overflow-y: auto;
flex-grow: 1;
}

#doc-list li {
padding: 12px 16px;
border-bottom: 1px solid #eee;
cursor: pointer;
}

#doc-list li:hover, #doc-list li.active {
background: #e6edf3;
}

#doc-list li .doc-title {
font-weight: bold;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
justify-content: space-between;
}

#doc-list li .doc-date {
font-size: 11px;
color: #59636e;
margin-top: 4px;
}

.delete-btn { color: #cf222e; cursor: pointer; }

[data-theme="dark"] #sidebar { background: #161b22; border-right: 1px solid #30363d; }
[data-theme="dark"] .sidebar-header { border-bottom: 1px solid #30363d; }
[data-theme="dark"] #doc-list li { border-bottom: 1px solid #30363d; }
[data-theme="dark"] #doc-list li:hover, [data-theme="dark"] #doc-list li.active { background: #21262d; }
[data-theme="dark"] #doc-list li .doc-date { color: #8b949e; }
Loading