mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-30 02:20:08 +00:00
minor tweaks and changes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4998ac950c
commit
146ad99711
@ -250,9 +250,10 @@
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lists... */
|
||||||
/* XXX needs to be in the middle of the first span but with universal size... */
|
/* XXX needs to be in the middle of the first span but with universal size... */
|
||||||
.editor .outline .list-item:before,
|
.editor .outline .list-item:before,
|
||||||
.editor .outline .list>[tabindex]>span:before {
|
.editor .outline .list>[tabindex]>span:not(:empty):before {
|
||||||
--size: 0.5rem;
|
--size: 0.5rem;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -267,10 +268,16 @@
|
|||||||
background: silver;
|
background: silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Highlightes... */
|
||||||
|
.editor .outline .ASAP {
|
||||||
|
font-weight: bold;
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
.editor .outline .XXX>span {
|
.editor .outline .XXX>span {
|
||||||
background: yellow;
|
background: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Comments... */
|
||||||
.editor.hide-comments .outline .comment {
|
.editor.hide-comments .outline .comment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -279,7 +286,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* checkboxes... */
|
/* Checkboxes... */
|
||||||
:root {
|
:root {
|
||||||
/* NOTE: this must have a unit... */
|
/* NOTE: this must have a unit... */
|
||||||
/* XXX move this to the config when fixed... */
|
/* XXX move this to the config when fixed... */
|
||||||
|
|||||||
@ -281,6 +281,10 @@ var Outline = {
|
|||||||
var elem = {
|
var elem = {
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
}
|
}
|
||||||
|
// only whitespace -> keep element blank...
|
||||||
|
if(code.trim() == ''){
|
||||||
|
elem.text = ''
|
||||||
|
return elem }
|
||||||
var style = function(style, code=undefined){
|
var style = function(style, code=undefined){
|
||||||
style = [style].flat()
|
style = [style].flat()
|
||||||
that.__styles = [...new Set([
|
that.__styles = [...new Set([
|
||||||
@ -321,13 +325,13 @@ var Outline = {
|
|||||||
.replace(/^((\/\/|;)\s+.*)$/m, style('comment'))
|
.replace(/^((\/\/|;)\s+.*)$/m, style('comment'))
|
||||||
.replace(/^XXX\s+(.*)$/m, style('XXX'))
|
.replace(/^XXX\s+(.*)$/m, style('XXX'))
|
||||||
.replace(/^(.*)\s*XXX$/m, style('XXX'))
|
.replace(/^(.*)\s*XXX$/m, style('XXX'))
|
||||||
|
.replace(/(\s*)ASAP(\s*)/m, '$1<span class="ASAP">ASAP</span>$2')
|
||||||
// elements...
|
// elements...
|
||||||
.replace(/(\n|^)---*\h*(\n|$)/m, '$1<hr>')
|
.replace(/(\n|^)---*\h*(\n|$)/m, '$1<hr>')
|
||||||
// ToDo...
|
// ToDo...
|
||||||
.replace(/^TODO\s*/m, style('todo', '<input type="checkbox">'))
|
.replace(/^TODO\s*/m, style('todo', '<input type="checkbox">'))
|
||||||
.replace(/^DONE\s*/m, style('todo', '<input type="checkbox" checked>'))
|
.replace(/^DONE\s*/m, style('todo', '<input type="checkbox" checked>'))
|
||||||
// checkboxes...
|
// checkboxes...
|
||||||
// XXX these can not be clicked (yet)...
|
|
||||||
.replace(/\[_\]/gm, style('check', '<input class="check" type="checkbox">'))
|
.replace(/\[_\]/gm, style('check', '<input class="check" type="checkbox">'))
|
||||||
.replace(/\[[X]\]/gm, style('check', '<input class="check" type="checkbox" checked>'))
|
.replace(/\[[X]\]/gm, style('check', '<input class="check" type="checkbox" checked>'))
|
||||||
// basic styling...
|
// basic styling...
|
||||||
|
|||||||
@ -65,7 +65,7 @@ var setup = function(){
|
|||||||
- ~add optional text styling to nodes~
|
- ~add optional text styling to nodes~
|
||||||
-
|
-
|
||||||
- ## TEST
|
- ## TEST
|
||||||
- Formatting:
|
- ### Formatting:
|
||||||
- Styles
|
- Styles
|
||||||
- # Heading 1
|
- # Heading 1
|
||||||
- ## Heading 2
|
- ## Heading 2
|
||||||
@ -83,6 +83,8 @@ var setup = function(){
|
|||||||
- XXX Highlight
|
- XXX Highlight
|
||||||
- Line
|
- Line
|
||||||
- ---
|
- ---
|
||||||
|
- Markers
|
||||||
|
- Basic "as soon as posible" (ASAP)
|
||||||
- Basic inline *bold*, _italic_ and ~striked~
|
- Basic inline *bold*, _italic_ and ~striked~
|
||||||
- To do items
|
- To do items
|
||||||
- TODO undone item
|
- TODO undone item
|
||||||
@ -90,19 +92,21 @@ var setup = function(){
|
|||||||
- DONE done item
|
- DONE done item
|
||||||
- [_] a different way to draw a checkbox
|
- [_] a different way to draw a checkbox
|
||||||
- Inline [X] checkboxes [_]
|
- Inline [X] checkboxes [_]
|
||||||
- A
|
-
|
||||||
collapsed:: true
|
- ### Playground for testing
|
||||||
- a
|
- A
|
||||||
- b
|
collapsed:: true
|
||||||
- c
|
- a
|
||||||
- B
|
- b
|
||||||
- d
|
- c
|
||||||
- e
|
- B
|
||||||
- C
|
- d
|
||||||
- This is a line of text
|
- e
|
||||||
- This is a set
|
- C
|
||||||
text lines
|
- This is a line of text
|
||||||
- Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text </div>
|
- This is a set
|
||||||
|
text lines
|
||||||
|
- Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text </div>
|
||||||
<!-- outline -->
|
<!-- outline -->
|
||||||
<div class="outline"></div>
|
<div class="outline"></div>
|
||||||
<!-- toolbar (optional) -->
|
<!-- toolbar (optional) -->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user