Static images now use flask url_for to get url
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
<div class="row text-center mb-2">
|
||||
<h1 class="text-primary display-1">
|
||||
Frequently asked questions
|
||||
{{ page.get_title() }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,15 +21,16 @@
|
||||
<picture>
|
||||
{% for img in page.get_content()[row]['images'] %}
|
||||
{% if not loop.last %}
|
||||
<source srcset="{{ img }}"
|
||||
<source srcset="{{ url_for('static', filename=img) }}"
|
||||
media="(max-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
|
||||
{% else %}
|
||||
<source srcset="{{ img }}"
|
||||
<source srcset="{{ url_for('static', filename=img) }}"
|
||||
media="(min-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<img class="img-fluid" src="{{ page.get_content()[row]['images'][1] }}">
|
||||
<img class="img-fluid"
|
||||
src="{{ url_for('static', filename=page.get_content()[row]['images'][1]) }}">
|
||||
</picture>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
<picture>
|
||||
{% for img in service['images'] %}
|
||||
{% if not loop.last %}
|
||||
<source srcset="{{ img }}"
|
||||
<source srcset="{{ url_for('static', filename=img) }}"
|
||||
media="(max-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
|
||||
{% else %}
|
||||
<source srcset="{{ img }}"
|
||||
<source srcset="{{ url_for('static', filename=img) }}"
|
||||
media="(min-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<img class="img-fluid card-img-top"
|
||||
src="{{ service['images'][1] }}">
|
||||
src="{{ url_for('static', filename=service['images'][1]) }}">
|
||||
</picture>
|
||||
<div class="card-body">
|
||||
<h1 class="card-title text-center text-primary">{{ service['title'] }}</h1>
|
||||
|
||||
Reference in New Issue
Block a user