diff --git a/Directory.Build.props b/Directory.Build.props index 058a319a6..c586f9977 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,15 +3,15 @@ full true - 0.9.3 - 0.9.3.0 - 0.9.3.0 + 0.9.4 + 0.9.4.0 + 0.9.4.0 Danielku15 CoderLine AlphaTab en alphaTab is a cross platform music notation and guitar tablature rendering library. - Copyright © 2017, Daniel Kuschny and Contributors + Copyright © 2019, Daniel Kuschny and Contributors MPL-2.0 https://www.alphatab.net https://github.com/CoderLine/alphaTab diff --git a/Documentation/config.wyam.packages.xml b/Documentation/config.wyam.packages.xml index 796268ccd..5486be897 100644 --- a/Documentation/config.wyam.packages.xml +++ b/Documentation/config.wyam.packages.xml @@ -1,75 +1,63 @@  - - - + + - - - - - - + + - + + + + + + + + + + + + + + + + + + - - - - - + - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - @@ -90,24 +78,18 @@ - - - - - - - - - - - + + + + + - + @@ -128,20 +110,67 @@ + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + @@ -150,6 +179,8 @@ + + @@ -164,17 +195,17 @@ - - - - - - - - + + + + + + + + - - + + - + \ No newline at end of file diff --git a/Documentation/generate.bat b/Documentation/generate.bat index ca6d4e895..69e8b0bda 100644 --- a/Documentation/generate.bat +++ b/Documentation/generate.bat @@ -2,7 +2,7 @@ pushd %~dp0 -SET WYAM=%USERPROFILE%\.nuget\packages\wyam\2.1.1\tools\netcoreapp2.1\Wyam.dll +SET WYAM=%USERPROFILE%\.nuget\packages\wyam\2.2.5\tools\netcoreapp2.1\Wyam.dll SET GitBranch=%APPVEYOR_REPO_BRANCH% git rev-parse HEAD > head.txt set /p GitRevision= head.txt set /p GitRevision= + +@functions +{ + IDocument[] FilterChildren(IEnumerable children) + { + return children + .Where(x => x.Bool(DocsKeys.ShowInSidebar, true)) + .OrderBy(x => x.Get(DocsKeys.Order, 1000)) + .ThenBy(x => x.WithoutSettings.String(Keys.Title)) + .ToArray(); + } +} + +@{ + // Group by category + IList> categoryGroups = Model + .GroupBy(x => x.String(DocsKeys.Category)) + .OrderBy(x => x.Key) + .ToList(); + foreach(IGrouping categoryGroup in categoryGroups) + { + IDocument[] children = FilterChildren(categoryGroup); + + if(children.Length > 0) + { + if(!string.IsNullOrWhiteSpace(categoryGroup.Key)) + { +
  • @categoryGroup.Key
  • + } + + // Iterate documents in this category + foreach(IDocument child in children) + { + object[] currentTreePath = Document.Get(Keys.TreePath); + object[] childTreePath = child.Get(Keys.TreePath); + string childTitle = child.WithoutSettings.String(Keys.Title, childTreePath.Last().ToString()); + string parentActive = currentTreePath.Take(childTreePath.Length).SequenceEqual(childTreePath) ? "active" : null; + string childSelected = parentActive != null && currentTreePath.Length == childTreePath.Length ? "selected" : null; + IDocument[] subChildren = FilterChildren(child.DocumentList(Keys.Children) ?? (IEnumerable)new IDocument[0]); + if(subChildren.Length > 0) + { + // Parent +
  • + @childTitle +
      + @Html.Partial("Sidebar/_ChildPagesMenu", subChildren) +
    +
  • + } + else + { + // Leaf +
  • @childTitle
  • + } + } + } + } +} diff --git a/Documentation/input/Shared/Sitebar/_ChildPagesMenu.cshtml b/Documentation/input/Shared/Sitebar/_ChildPagesMenu.cshtml deleted file mode 100644 index feae3cb9b..000000000 --- a/Documentation/input/Shared/Sitebar/_ChildPagesMenu.cshtml +++ /dev/null @@ -1,57 +0,0 @@ -@model IReadOnlyList - -@{ - // Group by category - IList> categoryGroups = Model - .GroupBy(x => x.String(DocsKeys.Category)) - .OrderBy(x => x.Key) - .ToList(); - foreach(IGrouping categoryGroup in categoryGroups) - { - if(!string.IsNullOrWhiteSpace(categoryGroup.Key)) - { -
  • @categoryGroup.Key
  • - } - - // Iterate documents in this category - foreach(IDocument child in categoryGroup - .OrderBy(x => x.Get(DocsKeys.Order, 1000)) - .ThenBy(x => x.WithoutSettings.String(Keys.Title))) - { - object[] currentTreePath = Document.Get(Keys.TreePath); - object[] childTreePath = child.Get(Keys.TreePath); - string childTitle = child.WithoutSettings.String(Keys.Title, childTreePath.Last().ToString()); - string parentActive = currentTreePath.Take(childTreePath.Length).SequenceEqual(childTreePath) ? "active" : null; - string childSelected = parentActive != null && currentTreePath.Length == childTreePath.Length ? "selected" : null; - IReadOnlyList children = child.DocumentList(Keys.Children); - if(children != null && children.Count > 0) - { - // Parent -
  • - @childTitle -
      - @Html.Partial("Sidebar/_ChildPagesMenu", children) -
    -
  • - } - else - { - // Leaf -
  • - @if(child.ContainsKey("Todo")) - { - - @childTitle - (work in progress) - - } - else - { - @childTitle - } - -
  • - } - } - } -} \ No newline at end of file diff --git a/Documentation/input/Shared/_SinceHeader.cshtml b/Documentation/input/Shared/_SinceHeader.cshtml new file mode 100644 index 000000000..aaf63d417 --- /dev/null +++ b/Documentation/input/Shared/_SinceHeader.cshtml @@ -0,0 +1,7 @@ +@{ + string since = Model.String("Since", ""); +} + +@if(!string.IsNullOrEmpty(since)) { + Since AlphaTab @since +} diff --git a/Documentation/input/_Bottom.cshtml b/Documentation/input/_Bottom.cshtml new file mode 100644 index 000000000..a8a987f32 --- /dev/null +++ b/Documentation/input/_Bottom.cshtml @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/Documentation/input/_Head.cshtml b/Documentation/input/_Head.cshtml new file mode 100644 index 000000000..1c5145a73 --- /dev/null +++ b/Documentation/input/_Head.cshtml @@ -0,0 +1,3 @@ + + + diff --git a/Documentation/input/_Layout.cshtml b/Documentation/input/_Layout.cshtml new file mode 100644 index 000000000..cae937ebf --- /dev/null +++ b/Documentation/input/_Layout.cshtml @@ -0,0 +1,46 @@ +@{ + Layout = "/_Master.cshtml"; + ViewData[Keys.Title] = @Model.WithoutSettings.String(Keys.Title); +} + +@section Infobar { + @if (IsSectionDefined("Infobar")) { + RenderSection("Infobar"); + } + else { + @Html.Partial("_Infobar") + } +} + +@section Search { + @if (IsSectionDefined("Search")) { + RenderSection("Search"); + } +} + +@section Sidebar { + @if (IsSectionDefined("Sidebar")) { + RenderSection("Sidebar"); + } + else { + @Html.Partial("Sidebar/_ChildPages") + } +} + +@if(Model.Bool(DocsKeys.NoContainer, false)) +{ + @RenderBody() +} +else +{ + @if(!Model.Bool(DocsKeys.NoTitle, false)) + { +
    +

    @ViewData[Keys.Title]

    + @Html.Partial("_SinceHeader") +
    + } +
    + @RenderBody() +
    +} \ No newline at end of file diff --git a/Documentation/input/_Master.cshtml b/Documentation/input/_Master.cshtml deleted file mode 100644 index 6dc262c70..000000000 --- a/Documentation/input/_Master.cshtml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - @Context.String(DocsKeys.Title, "Docs") - @ViewData[Keys.Title] - - - - - - - - - - - - - - - - - - - @Html.Partial("_Head") - - @{ - string layoutTopNav = Model.Bool(DocsKeys.NoSidebar, false) ? "layout-top-nav" : string.Empty; - string noGutter = Model.Bool(DocsKeys.NoGutter, false) ? "no-gutter" : string.Empty; - } - -
    - @{ - string withContainer = Model.Bool(DocsKeys.NoContainer, false) ? null : "with-container"; - } -
    - -
    - - - - -
    - - - - - -
    - @RenderBody() -
    - - -
    -
    - - @* - - - -
    - *@ -
    -
    -
    - @Html.Partial("_Footer") -
    -
    - - - - - - - @Html.Partial("_Bottom") - - - - \ No newline at end of file diff --git a/Documentation/input/_Navbar.cshtml b/Documentation/input/_Navbar.cshtml deleted file mode 100644 index 3a6cc15e7..000000000 --- a/Documentation/input/_Navbar.cshtml +++ /dev/null @@ -1,14 +0,0 @@ -@{ - List> pages = new List> - { - Tuple.Create("Features", Context.GetLink("features")), - Tuple.Create("Examples", Context.GetLink("examples")), - Tuple.Create("AlphaTex", Context.GetLink("alphatex")), - Tuple.Create("API", Context.GetLink("api")) - }; - foreach(Tuple page in pages) - { - string active = Context.GetLink(Document).StartsWith(page.Item2) ? "active" : null; -
  • @Html.Raw(page.Item1)
  • - } -} \ No newline at end of file diff --git a/Documentation/input/alphatex/index.cshtml b/Documentation/input/alphatex/index.cshtml index 19b5652ff..c69c61ac1 100644 --- a/Documentation/input/alphatex/index.cshtml +++ b/Documentation/input/alphatex/index.cshtml @@ -1,5 +1,6 @@ Title: AlphaTex TexSample: true +ShowInNavbar: true ---

    Introduction

    diff --git a/Documentation/input/assets/css/override.css b/Documentation/input/assets/css/override.css index e49e96b29..889a1444c 100644 --- a/Documentation/input/assets/css/override.css +++ b/Documentation/input/assets/css/override.css @@ -1,96 +1,95 @@ -.main-header { +.top-banner { background-image: linear-gradient(to bottom,#fff 0,#f8f8f8 100%); background-repeat: repeat-x; box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075); } -.main-header .logo, .main-header .navbar { - background: none !important; -} - -.main-header .logo img { - height: 30px; +.main-header { + background-image: linear-gradient(to bottom,#fff 0,#fbfbfb 100%); + background-repeat: repeat-x; } -.main-header .navbar .nav > li > a { - color: #777; -} -.main-header .navbar .nav > li > a:hover { - color: #333; - background-color: transparent; +.content, .content-header { + padding-left: 12px; + padding-right: 12px; } - .main-header .navbar .nav > .active > a, - .main-header .navbar .nav > .open > a { - color: #555; - background-color: #e7e7e7; - background-image: linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%); - background-repeat: repeat-x; - box-shadow: inset 0 3px 9px rgba(0,0,0,.075); - } - - .main-header .navbar .nav > .active > a:hover, - .main-header .navbar .nav > .open > a:hover { - color: #555; - background-color: #e7e7e7; - } - -.content-header h1 { - color: #426d9d; +.main-header .logo, .main-header .navbar { + background: none !important; } -.menu-container { - column-count: 2; +.main-header .navbar .nav > li > a { + color: #777; } -.tab-content { - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - border-bottom: 1px solid #ddd; - padding: 10px; +.main-header .logo img { + height:100%; + width:auto; } -.alphaTabSurface { - box-shadow: 0 0 10px rgba(0,0,0,0.3); - background: #FFF; - border-radius: 3px; +.main-header .logo .logo-lg, +.main-header .logo .logo-mini { + height: 30px; } -.example-source, .description { - margin-bottom: 10px; +.type-table code, +.reference-table code { + font-size:80%; + border: 1px solid #dedede; + white-space: nowrap; } -.infobar { - position: static; - right: auto !important; - top: auto !important; - width: auto !important; - padding: 30px 12px 0 12px !important; +.type-table code .code-badge, +.reference-table code .code-badge { + border-left: 1px solid #DEDEDE; + padding-left: 5px; + opacity: 0.5; } -.infobar.affix { - position: static !important; - left: auto !important; - margin-left: 0 !important; +.main-header .navbar .sidebar-toggle { + color: #777; } - -.sidebar { - padding-top: 0 !important; +.main-header .navbar .navbar-toggle { + display: none; } -@media only screen and (max-width: 1670px) and (min-width: 1250px) { - .wrapper.with-container { - max-width: none; - left: 0; - } -} -.wip { - color: #999; - font-size: 12px; - font-weight: normal; +.content-header { + background-color: #f4f4f4; + padding: 8px 16px; + border-radius: 6px; + border-bottom: 2px solid #ddd; + margin-left: 12px; + margin-right: 12px; + + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; } -.menu-block td { - width: 100%; +.content-header h1 { + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + + background-color: initial; + padding: initial; + border-radius: initial; + border-bottom: initial; } \ No newline at end of file diff --git a/Documentation/input/assets/index.cshtml b/Documentation/input/assets/index.cshtml new file mode 100644 index 000000000..21ec46b13 --- /dev/null +++ b/Documentation/input/assets/index.cshtml @@ -0,0 +1,2 @@ +ShowInNavbar: false +--- \ No newline at end of file diff --git a/Documentation/input/docs/command-line.md b/Documentation/input/docs/command-line.md deleted file mode 100644 index 3a9a56c27..000000000 --- a/Documentation/input/docs/command-line.md +++ /dev/null @@ -1,3 +0,0 @@ -Description: How to use the command line. ---- -Here are some instructions on how to use the command line. \ No newline at end of file diff --git a/Documentation/input/docs/usage.md b/Documentation/input/docs/usage.md deleted file mode 100644 index 127a961b1..000000000 --- a/Documentation/input/docs/usage.md +++ /dev/null @@ -1,3 +0,0 @@ -Description: Library usage instructions. ---- -To use this library, take these steps... \ No newline at end of file diff --git a/Documentation/input/examples/api/settings.cshtml b/Documentation/input/examples/api/settings.cshtml deleted file mode 100644 index cabd3e146..000000000 --- a/Documentation/input/examples/api/settings.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -Title: List of all settings and methods -Order: 0 -Todo: true ---- - -

    This example is not yet available.

    \ No newline at end of file diff --git a/Documentation/input/examples/general/html5.cshtml b/Documentation/input/examples/general/html5.cshtml index 0b87d5b2d..5382066ce 100644 --- a/Documentation/input/examples/general/html5.cshtml +++ b/Documentation/input/examples/general/html5.cshtml @@ -15,7 +15,7 @@ Order: 3
    -
    +
    @@ -29,7 +29,7 @@ Order: 1
    -
    +
    @@ -29,7 +29,7 @@ Order: 0
    -
    +
    @@ -27,7 +27,7 @@ Order: 0
    -
    +
    @@ -28,7 +28,7 @@ Order: 1
    -
    +
    @@ -27,7 +27,7 @@ Order: 6
    -
    +
    @@ -27,7 +27,7 @@ Order: 1
    -
    +
    @@ -30,7 +30,7 @@ Order: 0
    -
    +
    @@ -27,7 +27,7 @@ Order: 2
    -
    +