-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.slim
45 lines (35 loc) · 1.94 KB
/
index.html.slim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
div data-controller="popup"
#search-field data-reflex-permanent=""
mwc-textfield placeholder="Search" type="text" outlined="" class="shaped-outlined" data-action="input->popup#search" autofocus=""
button#search-button
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
- if @snippets.size == 0
- if @term.present?
.text-center.text-muted
| Couldn't find results for
strong = @term
| . Showing all results instead.
br
br
- Snippet.all.order(id: :desc).each do |snippet|
= render 'snippet', snippet: snippet
- else
p.text-muted.text-center Add your first snippet from the button below
br
- @snippets.each do |snippet|
= render 'snippet', snippet: snippet
br
br
br
#add-new-button
mwc-fab data-action="click->popup#new"
mwc-icon slot="icon"
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
mwc-dialog heading="Add Snippet" data-target="popup.newDialog" data-action="closing->popup#add"
/ p Paste the contents in the box
form
mwc-textarea outlined="" fullwidth="" placeholder="Snippet text .." helper="Snippets are small pieces of text that you can easily find later" helperpersistent="" dialoginitialfocus="" rows="5" data-target="popup.textarea"
mwc-button slot="primaryAction" dialogaction="save" unelevated=""
| Save
mwc-button slot="secondaryAction" dialogaction="close"
| Cancel