Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fonol committed Nov 24, 2021
1 parent c081271 commit b54416a
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 63 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"styles.modalBorderColor": "#2496dc",
"styles.night.modalBorderColor": "darkorange",
"styles.readingModalBackgroundColor": "#2f2f31",
"styles.readingModalButtonBorderColor": "#b2b2a0",
"styles.readingModalButtonBorderColor": "#484848",
"styles.readingModalTexture": "none",
"styles.readingModalBackgroundSize": "80",
"styles.readingModalFilter": "none",
Expand Down
9 changes: 9 additions & 0 deletions src/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ def print_search_results(cls, header, notes, stamp, editor=None, timing_info=Fal
else:
cmd = "setSearchResults(%s, `%s`, ``, null, page=%s , pageMax=%s, total=%s, cacheSize=%s, stamp=%s, printTiming=%s, isRerender=%s);" % (json.dumps(header), html, page, pageMax, len(notes) - meta_notes_cnt, len(cls.previous_calls), stamp, timing, rerender)

cmd = f"""window.srFn = () => {{
if (typeof(setSearchResults) === 'undefined') {{
console.log('[SIAC] setSearchResults not yet loaded, retrying in 50ms');
setTimeout(srFn, 50);
return;
}}
{cmd}
}}; srFn();"""

cls._js(cmd, editor)

if len(remaining_to_highlight) > 0:
Expand Down
6 changes: 3 additions & 3 deletions src/web/reading_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ def get_note_info_html(cls) -> HTML:
<tr>
<td style='padding-top: 10px;'><i class='fa fa-tags'></i>&nbsp; Tags</td>
<td style='padding-top: 10px;' class='pl-5'>
<input type='text' class='siac-rm-bg fg_lightgrey' style='width: 210px; margin-left: 4px; padding-left: 4px; border: 1px solid grey; border-radius: 4px;' onfocusout='pycmd("siac-update-note-tags {note.id} " + this.value)' value='{tags}'></input>
<input type='text' class='siac-rm-bg fg_lightgrey' style='width: 230px; margin-left: 4px; padding: 4px; border: 1px solid #464646; border-radius: 4px;' onfocusout='pycmd("siac-update-note-tags {note.id} " + this.value)' value='{tags}'></input>
</td>
</tr>
</table>
Expand Down Expand Up @@ -1487,7 +1487,7 @@ def page_sidebar_info(cls, page: int, pages_total: int):
html = UI.get_result_html_simple(linked, tag_hover=False, search_on_selection=False, query_set=None)
html = html.replace("`", "\\`")
html = f"""
<div class='fg_lightgrey siac-page-sidebar-header'>
<div class='siac-page-sidebar-header'>
<div class='siac-note-header flex-row'>{header}</div>
{around_s}
</div>
Expand All @@ -1497,7 +1497,7 @@ def page_sidebar_info(cls, page: int, pages_total: int):
{stats_s}"""
else:
html = f"""
<div class='fg_lightgrey siac-page-sidebar-header'>
<div class='siac-page-sidebar-header'>
<div class='siac-note-header flex-row'>{header}</div>
{around_s}
</div>
Expand Down
48 changes: 3 additions & 45 deletions src/web/templates/rm/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,55 +87,13 @@
<a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #2f2f31")'>Default</a>
</td>
<td>
<div style='width: 1em; height: 1em; border-radius: 3px; background: black'></div>
</td>
<td>
<a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor black")'>Black</a>
</td>
</tr>
<tr>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #00193C'></div></td>
<td> <a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #00193C")'>Darkblue</a>
</td>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #020D1E'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #020D1E")'>Darkbluegrey</a>
</td>
</tr>
<tr>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #102212'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #102212")'>Darkgreen</a>
</td>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #343741'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #343741")'>Lightgrey</a>
</td>
</tr>
<tr>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #0B2A2A'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #0B2A2A")'>Darkturquoise</a>
</td>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #2F1202'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #2F1202")'>Darkbrown</a>
</td>
</tr>
<tr>
<td><div style='width: 1em; height: 1em; border-radius: 3px; background: #381313'></div></td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor #381313")'>Darkred</a>
</td>
<td>?</td>
<td><a class='siac-link-btn'
onclick='modalBgUpdate();pycmd("siac-styling styles.readingModalBackgroundColor " + getComputedStyle(document.body, null)["backgroundColor"])'>Fit
to Window</a>
</td>
</tr>

</table>

</div>
Expand Down Expand Up @@ -169,10 +127,10 @@
<table class="user_sel_none">
<tr>
<td>
<div style='width: 1em; height: 1em; border-radius: 3px; background: #b2b2a0;'></div>
<div style='width: 1em; height: 1em; border-radius: 3px; background: #484848;'></div>
</td>
<td>
<a class='siac-link-btn' onclick='pycmd("siac-styling styles.readingModalButtonBorderColor #b2b2a0")'>Eagle (Default)</a>
<a class='siac-link-btn' onclick='pycmd("siac-styling styles.readingModalButtonBorderColor #484848")'>Eagle (Default)</a>
</td>
<td>
<div style='width: 1em; height: 1em; border-radius: 3px; background: #4682b4;'></div>
Expand Down
4 changes: 2 additions & 2 deletions web/css/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
outline: none;
}
.siac-btn.siac-btn-dark, .siac-btn.siac-btn-dark-smaller {
background-color: var(--c-reading-modal-background);
background-color: var(--c-card-bg-night);
color: lightgrey;
border: 1px outset #b2b2a0;
border-color: var(--c-reading-modal-button-border-color);
Expand Down Expand Up @@ -73,7 +73,7 @@ body.nightMode .modal-content input {
}
.siac-btn-dark:hover, .siac-btn-dark-smaller:hover {
color: white;
border-color: lightgrey;
border-color: #5d5d5d;
}
.siac-btn-small {
display: inline;
Expand Down
4 changes: 2 additions & 2 deletions web/css/decklist.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
body.nightMode .deck-list-item:hover > .list-item-inner {
/* background: var(--c-primary-color-night); */
background: #464646;
background: #3e3e3e;
}
.check {
float: right;
Expand All @@ -60,7 +60,7 @@ body.nightMode .deck-list-item:hover > .list-item-inner {
}
body.nightMode .siac-tl-plus {
/* background: var(--c-primary-color-night); */
background: #464646;
background: #3e3e3e;
}
.deck-list-item:hover > .list-item-inner > .siac-tl-plus {
display: inline-block;
Expand Down
4 changes: 2 additions & 2 deletions web/css/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ body.nightMode .siac-notes-sidebar-item:hover details {
flex: 1 1 auto;
box-sizing: border-box;
border-radius: 3px;
padding-left: 4px;
padding: 4px;
border: 1px solid #929292;
background: transparent;
}
body.nightMode .siac-sidebar-inp {
border: 1px solid grey;
border: 1px solid #404040;
background: #2f2f31;
}
#siac-sidebar-selected {
Expand Down
Loading

0 comments on commit b54416a

Please sign in to comment.