helpcenter/Web/Masters/BaseMaster.master

141 lines
5.9 KiB
Plaintext
Raw Normal View History

2016-08-29 13:51:20 +00:00
<%@ Master Language="C#" %>
<%@ Register Src="~/Controls/Common/BaseHeader/BaseHeader.ascx" TagName="Header" TagPrefix="uc" %>
<%@ Import Namespace="ASC.Data.Storage" %>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<%@ Register TagPrefix="client" Namespace="ASC.Web.Core.Client.PageExtensions" Assembly="ASC.Web.Core" %>
<%@ Register TagPrefix="master" TagName="BaseMasterCss" Src="~/Controls/Common/BaseMaster/BaseMasterCss.ascx" %>
<%@ Register TagPrefix="master" TagName="BaseMasterJSBody" Src="~/Controls/Common/BaseMaster/BaseMasterJSBodyNoBundle.ascx" %>
2016-08-29 13:51:20 +00:00
<!DOCTYPE html>
<script runat="server">
2018-06-01 13:55:28 +00:00
public System.Globalization.CultureInfo TeamLabUICulture;
protected override void OnLoad(EventArgs e)
2016-08-29 13:51:20 +00:00
{
2018-06-01 13:55:28 +00:00
TeamLabUICulture = LanguageProvider.GetCurrentCulture();
base.OnLoad(e);
2016-08-29 13:51:20 +00:00
}
2018-06-01 13:55:28 +00:00
private string RenderСео()
2016-08-29 13:51:20 +00:00
{
2018-06-01 13:55:28 +00:00
var sb = new StringBuilder();
var culture = TeamLabUICulture.Name;
if (culture == "en-GB")
culture = "en-US";
foreach (var availibleLanguage in LanguageProvider.GetAvailibleLanguages())
2016-08-29 13:51:20 +00:00
{
2018-06-01 13:55:28 +00:00
if (availibleLanguage.Value.Name == culture)
sb.Insert(0, string.Format(@"<link rel=""canonical"" href=""{0}"" />",
availibleLanguage.Key) + Environment.NewLine);
sb.AppendLine(string.Format(@"<link rel=""alternate"" href=""{0}"" hreflang=""{1}"" />",
availibleLanguage.Key.HtmlEncode(),
availibleLanguage.Value.Name));
2016-08-29 13:51:20 +00:00
}
2018-06-01 13:55:28 +00:00
var basePage = Page as BasePage;
if (basePage != null)
2016-08-29 13:51:20 +00:00
{
2018-06-01 13:55:28 +00:00
if (!string.IsNullOrEmpty(basePage.MetaKeyWords))
{
sb.AppendLine(string.Format(@"<meta name=""keywords"" content=""{0}"" />",
basePage.MetaKeyWords));
}
if (!string.IsNullOrEmpty(basePage.MetaDescription))
{
sb.AppendLine(string.Format(@"<meta name=""description"" content=""{0}"" />",
basePage.MetaDescription));
}
2016-08-29 13:51:20 +00:00
}
2018-06-01 13:55:28 +00:00
return sb.ToString();
2016-08-29 13:51:20 +00:00
}
</script>
2018-06-01 13:55:28 +00:00
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= TeamLabUICulture.Name %>" lang="<%= TeamLabUICulture.Name %>" prefix="og: http://ogp.me/ns#">
2016-08-29 13:51:20 +00:00
<head runat="server">
<title></title>
<meta charset="utf-8" />
<link rel="icon" href="<%=WebPath.GetPath("/images/favicon.ico") %>" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<%--<meta name="google-site-verification" content="b3uEYo1at0IiLaoEi9QvEX4eB3UyO9Dmgau9VSkkmZk" />--%>
2018-06-01 13:55:28 +00:00
<%=RenderСео()%>
2016-08-29 13:51:20 +00:00
<link href='https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext' rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet">
2017-07-12 13:30:12 +00:00
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300&amp;subset=cyrillic" rel="stylesheet">
2016-08-29 13:51:20 +00:00
<master:BaseMasterCss runat="server" />
<!--[if IE 8]>
<link href="<%=VirtualPathUtility.ToAbsolute("~/css/ie8.css")%>" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lt IE 8]>
<link href="<%=VirtualPathUtility.ToAbsolute("~/css/ie.css")%>" rel="stylesheet" type="text/css" />
<![endif]-->
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/BaseMaster/BaseMasterCustomCss.ascx" />
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12442749-5']);
_gaq.push(['_setDomainName', '.onlyoffice.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script>
var path = '<%=VirtualPathUtility.ToAbsolute("~/search.aspx")%>';
</script>
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
<asp:contentplaceholder id="bodyid" runat="server"></asp:contentplaceholder>
<div class="BaseSide">
<form id="mainForm" runat="server">
<div class="mainpart">
<div class="site-overlay"></div>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/BaseMaster/BaseMaster.ascx" />
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/BaseHeader/BaseHeader.ascx" />
<article id="container">
<asp:contentplaceholder id="BaseContent" runat="server"></asp:contentplaceholder>
</article>
</div>
</form>
</div>
<div class="basement">
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/BaseFooter.ascx" />
2016-08-29 13:51:20 +00:00
</div>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/CookieNotice/CookieNotice.ascx" />
2016-08-29 13:51:20 +00:00
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Common/BaseMaster/BaseMasterCustomJSBody.ascx" />
2016-08-29 13:51:20 +00:00
<master:BaseMasterJSBody runat="server" />
<asp:contentplaceholder id="masterpageScripts" runat="server"></asp:contentplaceholder>
2019-10-08 15:49:37 +00:00
<asp:contentplaceholder id="customPageScripts" runat="server"></asp:contentplaceholder>
2016-08-29 13:51:20 +00:00
<script type="text/javascript">
$(function () {
HelpCenterMasterInit();
});
</script>
</body>
</html>