Skip to content

Commit

Permalink
More tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Jan 23, 2024
1 parent c531c08 commit eeb248b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 11 deletions.
27 changes: 24 additions & 3 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,32 @@ div.label-smaller {
display: inline-block;
}

.tooltip-button {
button.is-small.tooltip-button {
border: 0;
margin-left: 0.2rem;
font-size: 0.65rem;
}

h1, h2, h3, h4, h5, h6 {
&.is-1,
&.is-2,
&.is-3 {
& > button.is-small.tooltip-button {
margin-top: 0.5rem;
}
}

&.is-4 {
& > button.is-small.tooltip-button {
margin-top: 0.2rem;
}
}

& > button.is-small.tooltip-button {
margin-top: 0.3rem;
}
}


button.clone-field {
float: right;
margin-top: 0.5rem;
Expand Down Expand Up @@ -229,4 +250,4 @@ div .field.with-tooltip .control {
& button {
margin-left: 0.5rem;
}
}
}
5 changes: 3 additions & 2 deletions view/download.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% from '_macros' import fileUrl %}
{% from '_macros' import fileUrl, renderTooltip %}
<div class="column {{ column is not empty ? column : 'is-full' }}">
<div class="field">
<div class="control">
<a href="{{ fileUrl(href) }}" target="_blank">{{ label }}</a>
{{ renderTooltip(tooltip) }}
</div>
</div>
</div>
</div>
5 changes: 3 additions & 2 deletions view/fieldset.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from '_macros' import renderError %}
{% from '_macros' import renderError, renderTooltip %}

{% if backgroundName is not empty %}
<div class="has-background-{{ backgroundName }}">
Expand All @@ -12,6 +12,7 @@
<div class="column {{ column is not empty ? column : 'is-full' }} fieldset-content">
<div class="label fieldset-label">
{{ label }}
{{ renderTooltip(tooltip) }}
</div>
<div class="columns{% if scrollable is empty %} is-multiline{% else %} is-scrollable{% endif %}">
{% if tablestyle is not empty %}<div class="next-is-double"></div>{% endif %}
Expand All @@ -24,4 +25,4 @@

{% if (backgroundName is not empty or backgroundNumber is not empty) %}
</div>
{% endif %}
{% endif %}
3 changes: 2 additions & 1 deletion view/image.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% from '_macros' import fileUrl , renderError %}
{% from '_macros' import fileUrl , renderError, renderTooltip %}
<div class="column {{ column is not empty ? column : 'is-full' }}">
<div class="field">
<div class="label {{ labelsmall is not empty ? 'label-smaller' }}">{{ label }}</div>
{{ renderTooltip(tooltip) }}
<div class="control">
<img src="{{ fileUrl(src) }}" style="{{ width is defined ? 'width:'~width~'px;' }} {{ height is defined ? 'height:'~height~'px;' }}" alt="{{ alt is defined ? alt : label }}">
</div>
Expand Down
6 changes: 4 additions & 2 deletions view/signature.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from '_macros' import renderError %}
{% from '_macros' import renderError, renderTooltip %}
<div class="column {{ column is not empty ? column : 'is-full' }}">

{% if value %}
Expand All @@ -17,7 +17,9 @@
<div class="signature-pad {{ value is not empty ? 'hidden'}}" data-replacepad="{{ id_string }}" {{ width is defined ? ('data-width="'~width~'"') | raw }} {{ height is defined ? ('data-height="'~height~'"') | raw }}>
<div class="field">
<div class="control">
<div class="label {{ labelsmall is not empty ? 'label-smaller' }}">{{ label }} {{ is_required ? '*' }}</div>
<div class="label {{ labelsmall is not empty ? 'label-smaller' }}">{{ label }} {{ is_required ? '*' }}
{{ renderTooltip(tooltip) }}
</div>
<input type="hidden" id="{{ id }}" name="{{ id }}" value="{{ value }}" class="form-input"/>
<canvas></canvas>
</div>
Expand Down
2 changes: 1 addition & 1 deletion view/textinput.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{%- if label is not empty -%}
{{ label }} {{ is_required ? '*' }}
{%- endif -%}
{{ renderTooltip(tooltip) }}
</label>
{{ renderTooltip(tooltip) }}
<div class="control is-cloneable">
<input
type="text"
Expand Down

0 comments on commit eeb248b

Please sign in to comment.