Use files for custom JS/CSS
This commit is contained in:
parent
ee1d4d4786
commit
b32adde2bd
3 changed files with 134 additions and 128 deletions
13
public/css/custom.css
Normal file
13
public/css/custom.css
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
body {
|
||||||
|
padding-top: 54px;
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
body {
|
||||||
|
padding-top: 56px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin-top: 56px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
21
public/js/custom.js
Normal file
21
public/js/custom.js
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
$(".alert-danger").delay(30000).fadeOut(300);
|
||||||
|
$(".alert-success").delay(10000).fadeOut(300);
|
||||||
|
$(".alert-info").delay(10000).fadeOut(300);
|
||||||
|
|
||||||
|
window.addEventListener("load", function () {
|
||||||
|
window.cookieconsent.initialise({
|
||||||
|
"palette": {
|
||||||
|
"popup": {
|
||||||
|
"background": "#252e39"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"background": "#14a7d0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"message": "{{ 'cookiemodal.message'|trans }}",
|
||||||
|
"dismiss": "{{ 'cookiemodal.dismiss'|trans }}",
|
||||||
|
"href": "/signup"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<!-- Meta -->
|
<!-- Meta -->
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
|
@ -9,68 +9,62 @@
|
||||||
<!-- CSS & fonts -->
|
<!-- CSS & fonts -->
|
||||||
<link rel="stylesheet" href="{{ base_url() }}/css/bootstrap.min.css">
|
<link rel="stylesheet" href="{{ base_url() }}/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="{{ base_url() }}/css/font-awesome.css">
|
<link rel="stylesheet" href="{{ base_url() }}/css/font-awesome.css">
|
||||||
<link rel="stylesheet" href="{{ base_url() }}/css/cookieconsent.min.css" />
|
<link rel="stylesheet" href="{{ base_url() }}/css/cookieconsent.min.css"/>
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<style>
|
<link rel="stylesheet" href="{{ base_url() }}/css/custom.css"/>
|
||||||
body {
|
</head>
|
||||||
padding-top: 54px;
|
<body>
|
||||||
}
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
body {
|
|
||||||
padding-top: 56px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
<!-- Navigation -->
|
||||||
margin-top: 56px;
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- Navigation -->
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="{{ base_url() }}{{ path_for('/') }}">{{ getenv('site_title') }}</a>
|
<a class="navbar-brand" href="{{ base_url() }}{{ path_for('/') }}">{{ getenv('site_title') }}</a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
|
||||||
|
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('/') }}">{{ getenv('site_navbar_home_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('/') }}">{{ getenv('site_navbar_home_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- current user -->
|
<!-- current user -->
|
||||||
{% if currentUser is not empty %}
|
{% if currentUser is not empty %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('password') }}">{{ getenv('site_navbar_password_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('password') }}">{{ getenv('site_navbar_password_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('delete') }}">{{ getenv('site_navbar_delete_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('delete') }}">{{ getenv('site_navbar_delete_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('signup') }}">{{ getenv('site_navbar_signup_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('signup') }}">{{ getenv('site_navbar_signup_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('login') }}">{{ getenv('site_navbar_login_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('login') }}">{{ getenv('site_navbar_login_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if getenv('site_navbar_backlink_enabled') == 'true' %}
|
{% if getenv('site_navbar_backlink_enabled') == 'true' %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ getenv('site_navbar_backlink_uri') }}">{{ getenv('site_navbar_backlink_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ getenv('site_navbar_backlink_uri') }}">{{ getenv('site_navbar_backlink_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if currentUser is not empty %}
|
{% if currentUser is not empty %}
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ base_url() }}{{ path_for('logout') }}">{{ getenv('site_navbar_logout_displayname') }}</a>
|
<a class="nav-link"
|
||||||
|
href="{{ base_url() }}{{ path_for('logout') }}">{{ getenv('site_navbar_logout_displayname') }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item disabled">
|
<li class="nav-item disabled">
|
||||||
<a class="nav-link">{% trans with {'%username%': currentUser.identity, '%server%': getenv('site_xmpp_server_displayname') } %}logged.in.site{% endtrans %}</a>
|
<a class="nav-link">{% trans with {'%username%': currentUser.identity, '%server%': getenv('site_xmpp_server_displayname') } %}logged.in.site{% endtrans %}</a>
|
||||||
|
@ -80,10 +74,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mx-auto">
|
<div class="col-md-6 mx-auto">
|
||||||
{% if flash is not empty %}
|
{% if flash is not empty %}
|
||||||
|
@ -118,37 +112,15 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Script -->
|
<!-- Script -->
|
||||||
<script src="{{ base_url() }}/js/jquery.min.js"></script>
|
<script src="{{ base_url() }}/js/jquery.min.js"></script>
|
||||||
<script src="{{ base_url() }}/js/bootstrap.bundle.min.js"></script>
|
<script src="{{ base_url() }}/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="{{ base_url() }}/js/cookieconsent.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<!-- Custom Script -->
|
||||||
$(".alert-danger" ).delay(30000).fadeOut(300);
|
<script src="{{ base_url() }}/js/custom.js"></script>
|
||||||
$(".alert-success" ).delay(10000).fadeOut(300);
|
|
||||||
$(".alert-info" ).delay(10000).fadeOut(300);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="{{ base_url() }}/js/cookieconsent.min.js"></script>
|
</body>
|
||||||
<script>
|
|
||||||
window.addEventListener("load", function(){
|
|
||||||
window.cookieconsent.initialise({
|
|
||||||
"palette": {
|
|
||||||
"popup": {
|
|
||||||
"background": "#252e39"
|
|
||||||
},
|
|
||||||
"button": {
|
|
||||||
"background": "#14a7d0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content": {
|
|
||||||
"message": "{{ 'cookiemodal.message'|trans }}",
|
|
||||||
"dismiss": "{{ 'cookiemodal.dismiss'|trans }}",
|
|
||||||
"href": "/signup"
|
|
||||||
}
|
|
||||||
})});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
Reference in a new issue