jekyll-vitepress-theme 1.13.0 → 1.14.0

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: 793dfa42f03569cd077e043569dac5987a04a421c2b269aecd7573dba75d47e0
4
- data.tar.gz: 53c5ed14d4acc23531da5bb65dea900c9ecf007d80e3703856b67a313a5aade8
3
+ metadata.gz: 3acda31684c8f9d1d99cb533a8584797445073a1abd1b2a19647e2962e900a76
4
+ data.tar.gz: 3d1fb7ec765bdbea2516906b3e97099995339fbbaa5a75fe4a78696210c84602
5
5
  SHA512:
6
- metadata.gz: c94cf449e00475733043bb9dcbf26171123b4659dd85c35a74894fad35c7373bfb09645973aa66bf80475b55cefe5500f4bac2cf9199809e37e1e14173debbea
7
- data.tar.gz: 4029e6221bce0f2b312cb89e17e5931a6cf8dab68dfdcec893566ce3a400d58661a623b75301ac3b4abc14cdb0f92a88a19664f21ee8541625241ceecadb8168
6
+ metadata.gz: ae1a358aeba68069bc6badf6c5e143200a76f4d87fe0eb27c66a6b1dfa53a7205ad7ea3b54c127d35ab46616d8d7c1155529cd5a9555fddf540787a845232128
7
+ data.tar.gz: '097d5996fc7c5ae1ec2b6c436fd60358dc626c2767cf178960dccb17e0cb99e9dc913429886ea17cc9b28c97f3725d5bcbaa933b9d11cf39d42e933fc57fbc2b'
@@ -33,7 +33,12 @@
33
33
  {% endif %}
34
34
  {% endunless %}
35
35
  {% if button_enabled and repository and button_url %}
36
- <a class="VPMetricButton VPMetricButtonGithub no-icon" href="{{ button_url }}" aria-label="Star {{ repository }} on GitHub" target="_blank" rel="noreferrer noopener" data-github-star-repo="{{ repository | escape }}" data-github-star-show-count="{{ show_count }}">
36
+ {% if include.variant == 'hero' %}
37
+ {% assign button_class = 'VPButton medium alt VPMetricButton VPMetricButtonGithub VPHeroStar' %}
38
+ {% else %}
39
+ {% assign button_class = 'VPMetricButton VPMetricButtonGithub no-icon' %}
40
+ {% endif %}
41
+ <a class="{{ button_class }}" href="{{ button_url }}" aria-label="Star {{ repository }} on GitHub" target="_blank" rel="noreferrer noopener" data-github-star-repo="{{ repository | escape }}" data-github-star-show-count="{{ show_count }}">
37
42
  <span class="VPMetricButtonIcon vpi-social-github" aria-hidden="true"></span>
38
43
  <span class="VPMetricButtonText">{{ button_text }}</span>
39
44
  <span class="VPMetricButtonCount" data-vp-github-star-count aria-hidden="true"{% unless show_count %} hidden{% endunless %}>{% if show_count %}...{% endif %}</span>
data/_includes/home.html CHANGED
@@ -1,6 +1,14 @@
1
1
  {% assign home_hero = page.hero %}
2
2
  {% assign home_features = page.features %}
3
3
  {% assign home_body = include.content | strip %}
4
+ {% assign hero_star_available = false %}
5
+ {% assign hero_star_config = site.jekyll_vitepress.github_star %}
6
+ {% if hero_star_config and hero_star_config.enabled != false %}
7
+ {% assign hero_star_repository = hero_star_config.repository | default: hero_star_config.repo %}
8
+ {% if hero_star_repository %}
9
+ {% assign hero_star_available = true %}
10
+ {% endif %}
11
+ {% endif %}
4
12
 
5
13
  <div class="VPHome">
6
14
  {% if home_hero %}
@@ -33,11 +41,17 @@
33
41
  {% if home_hero.actions and home_hero.actions.size > 0 %}
34
42
  <div class="actions">
35
43
  {% for action in home_hero.actions %}
36
- <div class="action">
37
- <a class="VPButton medium {{ action.theme | default: 'brand' }}" {% include link_attrs.html href=action.link target=action.target rel=action.rel %}>
38
- {{ action.text }}
39
- </a>
40
- </div>
44
+ {% if action.star == true and hero_star_available %}
45
+ <div class="action">
46
+ {% include github_star_button.html variant='hero' %}
47
+ </div>
48
+ {% elsif action.star != true or action.link %}
49
+ <div class="action">
50
+ <a class="VPButton medium {{ action.theme | default: 'brand' }}" {% include link_attrs.html href=action.link target=action.target rel=action.rel %}>
51
+ {{ action.text }}
52
+ </a>
53
+ </div>
54
+ {% endif %}
41
55
  {% endfor %}
42
56
  </div>
43
57
  {% endif %}
@@ -1147,6 +1147,15 @@ body.vp-search-open {
1147
1147
  display: none !important;
1148
1148
  }
1149
1149
 
1150
+ .VPButton.VPHeroStar {
1151
+ gap: 8px;
1152
+ }
1153
+
1154
+ .VPButton.VPHeroStar .VPMetricButtonIcon {
1155
+ width: 18px;
1156
+ height: 18px;
1157
+ }
1158
+
1150
1159
  .vp-doc p:has(> .VPMetricButton) {
1151
1160
  display: inline-block;
1152
1161
  margin: 8px 8px 8px 0;
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module VitePressTheme
3
- VERSION = "1.13.0".freeze
3
+ VERSION = "1.14.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-vitepress-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carmine Paolino