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"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
|
@ -12,21 +12,7 @@
|
||||||
<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 {
|
|
||||||
padding-top: 54px;
|
|
||||||
}
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
body {
|
|
||||||
padding-top: 56px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin-top: 56px;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -34,43 +20,51 @@
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
<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>
|
||||||
|
@ -123,32 +117,10 @@
|
||||||
<!-- 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>
|
|
||||||
$(".alert-danger" ).delay(30000).fadeOut(300);
|
|
||||||
$(".alert-success" ).delay(10000).fadeOut(300);
|
|
||||||
$(".alert-info" ).delay(10000).fadeOut(300);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="{{ base_url() }}/js/cookieconsent.min.js"></script>
|
<script src="{{ base_url() }}/js/cookieconsent.min.js"></script>
|
||||||
<script>
|
|
||||||
window.addEventListener("load", function(){
|
<!-- Custom Script -->
|
||||||
window.cookieconsent.initialise({
|
<script src="{{ base_url() }}/js/custom.js"></script>
|
||||||
"palette": {
|
|
||||||
"popup": {
|
|
||||||
"background": "#252e39"
|
|
||||||
},
|
|
||||||
"button": {
|
|
||||||
"background": "#14a7d0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content": {
|
|
||||||
"message": "{{ 'cookiemodal.message'|trans }}",
|
|
||||||
"dismiss": "{{ 'cookiemodal.dismiss'|trans }}",
|
|
||||||
"href": "/signup"
|
|
||||||
}
|
|
||||||
})});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Reference in a new issue