sdr_view_components 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ac91a62d7a33a057d3a621746ccee8adaab77874f94b7b62935ab4c5488842c
|
|
4
|
+
data.tar.gz: 7172541d5716edfcceff221b76e7e1c8a18242aca71e29c0a79bec66e1a9af4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3917b95574028622292e422422c4d04a21377f53e7dfd9449b6a0776642a971e335b767c6e43873a1807c2b9764d2127ad522a14c6d4d3ef42e8a568dbbde308
|
|
7
|
+
data.tar.gz: 8ef66752e994fee74e81a05ac2798058f18d1efbfb13b4855ec611a1655b28755181d9ac5fb73427984d551dc76466ca24c938f33e133e65bd31c7e910420c15
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[](https://dl.circleci.com/status-badge/redirect/gh/sul-dlss/sdr_view_components/tree/main)
|
|
2
2
|
[](https://codecov.io/github/sul-dlss/sdr_view_components)
|
|
3
|
+
[](https://badge.fury.io/rb/sdr_view_components)
|
|
3
4
|
|
|
4
5
|
# SdrViewComponents
|
|
5
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<%= tag.nav class: navbar_classes do %>
|
|
10
10
|
<div class="container">
|
|
11
|
-
|
|
11
|
+
<%= sul_logo %>
|
|
12
12
|
<button
|
|
13
13
|
class="navbar-toggler navbar-toggler-right collapsed"
|
|
14
14
|
type="button"
|
|
@@ -23,11 +23,13 @@ module SdrViewComponents
|
|
|
23
23
|
# param variant [Symbol] One of :light, :dark, :white - determines color scheme.
|
|
24
24
|
# param background_color [String, nil] Optional RGB color value for background (i.e. '1, 104, 149').
|
|
25
25
|
# Used only when variant is :dark.
|
|
26
|
-
|
|
26
|
+
# param sul_logo [String, nil] Optional URL for SUL logo image. (polychrome, stacked-lg, stacked-mobile)
|
|
27
|
+
def initialize(title:, subtitle: nil, variant: :light, background_color: nil, sul_logo: nil)
|
|
27
28
|
@title = title
|
|
28
29
|
@subtitle = subtitle
|
|
29
30
|
@variant = variant
|
|
30
31
|
@background_color = background_color
|
|
32
|
+
@sul_logo = sul_logo
|
|
31
33
|
super()
|
|
32
34
|
end
|
|
33
35
|
|
|
@@ -53,6 +55,12 @@ module SdrViewComponents
|
|
|
53
55
|
tag.span @subtitle, class: 'h4 d-block my-1'
|
|
54
56
|
end
|
|
55
57
|
|
|
58
|
+
def sul_logo
|
|
59
|
+
logo_classes = merge_classes('mb-0 navbar-brand navbar-logo', @sul_logo)
|
|
60
|
+
|
|
61
|
+
link_to 'Stanford University Libraries', 'https://library.stanford.edu', class: logo_classes
|
|
62
|
+
end
|
|
63
|
+
|
|
56
64
|
def title
|
|
57
65
|
tag.div(class: 'h1 my-0') do
|
|
58
66
|
link_to @title, '/'
|