Skip to content

Commit 2f56abd

Browse files
committed
added tool tips
1 parent 8d4ff6d commit 2f56abd

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

templates/events/form.html

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,18 @@ <h1>Create Event</h1>
9898
<div id="custom-icon-preview" class="d-none form-image"></div>
9999
</div>
100100
<fieldset class="form-floating">
101-
<input type="text" name="icon" id="icon" class="form-control last-border" placeholder="ph-calendar" list="icon-list">
102-
<label for="icon">Event Phosphor Icon</label>
101+
<input
102+
type="text"
103+
name="icon"
104+
id="icon"
105+
class="form-control last-border"
106+
placeholder="ph-calendar"
107+
list="icon-list"
108+
data-bs-toggle="tooltip"
109+
data-bs-html="true"
110+
data-bs-title="Enter a <a href='https://phosphoricons.com/' target='_blank'>Phosphor Icon</a> name or a <a href='https://github.com/UWCS/fulcrum/tree/main/static/icons' target='_blank'>custom icon</a> (upload files here if you want)"
111+
>
112+
<label for="icon">Event Icon</label>
103113
<datalist id="icon-list">
104114
{% for icon in icons %}
105115
<option value="{{ icon }}">
@@ -119,7 +129,17 @@ <h1>Create Event</h1>
119129
</div>
120130
<div class="input-group-text">#</div>
121131
<fieldset class="form-floating">
122-
<input type="text" name="text_colour" id="text_colour" class="form-control last-border" placeholder="#000000" list="colour-list">
132+
<input
133+
type="text"
134+
name="text_colour"
135+
id="text_colour"
136+
class="form-control last-border"
137+
placeholder="#000000"
138+
list="colour-list"
139+
data-bs-toggle="tooltip"
140+
data-bs-html="true"
141+
data-bs-title="Enter a hex colour code or a <a href='https://github.com/UWCS/fulcrum/blob/main/config.py' target='_blank'>predefined colour</a>"
142+
>
123143
<label for="text_colour">Event Colour</label>
124144
<datalist id="colour-list">
125145
{% for colour in colours %}
@@ -183,4 +203,9 @@ <h1>Create Event</h1>
183203
{% endfor %}
184204
</div>
185205

206+
<script>
207+
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
208+
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
209+
</script>
210+
186211
{% endblock %}

0 commit comments

Comments
 (0)