@rmdes/indiekit-endpoint-microsub 1.0.0-beta.4 → 1.0.0-beta.6
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/locales/en.json +1 -0
- package/package.json +1 -1
- package/views/channel-new.njk +8 -12
- package/views/channel.njk +4 -4
- package/views/compose.njk +4 -7
- package/views/item.njk +4 -4
- package/views/partials/actions.njk +2 -2
- package/views/partials/item-card.njk +2 -2
- package/views/reader.njk +2 -2
- package/views/settings.njk +24 -46
package/locales/en.json
CHANGED
package/package.json
CHANGED
package/views/channel-new.njk
CHANGED
|
@@ -3,21 +3,17 @@
|
|
|
3
3
|
{% block content %}
|
|
4
4
|
<div class="channel-new">
|
|
5
5
|
<a href="{{ baseUrl }}/channels" class="back-link">
|
|
6
|
-
{{ icon("
|
|
6
|
+
{{ icon("previous") }} {{ __("microsub.channels.title") }}
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<form method="post" action="{{ baseUrl }}/channels/new">
|
|
10
|
-
{{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
required: true,
|
|
18
|
-
autocomplete: "off",
|
|
19
|
-
autofocus: true
|
|
20
|
-
}
|
|
10
|
+
{{ input({
|
|
11
|
+
id: "name",
|
|
12
|
+
name: "name",
|
|
13
|
+
label: __("microsub.channels.name"),
|
|
14
|
+
required: true,
|
|
15
|
+
autocomplete: "off",
|
|
16
|
+
attributes: { autofocus: true }
|
|
21
17
|
}) }}
|
|
22
18
|
|
|
23
19
|
<div class="button-group">
|
package/views/channel.njk
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<div class="channel">
|
|
5
5
|
<header class="channel__header">
|
|
6
6
|
<a href="{{ baseUrl }}/channels" class="back-link">
|
|
7
|
-
{{ icon("
|
|
7
|
+
{{ icon("previous") }} {{ __("microsub.channels.title") }}
|
|
8
8
|
</a>
|
|
9
9
|
<div class="channel__actions">
|
|
10
10
|
<a href="{{ baseUrl }}/channels/{{ channel.uid }}/settings" class="button button--secondary button--small">
|
|
11
|
-
{{ icon("
|
|
11
|
+
{{ icon("updatePost") }} {{ __("microsub.channels.settings") }}
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
</header>
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
<nav class="timeline__paging" aria-label="Pagination">
|
|
25
25
|
{% if paging.before %}
|
|
26
26
|
<a href="?before={{ paging.before }}" class="button button--secondary">
|
|
27
|
-
{{ icon("
|
|
27
|
+
{{ icon("previous") }} {{ __("microsub.reader.newer") }}
|
|
28
28
|
</a>
|
|
29
29
|
{% endif %}
|
|
30
30
|
{% if paging.after %}
|
|
31
31
|
<a href="?after={{ paging.after }}" class="button button--secondary">
|
|
32
|
-
{{ __("microsub.reader.older") }} {{ icon("
|
|
32
|
+
{{ __("microsub.reader.older") }} {{ icon("next") }}
|
|
33
33
|
</a>
|
|
34
34
|
{% endif %}
|
|
35
35
|
</nav>
|
package/views/compose.njk
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{% block content %}
|
|
4
4
|
<div class="compose">
|
|
5
5
|
<a href="{{ baseUrl }}/channels" class="back-link">
|
|
6
|
-
{{ icon("
|
|
6
|
+
{{ icon("previous") }} {{ __("Back") }}
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
{% if replyTo %}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
{% if likeOf %}
|
|
16
16
|
<div class="compose__context">
|
|
17
|
-
{{ icon("
|
|
17
|
+
{{ icon("like") }} {{ __("microsub.compose.likeOf") }}: <a href="{{ likeOf }}">{{ likeOf }}</a>
|
|
18
18
|
</div>
|
|
19
19
|
{% endif %}
|
|
20
20
|
|
|
@@ -37,14 +37,11 @@
|
|
|
37
37
|
|
|
38
38
|
{% if not likeOf and not repostOf %}
|
|
39
39
|
{{ textarea({
|
|
40
|
-
label:
|
|
41
|
-
text: __("microsub.compose.content"),
|
|
42
|
-
classes: "label--visuallyhidden"
|
|
43
|
-
},
|
|
40
|
+
label: __("microsub.compose.content"),
|
|
44
41
|
id: "content",
|
|
45
42
|
name: "content",
|
|
46
43
|
rows: 5,
|
|
47
|
-
autofocus: true
|
|
44
|
+
attributes: { autofocus: true }
|
|
48
45
|
}) }}
|
|
49
46
|
{% endif %}
|
|
50
47
|
|
package/views/item.njk
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{% block content %}
|
|
4
4
|
<article class="item">
|
|
5
5
|
<a href="{{ baseUrl }}/channels" class="back-link">
|
|
6
|
-
{{ icon("
|
|
6
|
+
{{ icon("previous") }} {{ __("Back") }}
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
{% if item.author %}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<p>{{ icon("reply") }} {{ __("Reply to") }}: <a href="{{ item.inReplyTo[0] }}">{{ item.inReplyTo[0] }}</a></p>
|
|
57
57
|
{% endif %}
|
|
58
58
|
{% if item.likeOf %}
|
|
59
|
-
<p>{{ icon("
|
|
59
|
+
<p>{{ icon("like") }} {{ __("Liked") }}: <a href="{{ item.likeOf[0] }}">{{ item.likeOf[0] }}</a></p>
|
|
60
60
|
{% endif %}
|
|
61
61
|
{% if item.repostOf %}
|
|
62
62
|
<p>{{ icon("repost") }} {{ __("Reposted") }}: <a href="{{ item.repostOf[0] }}">{{ item.repostOf[0] }}</a></p>
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
{{ icon("reply") }} {{ __("microsub.item.reply") }}
|
|
73
73
|
</a>
|
|
74
74
|
<a href="{{ baseUrl }}/compose?likeOf={{ item.url | urlencode }}" class="button button--secondary button--small">
|
|
75
|
-
{{ icon("
|
|
75
|
+
{{ icon("like") }} {{ __("microsub.item.like") }}
|
|
76
76
|
</a>
|
|
77
77
|
<a href="{{ baseUrl }}/compose?repostOf={{ item.url | urlencode }}" class="button button--secondary button--small">
|
|
78
78
|
{{ icon("repost") }} {{ __("microsub.item.repost") }}
|
|
79
79
|
</a>
|
|
80
80
|
<a href="{{ item.url }}" class="button button--secondary button--small" target="_blank" rel="noopener">
|
|
81
|
-
{{ icon("
|
|
81
|
+
{{ icon("public") }} {{ __("microsub.item.viewOriginal") }}
|
|
82
82
|
</a>
|
|
83
83
|
</footer>
|
|
84
84
|
</article>
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
{{ icon("reply") }}
|
|
5
5
|
</a>
|
|
6
6
|
<a href="{{ baseUrl }}/compose?likeOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.like') }}">
|
|
7
|
-
{{ icon("
|
|
7
|
+
{{ icon("like") }}
|
|
8
8
|
</a>
|
|
9
9
|
<a href="{{ baseUrl }}/compose?repostOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.repost') }}">
|
|
10
10
|
{{ icon("repost") }}
|
|
11
11
|
</a>
|
|
12
12
|
<a href="{{ itemUrl }}" class="item-actions__button" target="_blank" rel="noopener" title="{{ __('microsub.item.viewOriginal') }}">
|
|
13
|
-
{{ icon("
|
|
13
|
+
{{ icon("public") }}
|
|
14
14
|
</a>
|
|
15
15
|
</div>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{% if item._type and item._type !== "entry" %}
|
|
19
19
|
<div class="item-card__type">
|
|
20
20
|
{% if item._type === "like" %}
|
|
21
|
-
{{ icon("
|
|
21
|
+
{{ icon("like") }} Liked
|
|
22
22
|
{% elif item._type === "repost" %}
|
|
23
23
|
{{ icon("repost") }} Reposted
|
|
24
24
|
{% elif item._type === "reply" %}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</time>
|
|
59
59
|
{% endif %}
|
|
60
60
|
{% if not item._is_read %}
|
|
61
|
-
<span class="item-card__unread"
|
|
61
|
+
<span class="item-card__unread" aria-label="Unread">●</span>
|
|
62
62
|
{% endif %}
|
|
63
63
|
</footer>
|
|
64
64
|
</a>
|
package/views/reader.njk
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<a href="{{ baseUrl }}/channels/{{ channel.uid }}" class="reader__channel-link">
|
|
10
10
|
<span class="reader__channel-name">
|
|
11
11
|
{% if channel.uid === "notifications" %}
|
|
12
|
-
{{ icon("
|
|
12
|
+
{{ icon("mention") }}
|
|
13
13
|
{% endif %}
|
|
14
14
|
{{ channel.name }}
|
|
15
15
|
</span>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</ul>
|
|
23
23
|
<p class="reader__actions">
|
|
24
24
|
<a href="{{ baseUrl }}/channels/new" class="button button--secondary">
|
|
25
|
-
{{ icon("
|
|
25
|
+
{{ icon("createPost") }} {{ __("microsub.channels.new") }}
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
28
28
|
{% else %}
|
package/views/settings.njk
CHANGED
|
@@ -3,69 +3,47 @@
|
|
|
3
3
|
{% block content %}
|
|
4
4
|
<div class="settings">
|
|
5
5
|
<a href="{{ baseUrl }}/channels/{{ channel.uid }}" class="back-link">
|
|
6
|
-
{{ icon("
|
|
6
|
+
{{ icon("previous") }} {{ channel.name }}
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<form method="post" action="{{ baseUrl }}/channels/{{ channel.uid }}/settings">
|
|
10
|
-
{{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
hint: {
|
|
16
|
-
text: __("microsub.settings.excludeTypesHelp")
|
|
10
|
+
{{ checkboxes({
|
|
11
|
+
name: "excludeTypes",
|
|
12
|
+
values: channel.settings.excludeTypes,
|
|
13
|
+
fieldset: {
|
|
14
|
+
legend: __("microsub.settings.excludeTypes")
|
|
17
15
|
},
|
|
16
|
+
hint: __("microsub.settings.excludeTypesHelp"),
|
|
18
17
|
items: [
|
|
19
18
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
value: "like",
|
|
23
|
-
text: __("microsub.settings.types.like"),
|
|
24
|
-
checked: channel.settings.excludeTypes | includes("like")
|
|
19
|
+
label: __("microsub.settings.types.like"),
|
|
20
|
+
value: "like"
|
|
25
21
|
},
|
|
26
22
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
value: "repost",
|
|
30
|
-
text: __("microsub.settings.types.repost"),
|
|
31
|
-
checked: channel.settings.excludeTypes | includes("repost")
|
|
23
|
+
label: __("microsub.settings.types.repost"),
|
|
24
|
+
value: "repost"
|
|
32
25
|
},
|
|
33
26
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value: "bookmark",
|
|
37
|
-
text: __("microsub.settings.types.bookmark"),
|
|
38
|
-
checked: channel.settings.excludeTypes | includes("bookmark")
|
|
27
|
+
label: __("microsub.settings.types.bookmark"),
|
|
28
|
+
value: "bookmark"
|
|
39
29
|
},
|
|
40
30
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
value: "reply",
|
|
44
|
-
text: __("microsub.settings.types.reply"),
|
|
45
|
-
checked: channel.settings.excludeTypes | includes("reply")
|
|
31
|
+
label: __("microsub.settings.types.reply"),
|
|
32
|
+
value: "reply"
|
|
46
33
|
},
|
|
47
34
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
value: "checkin",
|
|
51
|
-
text: __("microsub.settings.types.checkin"),
|
|
52
|
-
checked: channel.settings.excludeTypes | includes("checkin")
|
|
35
|
+
label: __("microsub.settings.types.checkin"),
|
|
36
|
+
value: "checkin"
|
|
53
37
|
}
|
|
54
38
|
]
|
|
55
|
-
})
|
|
39
|
+
}) }}
|
|
56
40
|
|
|
57
|
-
{{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
hint:
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
input: {
|
|
65
|
-
id: "excludeRegex",
|
|
66
|
-
name: "excludeRegex",
|
|
67
|
-
value: channel.settings.excludeRegex
|
|
68
|
-
}
|
|
41
|
+
{{ input({
|
|
42
|
+
id: "excludeRegex",
|
|
43
|
+
name: "excludeRegex",
|
|
44
|
+
label: __("microsub.settings.excludeRegex"),
|
|
45
|
+
hint: __("microsub.settings.excludeRegexHelp"),
|
|
46
|
+
value: channel.settings.excludeRegex
|
|
69
47
|
}) }}
|
|
70
48
|
|
|
71
49
|
<div class="button-group">
|