Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Use ember-mobile-menu for mobile nav #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
with:
node-version: 14.x
cache: npm
- run: npm i -g npm@8
- name: Install Dependencies
run: npm ci
- name: Lint
Expand All @@ -40,6 +41,7 @@ jobs:
with:
node-version: 14.x
cache: npm
- run: npm i -g npm@8
- name: Install Dependencies
run: npm install --no-shrinkwrap
- name: Run Tests
Expand Down Expand Up @@ -70,6 +72,7 @@ jobs:
with:
node-version: 14.x
cache: npm
- run: npm i -g npm@8
- name: Install Dependencies
run: npm ci
- name: Run Tests
Expand Down
2 changes: 1 addition & 1 deletion addon/components/grouped-toc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ul class="chapter">
{{#each group.links as |id|}}
<li>
<LinkTo @route="rfc" @model={{id}}> {{id}} </LinkTo>
{{yield id}}
</li>
{{/each}}
</ul>
Expand Down
6 changes: 5 additions & 1 deletion addon/styles/mdbook.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ table td {
table thead td {
font-weight: 700;
}

.sidebar-padding {
padding: 10px;
}

.sidebar {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 300px;
overflow-y: auto;
padding: 10px 10px;
font-size: 0.875em;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
Expand Down
42 changes: 31 additions & 11 deletions addon/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
<aside class="sidebar light">
<ul class="chapter">
<li>
<LinkTo @route="index">Introduction</LinkTo>
</li>
</ul>
<MobileMenuWrapper as |mmw|>
<mmw.MobileMenu as |mm|>
<div class="sidebar-padding">
<ul class="chapter">
<li>
<mm.LinkTo @route="index">Introduction</mm.LinkTo>
</li>
</ul>
<GroupedToc @model={{@model}} as |id|>
<mm.LinkTo @route="rfc" @model={{id}}> {{id}} </mm.LinkTo>
</GroupedToc>
</div>
</mmw.MobileMenu>

<GroupedToc @model={{@model}} />
</aside>
<mmw.Content>
<mmw.Toggle class="reset"><FaIcon class="p2" @icon="bars" /></mmw.Toggle>
<aside class="sidebar sidebar-padding light">
<ul class="chapter">
<li>
<LinkTo @route="index">Introduction</LinkTo>
</li>
</ul>

<GroupedToc @model={{@model}} as |id|>
<LinkTo @route="rfc" @model={{id}}> {{id}} </LinkTo>
</GroupedToc>
</aside>
<main class="page-wrapper light">
{{outlet}}
</main>
</mmw.Content>
</MobileMenuWrapper>

<main class="page-wrapper light">
{{outlet}}
</main>
7 changes: 0 additions & 7 deletions addon/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<div class="page">
<div class="menu-bar">
<div class="left-buttons">
<button class="reset" type="button" {{on "click" this.toggleSidebar}}>
<FaIcon class="p2" @icon="bars" />
</button>
</div>
</div>
<div class="content">
{{markdown-to-html @model.content tagName=""}}
</div>
Expand Down
7 changes: 0 additions & 7 deletions addon/templates/rfc.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<div class="page">
<div class="menu-bar">
<div class="left-buttons">
<button class="reset" type="button" {{on "click" this.toggleSidebar}}>
<FaIcon class="p2" @icon="bars" />
</button>
</div>
</div>
<table class="rfc-data-table">
<thead>
<tr>
Expand Down
Loading