kopia lustrzana https://github.com/dgtlmoon/changedetection.io
UI - "Add new watch" URL at main input box should always grow to match the viewport
rodzic
684e96f5f1
commit
19e752e9ba
|
@ -402,8 +402,24 @@ label {
|
||||||
}
|
}
|
||||||
|
|
||||||
#watch-add-wrapper-zone {
|
#watch-add-wrapper-zone {
|
||||||
>div {
|
|
||||||
display: inline-block;
|
@media only screen and (min-width: 760px) {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.3rem;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
/* URL field grows always, other stay static in width */
|
||||||
|
> span {
|
||||||
|
flex-grow: 0;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 760px) {
|
@media only screen and (max-width: 760px) {
|
||||||
|
|
|
@ -683,8 +683,20 @@ label:hover {
|
||||||
#new-watch-form legend {
|
#new-watch-form legend {
|
||||||
color: var(--color-text-legend);
|
color: var(--color-text-legend);
|
||||||
font-weight: bold; }
|
font-weight: bold; }
|
||||||
#new-watch-form #watch-add-wrapper-zone > div {
|
#new-watch-form #watch-add-wrapper-zone {
|
||||||
display: inline-block; }
|
/* URL field grows always, other stay static in width */ }
|
||||||
|
@media only screen and (min-width: 760px) {
|
||||||
|
#new-watch-form #watch-add-wrapper-zone {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.3rem;
|
||||||
|
flex-direction: row; } }
|
||||||
|
#new-watch-form #watch-add-wrapper-zone > span {
|
||||||
|
flex-grow: 0; }
|
||||||
|
#new-watch-form #watch-add-wrapper-zone > span input {
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 1em; }
|
||||||
|
#new-watch-form #watch-add-wrapper-zone > span:first-child {
|
||||||
|
flex-grow: 1; }
|
||||||
@media only screen and (max-width: 760px) {
|
@media only screen and (max-width: 760px) {
|
||||||
#new-watch-form #watch-add-wrapper-zone #url {
|
#new-watch-form #watch-add-wrapper-zone #url {
|
||||||
width: 100%; } }
|
width: 100%; } }
|
||||||
|
|
|
@ -39,6 +39,24 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
{% macro render_nolabel_field(field) %}
|
||||||
|
<span>
|
||||||
|
{{ field(**kwargs)|safe }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<span class="error">
|
||||||
|
{% if field.errors %}
|
||||||
|
<ul class=errors>
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro render_button(field) %}
|
{% macro render_button(field) %}
|
||||||
{{ field(**kwargs)|safe }}
|
{{ field(**kwargs)|safe }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% from '_helpers.jinja' import render_simple_field, render_field %}
|
{% from '_helpers.jinja' import render_simple_field, render_field, render_nolabel_field %}
|
||||||
<script src="{{url_for('static_content', group='js', filename='jquery-3.6.0.min.js')}}"></script>
|
<script src="{{url_for('static_content', group='js', filename='jquery-3.6.0.min.js')}}"></script>
|
||||||
<script src="{{url_for('static_content', group='js', filename='watch-overview.js')}}" defer></script>
|
<script src="{{url_for('static_content', group='js', filename='watch-overview.js')}}" defer></script>
|
||||||
|
|
||||||
|
@ -11,14 +11,11 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Add a new change detection watch</legend>
|
<legend>Add a new change detection watch</legend>
|
||||||
<div id="watch-add-wrapper-zone">
|
<div id="watch-add-wrapper-zone">
|
||||||
<div>
|
|
||||||
{{ render_simple_field(form.url, placeholder="https://...", required=true) }}
|
{{ render_nolabel_field(form.url, placeholder="https://...", required=true) }}
|
||||||
{{ render_simple_field(form.tags, value=tags[active_tag].title if active_tag else '', placeholder="watch label / tag") }}
|
{{ render_nolabel_field(form.tags, value=tags[active_tag].title if active_tag else '', placeholder="watch label / tag") }}
|
||||||
</div>
|
{{ render_nolabel_field(form.watch_submit_button, title="Watch this URL!" ) }}
|
||||||
<div>
|
{{ render_nolabel_field(form.edit_and_watch_submit_button, title="Edit first then Watch") }}
|
||||||
{{ render_simple_field(form.watch_submit_button, title="Watch this URL!" ) }}
|
|
||||||
{{ render_simple_field(form.edit_and_watch_submit_button, title="Edit first then Watch") }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="quick-watch-processor-type">
|
<div id="quick-watch-processor-type">
|
||||||
{{ render_simple_field(form.processor, title="Edit first then Watch") }}
|
{{ render_simple_field(form.processor, title="Edit first then Watch") }}
|
||||||
|
|
Ładowanie…
Reference in New Issue