Skip to content

Commit 1f6bde8

Browse files
committed
improve theme compability
1 parent 095c748 commit 1f6bde8

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

css/notes.css renamed to css/notes.scss

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* Copyright (c) 2013, Jan-Christoph Borchardt http://jancborchardt.net
3+
* and others
34
* This file is licensed under the Affero General Public License version 3 or later.
45
* See the COPYING file.
56
*/
@@ -12,7 +13,7 @@
1213
}
1314

1415
#app-navigation > ul > li.has-error a{
15-
color:#f00;
16+
color: var(--color-error);
1617
}
1718
.app-content-list-button {
1819
display: block;
@@ -30,7 +31,7 @@
3031
box-sizing: border-box;
3132
white-space: nowrap;
3233
text-overflow: ellipsis;
33-
color: #000;
34+
color: var(--color-main-text);
3435
opacity: .57;
3536
}
3637

@@ -95,6 +96,7 @@
9596
padding-top: 2ex;
9697
}
9798

99+
/* old style search (before NC14) */
98100
.note-search span {
99101
background-position: 0 center;
100102
background-origin: content-box;
@@ -142,6 +144,7 @@
142144
/* enable clickthrough for links */
143145
.CodeMirror-cursor {
144146
pointer-events: none;
147+
border-color: var(--color-main-text);
145148
}
146149

147150
#app-content .note-meta {
@@ -150,7 +153,7 @@
150153
width: 100%;
151154
padding: 0 45px 0px 45px;
152155
margin: -10px 0 0;
153-
background-color: white; /* TODO Theming! */
156+
background-color: var(--color-main-background);
154157
-ms-user-select: none;
155158
-moz-user-select: none;
156159
-webkit-user-select: none;
@@ -166,8 +169,8 @@
166169

167170
#app-content .note-meta > .note-error {
168171
opacity: 1;
169-
background-color: #e00;
170-
color: #fff;
172+
background-color: var(--color-error);
173+
color: var(--color-primary-text);
171174
border-radius: 0.5ex;
172175
padding: 0.5ex 1ex;
173176
}
@@ -242,6 +245,10 @@ form.category .icon-confirm {
242245

243246

244247
/* markdown styling */
248+
.CodeMirror {
249+
background: transparent;
250+
color: inherit;
251+
}
245252

246253
.CodeMirror .CodeMirror-code {
247254
width: 100%;
@@ -318,19 +325,19 @@ form.category .icon-confirm {
318325
/* distraction free styles */
319326
:-webkit-full-screen {
320327
width: 100%;
321-
background-color: white;
328+
background-color: var(--color-main-background);
322329
}
323330
:-moz-full-screen {
324331
width: 100%;
325-
background-color: white;
332+
background-color: var(--color-main-background);
326333
}
327334
:-ms-fullscreen {
328335
width: 100%;
329-
background-color: white;
336+
background-color: var(--color-main-background);
330337
}
331338
:fullscreen {
332339
width: 100%;
333-
background-color: white;
340+
background-color: var(--color-main-background);
334341
}
335342

336343
:-webkit-full-screen #app-content-container {
@@ -358,20 +365,17 @@ form.category .icon-confirm {
358365

359366

360367
/* icons for sidebar */
361-
.nav-icon-emptyfolder {
362-
background-image: url('../img/folder-empty.svg?v=1');
363-
}
364368
.nav-icon-files {
365-
background-image: url('../img/folder.svg?v=1');
369+
@include icon-color('folder', 'notes', $color-black);
370+
}
371+
.nav-icon-emptyfolder {
372+
@include icon-color('folder-empty', 'notes', $color-black);
366373
}
367374
.nav-icon-recent {
368-
background-image: url('../img/recent.svg?v=1');
375+
@include icon-color('recent', 'notes', $color-black);
369376
}
370377
.nav-icon-search {
371-
background-image: url('../img/search.svg?v=1');
372-
}
373-
.nav-icon-favorites {
374-
background-image: url('../img/star.svg?v=1');
378+
@include icon-color('search', 'notes', $color-black);
375379
}
376380

377381

img/folder-empty.svg

Lines changed: 1 addition & 1 deletion
Loading

img/folder.svg

Lines changed: 1 addition & 1 deletion
Loading

img/star.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

templates/note.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="note-meta" ng-if="note!==false">
33
<span class="note-category" ng-class="{ uncategorized: !note.category }" title="<?php p($l->t('Category')); ?>" ng-show="!editCategory" ng-click="showEditCategory()">{{ note.category || '<?php p($l->t('Uncategorized')) ?>' | categoryTitle}} <input type="button" class="edit icon icon-rename" title="<?php p($l->t('Edit category')); ?>"></span>
44
<span class="note-category" title="<?php p($l->t('Edit category')); ?>" ng-show="editCategory"><form class="category" ng-submit="closeCategory()"><input type="text" id="category" name="category" ng-blur="closeCategory()" placeholder="<?php p($l->t('Uncategorized')); ?>"><input type="submit" class="icon-confirm" value=""></form></span>
5-
<span class="note-word-count" ng-if="note.content.length > 0">{{note.content | wordCount}}</span>
6-
<span class="note-unsaved" ng-if="note.unsaved" title="<?php p($l->t('The note has unsaved changes.')); ?>">*</span>
7-
<span class="note-error" ng-if="note.error" ng-click="manualSave()" title="<?php p($l->t('Click here to try again')); ?>"><?php p($l->t('Saving failed!')); ?></span>
8-
<span class="saving" ng-if="isManualSaving()" title="<?php p($l->t('Note saved')); ?>"></span>
5+
<span class="note-word-count" ng-show="note.content.length > 0">{{note.content | wordCount}}</span>
6+
<span class="note-unsaved" ng-show="note.unsaved" title="<?php p($l->t('The note has unsaved changes.')); ?>">*</span>
7+
<span class="note-error" ng-show="note.error" ng-click="manualSave()" title="<?php p($l->t('Click here to try again')); ?>"><?php p($l->t('Saving failed!')); ?></span>
8+
<span class="saving" ng-show="isManualSaving()" title="<?php p($l->t('Note saved')); ?>"></span>
99
<span class="note-meta-right">
1010
<button class="icon-fullscreen has-tooltip btn-fullscreen" notes-tooltip ng-click="toggleDistractionFree()"></button>
1111
</span>

0 commit comments

Comments
 (0)