jekyll-glossary_tooltip 1.1.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +2 -0
- data/.github/workflows/cd.yml +30 -0
- data/.github/workflows/codeql-analysis.yml +37 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +48 -6
- data/.ruby-version +1 -1
- data/.simplecov +3 -2
- data/.travis.yml +1 -0
- data/CHANGELOG.md +30 -1
- data/Gemfile +3 -2
- data/OSSMETADATA +1 -0
- data/README.md +24 -12
- data/img/tooltip_screenshot.png +0 -0
- data/img/tooltip_screenshot.xcf +0 -0
- data/jekyll-glossary_tooltip.gemspec +3 -3
- data/lib/jekyll-glossary_tooltip/jekyll-glossary_tooltip.css +22 -1
- data/lib/jekyll-glossary_tooltip/options_parser.rb +4 -1
- data/lib/jekyll-glossary_tooltip/tag.rb +2 -1
- data/lib/jekyll-glossary_tooltip/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0d2a7c9c71b7870e1d4fe0afa64d23aed4e6511cada60c8c4cc86be19b32dfd
|
4
|
+
data.tar.gz: 1a20ab00bfd6d4f4c7ebeb7644c6ac49f04d4380bffea4fd5a831879ed37c7d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2fcc69854a22adeb846fd8278bc92bdb4ce4c74ac7c487aec2020d7dc971615a0122b75cafe56b3c5f9626ff3f3140229a5a705b43cea889f16dd93fb8843f
|
7
|
+
data.tar.gz: 1961474e8828979d106fb521ceac878d4511808dca15754853bb542d50e8f38a566f7d32a57dff07f61b2131fa82f316c4118bc3593f2895fb867a6c01374cb2
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Continuous Deployment # Well, semi-continuous
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags: v[0-9]+.[0-9]+.[0-9]+
|
6
|
+
env:
|
7
|
+
RUBY_VER: 3.0.1
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ env.RUBY_VER }}
|
17
|
+
bundler-cache: true
|
18
|
+
- name: Run CI Build with Rake
|
19
|
+
run: bundle exec rake
|
20
|
+
release-github:
|
21
|
+
needs: [test]
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v2
|
25
|
+
- name: Build and publish gem to GitHub Packages
|
26
|
+
if: contains(github.ref, 'refs/tags/v')
|
27
|
+
uses: jstastny/publish-gem-to-github@master
|
28
|
+
with:
|
29
|
+
token: ${{ github.token }}
|
30
|
+
owner: ${{ github.repository_owner }}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: "CodeQL"
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
# The branches below must be a subset of the branches above
|
8
|
+
branches: [ main ]
|
9
|
+
schedule:
|
10
|
+
- cron: '41 19 1 * *'
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
analyze:
|
14
|
+
name: Analyze
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
permissions:
|
17
|
+
actions: read
|
18
|
+
contents: read
|
19
|
+
security-events: write
|
20
|
+
|
21
|
+
strategy:
|
22
|
+
fail-fast: false
|
23
|
+
matrix:
|
24
|
+
language: [ 'ruby' ]
|
25
|
+
|
26
|
+
steps:
|
27
|
+
- name: Checkout repository
|
28
|
+
uses: actions/checkout@v2
|
29
|
+
|
30
|
+
# Initializes the CodeQL tools for scanning.
|
31
|
+
- name: Initialize CodeQL
|
32
|
+
uses: github/codeql-action/init@v1
|
33
|
+
with:
|
34
|
+
languages: ${{ matrix.language }}
|
35
|
+
|
36
|
+
- name: Perform CodeQL Analysis
|
37
|
+
uses: github/codeql-action/analyze@v1
|
data/.gitignore
CHANGED
@@ -8,7 +8,7 @@ gemfiles/Gemfile*.lock
|
|
8
8
|
# Bundle local config
|
9
9
|
.bundle/
|
10
10
|
|
11
|
-
# Package gem from (
|
11
|
+
# Package gem from $(rake install)
|
12
12
|
pkg/
|
13
13
|
|
14
14
|
# simplecov
|
@@ -19,3 +19,6 @@ coverage/
|
|
19
19
|
.rspec_status
|
20
20
|
spec/dest/
|
21
21
|
spec/reports/
|
22
|
+
|
23
|
+
# Jekyll - when switching from gh-pages-source branch
|
24
|
+
_site/
|
data/.rubocop.yml
CHANGED
@@ -5,6 +5,10 @@ require:
|
|
5
5
|
- rubocop-rake
|
6
6
|
- rubocop-rspec
|
7
7
|
|
8
|
+
inherit_mode:
|
9
|
+
merge:
|
10
|
+
- Exclude # Merge my AllCops.Excllude with default exludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml
|
11
|
+
|
8
12
|
AllCops:
|
9
13
|
TargetRubyVersion: 3.0
|
10
14
|
Include:
|
@@ -17,9 +21,17 @@ AllCops:
|
|
17
21
|
|
18
22
|
Gemspec/DateAssignment:
|
19
23
|
Enabled: true
|
24
|
+
Gemspec/RequireMFA:
|
25
|
+
Enabled: true
|
20
26
|
|
21
27
|
Layout/LineEndStringConcatenationIndentation:
|
22
28
|
Enabled: true
|
29
|
+
Layout/EmptyLineBetweenDefs:
|
30
|
+
Enabled: true
|
31
|
+
Exclude:
|
32
|
+
- lib/jekyll-glossary_tooltip/errors.rb
|
33
|
+
Layout/SpaceBeforeBrackets:
|
34
|
+
Enabled: true
|
23
35
|
|
24
36
|
Lint/AmbiguousAssignment:
|
25
37
|
Enabled: true
|
@@ -33,10 +45,16 @@ Lint/EmptyBlock:
|
|
33
45
|
Enabled: true
|
34
46
|
Lint/EmptyClass:
|
35
47
|
Enabled: true
|
36
|
-
|
48
|
+
Lint/AmbiguousOperatorPrecedence:
|
49
|
+
Enabled: true
|
50
|
+
Lint/AmbiguousRange:
|
51
|
+
Enabled: true
|
52
|
+
Lint/IncompatibleIoSelectWithFiberScheduler:
|
53
|
+
Enabled: true
|
54
|
+
Lint/RequireRelativeSelfPath:
|
55
|
+
Enabled: true
|
56
|
+
Lint/UselessRuby2Keywords:
|
37
57
|
Enabled: true
|
38
|
-
Exclude:
|
39
|
-
- lib/jekyll-glossary_tooltip/errors.rb
|
40
58
|
Lint/EmptyInPattern:
|
41
59
|
Enabled: true
|
42
60
|
Lint/LambdaWithoutLiteralBlock:
|
@@ -51,8 +69,6 @@ Lint/OrAssignmentToConstant:
|
|
51
69
|
Enabled: true
|
52
70
|
Lint/RedundantDirGlobSort:
|
53
71
|
Enabled: true
|
54
|
-
Layout/SpaceBeforeBrackets:
|
55
|
-
Enabled: true
|
56
72
|
Lint/SymbolConversion:
|
57
73
|
Enabled: true
|
58
74
|
Lint/ToEnumArguments:
|
@@ -70,7 +86,6 @@ Lint/UselessAccessModifier:
|
|
70
86
|
|
71
87
|
Metrics/AbcSize:
|
72
88
|
Enabled: true
|
73
|
-
Max: 25
|
74
89
|
Metrics/BlockLength:
|
75
90
|
Enabled: true
|
76
91
|
Max: 100
|
@@ -84,6 +99,11 @@ Naming/FileName:
|
|
84
99
|
- lib/jekyll-glossary_tooltip.rb
|
85
100
|
Naming/InclusiveLanguage:
|
86
101
|
Enabled: true
|
102
|
+
Naming/BlockForwarding:
|
103
|
+
Enabled: true
|
104
|
+
|
105
|
+
Security/IoMethods:
|
106
|
+
Enabled: true
|
87
107
|
|
88
108
|
Style/ArgumentsForwarding:
|
89
109
|
Enabled: true
|
@@ -131,6 +151,22 @@ Style/StringLiteralsInInterpolation:
|
|
131
151
|
EnforcedStyle: double_quotes
|
132
152
|
Style/SwapValues:
|
133
153
|
Enabled: true
|
154
|
+
Style/FileRead:
|
155
|
+
Enabled: true
|
156
|
+
Style/FileWrite:
|
157
|
+
Enabled: true
|
158
|
+
Style/MapToHash:
|
159
|
+
Enabled: true
|
160
|
+
Style/NumberedParameters:
|
161
|
+
Enabled: true
|
162
|
+
Style/NumberedParametersLimit:
|
163
|
+
Enabled: true
|
164
|
+
Style/OpenStructUse:
|
165
|
+
Enabled: true
|
166
|
+
Style/RedundantSelfAssignmentBranch:
|
167
|
+
Enabled: true
|
168
|
+
Style/SelectByRegexp:
|
169
|
+
Enabled: true
|
134
170
|
|
135
171
|
|
136
172
|
# Reference: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
|
@@ -151,3 +187,9 @@ RSpec/Rails/AvoidSetupHook:
|
|
151
187
|
Enabled: false
|
152
188
|
RSpec/BeforeAfterAll:
|
153
189
|
Enabled: false
|
190
|
+
RSpec/ExcessiveDocstringSpacing:
|
191
|
+
Enabled: true
|
192
|
+
RSpec/SubjectDeclaration:
|
193
|
+
Enabled: true
|
194
|
+
RSpec/FactoryBot/SyntaxMethods:
|
195
|
+
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0
|
1
|
+
3.1.0
|
data/.simplecov
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# vi: ft=ruby
|
2
2
|
|
3
3
|
SimpleCov.start do
|
4
|
-
enable_coverage
|
5
|
-
minimum_coverage 90
|
4
|
+
enable_coverage :branch # Add branch coverage statistics.
|
5
|
+
minimum_coverage 90 # Minimum coverage percentage.
|
6
|
+
command_name "test:bdd" # Must be set for codeclimat reporter
|
6
7
|
end
|
data/.travis.yml
CHANGED
@@ -11,6 +11,7 @@ env:
|
|
11
11
|
global:
|
12
12
|
- CC_TEST_REPORTER_ID=8b8822cdaba8bb6c0a9d3f05bea9bc94dbf866ccdd1204913f5673b61caa61b1
|
13
13
|
language: ruby
|
14
|
+
dist: focal # TODO Remove this when solved: https://github.com/rvm/rvm/issues/5133
|
14
15
|
# Buid matrix (rvm x gemfile = 2x2) with one version from each supported major version in range defined in .gemspec for
|
15
16
|
rvm:
|
16
17
|
- 2.7.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,34 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [1.3.1] - 2021-08-18
|
10
|
+
### Added
|
11
|
+
- GitHub workflow to publish to GitHub Packages.
|
12
|
+
|
13
|
+
## [1.3.1] - 2021-08-18
|
14
|
+
### Fixed
|
15
|
+
- gemspec dependency range stynax.
|
16
|
+
|
17
|
+
## [1.3.0] - 2021-08-07
|
18
|
+
### Changed
|
19
|
+
- Open the souce link from a tooltip in a new tab.
|
20
|
+
|
21
|
+
## [1.2.0] - 2021-08-06
|
22
|
+
### Added
|
23
|
+
- Bottom arrow to the tooltip.
|
24
|
+
- Tooltip hover animation from invisible to visible.
|
25
|
+
|
26
|
+
### Changed
|
27
|
+
- Restyle the glossary term bottom border style and color.
|
28
|
+
|
1
29
|
## [1.1.0] - 2021-08-06
|
2
|
-
|
30
|
+
### Added
|
31
|
+
- Optional `display:` argument to set a different term display name, rather than using the term name as defined in the glossary file. Usage: `{% glossary term_name, display: Different Name To Display %}`.
|
3
32
|
|
4
33
|
## [1.0.0] - 2021-08-05
|
5
34
|
- No changes from `v0.1.0` but just bumping to final first major release version!
|
data/Gemfile
CHANGED
@@ -12,10 +12,11 @@ gemspec
|
|
12
12
|
# Reference: https://github.com/rubygems/bundler/pull/7222
|
13
13
|
# However there's an argument for using gemspec too: https://bundler.io/guides/creating_gem.html#testing-our-gem
|
14
14
|
group :development, :test do
|
15
|
-
gem "rake", "~> 13.0", require: false
|
16
|
-
gem "travis", "~> 1.0", require: false
|
17
15
|
gem "appraisal", "~> 2.4", require: false
|
18
16
|
gem "gem-release", "~> 2.0", require: false
|
17
|
+
gem "rake", "~> 13.0", require: false
|
18
|
+
gem "solargraph", require: false
|
19
|
+
gem "travis", "~> 1.0", require: false
|
19
20
|
end
|
20
21
|
|
21
22
|
group :test do
|
data/OSSMETADATA
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
osslifecycle=active
|
data/README.md
CHANGED
@@ -1,15 +1,22 @@
|
|
1
|
-
# Jekyll Glossary Tooltip Tag Plugin
|
1
|
+
# Jekyll Glossary Tooltip Tag Plugin [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Get%20a%20nifty%20tooltip%20for%20term%20definitions%20in%20your%20Jekyll%20blog%20with%20this%20plugin&url=https://github.com/erikw/jekyll-glossary_tooltip&via=erik_westrup&hashtags=jekyll,plugin)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/jekyll-glossary_tooltip.svg)](https://badge.fury.io/rb/jekyll-glossary_tooltip)
|
3
3
|
[![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/jekyll-glossary_tooltip?color=brightgreen&type=total&label=gem%20downloads)](https://rubygems.org/gems/jekyll-glossary_tooltip)
|
4
|
-
[![Travis Build Status](https://img.shields.io/travis/erikw/jekyll-glossary_tooltip/main?logo=travis)](https://travis-ci.com/erikw/jekyll-glossary_tooltip)
|
4
|
+
[![Travis Build Status](https://img.shields.io/travis/erikw/jekyll-glossary_tooltip/main?logo=travis)](https://app.travis-ci.com/github/erikw/jekyll-glossary_tooltip)
|
5
5
|
[![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/7ffb648ec4b77f3f9eb8/maintainability)](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/maintainability)
|
6
6
|
[![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/7ffb648ec4b77f3f9eb8/test_coverage)](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/test_coverage)
|
7
|
+
[![CodeQL](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/codeql-analysis.yml)
|
8
|
+
[![SLOC](https://img.shields.io/tokei/lines/github/erikw/jekyll-glossary_tooltip)](#)
|
9
|
+
[![License](https://img.shields.io/github/license/erikw/jekyll-glossary_tooltip)](LICENSE.txt)
|
10
|
+
[![OSS Lifecycle](https://img.shields.io/osslifecycle/erikw/jekyll-glossary_tooltip)](https://github.com/Netflix/osstracker)
|
11
|
+
|
12
|
+
|
13
|
+
:point_right: **Live demo**: https://erikw.github.io/jekyll-glossary_tooltip/
|
7
14
|
|
8
15
|
<img src="/img/tooltip_screenshot.png" width="256" align="right" alt="Screenshot of the glossary tooltip term definition" title="Example of tooltip definition of the term 'Jekyll'.">
|
9
16
|
|
10
17
|
This plugin simplifies for your readers and you by making it easy to define terms or abbreviations that needs an explanation. Define a common dictionary of terms and their definition in a YAML file. Then inside markdown files you can use the provided glossary liquid tag to insert a tooltip for a defined word from the dictionary. The tooltip will show the term definition on mouse hover.
|
11
18
|
|
12
|
-
It's also possible to provide an optional URL to
|
19
|
+
It's also possible to provide an optional URL to for example a term definition source reference. To also support mobile devices, this URL link is placed inside the tooltip pop-up itself, rather than making the term itself clickable. This is so that on mobile device, you will first tap the word to get the hover tooltip, then click the link in the tooltip if desired.
|
13
20
|
|
14
21
|
|
15
22
|
# Installation
|
@@ -35,7 +42,7 @@ It's also possible to provide an optional URL to further term definition or sour
|
|
35
42
|
|
36
43
|
# Usage
|
37
44
|
## Glossary Term Definition File
|
38
|
-
Create a file `_data/glossary.yml` to host your shared term definition entries. This file should contain a list of term entries
|
45
|
+
Create a file `_data/glossary.yml` to host your shared term definition entries. This file should contain a list of term entries in the format of:
|
39
46
|
|
40
47
|
```markdown
|
41
48
|
- term: a_term_name # Can contain spaces
|
@@ -62,9 +69,9 @@ This could look something like:
|
|
62
69
|
On any page where you've made sure include the needed CSS styling, you can use the glossary tag simply like
|
63
70
|
|
64
71
|
```markdown
|
65
|
-
Here I'm
|
72
|
+
Here I'm talking about {% glossary term_name %} in a blog post.
|
66
73
|
|
67
|
-
The term name can contain spaces like {% glossary operating system }.
|
74
|
+
The term name can contain spaces like {% glossary operating system %}.
|
68
75
|
|
69
76
|
Even if the term is defined in _data/glossary.yml as 'term_name', the matching is case-insensitive meaning that I can look it up using {% glossary TeRM_NaME %}. Note that the term is displayed as defined in the tag rather than the definition, here meaing 'TeRM_NaME'.
|
70
77
|
|
@@ -72,12 +79,11 @@ The case-styling above works as there's still a case-insensitive match. But what
|
|
72
79
|
{% glossary <term>, display: <diplay name> %}
|
73
80
|
|
74
81
|
This could be e.g.
|
75
|
-
{% glossary cat, display: cats%}
|
76
|
-
{% glossary some term, display: some other display%}
|
77
|
-
|
78
|
-
TODO mention that a term name can't contain comma
|
82
|
+
{% glossary cat, display: cats %}
|
83
|
+
{% glossary some term, display: some other display text %}
|
79
84
|
```
|
80
|
-
|
85
|
+
|
86
|
+
**Note** that a term name can not contain a `,`, as this is the argument separator character.
|
81
87
|
|
82
88
|
|
83
89
|
## CSS Style Override
|
@@ -93,7 +99,7 @@ After checking out the repo;
|
|
93
99
|
1. run `script/test` to run the tests
|
94
100
|
1. You can also run `script/console` for an interactive prompt that will allow you to experiment.
|
95
101
|
|
96
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
102
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
97
103
|
|
98
104
|
|
99
105
|
## Local development
|
@@ -176,6 +182,9 @@ To use the [travis cli client](https://github.com/travis-ci/travis.rb) (installe
|
|
176
182
|
$ bundle exec travis monitor
|
177
183
|
```
|
178
184
|
|
185
|
+
## Live Demo GitHub Pages
|
186
|
+
The live demo source is in the branch [`gh-pages-source`](https://github.com/erikw/jekyll-glossary_tooltip/tree/gh-pages-source). Check its `README.md`!
|
187
|
+
|
179
188
|
# Contributing
|
180
189
|
Bug reports and pull requests are welcome on GitHub at https://github.com/erikw/jekyll-glossary_tooltip.
|
181
190
|
|
@@ -184,3 +193,6 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
184
193
|
|
185
194
|
# Acknowledgement
|
186
195
|
Thanks to [ayastreb/jekyll-maps](https://github.com/ayastreb/jekyll-maps) for inspiration on project structure and options parsing!
|
196
|
+
|
197
|
+
# More Jekyll
|
198
|
+
Check out my other Jekyll repositories [here](https://github.com/erikw?tab=repositories&q=jekyll-&type=&language=&sort=).
|
data/img/tooltip_screenshot.png
CHANGED
Binary file
|
data/img/tooltip_screenshot.xcf
CHANGED
Binary file
|
@@ -8,11 +8,11 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Erik Westrup"]
|
9
9
|
spec.email = ["erik.westrup@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "Jekyll plugin providing a glossary liquid tag that will show a tooltip of a term definition in your site"
|
11
|
+
spec.summary = "Jekyll plugin providing a glossary liquid tag that will show a tooltip of a term definition in your site."
|
12
12
|
spec.description = "This plugin simplifies for your readers and you by making it easy to define terms or abbreviations that needs an explanation. Define a common dictionary of terms and their definition in a YAML file. Then inside markdown files you can use the provided glossary liquid tag to insert a tooltip for a defined word from the dictionary. The tooltip will show the term definition on mouse hover."
|
13
13
|
spec.homepage = "https://github.com/erikw/jekyll-glossary_tooltip/"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.7", "< 4"
|
15
|
+
spec.required_ruby_version = [">= 2.7", "< 4"]
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/erikw/jekyll-glossary_tooltip/"
|
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "jekyll", ">= 3.7", "< 5.0"
|
30
|
+
spec.add_dependency "jekyll", [">= 3.7", "< 5.0"]
|
31
31
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
.jekyll-glossary {
|
3
3
|
position: relative;
|
4
4
|
display: inline-block;
|
5
|
-
border-bottom:
|
5
|
+
border-bottom: 2px dotted #0074bd;
|
6
6
|
cursor: help;
|
7
7
|
}
|
8
8
|
|
@@ -36,3 +36,24 @@
|
|
36
36
|
.jekyll-glossary-source-link:before {
|
37
37
|
content: "[source]"; // "(reference)", "<link>" or whatever you want.
|
38
38
|
}
|
39
|
+
|
40
|
+
/* Arrow created with borders. */
|
41
|
+
.jekyll-glossary .jekyll-glossary-tooltip::after {
|
42
|
+
content: " ";
|
43
|
+
position: absolute;
|
44
|
+
top: 100%;
|
45
|
+
left: 50%;
|
46
|
+
margin-left: -5px;
|
47
|
+
border-width: 5px;
|
48
|
+
border-style: solid;
|
49
|
+
border-color: black transparent transparent transparent;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* Animation from invisible to visible on hover. */
|
53
|
+
.jekyll-glossary .jekyll-glossary-tooltip {
|
54
|
+
opacity: 0;
|
55
|
+
transition: opacity 1s;
|
56
|
+
}
|
57
|
+
.jekyll-glossary:hover .jekyll-glossary-tooltip {
|
58
|
+
opacity: 1;
|
59
|
+
}
|
@@ -23,7 +23,11 @@ module Jekyll
|
|
23
23
|
|
24
24
|
options[:term_query] = opt_segments[0]
|
25
25
|
opt_segments.shift
|
26
|
+
parse_segments(options, opt_segments)
|
27
|
+
options
|
28
|
+
end
|
26
29
|
|
30
|
+
def parse_segments(options, opt_segments)
|
27
31
|
opt_segments.each do |opt_segment|
|
28
32
|
raise Errors::OptionsBadTagArgumentFormat, options[:term_name] unless opt_segment =~ ARGS_PATTERN
|
29
33
|
|
@@ -33,7 +37,6 @@ module Jekyll
|
|
33
37
|
|
34
38
|
options[arg_name.to_sym] = arg_value
|
35
39
|
end
|
36
|
-
options
|
37
40
|
end
|
38
41
|
end
|
39
42
|
end
|
@@ -30,7 +30,8 @@ module Jekyll
|
|
30
30
|
def render_tooltip_url(entry)
|
31
31
|
# The content of the anchor is set from the CSS class jekyll-glossary-source-link,
|
32
32
|
# so that the plugin user can customize the text without touching ruby source.
|
33
|
-
|
33
|
+
anchor = "<br><a class=\"jekyll-glossary-source-link\" href=\"#{entry["url"]}\" target=\"_blank\"></a>"
|
34
|
+
entry["url"] ? anchor : ""
|
34
35
|
end
|
35
36
|
|
36
37
|
def lookup_entry(site, term_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-glossary_tooltip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Westrup
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -45,6 +45,8 @@ files:
|
|
45
45
|
- ".codeclimate.yml"
|
46
46
|
- ".editorconfig"
|
47
47
|
- ".github/dependabot.yml"
|
48
|
+
- ".github/workflows/cd.yml"
|
49
|
+
- ".github/workflows/codeql-analysis.yml"
|
48
50
|
- ".gitignore"
|
49
51
|
- ".rspec"
|
50
52
|
- ".rubocop.yml"
|
@@ -56,6 +58,7 @@ files:
|
|
56
58
|
- CONTRIBUTING.md
|
57
59
|
- Gemfile
|
58
60
|
- LICENSE.txt
|
61
|
+
- OSSMETADATA
|
59
62
|
- README.md
|
60
63
|
- Rakefile
|
61
64
|
- SECURITY.md
|
@@ -101,9 +104,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
104
|
- !ruby/object:Gem::Version
|
102
105
|
version: '0'
|
103
106
|
requirements: []
|
104
|
-
rubygems_version: 3.
|
107
|
+
rubygems_version: 3.3.3
|
105
108
|
signing_key:
|
106
109
|
specification_version: 4
|
107
110
|
summary: Jekyll plugin providing a glossary liquid tag that will show a tooltip of
|
108
|
-
a term definition in your site
|
111
|
+
a term definition in your site.
|
109
112
|
test_files: []
|