Beispiel #1
0
 public void Fill(string markDownFromFile, string targetURL, string title, NavigatedPath tocLocaton)
 {
     this.Location = HttpUtility.UrlPathEncode(targetURL);
     this.Title = title;
     this.BreadCrumbs = tocLocaton.CreateBreadCrumbsText(string.Empty).Replace("\"", "").Replace("'", "");
     RetrieveWords(markDownFromFile);
 }
Beispiel #2
0
 private void GenerateSearchPage()
 {
     var activePath = new NavigatedPath();
     activePath.Push(this.Pages);
     var searchSimpleElement = new SimpleNavigationElement() {Name = "Search", Value = "Docnet_search.htm", IsIndexElement = false, ParentContainer = this.Pages};
     searchSimpleElement.ContentProducerFunc = e=>@"
             <h1 id=""search"">Search Results</h1>
             <p>
             <form id=""content_search"" action=""docnet_search.htm"">
                 <span role= ""status"" aria-live=""polite"" class=""ui-helper-hidden-accessible""></span>
                 <input name=""q"" id=""search-query"" type=""text"" class=""search_input search-query ui-autocomplete-input"" placeholder=""Search the Docs"" autocomplete=""off"" autofocus/>
             </form>
             </p>
             <div id=""search-results"">
             <p>Sorry, page not found.</p>
             </div>";
     searchSimpleElement.ExtraScriptProducerFunc = e=> @"
     <script>var base_url = '.';</script>
     <script data-main=""js/search.js"" src=""js/require.js""></script>";
     searchSimpleElement.GenerateOutput(this, activePath);
     activePath.Pop();
 }