0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

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}} {{#unless hideNav}}
{{partial "navbar"}} {{partial "navbar"}}
{{/unless}} {{/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="top" notify="topNotificationChange"}}
{{gh-notifications location="bottom"}} {{gh-notifications location="bottom"}}
{{outlet}} {{outlet}}
</main> </main>
{{outlet modal}} {{outlet modal}}
</div>

View file

@ -1,27 +1,35 @@
<header> <header class="page-header">
<section class="box entry-title"> <a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
{{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=titleScratch tabindex="1" focus=shouldFocusTitle}} <h2>Editor</h2>
</section>
</header> </header>
<section class="entry-markdown active"> <div class="page-content">
<header class="floatingheader" id="entry-markdown-header"> <header>
<small>Markdown</small> <section class="box entry-title">
<a class="markdown-help" href="" {{action "openModal" "markdown"}}><span class="hidden">What is Markdown?</span></a> {{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=titleScratch tabindex="1" focus=shouldFocusTitle}}
</section>
</header> </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"> <section class="entry-markdown active">
<header class="floatingheader" id="entry-preview-header"> <header class="floatingheader">
<small>Preview <span class="entry-word-count js-entry-word-count">{{gh-count-words scratch}}</span></small> <small>Markdown</small>
</header> <a class="markdown-help" href="" {{action "openModal" "markdown"}}><span class="hidden">What is Markdown?</span></a>
<section class="entry-preview-content"> </header>
{{gh-markdown markdown=scratch scrollPosition=view.scrollPosition <section id="entry-markdown-content" class="entry-markdown-content">
uploadStarted="disableCodeMirror" uploadFinished="enableCodeMirror" uploadSuccess="handleImgUpload"}} {{gh-codemirror value=scratch scrollInfo=view.markdownScrollInfo setCodeMirror="setCodeMirror"}}
</section>
</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="page-header">
<header class="floatingheader"> <a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
<section class="content-filter"> <h2>Content</h2>
<small>All Posts</small> </header>
</section>
{{#link-to "editor.new" class="button button-add" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}} <div class="page-content">
</header> <section class="content-list js-content-list">
{{#view "content-list-content-view" tagName="section"}} <header class="floatingheader">
<ol class="posts-list"> <section class="content-filter">
{{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}} <small>All Posts</small>
{{#link-to "posts.post" this class="permalink" title="Edit this post"}} </section>
<h3 class="entry-title">{{title}}</h3> {{#link-to "editor.new" class="button button-add" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}}
<section class="entry-meta"> </header>
<span class="status"> {{#view "content-list-content-view" tagName="section"}}
{{#if isPublished}} <ol class="posts-list">
{{#if page}} {{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}}
<span class="page">Page</span> {{#link-to "posts.post" this class="permalink" title="Edit this post"}}
{{else}} <h3 class="entry-title">{{title}}</h3>
<time datetime="{{unbound published_at}}" class="date published"> <section class="entry-meta">
Published {{gh-format-timeago published_at}} <span class="status">
</time> {{#if isPublished}}
{{/if}} {{#if page}}
{{else}} <span class="page">Page</span>
<span class="draft">Draft</span> {{else}}
{{/if}} <time datetime="{{unbound published_at}}" class="date published">
</span> Published {{gh-format-timeago published_at}}
</section> </time>
{{/link-to}} {{/if}}
{{/each}} {{else}}
</ol> <span class="draft">Draft</span>
{{/view}} {{/if}}
</section> </span>
<section class="content-preview js-content-preview"> </section>
{{outlet}} {{/link-to}}
</section> {{/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 class="page-header">
<header> <a class="menu-button" href="#"><span class="sr-only">Menu</span></a>
<h1 class="title">Settings</h1> <h2>Settings</h2>
</header> </header>
<nav class="settings-menu">
<ul> <div class="page-content">
{{#unless session.user.isAuthor}} <aside class="settings-sidebar" role="complementary">
{{#unless session.user.isEditor}} <header>
{{gh-activating-list-item route="settings.general" title="General" classNames="general"}} <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}} {{/unless}}
</ul>
</nav>
</aside>
{{gh-activating-list-item route="settings.users" title="Users" classNames="users"}} {{outlet}}
</div>
{{/unless}}
</ul>
</nav>
</aside>
{{outlet}}