Adding global app frame wrappers

This makes the new responsive styles work in a basic way. It'll probably need revisiting to break out the header area into a partial (maybe?)
This commit is contained in:
John O'Nolan 2014-08-05 12:51:39 +03:00
parent b73d60bc2e
commit 2331572978
4 changed files with 107 additions and 75 deletions

View File

@ -1,11 +1,16 @@
<div id="container">
<a class="sr-only sr-only-focusable" href="#gh-main">Skip to main content</a>
{{#unless hideNav}}
{{partial "navbar"}}
{{/unless}}
<main role="main" id="main" {{bind-attr data-notification-count=topNotificationCount}}>
<main id="gh-main" class="viewport" role="main" {{bind-attr data-notification-count=topNotificationCount}}>
{{gh-notifications location="top" notify="topNotificationChange"}}
{{gh-notifications location="bottom"}}
{{outlet}}
</main>
{{outlet modal}}
</div>

View File

@ -1,27 +1,35 @@
<header>
<section class="box entry-title">
{{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=titleScratch tabindex="1" focus=shouldFocusTitle}}
</section>
<header class="page-header">
<a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
<h2>Editor</h2>
</header>
<section class="entry-markdown active">
<header class="floatingheader" id="entry-markdown-header">
<small>Markdown</small>
<a class="markdown-help" href="" {{action "openModal" "markdown"}}><span class="hidden">What is Markdown?</span></a>
<div class="page-content">
<header>
<section class="box entry-title">
{{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=titleScratch tabindex="1" focus=shouldFocusTitle}}
</section>
</header>
<section id="entry-markdown-content" class="entry-markdown-content">
{{gh-codemirror value=scratch scrollInfo=view.markdownScrollInfo setCodeMirror="setCodeMirror"}}
</section>
</section>
<section class="entry-preview">
<header class="floatingheader" id="entry-preview-header">
<small>Preview <span class="entry-word-count js-entry-word-count">{{gh-count-words scratch}}</span></small>
</header>
<section class="entry-preview-content">
{{gh-markdown markdown=scratch scrollPosition=view.scrollPosition
uploadStarted="disableCodeMirror" uploadFinished="enableCodeMirror" uploadSuccess="handleImgUpload"}}
<section class="entry-markdown active">
<header class="floatingheader">
<small>Markdown</small>
<a class="markdown-help" href="" {{action "openModal" "markdown"}}><span class="hidden">What is Markdown?</span></a>
</header>
<section id="entry-markdown-content" class="entry-markdown-content">
{{gh-codemirror value=scratch scrollInfo=view.markdownScrollInfo setCodeMirror="setCodeMirror"}}
</section>
</section>
</section>
{{partial "publish-bar"}}
<section class="entry-preview">
<header class="floatingheader" id="entry-preview-header">
<small>Preview <span class="entry-word-count js-entry-word-count">{{gh-count-words scratch}}</span></small>
</header>
<section class="entry-preview-content">
{{gh-markdown markdown=scratch scrollPosition=view.scrollPosition
uploadStarted="disableCodeMirror" uploadFinished="enableCodeMirror" uploadSuccess="handleImgUpload"}}
</section>
</section>
{{partial "publish-bar"}}
</div>

View File

@ -1,35 +1,42 @@
<section class="content-list js-content-list">
<header class="floatingheader">
<section class="content-filter">
<small>All Posts</small>
</section>
{{#link-to "editor.new" class="button button-add" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}}
</header>
{{#view "content-list-content-view" tagName="section"}}
<ol class="posts-list">
{{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}}
{{#link-to "posts.post" this class="permalink" title="Edit this post"}}
<h3 class="entry-title">{{title}}</h3>
<section class="entry-meta">
<span class="status">
{{#if isPublished}}
{{#if page}}
<span class="page">Page</span>
{{else}}
<time datetime="{{unbound published_at}}" class="date published">
Published {{gh-format-timeago published_at}}
</time>
{{/if}}
{{else}}
<span class="draft">Draft</span>
{{/if}}
</span>
</section>
{{/link-to}}
{{/each}}
</ol>
{{/view}}
</section>
<section class="content-preview js-content-preview">
{{outlet}}
</section>
<header class="page-header">
<a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
<h2>Content</h2>
</header>
<div class="page-content">
<section class="content-list js-content-list">
<header class="floatingheader">
<section class="content-filter">
<small>All Posts</small>
</section>
{{#link-to "editor.new" class="button button-add" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}}
</header>
{{#view "content-list-content-view" tagName="section"}}
<ol class="posts-list">
{{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}}
{{#link-to "posts.post" this class="permalink" title="Edit this post"}}
<h3 class="entry-title">{{title}}</h3>
<section class="entry-meta">
<span class="status">
{{#if isPublished}}
{{#if page}}
<span class="page">Page</span>
{{else}}
<time datetime="{{unbound published_at}}" class="date published">
Published {{gh-format-timeago published_at}}
</time>
{{/if}}
{{else}}
<span class="draft">Draft</span>
{{/if}}
</span>
</section>
{{/link-to}}
{{/each}}
</ol>
{{/view}}
</section>
<section class="content-preview js-content-preview">
{{outlet}}
</section>
</div>

View File

@ -1,19 +1,31 @@
<aside class="settings-sidebar" role="complementary">
<header>
<h1 class="title">Settings</h1>
</header>
<nav class="settings-menu">
<ul>
{{#unless session.user.isAuthor}}
{{#unless session.user.isEditor}}
{{gh-activating-list-item route="settings.general" title="General" classNames="general"}}
<header class="page-header">
<a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
<h2>Settings</h2>
</header>
<div class="page-content">
<aside class="settings-sidebar" role="complementary">
<header>
<h1 class="title">Settings</h1>
</header>
<nav class="settings-menu">
<ul>
{{#unless session.user.isAuthor}}
{{#unless session.user.isEditor}}
{{gh-activating-list-item route="settings.general" title="General" classNames="general"}}
{{/unless}}
{{gh-activating-list-item route="settings.users" title="Users" classNames="users"}}
{{#if showApps}}
{{#unless session.user.isEditor}}
{{gh-activating-list-item route="settings.apps" title="Apps" classNames="apps"}}
{{/unless}}
{{/if}}
{{/unless}}
</ul>
</nav>
</aside>
{{gh-activating-list-item route="settings.users" title="Users" classNames="users"}}
{{/unless}}
</ul>
</nav>
</aside>
{{outlet}}
{{outlet}}
</div>