chore: include head html component in all pages
Moves common <head>..</head> tags into componenents/head.html and includes it from all pages. Common elements include: css files, favicon, meta tag(s)
This commit is contained in:
parent
faf303bbdd
commit
48966fa69d
4
templates/web/html/components/head.html
Normal file
4
templates/web/html/components/head.html
Normal file
@ -0,0 +1,4 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="/css/styles.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/pico.min.css" media="screen" />
|
||||
<link rel="icon" type="image/png" sizes="48x48" href="/image/neptune-favicon.png">
|
||||
@ -3,9 +3,7 @@
|
||||
|
||||
<head>
|
||||
<title>Neptune Block Explorer: Block Height {{self.block_info.height}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="/css/pico.min.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/styles.css" media="screen" />
|
||||
{{html_escaper::Trusted(include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/templates/web/html/components/head.html")))}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
<head>
|
||||
<title>Neptune Block Explorer: Not Found</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="/css/pico.min.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/styles.css" media="screen" />
|
||||
{{html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html")))}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Neptune Block Explorer: (network: {{self.state.network}})</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/styles.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/pico.min.css" media="screen" />
|
||||
<link rel="icon" type="image/png" sizes="48x48" href="/image/neptune-favicon.png">
|
||||
|
||||
<script>
|
||||
{{ html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html"))) }}
|
||||
<script>
|
||||
function handle_submit(form) {
|
||||
let value = form.height_or_digest.value;
|
||||
var is_digest = value.length == 80;
|
||||
@ -20,8 +17,7 @@
|
||||
window.location.href = uri;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="container">
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
<head>
|
||||
<title>Neptune Block Explorer: Utxo {{self.index}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="/css/pico.min.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/styles.css" media="screen" />
|
||||
{{html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html")))}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user