header.php
This commit is contained in:
parent
9cfa17493d
commit
4fe9441ef3
@ -14,7 +14,7 @@
|
|||||||
<link rel="dns-prefetch" href="//mod.gudok.tel">
|
<link rel="dns-prefetch" href="//mod.gudok.tel">
|
||||||
<?php
|
<?php
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
// PRELOAD ЛОГОТИПА — он в первом экране, грузим как приоритет
|
// PRELOAD
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
?>
|
?>
|
||||||
<link rel="preload" as="image"
|
<link rel="preload" as="image"
|
||||||
@ -23,8 +23,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
// PRELOAD LCP-БАННЕРА — только на главной странице
|
// PRELOAD LCP
|
||||||
// fetchpriority="high" — самый важный ресурс для LCP
|
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
if ( is_front_page() ) {
|
if ( is_front_page() ) {
|
||||||
$post_id = get_the_ID();
|
$post_id = get_the_ID();
|
||||||
@ -46,9 +45,7 @@ if ( is_front_page() ) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
// CSS — reset и main синхронно (свой сервер, быстро, нужны сразу)
|
// CSS
|
||||||
// Swiper и Google Fonts — асинхронно через preload+onload trick
|
|
||||||
// Это убирает блокировку рендера для внешних стилей
|
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
// ─────────────────────────────────────────────────────────────────────
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" href="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/css/reset.css" media="all">
|
<link rel="stylesheet" href="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/css/reset.css" media="all">
|
||||||
@ -60,8 +57,7 @@ if ( is_front_page() ) {
|
|||||||
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"></noscript>
|
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"></noscript>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Google Fonts — обновлённый URL с display=swap (нет FOIT/FOUT)
|
// Google Fonts
|
||||||
// Убрали старый формат css?family= в пользу css2 с более широкой поддержкой
|
|
||||||
?>
|
?>
|
||||||
<link rel="preload" as="style"
|
<link rel="preload" as="style"
|
||||||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Oswald:wght@300;400;700&family=Fredoka:wght@400;500;600;700&family=Manrope:wght@700;800&family=Montserrat:wght@800&family=Poppins:wght@500;600;900&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Oswald:wght@300;400;700&family=Fredoka:wght@400;500;600;700&family=Manrope:wght@700;800&family=Montserrat:wght@800&family=Poppins:wght@500;600;900&display=swap"
|
||||||
@ -69,30 +65,9 @@ if ( is_front_page() ) {
|
|||||||
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Oswald:wght@300;400;700&family=Fredoka:wght@400;500;600;700&family=Manrope:wght@700;800&family=Montserrat:wght@800&family=Poppins:wght@500;600;900&display=swap"></noscript>
|
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Oswald:wght@300;400;700&family=Fredoka:wght@400;500;600;700&family=Manrope:wght@700;800&family=Montserrat:wght@800&family=Poppins:wght@500;600;900&display=swap"></noscript>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
|
||||||
// ГУДОК — async, оставляем как есть
|
|
||||||
// ─────────────────────────────────────────────────────────────────────
|
|
||||||
?>
|
?>
|
||||||
<script>
|
|
||||||
(function(window,document,n,project_ids){
|
|
||||||
window.GudokData=n;
|
|
||||||
if(typeof project_ids!=="object"){project_ids=[project_ids];}
|
|
||||||
window[n]={};window[n]["projects"]=project_ids;
|
|
||||||
config_load(project_ids.join(','));
|
|
||||||
function config_load(cId){
|
|
||||||
var a=document.getElementsByTagName("script")[0],
|
|
||||||
s=document.createElement("script"),
|
|
||||||
i=function(){a.parentNode.insertBefore(s,a)},cMrs='';
|
|
||||||
s.async=true;
|
|
||||||
if(document.location.search&&document.location.search.indexOf('?gudok_check=')===0)
|
|
||||||
cMrs+=document.location.search.replace('?','&');
|
|
||||||
s.src="//mod.gudok.tel/script.js?sid="+cId+cMrs;
|
|
||||||
if(window.opera=="[object Opera]"){
|
|
||||||
document.addEventListener("DOMContentLoaded",i,false);
|
|
||||||
}else{i();}
|
|
||||||
}
|
|
||||||
})(window,document,"gd","5vyjvnx2nx");
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script>
|
||||||
<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/js/add.js" defer></script>
|
<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/js/add.js" defer></script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user