<ul class="list-unstyled">
<li data-bs-dismiss="offcanvas"><a href="#feedback" class="text-dark">ОТЗЫВЫ</a></li>
<li data-bs-dismiss="offcanvas"><a href="#timetable" class="text-dark">РАСПИСАНИЕ</a></li>
<li data-bs-dismiss="offcanvas"><a href="#services" class="text-dark">УСЛУГИ</a></li>
<li data-bs-dismiss="offcanvas"><a href="#discounts" class="text-dark">АКЦИИ</a></li>
<li data-bs-dismiss="offcanvas"><a href="#faq" class="text-dark">ВОПРОС - ОТВЕТ</a></li>
</ul>
<style>
.custom-1 {
filter: invert(0.5);
}
.custom-2 {
filter: brightness(0) invert(1);
}
</style>
<img src="https://s.cdpn.io/3/kiwi.svg" class="standard" width="50" height="50" alt="img">
<img src="https://s.cdpn.io/3/kiwi.svg" class="custom-1" width="50" height="50" alt="img">
<img src="https://s.cdpn.io/3/kiwi.svg" class="custom-2" width="50" height="50" alt="img">
add_action( 'init', 'custom_fix_thumbnail' );
function custom_fix_thumbnail() {
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src');
function custom_woocommerce_placeholder_img_src( $src ) {
$upload_dir = wp_upload_dir();
$uploads = untrailingslashit( $upload_dir['baseurl'] );
$src = $uploads . '/2015/08/default-image.jpg';
return $src;
}
}
$(function() {
$.post('some_script.php', { width: screen.width, height:screen.height }, function(json) {
if(json.outcome == 'success') {
// запрос прошёл успешно
} else {
alert('Unable to let PHP know what the screen resolution is!');
}
},'json');
});
if(isset($_POST['width']) && isset($_POST['height'])) {
$_SESSION['screen_width'] = $_POST['width'];
$_SESSION['screen_height'] = $_POST['height'];
echo json_encode(array('outcome'=>'success'));
} else {
echo json_encode(array('outcome'=>'error','error'=>"Couldn't save dimension info"));
}