tangled
alpha
login
or
join now
tokono.ma
/
diffuse
5
fork
atom
A music player that connects to your cloud/distributed storage.
5
fork
atom
overview
issues
4
pulls
pipelines
feat(facets): improved your-collection view
Steven Vandevelde
1 week ago
20bf1258
591e8883
+78
-62
2 changed files
expand all
collapse all
unified
split
src
facets
you.js
styles
diffuse
page.css
+47
-61
src/facets/you.js
···
34
34
keyed(
35
35
c.id,
36
36
html`
37
37
-
<li>
38
38
-
<div
39
39
-
style="display: flex; align-items: center; gap: var(--space-xs); justify-content: space-between; position: relative;"
40
40
-
>
37
37
+
<li class="grid-item">
38
38
+
<div class="grid-item__contents">
39
39
+
<div>
40
40
+
<a
41
41
+
href="facets/l/?id=${c
42
42
+
.id}"
43
43
+
style="display: inline-block; padding: var(--space-3xs) 0"
44
44
+
>
45
45
+
${c.name}
46
46
+
</a>
47
47
+
</div>
48
48
+
<div class="list-description">
49
49
+
<div>
50
50
+
${c.description?.trim().length
51
51
+
? unsafeHTML(
52
52
+
marked.parse(c.description, { async: false }),
53
53
+
)
54
54
+
: nothing}
55
55
+
</div>
56
56
+
<div>
57
57
+
${c.uri && !c.html
58
58
+
? html`
59
59
+
<span class="with-icon">
60
60
+
<i class="ph-fill ph-binoculars"></i>
61
61
+
<span>Tracking the original <a href="${c
62
62
+
.uri}">URI</a></span>
63
63
+
</span>
64
64
+
`
65
65
+
: html`
66
66
+
<span class="with-icon">
67
67
+
<i class="ph-fill ph-code-simple"></i>
68
68
+
<span>Custom code</span>
69
69
+
</span>
70
70
+
`}
71
71
+
</div>
72
72
+
</div>
73
73
+
</div>
74
74
+
75
75
+
<div class="grid-item__menu">
41
76
<a
42
42
-
href="facets/l/?id=${c
43
43
-
.id}"
44
44
-
style="display: inline-block; padding: var(--space-3xs) 0"
77
77
+
class="button button--transparent"
78
78
+
title="Edit"
79
79
+
href="facets/build/?id=${encodeURIComponent(c.id)}"
45
80
>
46
46
-
${c.name}
81
81
+
<i class="ph-fill ph-code-block"></i>
47
82
</a>
83
83
+
<hr />
48
84
<button
49
85
class="button--transparent"
50
50
-
popovertarget="facet-menu-col-${c.id}"
51
51
-
style="anchor-name: --facet-anchor-col-${c
52
52
-
.id}; font-size: var(--fs-base); padding: var(--space-3xs) 0;"
86
86
+
title="Delete"
87
87
+
@click="${deleteFacet({ id: c.id })}"
53
88
>
54
54
-
<i class="ph-fill ph-dots-three-circle"></i>
89
89
+
<i class="ph-fill ph-skull"></i>
55
90
</button>
56
56
-
</div>
57
57
-
<div class="list-description">
58
58
-
<div>
59
59
-
${c.description?.trim().length
60
60
-
? unsafeHTML(
61
61
-
marked.parse(c.description, { async: false }),
62
62
-
)
63
63
-
: nothing}
64
64
-
</div>
65
65
-
<div>
66
66
-
${c.uri && !c.html
67
67
-
? html`
68
68
-
<span class="with-icon">
69
69
-
<i class="ph-fill ph-binoculars"></i>
70
70
-
<span>Tracking the original <a href="${c
71
71
-
.uri}">URI</a></span>
72
72
-
</span>
73
73
-
`
74
74
-
: html`
75
75
-
<span class="with-icon">
76
76
-
<i class="ph-fill ph-code"></i>
77
77
-
<span>Custom code</span>
78
78
-
</span>
79
79
-
`}
80
80
-
</div>
81
81
-
</div>
82
82
-
83
83
-
<!-- Dropdown Menu -->
84
84
-
<div
85
85
-
id="facet-menu-col-${c.id}"
86
86
-
class="dropdown"
87
87
-
style="position-anchor: --facet-anchor-col-${c.id}"
88
88
-
popover
89
89
-
>
90
90
-
<a href="facets/l/?id=${c.id}">
91
91
-
<span class="with-icon">
92
92
-
<i class="ph-fill ph-globe"></i> Open
93
93
-
</span>
94
94
-
</a>
95
95
-
<a @click="${() => editFacet(c)}">
96
96
-
<span class="with-icon">
97
97
-
<i class="ph-fill ph-cursor-text"></i> Edit
98
98
-
</span>
99
99
-
</a>
100
100
-
<a @click="${deleteFacet({ id: c.id })}">
101
101
-
<span class="with-icon">
102
102
-
<i class="ph-fill ph-eraser"></i> Delete
103
103
-
</span>
104
104
-
</a>
105
91
</div>
106
92
</li>
107
93
`,
+31
-1
src/styles/diffuse/page.css
···
224
224
content: none;
225
225
}
226
226
227
227
-
li {
227
227
+
.grid-item {
228
228
border: 1px solid var(--border-color);
229
229
+
display: flex;
230
230
+
}
231
231
+
232
232
+
.grid-item__contents {
233
233
+
flex: 1;
229
234
padding: var(--space-md);
235
235
+
}
236
236
+
237
237
+
.grid-item__menu {
238
238
+
border-left: 1px solid var(--border-color);
239
239
+
display: flex;
240
240
+
flex-direction: column;
241
241
+
justify-content: space-evenly;
242
242
+
243
243
+
hr {
244
244
+
background: var(--border-color);
245
245
+
border: 0;
246
246
+
height: 1px;
247
247
+
margin: 0;
248
248
+
padding: 0;
249
249
+
}
250
250
+
}
251
251
+
252
252
+
.grid-item__menu button,
253
253
+
.grid-item__menu .button {
254
254
+
--button-bg-opacity: 0.3;
255
255
+
align-items: center;
256
256
+
border-radius: 0;
257
257
+
display: flex;
258
258
+
flex: 1;
259
259
+
justify-content: center;
230
260
}
231
261
}
232
262