Skip to content

Commit

Permalink
Upgrade addon docs (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
chbonser authored Mar 10, 2023
1 parent 0dfaa2f commit f439d61
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 38 deletions.
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"name": "ember-printable-pages",
"version": "1.0.2",
"description": "An addon for creating printable documents using ember components",
"keywords": [
"ember-addon",
"pagination",
"printable-files"
],
"keywords": ["ember-addon", "pagination", "printable-files"],
"repository": "https://github.com/forge512/ember-printable-pages",
"license": "MIT",
"author": "Forge 512",
Expand Down Expand Up @@ -58,7 +54,7 @@
"ember-auto-import": "^2.4.2",
"ember-classic-decorator": "^3.0.0",
"ember-cli": "~3.28.5",
"ember-cli-addon-docs": "^5.0",
"ember-cli-addon-docs": "^5.1",
"ember-cli-addon-docs-yuidoc": "^1.0.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deploy": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{page-title 'Dummy'}}
{{page-title 'Ember Printable Pages'}}

{{outlet}}
<DocsKeyboardShortcuts />
<DocsKeyboardShortcuts />
26 changes: 13 additions & 13 deletions tests/dummy/app/templates/docs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

<DocsViewer as |viewer|>
<viewer.nav as |nav|>
{{nav.section "Overview"}}
{{nav.item "Introduction" "docs.index"}}
{{nav.item "Installation" "docs.installation"}}
{{nav.item "Quick Start" "docs.getting-started"}}
{{nav.item "Limitations" "docs.limitations"}}
<nav.section @label="Overview" />
<nav.item @label="Introduction" @route="docs.index" />
<nav.item @label="Installation" @route="docs.installation" />
<nav.item @label="Quick Start" @route="docs.getting-started" />
<nav.item @label="Limitations" @route="docs.limitations" />

{{nav.section "Cookbook"}}
{{nav.item "Rerendering" "docs.rerendering"}}
{{nav.item "Layout Customization" "docs.layout-customization"}}
{{nav.item "Title Pages" "docs.title-pages"}}
{{nav.item "Page Numbers" "docs.page-numbers"}}
{{nav.item "Table of Contents" "docs.table-of-contents"}}
{{nav.item "Continued Sections" "docs.continued-sections"}}
{{nav.item "Tracking Render Progress" "docs.render-progress"}}
<nav.section @label="Cookbook" />
<nav.item @label="Rerendering" @route="docs.rerendering" />
<nav.item @label="Layout Customization" @route="docs.layout-customization" />
<nav.item @label="Title Pages" @route="docs.title-pages" />
<nav.item @label="Page Numbers" @route="docs.page-numbers" />
<nav.item @label="Table of Contents" @route="docs.table-of-contents" />
<nav.item @label="Continued Sections" @route="docs.continued-sections" />
<nav.item @label="Tracking Render Progress" @route="docs.render-progress" />
</viewer.nav>

<viewer.main>
Expand Down
24 changes: 14 additions & 10 deletions tests/dummy/app/templates/docs/getting-started.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<h1>Quick Start</h1>

<p>In its simplest form a Printable Page is a document containing chapters.</p>
<p>Each chapter defines headers, footers, and one or more sections.</p>
<p>
Printable Pages will layout your document so that page breaks
do not occur in the middle of a section.
Printable Pages enables the declarative definition of a document and then
it manages the layout for you. A Printable Pages 'document' consists of
one or more chapters with page headers &amp; footers and body sections.
</p>

<p>
See the <LinkTo @route='demo'>Demo</LinkTo> for an interactive demo.
</p>

<h2>Simplest Implementation</h2>
<DocsDemo as |demo|>
<demo.example @name="getting-started-1" @class="hidden">
<demo.example @name="getting-started-1" class="hidden">
<PrintablePages as |document|>
<document.chapter as |chapter|>
<chapter.page-header>Header content</chapter.page-header>
Expand All @@ -19,7 +23,7 @@
</PrintablePages>
</demo.example>

<DocsSnippet @name="getting-started-1" @language="hbs" />
<demo.snippet @name="getting-started-1" @language="hbs" />
</DocsDemo>

<h2>Repeating Content</h2>
Expand All @@ -29,7 +33,7 @@
</p>

<DocsDemo as |demo|>
<demo.example @name="getting-started-2" @class="hidden">
<demo.example @name="getting-started-2" class="hidden">
<PrintablePages as |document|>
<document.chapter as |chapter|>
<chapter.section @data={{range 1 10}} as |section|>
Expand All @@ -39,7 +43,7 @@
</PrintablePages>
</demo.example>

<DocsSnippet @name="getting-started-2" @language="hbs" />
<demo.snippet @name="getting-started-2" @language="hbs" />
</DocsDemo>

<h2>Multiple Columns</h2>
Expand All @@ -49,7 +53,7 @@
</p>

<DocsDemo as |demo|>
<demo.example @name="getting-started-3" @class="hidden">
<demo.example @name="getting-started-3" class="hidden">
<PrintablePages as |document|>
<document.chapter as |chapter|>
<chapter.section @data={{range 1 10}} @columnCount={{3}} as |section|>
Expand All @@ -59,5 +63,5 @@
</PrintablePages>
</demo.example>

<DocsSnippet @name="getting-started-3" @language="hbs" />
<demo.snippet @name="getting-started-3" @language="hbs" />
</DocsDemo>
7 changes: 3 additions & 4 deletions tests/dummy/app/templates/docs/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

<ul class="styled-list">
<li>Define your document using the declarative power of handlebars</li>
<li>Reuse your existing component</li>
<li>Include page headers and footers (impossible to achieve with CSS alone)</li>
<li>Define document or chapter title pages</li>
<li>Reuse your existing components</li>
<li>Include page headers and footers</li>
<li>Define document and/or chapter title pages</li>
<li>Supports multicolumn layouts</li>
<li>Easy to test</li>
<li>Fast</li>
<li>Progressive rendering (users see progress as pages are generated)</li>
<li>Makes it easy to provide an in-app preview</li>
</ul>
4 changes: 2 additions & 2 deletions tests/dummy/app/templates/docs/layout-customization.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</p>

<DocsDemo as |demo|>
<demo.example @name="getting-started-1" @class="hidden">
<demo.example @name="layout-1" @class="hidden">
<PrintablePages
@dimensions={{hash
width=this.settings.width
Expand All @@ -41,5 +41,5 @@
</PrintablePages>
</demo.example>

<DocsSnippet @name="getting-started-1" @language="hbs" />
<DocsSnippet @name="layout-1" @language="hbs" />
</DocsDemo>
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5715,7 +5715,7 @@ ember-cli-addon-docs-yuidoc@^1.0.0:
lodash "^4.17.20"
yuidocjs "^0.10.2"

ember-cli-addon-docs@^5.0:
ember-cli-addon-docs@^5.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/ember-cli-addon-docs/-/ember-cli-addon-docs-5.1.0.tgz#0804ff9e5d5e0a4a939a35cdd269d0adf3ac7b4f"
integrity sha512-O2xmirToqwKcemMuQbrlneDy6O3YI6RvjOkrKx+16em2/I28n6mUChKwquIh0PePhVQQMNn9313XEt/dENSr/w==
Expand Down

0 comments on commit f439d61

Please sign in to comment.