jekyll_ranked_search 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/search.js +17 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa336a48a9eb94c3a0e7e395dee1a9c4a7938339cfa800e528db49b3c2876953
4
- data.tar.gz: ced1e0e9cd3919a5a5fc28848c80523a81987698c11b0be0b4ea487f5f3ca3a7
3
+ metadata.gz: 285d83435623362b1b2a64895f39e9083a23e994f44772b8d7d0ee119bb0a2a8
4
+ data.tar.gz: 3f87f6708fb4bb8070ffbf22a388345ec0ead46c251aa94b7828d3cb8e0653d6
5
5
  SHA512:
6
- metadata.gz: f87c796fa346ac49d87bb939ee85ed37cfbe4083954a2963e2fb04e95963b87e0b95d2b5b03356364a1ce84f59d366fc74477e65fd532f1808ed272b810cda22
7
- data.tar.gz: 811a1bebdcbef011282022bfe7083d2284d0c690132aad7a79431fd01fd0548144540f8499c61e04458e6f93ab1b29f4a61a3d05c220e5fede490ce7c05d5861
6
+ metadata.gz: c5b400d6ad614276e3f325923c7a0ba56a78fc216e4eeaf26acb5fd070a89e90b41e995c16760f337c983b1902d892d8f96bfdba1312000e8f9bfff71104cb00
7
+ data.tar.gz: 132c37490020d2205f526ae84c0f190236e265ac19f33f12abb4654d0350547055e0549517e3df554b5a46d9271f43e80556dafbeadf5fd98f79c4992a126d70
data/lib/search.js CHANGED
@@ -54,7 +54,7 @@ class SearchBox extends LitElement {
54
54
  box-sizing: border-box;
55
55
  width: 100%;
56
56
  // margin: 0 auto;
57
- padding: .4em;
57
+ padding: .4em 30px;
58
58
  border: 1px solid #ccc;
59
59
  font-size: 1.2em;
60
60
  border-radius: 4px;
@@ -62,6 +62,20 @@ class SearchBox extends LitElement {
62
62
  z-index: 11;
63
63
  }
64
64
 
65
+ label {
66
+ position: relative;
67
+ }
68
+
69
+ label::before {
70
+ content: "";
71
+ position: absolute;
72
+ left: 10px;
73
+ top: 0;
74
+ bottom: 0;
75
+ width: 20px;
76
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class=''%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z' /%3E%3C/svg%3E") no-repeat center center;
77
+ }
78
+
65
79
  #results {
66
80
  position: absolute;
67
81
  width: 100%;
@@ -245,7 +259,9 @@ class SearchBox extends LitElement {
245
259
 
246
260
  render() {
247
261
  return html`<div>
262
+ <label>
248
263
  <input id="q" type="text" placeholder="${this._placeholder}" @keyup="${this.search}" @click=${this.openIfResults} @focus=${this.focus}>
264
+ </label>
249
265
  ${this._open ? html`
250
266
  <div id="results">
251
267
  ${this._results.map((result) => html`
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_ranked_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Friedrich Ewald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-05 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubygems_version: 3.4.13
56
+ rubygems_version: 3.4.15
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: TF-IDF offline search for Jekyll posts