Commit 62cafe08 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #306 from hypothesis/branded-sidebar

Branded sidebar
parents 12d49902 ef671dfe
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
overflow-hysteresis="20" overflow-hysteresis="20"
content-data="selector.exact"> content-data="selector.exact">
<blockquote class="annotation-quote" <blockquote class="annotation-quote"
h-branding="selectionFontFamily"
ng-bind="selector.exact" ng-bind="selector.exact"
ng-repeat="selector in target.selector ng-repeat="selector in target.selector
| filter : {'type': 'TextQuoteSelector'} | filter : {'type': 'TextQuoteSelector'}
...@@ -106,7 +107,8 @@ ...@@ -106,7 +107,8 @@
<a class="annotation-link u-strong" ng-show="vm.canCollapseBody" <a class="annotation-link u-strong" ng-show="vm.canCollapseBody"
ng-click="vm.toggleCollapseBody($event)" ng-click="vm.toggleCollapseBody($event)"
ng-title="vm.collapseBody ? 'Show the full annotation text' : 'Show the first few lines only'" ng-title="vm.collapseBody ? 'Show the full annotation text' : 'Show the first few lines only'"
ng-bind="vm.collapseBody ? 'More' : 'Less'"></a> ng-bind="vm.collapseBody ? 'More' : 'Less'"
h-branding="highlightColor"></a>
</div> </div>
<!-- / Tags --> <!-- / Tags -->
......
<top-bar <div class="app-content-wrapper" h-branding="appBackgroundColor">
auth="auth" <top-bar
on-login="login()" auth="auth"
on-logout="logout()" on-login="login()"
on-share-page="share()" on-logout="logout()"
on-show-help-panel="helpPanel.visible = true" on-share-page="share()"
is-sidebar="::isSidebar" on-show-help-panel="helpPanel.visible = true"
pending-update-count="countPendingUpdates()" is-sidebar="::isSidebar"
on-apply-pending-updates="applyPendingUpdates()" pending-update-count="countPendingUpdates()"
search-controller="search" on-apply-pending-updates="applyPendingUpdates()"
sort-key="sortKey()" search-controller="search"
sort-keys-available="sortKeysAvailable()" sort-key="sortKey()"
on-change-sort-key="setSortKey(sortKey)"> sort-keys-available="sortKeysAvailable()"
</top-bar> on-change-sort-key="setSortKey(sortKey)">
</top-bar>
<div class="create-account-banner" ng-if="isSidebar && auth.status === 'logged-out'" ng-cloak> <div class="create-account-banner" ng-if="isSidebar && auth.status === 'logged-out'" ng-cloak>
To annotate this document To annotate this document
<a href="{{ serviceUrl('signup') }}" target="_blank"> <a href="{{ serviceUrl('signup') }}" target="_blank">
create a free account create a free account
</a> </a>
or <a href="" ng-click="login()">log in</a> or <a href="" ng-click="login()">log in</a>
</div> </div>
<div class="content" ng-cloak> <div class="content" ng-cloak>
<login-form <login-form
ng-if="accountDialog.visible" ng-if="accountDialog.visible"
on-close="accountDialog.visible = false"> on-close="accountDialog.visible = false">
</login-form> </login-form>
<sidebar-tutorial ng-if="isSidebar"></sidebar-tutorial> <sidebar-tutorial ng-if="isSidebar"></sidebar-tutorial>
<share-dialog <share-dialog
ng-if="shareDialog.visible" ng-if="shareDialog.visible"
on-close="shareDialog.visible = false"> on-close="shareDialog.visible = false">
</share-dialog> </share-dialog>
<help-panel ng-if="helpPanel.visible" <help-panel ng-if="helpPanel.visible"
on-close="helpPanel.visible = false" on-close="helpPanel.visible = false"
auth="auth"> auth="auth">
</help-panel> </help-panel>
<main ng-view=""></main> <main ng-view=""></main>
</div>
</div> </div>
<div class="dropdown-menu-btn"> <div class="dropdown-menu-btn" >
<button <button
class="dropdown-menu-btn__btn" class="dropdown-menu-btn__btn"
ng-bind="vm.label" ng-bind="vm.label"
ng-click="vm.onClick($event)" ng-click="vm.onClick($event)"
ng-disabled="vm.isDisabled"> ng-disabled="vm.isDisabled"
h-branding="ctaTextColor, ctaBackgroundColor">
</button> </button>
<button <button
class="dropdown-menu-btn__dropdown-arrow" class="dropdown-menu-btn__dropdown-arrow"
title="{{vm.dropdownMenuLabel}}" title="{{vm.dropdownMenuLabel}}"
ng-click="vm.toggleDropdown($event)"> ng-click="vm.toggleDropdown($event)">
<div class="dropdown-menu-btn__dropdown-arrow-separator"></div> <div class="dropdown-menu-btn__dropdown-arrow-separator"></div>
<div class="dropdown-menu-btn__dropdown-arrow-indicator"> <div
class="dropdown-menu-btn__dropdown-arrow-indicator"
h-branding="ctaTextColor, ctaBackgroundColor">
<div></div> <div></div>
</div> </div>
</button> </button>
......
...@@ -9,11 +9,13 @@ ...@@ -9,11 +9,13 @@
ng-show="vm.showInlineControls()"> ng-show="vm.showInlineControls()">
<span class="excerpt__toggle-link" ng-show="vm.isExpandable()"> <span class="excerpt__toggle-link" ng-show="vm.isExpandable()">
<a ng-click="vm.toggle($event)" <a ng-click="vm.toggle($event)"
title="Show the full excerpt">More</a> title="Show the full excerpt"
h-branding="highlightColor">More</a>
</span> </span>
<span class="excerpt__toggle-link" ng-show="vm.isCollapsible()"> <span class="excerpt__toggle-link" ng-show="vm.isCollapsible()">
<a ng-click="vm.toggle($event)" <a ng-click="vm.toggle($event)"
title="Show the first few lines only">Less</a> title="Show the first few lines only"
h-branding="highlightColor">Less</a>
</span> </span>
</div> </div>
</div> </div>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
ng-if="vm.newStyle && vm.auth.status === 'unknown'"></span> ng-if="vm.newStyle && vm.auth.status === 'unknown'"></span>
<span class="login-text" <span class="login-text"
ng-if="vm.newStyle && vm.auth.status === 'logged-out'"> ng-if="vm.newStyle && vm.auth.status === 'logged-out'">
<a href="{{vm.serviceUrl('signup')}}" target="_blank">Sign up</a> <a href="{{vm.serviceUrl('signup')}}" target="_blank" h-branding="highlightColor">Sign up</a>
/ <a href="" ng-click="vm.onLogin()">Log in</a> / <a href="" ng-click="vm.onLogin()" h-branding="highlightColor">Log in</a>
</span> </span>
<div ng-if="vm.newStyle" <div ng-if="vm.newStyle"
class="pull-right login-control-menu" class="pull-right login-control-menu"
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="form-actions"> <div class="form-actions">
<div class="form-actions-message"> <div class="form-actions-message">
<a href="{{vm.serviceUrl('forgot-password')}}" target="_blank">Forgot your password?</a> <a href="{{vm.serviceUrl('forgot-password')}}" target="_blank" h-branding="highlightColor">Forgot your password?</a>
</div> </div>
<div class="form-actions-buttons"> <div class="form-actions-buttons">
<button class="btn btn-primary" type="submit" name="login" <button class="btn btn-primary" type="submit" name="login"
......
...@@ -15,8 +15,11 @@ ...@@ -15,8 +15,11 @@
</div> </div>
<textarea class="form-input form-textarea js-markdown-input" <textarea class="form-input form-textarea js-markdown-input"
ng-show="showEditor()" ng-show="showEditor()"
ng-click="$event.stopPropagation()"></textarea> ng-click="$event.stopPropagation()"
h-branding="annotationFontFamily"
></textarea>
<div class="markdown-body js-markdown-preview" <div class="markdown-body js-markdown-preview"
ng-class="preview && 'markdown-preview'" ng-class="preview && 'markdown-preview'"
ng-dblclick="togglePreview()" ng-dblclick="togglePreview()"
ng-show="!showEditor()"></div> ng-show="!showEditor()"
h-branding="annotationFontFamily"></div>
...@@ -34,15 +34,31 @@ $base-line-height: 20px; ...@@ -34,15 +34,31 @@ $base-line-height: 20px;
// Top-level styles // Top-level styles
// ---------------- // ----------------
body { html, body {
$sidebar-h-padding: 9px; height: 100%;
}
body {
@include grey-background; @include grey-background;
font-family: $sans-font-family; font-family: $sans-font-family;
font-weight: normal; font-weight: normal;
-webkit-overflow-scrolling: touch;
}
hypothesis-app {
display: block;
height: 100%;
}
.app-content-wrapper {
$sidebar-h-padding: 9px;
@include grey-background;
min-height: 100%;
padding: $sidebar-h-padding; padding: $sidebar-h-padding;
padding-top: $sidebar-h-padding + $top-bar-height; padding-top: $sidebar-h-padding + $top-bar-height;
-webkit-overflow-scrolling: touch;
@include respond-to(tablets desktops) { @include respond-to(tablets desktops) {
padding-bottom: 4rem; padding-bottom: 4rem;
......
.selection-tabs { .selection-tabs {
@include grey-background;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment