header.php
This commit is contained in:
parent
9cfa17493d
commit
4fe9441ef3
@ -14,7 +14,7 @@
|
||||
<link rel="dns-prefetch" href="//mod.gudok.tel">
|
||||
<?php
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
// PRELOAD ЛОГОТИПА — он в первом экране, грузим как приоритет
|
||||
// PRELOAD
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
?>
|
||||
<link rel="preload" as="image"
|
||||
@ -23,8 +23,7 @@
|
||||
|
||||
<?php
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
// PRELOAD LCP-БАННЕРА — только на главной странице
|
||||
// fetchpriority="high" — самый важный ресурс для LCP
|
||||
// PRELOAD LCP
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
if ( is_front_page() ) {
|
||||
$post_id = get_the_ID();
|
||||
@ -46,9 +45,7 @@ if ( is_front_page() ) {
|
||||
|
||||
<?php
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
// CSS — reset и main синхронно (свой сервер, быстро, нужны сразу)
|
||||
// Swiper и Google Fonts — асинхронно через preload+onload trick
|
||||
// Это убирает блокировку рендера для внешних стилей
|
||||
// CSS
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
?>
|
||||
<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>
|
||||
|
||||
<?php
|
||||
// Google Fonts — обновлённый URL с display=swap (нет FOIT/FOUT)
|
||||
// Убрали старый формат css?family= в пользу css2 с более широкой поддержкой
|
||||
// Google Fonts
|
||||
?>
|
||||
<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"
|
||||
@ -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>
|
||||
|
||||
<?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="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/js/add.js" defer></script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user