Augmentation vers version 3.3.0
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
|
||||
|
||||
<!-- IF S_ALLOW_CDN -->
|
||||
<script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script>
|
||||
<script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.4.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
@@ -79,13 +79,16 @@
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_PARALLAX_HEADER -->
|
||||
<!-- INCLUDEJS parallax.js -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDEJS tooltipster.bundle.min.js -->
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_COLLAPSIBLE_PANELS -->
|
||||
<!-- INCLUDEJS jquery.collapse.js -->
|
||||
<!-- INCLUDEJS jquery.collapse_storage.js -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDEJS forum_fn.js -->
|
||||
<!-- INCLUDEJS ajax.js -->
|
||||
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_DARK_TOGGLE -->
|
||||
<!-- INCLUDEJS js.cookie.js -->
|
||||
<!-- ENDIF -->
|
||||
@@ -189,6 +192,117 @@
|
||||
|
||||
<!-- EVENT overall_footer_after -->
|
||||
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_LIGHT_DARK_TOGGLE -->
|
||||
|
||||
<!--
|
||||
"[BETA] Enable Light/Dark User Toggle": {
|
||||
"name": "light_dark_toggle",
|
||||
"type": "bool",
|
||||
"help": "Enables a one-click light/dark preset toggle in top nav bar.<br />Default Value: No"
|
||||
},
|
||||
-->
|
||||
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
// Set variables
|
||||
var light_stylesheet_src = '{T_STYLESHEET_LINK}';
|
||||
var dark_stylesheet_src = '{BOARD_URL}styles/Milk_v2/theme/colours_dark.css';
|
||||
|
||||
// Is there a cookie set already?
|
||||
if(Cookies.get('Dark_Toggle_Cookie')) {
|
||||
// Cookie below
|
||||
|
||||
// Cookie: Set stylesheet
|
||||
$("link.colour_switch_link").attr("href",Cookies.get('Dark_Toggle_Cookie'));
|
||||
|
||||
// Cookie: Set icon & add dark_base class if necessary
|
||||
if(Cookies.get('Dark_Toggle_Cookie') == dark_stylesheet_src) {
|
||||
$("i.dark_toggle_icon").addClass("fa-lightbulb-o");
|
||||
$("body").addClass("dark_base");
|
||||
} else {
|
||||
$("i.dark_toggle_icon").addClass("fa-moon-o");
|
||||
}
|
||||
|
||||
// Cookie: click function
|
||||
$("a.dark_toggle_link").click(function() {
|
||||
if(Cookies.get('Dark_Toggle_Cookie') == dark_stylesheet_src) {
|
||||
$("link.colour_switch_link").attr("href",light_stylesheet_src);
|
||||
$("i.dark_toggle_icon").addClass("fa-moon-o");
|
||||
} else {
|
||||
$("link.colour_switch_link").attr("href",dark_stylesheet_src);
|
||||
$("i.dark_toggle_icon").addClass("fa-lightbulb-o");
|
||||
}
|
||||
|
||||
Cookies.set('Dark_Toggle_Cookie', $("link.colour_switch_link").attr('href'), { expires: 365, path: '/' });
|
||||
location.reload();
|
||||
});
|
||||
|
||||
} else {
|
||||
// No cookie below
|
||||
|
||||
// No cookie: Set the icon
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_BASE_COLOUR == "Light" -->
|
||||
$("i.dark_toggle_icon").addClass("fa-moon-o");
|
||||
<!-- ELSEIF STYLE_SETTINGS_CONFIG_BASE_COLOUR == "Dark" -->
|
||||
$("i.dark_toggle_icon").addClass("fa-lightbulb-o");
|
||||
<!-- ENDIF -->
|
||||
|
||||
// No cookie: Click function
|
||||
$("a.dark_toggle_link").click(function() {
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_BASE_COLOUR == 'Light' -->
|
||||
$("link.colour_switch_link").attr("href",dark_stylesheet_src);
|
||||
$("body").addClass("dark_base");
|
||||
<!-- ELSEIF STYLE_SETTINGS_CONFIG_BASE_COLOUR == 'Dark' -->
|
||||
$("link.colour_switch_link").attr("href",light_stylesheet_src);
|
||||
//Replace this with just clearing the cookie?
|
||||
<!-- ENDIF -->
|
||||
Cookies.set('Dark_Toggle_Cookie', $("link.colour_switch_link").attr('href'), { expires: 365, path: '/' });
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
-->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// Add user icon in front of forumlist mods
|
||||
$("span.forumlist_mods a").each(function(i) {
|
||||
$(this).prepend("<i class='icon fa-shield fa-fw'></i>");
|
||||
});
|
||||
// Remove the comma seperator
|
||||
$("span.forumlist_mods").each(function() {
|
||||
$(this).html($(this).html().replace(/,/g , ''));
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- IF not STYLE_SETTINGS_CONFIG_DISABLE_CSS_ANIMATIONS -->
|
||||
<script type="text/javascript">
|
||||
// Animate Forumlist and other things
|
||||
// Add a small transition delay to each block for nice effect
|
||||
$("#nav-main, #logo, #site-description h1, #site-description p, #nav-breadcrumbs, #page-body").each(function(i) {
|
||||
$(this).addClass("animated fadeIn");
|
||||
|
||||
var transitiondelay = (('0.' + (i+1)))/2 + 's';
|
||||
$(this).css({
|
||||
"transform": 'translateY(0px)',
|
||||
"transition-delay": transitiondelay,
|
||||
"animation-delay": transitiondelay
|
||||
});
|
||||
console.log(transitiondelay);
|
||||
});
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_FORUMLIST_DISPLAY == 'Grid' -->
|
||||
<script type="text/javascript">
|
||||
// Remove the comma seperator
|
||||
$(".forumlist_grid time").each(function() {
|
||||
var last_post_time = $(this).html();
|
||||
$(this).html(last_post_time.split(',')[0])
|
||||
});
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT overall_footer_body_after -->
|
||||
|
||||
<!-- IF STYLE_SETTINGS_CONFIG_SCROLL_TO_TOP -->
|
||||
|
||||
Reference in New Issue
Block a user