Use url_for for all static paths

This commit is contained in:
richard-dds 2019-11-12 12:53:17 -05:00 committed by dandds
parent 436cbcffe4
commit 7ace430dee
7 changed files with 8 additions and 6 deletions

View File

@ -6,6 +6,7 @@
"scripts": {
"watch": "parcel watch js/index.js -d static/assets --public-url /static/assets -o index.js --no-autoinstall",
"build": "parcel build js/index.js -d static/assets --public-url /static/assets -o index.js",
"build-prod": "parcel build js/index.js -d static/assets --public-url $CDN_URL -o index.js",
"test": "jest",
"test:coverage": "jest --coverage --collectCoverageFrom='js/**/*.js'",
"test:watch": "jest --watch --no-cache"

View File

@ -6,7 +6,8 @@
<div class="home-container">
<div class="home-container__logo">
<img src="/static/img/ccpo-logo.svg" alt="Cloud Computing Program Office Logo">
<img src="{{ url_for("static", filename="img/ccpo-logo.svg") }}"
alt="Cloud Computing Program Office Logo">
</div>
<div class="home-container__body">

View File

@ -8,7 +8,7 @@
{% assets "css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">
{% endassets %}
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }} " />
</head>
<body>

View File

@ -10,7 +10,7 @@
{% assets "css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">
{% endassets %}
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }} " />
</head>
<body>

View File

@ -7,7 +7,7 @@
{% assets "css" %}
<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">
{% endassets %}
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='img/favicon.ico') }} " />
</head>
<body class="{% if g.modalOpen %} modalOpen{% endif %}">

View File

@ -132,6 +132,6 @@
<p>Heres an example:<br>
Application A has a development environment, production environment, and sandbox environment. The cloud resources in the development environment are grouped and accessed separately from the production environment and sandbox environment.</p>
<img src='/static/img/at-at_faqs_content.svg' alt='AT-AT FAQs Content'>
<img src='{{ url_for("static", filename="img/at-at_faqs_content.svg") }}' alt='AT-AT FAQs Content'>
{% endblock %}

View File

@ -94,7 +94,7 @@
</toggler>
</div>
<img id='jedi-heirarchy' src="/static/img/JEDIhierarchyDiagram.png" alt="JEDI heirarchy diagram">
<img id='jedi-heirarchy' src="{{ url_for("static", filename="img/JEDIhierarchyDiagram.png")}}" alt="JEDI heirarchy diagram">
</div>
</main>