Finetune fretboard css

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
Yukai Huang 2020-08-12 17:21:21 +08:00
parent 94aa54b495
commit 12b8f09d52
No known key found for this signature in database
GPG Key ID: A76CBD50B22052C0
2 changed files with 13 additions and 4 deletions

View File

@ -502,6 +502,7 @@ export function finishView (view) {
try { try {
const $ele = $(value).parent().parent() const $ele = $(value).parent().parent()
$ele.html(renderFretBoard($value.text(), params)) $ele.html(renderFretBoard($value.text(), params))
$ele.addClass('fretboard')
} catch (err) { } catch (err) {
$value.unwrap() $value.unwrap()
$value.parent().append(`<div class="alert alert-warning">${escapeHTML(err)}</div>`) $value.parent().append(`<div class="alert alert-warning">${escapeHTML(err)}</div>`)

View File

@ -1,8 +1,8 @@
/* -- GENERAL TYPOGRAPHY -- */ /* -- GENERAL TYPOGRAPHY -- */
.fretTitle { .fretTitle {
color: #555; color: #555;
text-align: center;
font-family: "Helvetica Neue", sans-serif; font-family: "Helvetica Neue", sans-serif;
background: #eee;
line-height: 1.4; line-height: 1.4;
font-size: 1.6em; font-size: 1.6em;
margin: 10px 0 10px 0; margin: 10px 0 10px 0;
@ -20,14 +20,19 @@ section {
} }
/* Fretboard Container/Wrapper */ /* Fretboard Container/Wrapper */
.fretContainer, .fretContainer_h {
outline: solid 1px #eeee;
margin: 0 auto;
padding: 15px 0;
}
.fretContainer { .fretContainer {
width: 320px; width: 320px;
margin: 0 auto;
} }
.fretContainer_h { .fretContainer_h {
max-width: 400px; max-width: 400px;
margin: 0 auto;
} }
@media all and (max-width: 400px) { @media all and (max-width: 400px) {
@ -59,7 +64,6 @@ section {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 10;
} }
.svg_wrapper.v4 { .svg_wrapper.v4 {
@ -181,3 +185,7 @@ section {
} }
/*# sourceMappingURL=i.css.map */ /*# sourceMappingURL=i.css.map */
.markdown-body pre.fretboard {
background-color: transparent;
}