@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | $id = $this->randomID(); |
32 | 32 | |
33 | 33 | return '<div class="'.$this->tag.'-container">'. |
34 | - '<div data-id="'.$id.'" class="'.$this->tag.'-header expander"><span>'.$this->tag.': '.$this->getAttribute('desc').'</span></div>'. // @todo: desc in tag attribute |
|
35 | - '<div id="'.$id.'" class="'.$this->tag.'-body" style="display:none;">'.$this->content.'</div>'. |
|
36 | - '</div>'; |
|
34 | + '<div data-id="'.$id.'" class="'.$this->tag.'-header expander"><span>'.$this->tag.': '.$this->getAttribute('desc').'</span></div>'. // @todo: desc in tag attribute |
|
35 | + '<div id="'.$id.'" class="'.$this->tag.'-body" style="display:none;">'.$this->content.'</div>'. |
|
36 | + '</div>'; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | // @todo |
52 | 52 | return '<div class="quote-container">'. |
53 | - '<div data-id="'.$id.'" class="quote-header expander">quote '.($this->getAttribute('source', null) ?? '').(!empty($url) ? ' <small>[<a href="'.$url.'">link</a>]<small>' : '').'</div>'. |
|
54 | - '<blockquote id="'.$id.'" class="quote-body" style="display:block;">'.$this->content.'</blockquote>'. // @todo: collapse (js: collapse child elements etc.) |
|
55 | - '</div>'; |
|
53 | + '<div data-id="'.$id.'" class="quote-header expander">quote '.($this->getAttribute('source', null) ?? '').(!empty($url) ? ' <small>[<a href="'.$url.'">link</a>]<small>' : '').'</div>'. |
|
54 | + '<blockquote id="'.$id.'" class="quote-body" style="display:block;">'.$this->content.'</blockquote>'. // @todo: collapse (js: collapse child elements etc.) |
|
55 | + '</div>'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -169,11 +169,11 @@ |
||
169 | 169 | $list_tag = (count($this->attributes) === 0 || $this->attributeIn('type', $ul) ? 'ul' : 'ol'); |
170 | 170 | |
171 | 171 | return '<'.$list_tag.' class="bb-list '.$this->attributeKeyIn('type', $types, 'disc').'" ' |
172 | - .(is_numeric($start) && $this->attributeIn('type', $ol) ? ' start="'.ceil($start).'"' : '') |
|
173 | - .($this->getAttribute('reversed') && $this->attributeIn('type', $ol) ? ' reversed="true"' : '') |
|
174 | - .'>' |
|
175 | - .'<li>'.implode(array_slice(explode('[*]', $this->content), true), '</li><li>').'</li>' // nasty |
|
176 | - .'</'.$list_tag.'>'; |
|
172 | + .(is_numeric($start) && $this->attributeIn('type', $ol) ? ' start="'.ceil($start).'"' : '') |
|
173 | + .($this->getAttribute('reversed') && $this->attributeIn('type', $ol) ? ' reversed="true"' : '') |
|
174 | + .'>' |
|
175 | + .'<li>'.implode(array_slice(explode('[*]', $this->content), true), '</li><li>').'</li>' // nasty |
|
176 | + .'</'.$list_tag.'>'; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | } |
@@ -64,7 +64,8 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * @return string |
66 | 66 | */ |
67 | - protected function c(){ // @todo |
|
67 | + protected function c(){ |
|
68 | +// @todo |
|
68 | 69 | $this->clearPseudoClosingTags(); |
69 | 70 | return '<code class="bb-inline-code" style="display: inline">'.$this->content.'</code>'; |
70 | 71 | } |
@@ -80,14 +81,16 @@ discard block |
||
80 | 81 | /** |
81 | 82 | * @return string |
82 | 83 | */ |
83 | - protected function font(){ // @todo: restrict fonts via classname |
|
84 | + protected function font(){ |
|
85 | +// @todo: restrict fonts via classname |
|
84 | 86 | return '<span class="bb-text font comic-sans">'.$this->content.'</span>'; |
85 | 87 | } |
86 | 88 | |
87 | 89 | /** |
88 | 90 | * @return string |
89 | 91 | */ |
90 | - protected function size(){ // @todo: restrict sizes via css |
|
92 | + protected function size(){ |
|
93 | +// @todo: restrict sizes via css |
|
91 | 94 | return '<span class="bb-text size extra-tiny">'.$this->content.'</span>'; |
92 | 95 | } |
93 | 96 |
@@ -40,8 +40,8 @@ |
||
40 | 40 | |
41 | 41 | // @todo |
42 | 42 | return '<div data-id="'.$id.'" class="expander code-header '.$this->tag.'">'.($desc ? ' - <span>'.$desc.'</span>' : '').'</div>' |
43 | - .'<pre id="'.$id.'" class="code-body" style="display:'.($this->getAttribute('hide') ? 'none' : 'block').';">' |
|
44 | - .'<code class="language-'.$this->tag.'">'.$this->content.'</code></pre>'; // sanitize |
|
43 | + .'<pre id="'.$id.'" class="code-body" style="display:'.($this->getAttribute('hide') ? 'none' : 'block').';">' |
|
44 | + .'<code class="language-'.$this->tag.'">'.$this->content.'</code></pre>'; // sanitize |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | } |