Skip to content

Commit

Permalink
Fix #152 Show ST4 badges
Browse files Browse the repository at this point in the history
- Show ST4 badges for packages that support ST4
- Make ST4 badges green like the ALL badge
- Show ALL badge on package list

Fix #152
  • Loading branch information
gerardroche committed Jun 1, 2023
1 parent 9f5eb7e commit 1026ed8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/css/messaging.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ span.versions {
background-color: $green;
color: $white;
}
&.latest {
background-color: $green;
color: $white;
}
}

span.platforms,
Expand Down
1 change: 0 additions & 1 deletion app/templates/package.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<div class="meta">
{{>package_author}}
{{>package_compat}}
{{#contains st_versions 2 3 4}}<span class="versions all" title="Works with all versions of Sublime Text">ALL</span>{{/contains}}
{{>package_badges}}
</div>

Expand Down
7 changes: 4 additions & 3 deletions app/templates/partials/package_compat.handlebars
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{{#omits platforms "osx" "linux" "windows"}}
{{!-- There are no releases, most likely due to a crawling issue --}}
{{else}}
{{#eq st_versions 4}}<span class="versions only" title="Only works with Sublime Text 4">ST4</span>{{/eq}}
{{#eq st_versions 2 3 4}}<span class="versions all" title="Works with all versions of Sublime Text">ALL</span>{{/eq}}
{{#eq st_versions 4}}<span class="versions latest" title="Only works with Sublime Text 4">ST4</span>{{/eq}}
{{#eq st_versions 3}}<span class="versions only" title="Only works with Sublime Text 3">ST3</span>{{/eq}}
{{#eq st_versions 2}}<span class="versions only" title="Only works with Sublime Text 2">ST2</span>{{/eq}}
{{#eq st_versions 3 4}}<span class="versions only" title="Works with Sublime Text 3+">ST3</span>{{/eq}}
{{#eq st_versions 2 3}}<span class="versions only" title="Works with Sublime Text 2 and 3">ST2/ST3</span>{{/eq}}
{{#eq st_versions 3 4}}<span class="versions only" title="Works with Sublime Text 3">ST3</span><span class="versions latest" title="Works with Sublime Text 4">ST4</span>{{/eq}}
{{#eq st_versions 2 3}}<span class="versions only" title="Works with Sublime Text 2">ST2</span><span class="versions only" title="Works with Sublime Text 3 and 3">ST3</span>{{/eq}}

{{#omits platforms "osx" "linux"}}<span class="platforms windows" title="Only available on Windows">Win</span>{{/omits}}
{{#omits platforms "windows" "linux"}}<span class="platforms osx" title="Only available on Mac">Mac</span>{{/omits}}
Expand Down

0 comments on commit 1026ed8

Please sign in to comment.