diff options
Diffstat (limited to 'webdoc/index.aspx')
-rw-r--r-- | webdoc/index.aspx | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/webdoc/index.aspx b/webdoc/index.aspx index 28511e4f..12b7a7e0 100644 --- a/webdoc/index.aspx +++ b/webdoc/index.aspx @@ -1,45 +1,47 @@ <%@ Page Language="C#" ClassName="Mono.Website.Index" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Collections.Specialized" %> +<%@ Import Namespace="System.Configuration" %> <%@ Assembly name="monodoc" %> <html> <head> + <title runat="server"><%= ConfigurationManager.AppSettings["Page Title"] %></title> + <link href="favicon.ico" type="image/png" rel="icon"> <meta http-equiv="X-UA-Compatible" content="IE=edge" > - <title><%=GetTitle ()%></title> - <link rel="stylesheet" type="text/css" href="common.css" media="all" title="Default Style"/> - <link rel="stylesheet" type="text/css" href="main.css" media="all" /> - <link type="text/css" rel="stylesheet" href="ptree/tree.css"/> - <link type="text/css" rel="stylesheet" href="sidebar.css"/> + <link type="text/css" rel="stylesheet" href="plugins/sidebar/ptree/tree.css"/> + <link type="text/css" rel="stylesheet" href="plugins/sidebar/sidebar.css"/> + <link type="text/css" rel="stylesheet" href="reset.css"/> <% = Global.IncludeExternalHeader (Global.ExternalResourceType.Css) %> <% = Global.IncludeExternalFooter (Global.ExternalResourceType.Css) %> </head> <body> + + <!--Do our c# scripts here to generate iframe/monodoc magic--> <script language="c#" runat="server"> -public string GetTitle () -{ - return "Monodoc"; -// return Global.help_tree.GetTitle (Request.QueryString ["link"]); -} + public string GetTitle () + { + return Global.help_tree.GetTitle (Request.QueryString ["link"]); + } -// Get the path to be shown in the content fram -string getContentFrame() -{ - // Docs get shown from monodoc.ashx - string monodocUrl="monodoc.ashx"; - string defaultParams="?link=root:"; - NameValueCollection qStringParams=Request.QueryString; - - // If no querystring params, show root link - if(!qStringParams.HasKeys()) - return(monodocUrl+defaultParams); - // else, build query for the content frame - string nQueryString=monodocUrl+"?"; - foreach(string key in qStringParams) - nQueryString+=(HttpUtility.UrlEncode(key)+"="+HttpUtility.UrlEncode(qStringParams[key])); - return nQueryString; -} + // Get the path to be shown in the content fram + string getContentFrame() + { + // Docs get shown from monodoc.ashx + string monodocUrl="monodoc.ashx"; + string defaultParams="?link=root:"; + NameValueCollection qStringParams=Request.QueryString; + // If no querystring params, show root link + if(!qStringParams.HasKeys()) + return(monodocUrl+defaultParams); + // else, build query for the content frame + string nQueryString=monodocUrl+"?"; + foreach(string key in qStringParams) + nQueryString+=(HttpUtility.UrlEncode(key)+"="+HttpUtility.UrlEncode(qStringParams[key])); + return nQueryString; + } +/* void Page_Load (object sender, EventArgs e) { if (User.Identity.IsAuthenticated){ @@ -47,34 +49,26 @@ void Page_Load (object sender, EventArgs e) login.Text = "Logged in as " + User.Identity.Name; } else { login.NavigateUrl = "javascript:parent.content.login (parent.content.window.location)"; - //login.Text = "Sign in / create account"; + login.Text = "Sign in / create account"; } -} - </script> - <% = Global.IncludeExternalHeader (Global.ExternalResourceType.Html) %> - <div id="banner" style="color: rgb(255, 255, 255);"> - <div id="rightSide"> - <label for="search">Search: </label> - <input id="fsearch" type="search" placeholder="Enter search request" style="width:19em; margin-right: 10px"/> - <a href="#" onclick="document.getElementById ('content_frame').contentWindow.print ()"><img class="toolbar" src="images/print.png" width="24" height="24" alt="Print" title="Print this document"/></a> - <a id="pageLink" href="/"> - <img class="toolbar" src="images/link.png" width="24" height="24" alt="Link to this document" title="Link to this document"/> - </a> - </div> +}*/ + </script> - <div id="header"> - <h1>Mono Documentation</h1> - </div> - <div id="dlogin"> +<!--HTML goes here--> + <% = Global.IncludeExternalHeader (Global.ExternalResourceType.Html) %> + <!-- <div id="dlogin"> <asp:HyperLink id="login" runat="server"/> </div> <div id="fsearch_companion"></div> <div id="fsearch_window"></div> </div> +--> <div id="main_part"> <div id="side"> - <div id="contents" class="activeTab"> + <a class="doc-sidebar-toggle shrink" href="#"></a> + <a class="doc-sidebar-toggle expand" href="#"></a> + <div id="contents" class="activeTab"> <div id="contentList"></div> </div> </div> @@ -82,16 +76,31 @@ void Page_Load (object sender, EventArgs e) </div> <% = Global.IncludeExternalFooter (Global.ExternalResourceType.Html) %> -<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> -<script src="search.js"></script> -<script src="xtree/xmlextras.js"></script> -<script src="ptree/tree.js"></script> -<script src="sidebar.js"></script> + + + +<!--javascript goes here--> +<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> +<script src="plugins/search-plugin/search.js"></script> +<script src="plugins/sidebar/xtree/xmlextras.js"></script> +<script src="plugins/sidebar/ptree/tree.js"></script> +<script src="plugins/sidebar/sidebar.js"></script> + <script type="text/javascript"> +var content_frame = $('#content_frame'); +var page_link = $('#pageLink'); + +change_page = function (pagename) { + content_frame.attr ('src', 'monodoc.ashx?link=' + pagename); + page_link.attr ('href', '?link=' + pagename); + if (window.history && window.history.pushState) + window.history.pushState (null, '', '/?link=' + pagename); +}; + var tree = new PTree (); tree.strSrcBase = 'monodoc.ashx?tree='; tree.strActionBase = '?link='; -tree.strImagesBase = 'xtree/images/msdn2/'; +tree.strImagesBase = 'plugins/sidebar/xtree/images/msdn2/'; tree.strImageExt = '.gif'; tree.onClickCallback = function (url) { change_page (url); }; var content = document.getElementById ('contentList'); @@ -117,17 +126,12 @@ add_native_browser_link = function () { } }; add_native_browser_link (); -change_window_title = function () { - var contentTitle = $('#content_frame').contents ().find ('title').text (); - var title = contentTitle + "- Monodoc"; - $('title').text (title); -}; -change_window_title (); content_frame.load (update_tree); content_frame.load (add_native_browser_link); -content_frame.load (change_window_title); </script> + +<!--include external javascript--> <% = Global.IncludeExternalHeader (Global.ExternalResourceType.Javascript) %> <% = Global.IncludeExternalFooter (Global.ExternalResourceType.Javascript) %> </body> |