89 lines
2.9 KiB
Plaintext
89 lines
2.9 KiB
Plaintext
@using System.Net.Http
|
|
@using System.Web.Mvc.Html
|
|
@using Umbraco.Core
|
|
@using ClientDependency.Core
|
|
@using ClientDependency.Core.Mvc
|
|
@using Umbraco.Core.IO
|
|
@using Umbraco.Web
|
|
@using Umbraco.Web.Editors
|
|
@using umbraco
|
|
|
|
@inherits System.Web.Mvc.WebViewPage
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<base href="@GlobalSettings.Path.EnsureEndsWith('/')" />
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
<title ng-bind="$root.locationTitle">Umbraco</title>
|
|
|
|
@{ Html.RequiresCss("assets/css/umbraco.css", "Umbraco");}
|
|
@{ Html.RequiresCss("tree/treeicons.css", "UmbracoClient");}
|
|
@Html.RenderCssHere(
|
|
new BasicPath("Umbraco", IOHelper.ResolveUrl(SystemDirectories.Umbraco)),
|
|
new BasicPath("UmbracoClient", IOHelper.ResolveUrl(SystemDirectories.UmbracoClient)))
|
|
|
|
|
|
</head>
|
|
<body ng-class="{touch:touchDevice,emptySection:emptySection}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">
|
|
<div ng-hide="!authenticated" ng-cloak id="mainwrapper" id="mainwrapper" class="clearfix" ng-click="closeDialogs($event)">
|
|
|
|
<umb-navigation></umb-navigation>
|
|
|
|
<section id="contentwrapper">
|
|
<div id="contentcolumn" ng-view>
|
|
</div>
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<umb-notifications></umb-notifications>
|
|
|
|
|
|
@*
|
|
These are the bare minimal server variables that are required for the application to start without being authenticated,
|
|
we will load the rest of the server vars after the user is authenticated.
|
|
*@
|
|
<script type="text/javascript">
|
|
var Umbraco = {};
|
|
Umbraco.Sys = {};
|
|
Umbraco.Sys.ServerVariables = {
|
|
"umbracoUrls": {
|
|
"authenticationApiBaseUrl": "@(Url.GetUmbracoApiServiceBaseUrl<AuthenticationController>(controller => controller.PostLogin(null)))",
|
|
"serverVarsJs": '@Url.GetUrlWithCacheBust("ServerVariables", "BackOffice")'
|
|
}
|
|
};
|
|
</script>
|
|
|
|
@*And finally we can load in our angular app*@
|
|
<script type="text/javascript" src="lib/rgrove-lazyload/lazyload.js"></script>
|
|
<script type="text/javascript" src="@Url.GetUrlWithCacheBust("Application", "BackOffice")"></script>
|
|
|
|
@{
|
|
var isDebug = false;
|
|
if (Request.RawUrl.IndexOf('?') >= 0)
|
|
{
|
|
var parsed = HttpUtility.ParseQueryString(Request.RawUrl.Split('?')[1]);
|
|
var attempt = parsed["umbDebug"].TryConvertTo<bool>();
|
|
if (attempt && attempt.Result)
|
|
{
|
|
isDebug = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
@if (isDebug)
|
|
{
|
|
@Html.RenderProfiler()
|
|
}
|
|
|
|
</body>
|
|
</html>
|
|
|