mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-22 01:19:46 +01:00
feat: preload assets
This commit is contained in:
2852
assets/style.css
2852
assets/style.css
File diff suppressed because one or more lines are too long
@@ -27,11 +27,14 @@ pub async fn index_handler(
|
||||
|
||||
let gdpr_accepted = auth.current_user.is_some() | session.get("gdpr_accepted").unwrap_or(false);
|
||||
|
||||
let queue_length = state
|
||||
.rabbitmq_consumer
|
||||
.get_queue_length()
|
||||
.await
|
||||
.map_err(|e| HtmlError::new(AppError::from(e), state.templates.clone()))?;
|
||||
let queue_length = match auth.current_user.is_some() {
|
||||
true => state
|
||||
.rabbitmq_consumer
|
||||
.get_queue_length()
|
||||
.await
|
||||
.map_err(|e| HtmlError::new(AppError::from(e), state.templates.clone()))?,
|
||||
false => 0,
|
||||
};
|
||||
|
||||
// let knowledge_entities = User::get_knowledge_entities(
|
||||
// &auth.current_user.clone().unwrap().id,
|
||||
|
||||
@@ -5,15 +5,26 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Minne{% endblock %}</title>
|
||||
<script src="assets/htmx.min.js"></script>
|
||||
<link rel="stylesheet" href="assets/style.css">
|
||||
<link rel="manifest" href="/assets/manifest.json">
|
||||
|
||||
<!-- Optional but recommended for iOS support -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<!-- Preload critical assets -->
|
||||
<link rel="preload" href="assets/htmx.min.js" as="script">
|
||||
<link rel="preload" href="assets/style.css" as="style">
|
||||
|
||||
<!-- Core styles -->
|
||||
<link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="assets/htmx.min.js" defer></script>
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="icon" href="/assets/icon/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="/assets/icon/apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" href="/assets/icon/apple-touch-icon.png" media="(device-width: 320px)">
|
||||
|
||||
<!-- PWA -->
|
||||
<link rel="manifest" href="/assets/manifest.json">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user