@{
    var layoutData = (LayoutData)ViewData["layoutData"];
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width">
    <meta name="theme-color" content="#000000">
    <title>@layoutData.Title</title>
    <link rel="icon" href="@BlogInfo.GetAvatarUrl()">
@if(!String.IsNullOrEmpty(layoutData.CanonicalAbsoluteUrl)) {
    <link rel="canonical" href="@layoutData.CanonicalAbsoluteUrl">
}
@if(!String.IsNullOrEmpty(layoutData.RssAbsoluteUrl)) {
    <link rel="alternate" type="application/rss+xml" href="@layoutData.RssAbsoluteUrl">
}
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,600&subset=latin,greek,cyrillic,latin-ext">
@foreach(var href in layoutData.Libs.CssUrls) {
    <link rel="stylesheet" href="@href">
}
    <link rel="stylesheet" href="@(BlogInfo.PathPrefix)/style.css">
@if(!String.IsNullOrEmpty(layoutData.OpenGraphDescription)) {
    <meta property="og:description" content="@layoutData.OpenGraphDescription">
}
@if(!String.IsNullOrEmpty(layoutData.OpenGraphType)) {
    <meta property="og:type" content="@layoutData.OpenGraphType">
}
@if(!String.IsNullOrEmpty(layoutData.OpenGraphImageAbsoluteUrl)) {
    <meta property="og:image" content="@layoutData.OpenGraphImageAbsoluteUrl">
    <meta name="twitter:card" content="summary_large_image">
}
@if(!String.IsNullOrEmpty(layoutData.RobotsTag)) {
    <meta name="robots" content="@layoutData.RobotsTag">
}
    <script>
        /p=\d/.test(location.search) && document.write("<script src=@BlogInfo.PathPrefix/@BlogInfo.LegacyIDRedirectScriptFileName><\/script>");
    </script>
@if(Utils.RenderTrackers) {
    @Html.Raw(System.IO.File.ReadAllText("trackers.txt"))
} else {
    <!-- Trackers place -->
}
</head>
<body>
    <div id="page">
        <div id="header">
            <div id="headerimage">
                <h1><a href="@BlogInfo.PathPrefix/">@BlogInfo.Title</a></h1>
                <div class="description">@BlogInfo.Description</div>
            </div>
        </div>
        <div id="wrapper" class="hasfloats">
            <div id="content">
                @RenderBody()
            </div>
        </div>
        <hr class="plainscape">
        <div id="footer">
            <p>
                Материалы опубликованы на условиях лицензии
                <a rel="license" href="@BlogInfo.LicenseDeedUrl" target="_blank">@BlogInfo.LicenseName</a>.
            </p>
            <p>
                Proudly hosted by <a href="https://m.do.co/c/8183daf27a39" rel="nofollow" target="_blank">DigitalOcean</a>
            </p>
        </div>
    </div>

@foreach(var src in layoutData.Libs.IncludeScriptUrls) {
    <script src="@src"></script>
}

    <script>
        addEventListener("DOMContentLoaded", function() {
@foreach(var line in layoutData.Libs.InitScripts) {
    @Html.Raw(" ".PadLeft(12, ' ') + line + "\n")
}
        });
    </script>

@if(layoutData.RenderDisqus) {
    <script>
        var disqus_config = function() {
            this.page.url = "@layoutData.CanonicalAbsoluteUrl";
        };
    </script>
    <script src="https://am-notebooks.disqus.com/embed.js"></script>
}
</body>
</html>
