webring-rails 1.3.0 → 1.3.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: 919f405578a35bb65238570b3e7bdc650e2685ac435dde5f40a814828dfbc491
4
- data.tar.gz: db6dd54f0c3138e534c4dfe7ec3bce2075e1d06e978ca21865ef099ac253256f
3
+ metadata.gz: cb7c45a7911e93d8ba099c52ab12aa3552007ade35aee285cadb4adfa2eb0fb2
4
+ data.tar.gz: 87c041e80ac5729486e4a1d479401255b4def0995e96e0f0e0d4773d8109f6ad
5
5
  SHA512:
6
- metadata.gz: 7b89d911a5b51898e9a2ac0f8c157fd5d1aac5e54a885918a6bdf76a3758721501d6040c97fe4df93a692d373806df21dcff26456d7546ceb23b935c77b723cc
7
- data.tar.gz: 6072b3a3573f4c9433f11472eba97590dc7cb4af7c53db2b5b476d3590787d99d9a98b64f1fee64787bdc6c6190b4308741637ce4f8af1fff901e653e241a75b
6
+ metadata.gz: a106e56ff61948867ec07e2cb29e3d7c547ee83b5974b9f7823c229f8d220bafe44d9f8e45de1c7b0fa6d44ed226730c22e54c10ceddb57fd700a7f0dc2b2707
7
+ data.tar.gz: c5084e377d1a15bbcbe3a3fd72ab421b8aadb7f8fcfa23ddd99f3150a747563e2ef61f59dc77fc598b02cb009ff295e730e113c87e5758a7ab91e4a9f0d23ec6
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Webring Widget Sample](widget-sample.jpeg)
1
+ ![Webring Widget Sample](widget-sample.png)
2
2
 
3
3
  # Webring for Rails
4
4
 
@@ -42,10 +42,11 @@
42
42
  symbol: '«',
43
43
  text: '« Prev',
44
44
  title: 'Previous site',
45
- path: 'previous'
45
+ path: 'previous',
46
+ additionalClass: 'prev-btn'
46
47
  },
47
48
  random: {
48
- symbol: logoSvg(22, 22),
49
+ symbol: logoSvg(23, 23),
49
50
  text: `${logoSvg(20, 20, "margin-right: 4px; margin-top: 1px;")} Random`,
50
51
  title: 'Random site',
51
52
  path: 'random',
@@ -55,13 +56,14 @@
55
56
  symbol: '»',
56
57
  text: 'Next »',
57
58
  title: 'Next site',
58
- path: 'next'
59
+ path: 'next',
60
+ additionalClass: 'next-btn'
59
61
  },
60
62
  logoOnly: {
61
- symbol: logoSvg(22, 22),
62
- text: `${logoSvg(20, 20)} Random`,
63
- title: 'Ruby Webring',
64
- path: ''
63
+ symbol: logoSvg(23, 23),
64
+ text: logoSvg(23, 23),
65
+ path: '',
66
+ additionalClass: 'logo-only'
65
67
  }
66
68
  };
67
69
 
@@ -104,7 +106,7 @@
104
106
  text-decoration: none;
105
107
  }
106
108
  .webring-nav a.webring-btn.random-btn {
107
- padding: 6px 9px 6px 9px;
109
+ padding: 6px 8px 6px 8px;
108
110
  }
109
111
  .webring-nav .logo-only {
110
112
  padding: 8px 3px 6px 3px;
@@ -121,6 +123,16 @@
121
123
  margin-right: 6px;
122
124
  margin-top: 1px;
123
125
  }
126
+ /* no-text prev button */
127
+ .webring-nav[data-button-text="false"] a.webring-btn.prev-btn {
128
+ padding-top: 5px;
129
+ padding-right: 12.5px;
130
+ }
131
+ /* no-text next button */
132
+ .webring-nav[data-button-text="false"] a.webring-btn.next-btn {
133
+ padding-top: 5px;
134
+ padding-left: 12.5px;
135
+ }
124
136
  `,
125
137
  design: `
126
138
  .webring-nav[data-widget-type="full"] {
@@ -199,7 +211,7 @@
199
211
 
200
212
  // Logo-only block
201
213
  if (action === 'logoOnly') {
202
- return `<div class="logo-only">${logoSvg(22, 22)}</div>`;
214
+ return `<div class="${actionConfig.additionalClass}">${actionConfig.symbol}</div>`;
203
215
  }
204
216
 
205
217
  const url = `${baseUrl}/webring/${actionConfig.path}?source_member_uid=${memberUid}`;
@@ -219,7 +231,7 @@
219
231
  // Create widget HTML
220
232
  const title = config.showTitle ? '<span class="webring-title">Ruby Webring</span>' : '';
221
233
  container.innerHTML = `
222
- <div class="webring-nav" data-widget-type="${widgetType}">
234
+ <div class="webring-nav" data-widget-type="${widgetType}" data-button-text="${buttonText}">
223
235
  ${title}
224
236
  <nav class="webring-buttons">
225
237
  ${linkElements}
@@ -1,3 +1,3 @@
1
1
  module Webring
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webring-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shkoda