Antwort #20 am: 18. März 2021, 20:48:44
Hallo Viol,
gerne, nachfolgend der Code. Der Code bezieht sich auf das tpl_modified_responsive Standardtemplate aus der Shopversion 2.0.5.1 rev 12725
Füge in der Datei /templates/tpl_modified_responsive/css/general_bottom.css.php nach folgender Codezeile
DIR_TMPL_CSS.'jquery.sidebar.css',
diese Codezeile ein.
DIR_TMPL_CSS.'jquery.sidebar.full.css',
Füge in der Datei /templates/tpl_modified_responsive/source/boxes.php
vor folgender Codezeile
diese Codezeile ein.
$fullcontent = [];
Erstelle die Datei /templates/tpl_modified_responsive/javascript/extra/jquery.sidebar.full.js.php und fülle sie mit folgendem Inhalt.
<?php
/* --------------------------------------------------------------
$Id: jquery.sidebar_full.js.php 2021-03-17 hpzeller $
Copyright (c) 2021 hpzeller [info@hpzeller.com]
--------------------------------------------------------------
Released under the GNU General Public License
--------------------------------------------------------------*/
?>
<script>
$("#col_right #content_navbar .contentnavigation").prepend('<li class="sidebar_btn_full"><span id="sidebar_marker"></span><a href="#"><i class="fas fa-bars"></i><span class="cn_nomobile_text">Menü</span></a></li>');
$(function(){
$(".box_category_header").append('<a class="sidebar_btn_full_x" href="#"><i class="fas fa-times"></i></a>');
$(document).on("click", ".sidebar_btn_full, .sidebar_btn_full_x", function(){
$(".sidebar_btn_full a i").toggleClass("fa-bars fa-times");
$("#col_left").animate({width:'toggle'},200);
$("#col_right .col_right_inner").toggleClass("col_right_trans");
});
});
</script>
Erstelle die Datei /templates/tpl_modified_responsive/css/jquery.sidebar.full.css und fülle sie mit folgendem Inhalt.
.sidebar_btn_full {
display: none;
}
.sidebar_btn_full a {
font-weight: 800 !important;
text-transform: uppercase;
}
.sidebar_btn_full a .fas {
vertical-align:-1px;
}
.col_right_trans {
margin-left: 285px !important;
}
@media only screen and (min-width: 986px) {
#col_left {
display: none;
}
.sidebar_btn_full_x {
display: inline-block;
float: right;
font-size: 24px;
line-height: 44px;
color: #fff !important;
cursor: pointer;
}
.sidebar_btn_full_x:hover {
color: #b0377e !important;
}
.sidebar_btn_full {
display: block;
}
}
@media only screen and (max-width: 985px) {
#col_right .col_right_inner {
margin-left: 0px !important;
}
#col_left {
display: block !important;
}
.sidebar_btn_full_x {
display: none;
}
.sidebar_btn_full {
display: none;
}
}
#col_right .col_right_inner {
margin-left: 0px;
-webkit-transition: all 300ms ease;
-moz-transition: all 300ms ease;
-o-transition: all 300ms ease;
transition: all 300ms ease;
}
Feedback erwünscht, Gruss
Hanspeter