Last active
October 11, 2017 14:06
-
-
Save EvilWolf/f48d677b208e2e78dd29398f29d0c488 to your computer and use it in GitHub Desktop.
Заголовок шаблона для Битрикс
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bitrix\Main\Page\Asset; | |
$AssetManager = Asset::getInstance(); | |
//$AssetManager->addCss(); | |
//$AssetManager->addJs(); | |
//$AssetManager->addString(); | |
?> | |
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title><? $APPLICATION->ShowTitle()?></title> | |
<?php | |
// Assets | |
// 0. Fonts | |
$AssetManager->addString('<link href="https://fonts.googleapis.com/css?family=Cuprum:400,400i,700,700i&subset=cyrillic" rel="stylesheet">'); | |
// 1. Stylesheet | |
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/normalize.css'); | |
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/grid.css'); | |
$AssetManager->addCss(SITE_TEMPLATE_PATH . '/css/main.css'); | |
// 2. Libraries and Scripts | |
// jQuery and Modernizr | |
$AssetManager->addString('<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>'); | |
$AssetManager->addString('<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>'); | |
// flickity | |
$AssetManager->addString('<link rel="stylesheet" href="https://unpkg.com/flickity@2.0/dist/flickity.min.css">'); | |
$AssetManager->addString('<script src="https://unpkg.com/flickity@2.0/dist/flickity.pkgd.min.js"></script>'); | |
$AssetManager->addJs(SITE_TEMPLATE_PATH . '/js/main.js'); | |
// 3. Join BX and head | |
CJSCore::Init(array("fx")); // fix BX not defined; | |
$APPLICATION->ShowHead(); | |
?> | |
</head> | |
<body> | |
<? $APPLICATION->ShowPanel() ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment