Skip to content

Commit

Permalink
Use "webpack" instead of "manifest" for the more precise term
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed May 28, 2024
1 parent d47b251 commit 2e02549
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions hasjob/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
lastuser = Lastuser()
redis_store = FlaskRedis(decode_responses=True)
rq = RQ()
manifest = WebpackManifest(
app, filepath='static/build/manifest.json', urlpath='/static/build/'
webpack = WebpackManifest(
app,
filepath='static/build/manifest.json',
urlpath='/static/build/',
jinja_global='webpack',
)

# Second, setup assets
Expand Down
2 changes: 1 addition & 1 deletion hasjob/templates/embedlayout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{%- block layoutheaders %}
<link rel="icon" href="/static/img/favicon.ico">
<link rel="stylesheet" type="text/css" href="{{ manifest('app-css') }}" />
<link rel="stylesheet" type="text/css" href="{{ webpack('app-css') }}" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,700,700i|McLaren&amp;subset=latin-ext">
{#
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=McLaren" />
Expand Down
8 changes: 4 additions & 4 deletions hasjob/templates/layout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/static/img/hasjob-logo.svg">

<link rel="stylesheet" type="text/css" href="{{ manifest('app-css') }}" />
<link rel="stylesheet" type="text/css" href="{{ webpack('app-css') }}" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,700,700i|McLaren&amp;subset=latin-ext">
{#
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=McLaren" />
Expand Down Expand Up @@ -282,9 +282,9 @@

{% block layoutscripts %}
{%- if header_campaign %}{{ campaign_script() }}{% endif %}
<script src='{{ manifest('manifest') }}' type="text/javascript"></script>
<script src='{{ manifest('app') }}' type="text/javascript"></script>
<script src='{{ manifest('vendor') }}' type="text/javascript"></script>
<script src='{{ webpack('manifest') }}' type="text/javascript"></script>
<script src='{{ webpack('app') }}' type="text/javascript"></script>
<script src='{{ webpack('vendor') }}' type="text/javascript"></script>
<script type="text/javascript">
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
Expand Down

0 comments on commit 2e02549

Please sign in to comment.