blacklight-spotlight 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89df58d840a596c845a8bcbb2f62b49ac7b0e9a5
4
- data.tar.gz: 7ddcda4d2cee3f8fd7f760962b6ff2fda4f563b2
3
+ metadata.gz: 5a0bdc363611ae794c9f8538a86d7c183e6106fd
4
+ data.tar.gz: 6eaa6b1112ae5187727f5d55fe8cc8dafd80aa66
5
5
  SHA512:
6
- metadata.gz: 7c6187d960f255975cba4928ab6359397482ef09c72e9034d2d2ef67464a76500a60b812c9f95f634f12de114cd1f0fb7d3a62935a8200f14269a98c72018441
7
- data.tar.gz: cd79ced46190290e79965c6058fae17a7eaae996c2e6ea1cb01d0138080864c74f3c6a7e44644207ad4dfec92cd5bcbd9f916765401385703196eec4723af220
6
+ metadata.gz: 076a0d3486082869865b4adbf54613ed42022236890d6c2b60dcd979a65dbc1b4bb61a5294047c2c31d8f424a3d42798fc6cad267bb37016fd20d59337d10eb5
7
+ data.tar.gz: 67e395d6f4c102f7549ca82a54f862d0bd97f252e6c0040a48f8577b67ed91ca9cb3a2b2fc39e6b86add8903e10c1e695dc30c445a6f5fbcc9b418d98fe698aa
@@ -1,7 +1,5 @@
1
1
  $masthead-height: 180px;
2
2
  $masthead-image-blur: 1px;
3
- $menu-link-background-color-active: rgba(255, 255, 255, 0.3);
4
- $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
5
3
 
6
4
  @mixin masthead-background-containers() {
7
5
  position: absolute;
@@ -12,7 +10,9 @@ $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
12
10
  height: inherit;
13
11
  }
14
12
 
15
- @mixin masthead-navigation-menu() {
13
+ @mixin transparent-masthead-navigation-menu() {
14
+ @extend .navbar-transparent;
15
+
16
16
  border: 0;
17
17
  border-radius: 0;
18
18
 
@@ -21,39 +21,14 @@ $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
21
21
  text-transform: uppercase;
22
22
 
23
23
  a {
24
- color: $gray-lighter;
25
24
  letter-spacing: 1.2px;
26
25
  }
27
26
  }
28
27
 
29
- a:hover {
30
- background-color: $menu-link-background-color-hover;
31
- }
32
-
33
- > .active > a {
34
- background-color: $menu-link-background-color-active;
35
- color: $white;
36
- }
37
-
38
28
  .dropdown-menu {
39
29
  text-transform: none;
40
-
41
- > li a {
42
- color: $black;
43
-
44
- &:hover {
45
- background-color: $gray-lighter;
46
- }
47
- }
48
30
  }
49
31
  }
50
-
51
- // Curated Features menu link when it has dropdown menu
52
- .navbar-nav > .open > a,
53
- .navbar-nav > .open > a:hover,
54
- .navbar-nav > .open > a:focus {
55
- background-color: $menu-link-background-color-hover;
56
- }
57
32
  }
58
33
 
59
34
  #exhibit-masthead,
@@ -65,28 +40,14 @@ $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
65
40
  z-index: 100;
66
41
 
67
42
  &.page-masthead {
68
- @include masthead-navigation-menu();
69
- background-color: rgba(0, 0, 0, 0.5);
70
- border-bottom: 1px solid $gray;
43
+ @include transparent-masthead-navigation-menu();
44
+ border-bottom: 1px solid $navbar-transparent-border;
71
45
  margin-bottom: 0;
72
46
  margin-top: 0;
73
47
 
74
48
  .navbar-nav {
75
49
  float: right;
76
50
  }
77
-
78
- .navbar-brand,
79
- .navbar-nav li {
80
- color: $gray-lighter;
81
-
82
- &.active a {
83
- color: $gray;
84
- }
85
-
86
- a {
87
- color: $gray-lighter;
88
- }
89
- }
90
51
  }
91
52
 
92
53
  .navbar-form {
@@ -95,9 +56,9 @@ $menu-link-background-color-hover: rgba(255, 255, 255, 0.15);
95
56
  }
96
57
 
97
58
  #exhibit-masthead.with-image + #exhibit-navbar.navbar-default {
98
- @include masthead-navigation-menu();
99
- background-color: rgba(0, 0, 0, 0.2);
100
- border-top: 1px solid $gray;
59
+ @include transparent-masthead-navigation-menu();
60
+ background-color: $navbar-transparent-bg;
61
+ border-top: 1px solid $navbar-transparent-border;
101
62
  }
102
63
 
103
64
  .navbar + .navbar {
@@ -0,0 +1,48 @@
1
+ // Transparent navbar styling, adapted directly from Bootstrap's navbar styles:
2
+ // https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_navbar.scss
3
+
4
+ .navbar-transparent {
5
+ background-color: $navbar-transparent-bg;
6
+ border-color: $navbar-transparent-border;
7
+
8
+ .navbar-brand {
9
+ color: $navbar-transparent-brand-color;
10
+ &:hover,
11
+ &:focus {
12
+ color: $navbar-transparent-brand-hover-color;
13
+ background-color: $navbar-transparent-brand-hover-bg;
14
+ }
15
+ }
16
+
17
+ .navbar-text {
18
+ color: $navbar-transparent-color;
19
+ }
20
+
21
+ .navbar-nav {
22
+ > li > a {
23
+ color: $navbar-transparent-link-color;
24
+
25
+ &:hover,
26
+ &:focus {
27
+ color: $navbar-transparent-link-hover-color;
28
+ background-color: $navbar-transparent-link-hover-bg;
29
+ }
30
+ }
31
+ > .active > a {
32
+ &,
33
+ &:hover,
34
+ &:focus {
35
+ color: $navbar-transparent-link-active-color;
36
+ background-color: $navbar-transparent-link-active-bg;
37
+ }
38
+ }
39
+ > .disabled > a {
40
+ &,
41
+ &:hover,
42
+ &:focus {
43
+ color: $navbar-transparent-link-disabled-color;
44
+ background-color: $navbar-transparent-link-disabled-bg;
45
+ }
46
+ }
47
+ }
48
+ }
@@ -2,6 +2,7 @@
2
2
  @import "spotlight/mixins";
3
3
  @import "bootstrap/variables";
4
4
 
5
+ @import "spotlight/navbar";
5
6
  @import "spotlight/sir-trevor_overrides";
6
7
  @import "spotlight/attachments";
7
8
  @import "spotlight/pages";
@@ -9,3 +9,24 @@ $exhibit-card-border: $well-border !default;
9
9
  $exhibit-card-gutter: $padding-large-horizontal !default;
10
10
  $exhibit-card-image-size: 273px !default;
11
11
  $exhibit-card-shadow: inset 2px 2px 5px -2px $exhibit-card-border !default;
12
+
13
+ $navbar-transparent-color: $gray !default;
14
+ $navbar-transparent-bg: rgba(0, 0, 0, 0.2) !default;
15
+ $navbar-transparent-border: $gray !default;
16
+ $navbar-transparent-link-color: $gray-lighter !default;
17
+ $navbar-transparent-link-hover-color: $gray-lighter !default;
18
+ $navbar-transparent-link-hover-bg: rgba(255, 255, 255, 0.15) !default;
19
+ $navbar-transparent-link-active-color: $gray-lighter !default;
20
+ $navbar-transparent-link-active-bg: rgba(255, 255, 255, 0.3) !default;
21
+ $navbar-transparent-link-disabled-color: #ccc !default;
22
+ $navbar-transparent-link-disabled-bg: transparent !default;
23
+
24
+ // Navbar brand label
25
+ $navbar-transparent-brand-color: $navbar-transparent-link-color !default;
26
+ $navbar-transparent-brand-hover-color: darken($navbar-transparent-brand-color, 10%) !default;
27
+ $navbar-transparent-brand-hover-bg: transparent !default;
28
+
29
+ // Navbar toggle
30
+ $navbar-transparent-toggle-hover-bg: $navbar-default-toggle-hover-bg !default;
31
+ $navbar-transparent-toggle-icon-bar-bg: $navbar-default-toggle-icon-bar-bg !default;
32
+ $navbar-transparent-toggle-border-color: $navbar-default-toggle-border-color !default;
@@ -83,6 +83,8 @@ module Spotlight
83
83
  def avatar
84
84
  file = represented.avatar.file
85
85
 
86
+ return unless file
87
+
86
88
  { filename: file.filename, content_type: file.content_type, content: Base64.encode64(file.read) }
87
89
  end
88
90
 
@@ -1,9 +1,8 @@
1
1
  class RemoveDefaultFromSpotlightExhibit < ActiveRecord::Migration
2
2
  def up
3
- return unless Spotlight::Exhibit.column_names.include? :default
3
+ return unless Spotlight::Exhibit.column_names.include? 'default'
4
4
 
5
5
  remove_column :spotlight_exhibits, :default
6
- remove_index :spotlight_exhibits, :default
7
6
  end
8
7
 
9
8
  def down
@@ -1,4 +1,4 @@
1
1
  #
2
2
  module Spotlight
3
- VERSION = '0.10.2'
3
+ VERSION = '0.10.3'
4
4
  end
@@ -134,6 +134,16 @@ describe Spotlight::ExhibitExportSerializer do
134
134
  contact = subject.contacts.first
135
135
  expect(contact.contact_info[:title]).to eq 'xyz'
136
136
  end
137
+
138
+ describe 'for a contact without an avatar' do
139
+ let!(:curator) do
140
+ FactoryGirl.create(:contact, exhibit: source_exhibit, avatar: nil)
141
+ end
142
+
143
+ it 'has contacts' do
144
+ expect(subject.contacts.count).to eq 1
145
+ end
146
+ end
137
147
  end
138
148
 
139
149
  it 'has tags' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -762,6 +762,7 @@ files:
762
762
  - app/assets/stylesheets/spotlight/_mixins.scss
763
763
  - app/assets/stylesheets/spotlight/_multi_image_selector.scss
764
764
  - app/assets/stylesheets/spotlight/_multi_up_item_grid.scss
765
+ - app/assets/stylesheets/spotlight/_navbar.scss
765
766
  - app/assets/stylesheets/spotlight/_nestable.scss
766
767
  - app/assets/stylesheets/spotlight/_pages.scss
767
768
  - app/assets/stylesheets/spotlight/_report_a_problem.scss