@robert.tools/atom-text 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.css +1 -1
- package/src/index.njk +7 -5
package/package.json
CHANGED
package/src/index.css
CHANGED
package/src/index.njk
CHANGED
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
{% set css_modifier = params.css_modifier or "" %}
|
|
4
4
|
{% set css = (css_base ~ " " ~ css_modifier) | trim %}
|
|
5
5
|
|
|
6
|
+
{% set id = ('id="' ~ (params.id) ~ '"') if params.id is defined else '' %}
|
|
7
|
+
|
|
6
8
|
{% set text = (params.prefix or "") ~ params.text ~ (params.suffix or "") %}
|
|
7
9
|
|
|
8
10
|
{% if params.text is defined %}
|
|
9
11
|
{% if tag == 'span' %}
|
|
10
|
-
<span class="{{css}}" data-component="text.atom">{{ text }}</span>
|
|
12
|
+
<span {{id}} class="{{css}}" data-component="text.atom">{{ text }}</span>
|
|
11
13
|
{% elif tag == 'h1' %}
|
|
12
|
-
<h1 class="{{css}}" data-component="text.atom">{{ text }}</h1>
|
|
14
|
+
<h1 {{id}} class="{{css}}" data-component="text.atom">{{ text }}</h1>
|
|
13
15
|
{% elif tag == 'h2' %}
|
|
14
|
-
<h2 class="{{css}}" data-component="text.atom">{{ text }}</h2>
|
|
16
|
+
<h2 {{id}} class="{{css}}" data-component="text.atom">{{ text }}</h2>
|
|
15
17
|
{% elif tag == 'h3' %}
|
|
16
|
-
<h3 class="{{css}}" data-component="text.atom">{{ text }}</h3>
|
|
18
|
+
<h3 {{id}} class="{{css}}" data-component="text.atom">{{ text }}</h3>
|
|
17
19
|
{% elif tag == 'p' %}
|
|
18
|
-
<p class="{{css}}" data-component="text.atom">{{ text }}</p>
|
|
20
|
+
<p {{id}} class="{{css}}" data-component="text.atom">{{ text }}</p>
|
|
19
21
|
{% else %}
|
|
20
22
|
{{ text }}
|
|
21
23
|
{% endif %}
|