* script src=/static/dist/budle.js where required
* page module no longer sets 'script_src'
This commit is contained in:
parent
3ad4d4fa14
commit
7c85c656e9
@ -30,7 +30,6 @@ pub fn default_map() -> HashMap<&'static str, String> {
|
|||||||
#[get("/")]
|
#[get("/")]
|
||||||
pub async fn home() -> Template {
|
pub async fn home() -> Template {
|
||||||
let mut h = default_map();
|
let mut h = default_map();
|
||||||
h.insert("script_src", String::from("index.js"));
|
|
||||||
h.insert("page", String::from("home"));
|
h.insert("page", String::from("home"));
|
||||||
h.insert("title", SITENAME.clone());
|
h.insert("title", SITENAME.clone());
|
||||||
|
|
||||||
@ -40,7 +39,6 @@ pub async fn home() -> Template {
|
|||||||
#[get("/category/<cat..>")]
|
#[get("/category/<cat..>")]
|
||||||
pub async fn category(cat: PathBuf) -> Template {
|
pub async fn category(cat: PathBuf) -> Template {
|
||||||
let mut h = default_map();
|
let mut h = default_map();
|
||||||
h.insert("script_src", String::from("category.js"));
|
|
||||||
h.insert("page", String::from("category"));
|
h.insert("page", String::from("category"));
|
||||||
|
|
||||||
// Opengraph meta tags bro
|
// Opengraph meta tags bro
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
<title>Clippable Admin Dashboard</title>
|
<title>Clippable Admin Dashboard</title>
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"/>
|
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"/>
|
||||||
|
|
||||||
<!-- This script basically just provides some convenience to -->
|
<script src="/static/dist/bundle.js"></script>
|
||||||
<!-- pre-populate the requests that an admin might make -->
|
|
||||||
<script src="/static/js/admin.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:image" content="/static/favicon.png">
|
<meta property="og:image" content="/static/favicon.png">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script src="/static/js/{{script_src}}"></script>
|
<script src="/static/dist/bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="layout">
|
<div id="layout">
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<meta property="og:video" content="{{clip_url}}">
|
<meta property="og:video" content="{{clip_url}}">
|
||||||
|
|
||||||
{% if script %}
|
{% if script %}
|
||||||
<script src="/static/js/{{script_src}}"></script>
|
<script src="/static/dist/bundle.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user