-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from empress/on-this-page
Implement "on this page"
- Loading branch information
Showing
13 changed files
with
998 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{#if @toc}} | ||
<div class="on-this-page-wrapper"> | ||
On this page | ||
<hr> | ||
<ul> | ||
{{#each @toc as |toc|}} | ||
<li> | ||
<a href="#{{toc.id}}">{{toc.text}}</a> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
{{yield}} | ||
</div> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.on-this-page-wrapper ul { | ||
list-style: none; | ||
padding: 0; | ||
} | ||
|
||
.on-this-page-wrapper a { | ||
text-decoration: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'guidemaker-default-template/components/on-this-page'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
{{! template-lint-disable link-rel-noopener simple-unless no-curly-component-invocation }} | ||
{{#unless (eq @version @currentVersion)}} | ||
<div class="old-version-warning"> | ||
<i class="icon-attention-circled"></i><strong>Old Guides - </strong>You are viewing the guides for {{this.guidemaker.title}} {{@version}}. | ||
<div class="guides-article-wrapper"> | ||
<div class="guides-article-content"> | ||
{{#unless (eq @version @currentVersion)}} | ||
<div class="old-version-warning"> | ||
<i class="icon-attention-circled"></i><strong>Old Guides - </strong>You are viewing the guides for {{this.guidemaker.title}} {{@version}}. | ||
|
||
<LinkTo @route='version.show' @models={{array 'release' @path}} class="btn"> VIEW {{@currentVersion}} </LinkTo> | ||
</div> | ||
{{/unless}} | ||
<LinkTo @route='version.show' @models={{array 'release' @path}} class="btn"> VIEW {{@currentVersion}} </LinkTo> | ||
</div> | ||
{{/unless}} | ||
|
||
{{#if this.guidemaker.sourceRepo}} | ||
<a href="{{this.guidemaker.sourceRepo}}/edit/master/guides/{{unless (eq this.page.currentVersion 'release') (concat this.page.currentVersion '/')}}{{@model.id}}.md" | ||
target="_blank" class="edit-page icon-pencil">Edit Page</a> | ||
{{/if}} | ||
|
||
{{#if this.guidemaker.sourceRepo}} | ||
<a href="{{this.guidemaker.sourceRepo}}/edit/master/guides/{{unless (eq this.page.currentVersion 'release') (concat this.page.currentVersion '/')}}{{@model.id}}.md" | ||
target="_blank" class="edit-page icon-pencil">Edit Page</a> | ||
{{/if}} | ||
<h1> | ||
{{this.page.currentPage.title}} | ||
</h1> | ||
<hr> | ||
|
||
<h1> | ||
{{this.page.currentPage.title}} | ||
</h1> | ||
<hr> | ||
{{markdown-to-html @model.content extensions='showdown-section-groups'}} | ||
|
||
{{markdown-to-html @model.content extensions='showdown-section-groups'}} | ||
{{chapter-links pages=@pages}} | ||
</div> | ||
|
||
{{chapter-links pages=@pages}} | ||
<div class="guides-article-toc"> | ||
<OnThisPage @toc={{@model.toc}} /> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{{!-- template-lint-disable no-curly-component-invocation --}} | ||
{{guides-article model=@model.content pages=@model.pages path='index' version=@model.version currentVersion=@model.currentVersion}} | ||
{{guides-article model=@model.content pages=@model.pages path='index' version=@model.version currentVersion=@model.currentVersion}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{{!-- template-lint-disable no-curly-component-invocation no-implicit-this --}} | ||
{{guides-article model=@model.content pages=@model.pages path=@model.path version=@model.version currentVersion=@model.currentVersion}} | ||
{{guides-article model=@model.content pages=@model.pages path=@model.path version=@model.version currentVersion=@model.currentVersion}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.