Unify button CSS
This commit is contained in:
@@ -16,32 +16,32 @@
|
||||
><a href="{{.URL}}">{{.Name}}</a>{{end}}
|
||||
</nav>
|
||||
{{if .EditMode}}
|
||||
<a class="btn-cancel" href="{{.PostURL}}">CANCEL</a>
|
||||
<button class="btn-save" type="submit" form="edit-form" data-action="save" data-key="S" title="Save (S)">SAVE</button>
|
||||
<a class="btn" href="{{.PostURL}}">CANCEL</a>
|
||||
<button class="btn" type="submit" form="edit-form" data-action="save" data-key="S" title="Save (S)">SAVE</button>
|
||||
{{else if .CanEdit}}
|
||||
<button class="new-btn" onclick="newPage()" title="New page (N)">NEW</button>
|
||||
<a class="edit-btn" href="?edit" title="Edit page (E)">EDIT</a>
|
||||
<button class="btn" onclick="newPage()" title="New page (N)">NEW</button>
|
||||
<a class="btn" href="?edit" title="Edit page (E)">EDIT</a>
|
||||
{{end}}
|
||||
</header>
|
||||
<main>
|
||||
{{if .EditMode}}
|
||||
<form id="edit-form" class="edit-form" method="POST" action="{{.PostURL}}">
|
||||
<div class="editor-toolbar">
|
||||
<button type="button" class="btn-tool" data-action="bold" data-key="B" title="Bold (B)">**</button>
|
||||
<button type="button" class="btn-tool" data-action="italic" data-key="I" title="Italic (I)">*</button>
|
||||
<button type="button" class="btn btn-tool" data-action="bold" data-key="B" title="Bold (B)">**</button>
|
||||
<button type="button" class="btn btn-tool" data-action="italic" data-key="I" title="Italic (I)">*</button>
|
||||
<span class="toolbar-sep"></span>
|
||||
<button type="button" class="btn-tool" data-action="h1" data-key="1" title="Heading 1 (1)">#</button>
|
||||
<button type="button" class="btn-tool" data-action="h2" data-key="2" title="Heading 2 (2)">##</button>
|
||||
<button type="button" class="btn-tool" data-action="h3" data-key="3" title="Heading 3 (3)">###</button>
|
||||
<button type="button" class="btn btn-tool" data-action="h1" data-key="1" title="Heading 1 (1)">#</button>
|
||||
<button type="button" class="btn btn-tool" data-action="h2" data-key="2" title="Heading 2 (2)">##</button>
|
||||
<button type="button" class="btn btn-tool" data-action="h3" data-key="3" title="Heading 3 (3)">###</button>
|
||||
<span class="toolbar-sep"></span>
|
||||
<button type="button" class="btn-tool" data-action="code" data-key="C" title="Inline code (C)">`</button>
|
||||
<button type="button" class="btn-tool" data-action="codeblock" data-key="K" title="Code block (K)">```</button>
|
||||
<button type="button" class="btn btn-tool" data-action="code" data-key="C" title="Inline code (C)">`</button>
|
||||
<button type="button" class="btn btn-tool" data-action="codeblock" data-key="K" title="Code block (K)">```</button>
|
||||
<span class="toolbar-sep"></span>
|
||||
<button type="button" class="btn-tool" data-action="link" data-key="L" title="Link (L)">[]</button>
|
||||
<button type="button" class="btn-tool" data-action="quote" data-key="Q" title="Blockquote (Q)">></button>
|
||||
<button type="button" class="btn-tool" data-action="ul" data-key="U" title="Unordered list (U)">-</button>
|
||||
<button type="button" class="btn-tool" data-action="ol" data-key="O" title="Ordered list (O)">1.</button>
|
||||
<button type="button" class="btn-tool" data-action="hr" data-key="R" title="Horizontal rule (R)">---</button>
|
||||
<button type="button" class="btn btn-tool" data-action="link" data-key="L" title="Link (L)">[]</button>
|
||||
<button type="button" class="btn btn-tool" data-action="quote" data-key="Q" title="Blockquote (Q)">></button>
|
||||
<button type="button" class="btn btn-tool" data-action="ul" data-key="U" title="Unordered list (U)">-</button>
|
||||
<button type="button" class="btn btn-tool" data-action="ol" data-key="O" title="Ordered list (O)">1.</button>
|
||||
<button type="button" class="btn btn-tool" data-action="hr" data-key="R" title="Horizontal rule (R)">---</button>
|
||||
</div>
|
||||
<textarea name="content" id="editor" autofocus>{{.RawContent}}</textarea>
|
||||
</form>
|
||||
|
||||
@@ -82,7 +82,7 @@ header {
|
||||
color: #060;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
.btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ffb300;
|
||||
@@ -90,34 +90,17 @@ header {
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
.edit-btn::before {
|
||||
.btn::before {
|
||||
content: "[";
|
||||
}
|
||||
.edit-btn::after {
|
||||
.btn::after {
|
||||
content: "]";
|
||||
}
|
||||
.edit-btn:hover {
|
||||
color: #ffd54f;
|
||||
}
|
||||
|
||||
.new-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ffb300;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.new-btn::before {
|
||||
content: "[";
|
||||
}
|
||||
.new-btn::after {
|
||||
content: "]";
|
||||
}
|
||||
.new-btn:hover {
|
||||
.btn:hover {
|
||||
color: #ffd54f;
|
||||
}
|
||||
|
||||
@@ -268,22 +251,15 @@ main {
|
||||
}
|
||||
|
||||
.btn-tool {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #0f0;
|
||||
font: inherit;
|
||||
font-size: 0.85rem;
|
||||
cursor: pointer;
|
||||
padding: 0 0.15rem;
|
||||
text-shadow: 0 0 4px #0a0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn-tool::before {
|
||||
content: "[";
|
||||
color: #060;
|
||||
}
|
||||
.btn-tool::after {
|
||||
content: "]";
|
||||
color: #060;
|
||||
}
|
||||
.btn-tool:hover {
|
||||
@@ -326,45 +302,6 @@ textarea:focus {
|
||||
box-shadow: 0 0 5px #0a0;
|
||||
}
|
||||
|
||||
.btn-save {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ffb300;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
text-shadow: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
.btn-save::before {
|
||||
content: "[";
|
||||
}
|
||||
.btn-save::after {
|
||||
content: "]";
|
||||
}
|
||||
.btn-save:hover {
|
||||
color: #ffd54f;
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ffb300;
|
||||
font: inherit;
|
||||
text-shadow: inherit;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn-cancel::before {
|
||||
content: "[";
|
||||
}
|
||||
.btn-cancel::after {
|
||||
content: "]";
|
||||
}
|
||||
.btn-cancel:hover {
|
||||
color: #ffb300;
|
||||
}
|
||||
|
||||
/* === Diary views === */
|
||||
.diary-section {
|
||||
|
||||
Reference in New Issue
Block a user