@using ClientDependency.Core.Mvc
@using Umbraco.Core.Configuration
@inherits OurUmbraco.Our.Models.OurUmbracoTemplatePage
@{
    Layout = null;
    var model = UmbracoContext.Current.PublishedContentRequest.PublishedContent;
    var bodyCss =
        model.Level > 2 && model.AncestorOrSelf(3).Id == 1057
            ? "profile has-sidebar"
            : model.DocumentTypeAlias.ToLower().Replace(" ", "-") + "-page";
    
    var memberIsBlocked = MemberData != null && MemberData.IsBlocked;


    Html.RequiresCss("~/assets/css/style.min.css", 0);
    Html.RequiresCss("https://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic", 0);
    Html.RequiresCss("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.0.47/jquery.fancybox.min.css", 0);


    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js");
    Html.RequiresJs("https://ajax.aspnetcdn.com/ajax/mvc/4.0/jquery.validate.unobtrusive.min.js");
    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Converter.js");
    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Editor.js");
    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Sanitizer.js");
    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.8.1/mustache.min.js");
    Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.0.47/jquery.fancybox.min.js");

    Html.RequiresJs("~/assets/js/jquery.ajaxfileupload.js");

    Html.RequiresJs("~/assets/js/jquery.scrolly.js");
    Html.RequiresJs("~/assets/js/lodash.min.js");
    Html.RequiresJs("~/assets/js/community.js");
    Html.RequiresJs("~/assets/js/app.min.js");
    Html.RequiresJs("~/assets/js/editor.min.js");

}<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="alternate" type="application/rss+xml" title="Latest packages" href="//our.umbraco.org/rss/projects" />
    <link rel="alternate" type="application/rss+xml" title="Package updates" href="//our.umbraco.org/rss/projectsupdate" />
    <link rel="alternate" type="application/rss+xml" title="Active forum topics" href="//our.umbraco.org/rss/activetopics" />
    <link rel="alternate" type="application/rss+xml" title="Community blogs" href="//pipes.yahoo.com/pipes/pipe.run?_id=8llM7pvk3RGFfPy4pgt1Yg&_render=rss" />

    <link rel="search" type="application/opensearchdescription+xml" title="our.umbraco.org" href="/scripts/OpenSearch.xml">

    <!-- Application name -->
    <meta name="application-name" content="Our Umbraco" />
    <meta name="apple-mobile-web-app-title" content="Our Umbraco">

    <!-- Icons -->
    <link rel="apple-touch-icon-precomposed" href="/assets/images/app-icons/icon-60.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/app-icons/icon-72.png">
    <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/assets/images/app-icons/icon-76.png">
    <link rel="icon" sizes="192x192" href="/assets/images/app-icons/touch-icon-192x192.png">

    <meta name="msapplication-TileImage" content="/assets/images/app-icons/tile.png" />
    <meta name="msapplication-config" content="/assets/images/app-icons/browserconfig.xml">

    <link rel="icon" type="image/png" href="/assets/images/app-icons/favicon.png">

    <title>
        @{
            var title = string.Empty;
            var navigationTitle = HttpContext.Current.Items["topicTitle"];
            if (navigationTitle != null)
            {
                title = navigationTitle.ToString();
            }

            if (string.IsNullOrWhiteSpace(title) == false)
            {
                <text>@title - </text>
            }
        }

        @Model.Content.Name - our.umbraco.org
    </title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!--[if lt IE 9]>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>

    @Html.Partial("~/Views/Partials/Community/JsValues.cshtml")

    @Html.RenderCssHere()
    @RenderSection("HeadCssScripts", false)

    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
                m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

        ga('create', 'UA-120590-4', 'auto');
        ga('send', 'pageview');
    </script>
</head>

<body class="@bodyCss">
    @Html.Partial("~/Views/Partials/Members/QuickMenu.cshtml")

    <div class="wrapper">
        <header>
            <div class="navigation">
                <div class="container">
                    <div class="row">
                        <div class="col-md-3">
                            <a class="logo" href="/">Our Umbraco</a>
                        </div>
                        <div id="toggle" class="menu-toggle">
                            <a href="#" class="toggle cross"><span></span></a>
                        </div>
                        <nav class="col-md-9">
                            @Html.Partial("~/Views/Partials/Navigation/TopNavigation.cshtml")
                        </nav>
                    </div>
                </div>
            </div>
        </header>

        @{
            if (memberIsBlocked == false)
            {
                @Html.Partial("~/Views/Partials/Global/AlertBar.cshtml")
                @RenderSection("Search", false)
                @RenderBody()
            }
            else
            {
                <section class="forum">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12">
                                <h1 class="text-center">Computer says no</h1>
                                <p>Unfortunaly, it seems that your account has been blocked.</p>
                            </div>
                        </div>
                    </div>
                </section>
            }
        }

        <footer>
            <div class="container">
                <div class="row">
                    <div class="col-xs-12">
                        Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community.
                        @if (HttpContext.Current != null && HttpContext.Current.Request.UserAgent != null && HttpContext.Current.Request.UserAgent.ToLower().Contains("googlebot"))
                        {
                            <text>This site is running Umbraco.</text>
                        }
                        else
                        {
                            <text>This site is running</text> <data id="umbraco-version" value="@UmbracoVersion.GetSemanticVersion()">Umbraco version @UmbracoVersion.GetSemanticVersion()</data>
                        }
                    </div>
                </div>
            </div>
        </footer>

    </div>
    <!--.wrapper-->

    @Html.RenderJsHere()

    <script type="text/javascript">
        classOnScroll('header', 'sticky', 10);
    </script>

    @RenderSection("EndScripts", false)
</body>
</html>
