Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
2f1cda50
Commit
2f1cda50
authored
May 15, 2017
by
Robert Knight
Committed by
GitHub
May 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #383 from hypothesis/branding-updates
Branding updates
parents
b4d232ed
e321f9e5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
config.rst
docs/publishers/config.rst
+1
-1
h-branding.js
src/sidebar/directive/h-branding.js
+3
-3
h-branding-fixtures.js
src/sidebar/directive/test/h-branding-fixtures.js
+2
-2
annotation.html
src/sidebar/templates/annotation.html
+1
-1
excerpt.html
src/sidebar/templates/excerpt.html
+2
-2
login-control.html
src/sidebar/templates/login-control.html
+2
-2
login-form.html
src/sidebar/templates/login-form.html
+1
-1
No files found.
docs/publishers/config.rst
View file @
2f1cda50
...
...
@@ -201,7 +201,7 @@ loads.
The :option:`branding` setting is currently still experimental and may
change in the future.
.. option::
highligh
tColor
.. option::
accen
tColor
``Color``. We have several areas in our client that have pops of color
that are secondary to the primary call to action elements. Things such as
...
...
src/sidebar/directive/h-branding.js
View file @
2f1cda50
...
...
@@ -30,7 +30,7 @@ function BrandingDirective(settings) {
// the type of .style property being set. The types are pretty simple for now
// and are a one-to-one mapping between the branding type and style property.
var
_supportedPropSettings
=
{
highligh
tColor
:
'color'
,
accen
tColor
:
'color'
,
appBackgroundColor
:
'backgroundColor'
,
ctaBackgroundColor
:
'backgroundColor'
,
ctaTextColor
:
'color'
,
...
...
@@ -40,7 +40,7 @@ function BrandingDirective(settings) {
// filter all attribute values down to the supported
// branding properties
var
_getValidBrandingAttribut
=
function
(
attrString
){
var
_getValidBrandingAttribut
e
=
function
(
attrString
){
return
attrString
.
split
(
','
).
map
(
function
(
attr
){
return
attr
.
trim
();
}).
filter
(
function
filterAgainstWhitelist
(
attr
){
...
...
@@ -53,7 +53,7 @@ function BrandingDirective(settings) {
restrict
:
'A'
,
link
:
function
(
scope
,
$elem
,
attrs
)
{
if
(
_hasBranding
){
_getValidBrandingAttribut
(
attrs
.
hBranding
).
forEach
(
function
(
attr
){
_getValidBrandingAttribut
e
(
attrs
.
hBranding
).
forEach
(
function
(
attr
){
var
propVal
=
settings
.
branding
[
attr
];
if
(
propVal
){
// the _supportedPropSettings holds the .style property name
...
...
src/sidebar/directive/test/h-branding-fixtures.js
View file @
2f1cda50
...
...
@@ -10,8 +10,8 @@ module.exports = [
expectedPropValue
:
'blue'
,
},
{
settings
:
{
highligh
tColor
:
'red'
},
attrs
:
'h-branding="
highligh
tColor"'
,
settings
:
{
accen
tColor
:
'red'
},
attrs
:
'h-branding="
accen
tColor"'
,
styleChanged
:
'color'
,
expectedPropValue
:
'red'
,
},
...
...
src/sidebar/templates/annotation.html
View file @
2f1cda50
...
...
@@ -66,7 +66,7 @@
ng-click=
"vm.toggleCollapseBody($event)"
ng-title=
"vm.collapseBody ? 'Show the full annotation text' : 'Show the first few lines only'"
ng-bind=
"vm.collapseBody ? 'More' : 'Less'"
h-branding=
"
highligh
tColor"
></a>
h-branding=
"
accen
tColor"
></a>
</div>
<!-- / Tags -->
...
...
src/sidebar/templates/excerpt.html
View file @
2f1cda50
...
...
@@ -10,12 +10,12 @@
<span
class=
"excerpt__toggle-link"
ng-show=
"vm.isExpandable()"
>
…
<a
ng-click=
"vm.toggle($event)"
title=
"Show the full excerpt"
h-branding=
"
highlightColor
"
>
More
</a>
h-branding=
"
accentColor, selectionFontFamily
"
>
More
</a>
</span>
<span
class=
"excerpt__toggle-link"
ng-show=
"vm.isCollapsible()"
>
<a
ng-click=
"vm.toggle($event)"
title=
"Show the first few lines only"
h-branding=
"
highlightColor
"
>
Less
</a>
h-branding=
"
accentColor, selectionFontFamily
"
>
Less
</a>
</span>
</div>
</div>
...
...
src/sidebar/templates/login-control.html
View file @
2f1cda50
...
...
@@ -3,8 +3,8 @@
ng-if=
"vm.newStyle && vm.auth.status === 'unknown'"
>
⋯
</span>
<span
class=
"login-text"
ng-if=
"vm.newStyle && vm.auth.status === 'logged-out'"
>
<a
href=
""
ng-click=
"vm.onSignUp()"
target=
"_blank"
h-branding=
"
highligh
tColor"
>
Sign up
</a>
/
<a
href=
""
ng-click=
"vm.onLogin()"
h-branding=
"
highligh
tColor"
>
Log in
</a>
<a
href=
""
ng-click=
"vm.onSignUp()"
target=
"_blank"
h-branding=
"
accen
tColor"
>
Sign up
</a>
/
<a
href=
""
ng-click=
"vm.onLogin()"
h-branding=
"
accen
tColor"
>
Log in
</a>
</span>
<div
ng-if=
"vm.newStyle"
class=
"pull-right login-control-menu"
...
...
src/sidebar/templates/login-form.html
View file @
2f1cda50
...
...
@@ -53,7 +53,7 @@
<div
class=
"form-actions"
>
<div
class=
"form-actions-message"
>
<a
href=
"{{vm.serviceUrl('forgot-password')}}"
target=
"_blank"
h-branding=
"
highligh
tColor"
>
Forgot your password?
</a>
<a
href=
"{{vm.serviceUrl('forgot-password')}}"
target=
"_blank"
h-branding=
"
accen
tColor"
>
Forgot your password?
</a>
</div>
<div
class=
"form-actions-buttons"
>
<button
class=
"btn btn-primary"
type=
"submit"
name=
"login"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment