Skip to content

Commit

Permalink
Add version and author
Browse files Browse the repository at this point in the history
  • Loading branch information
SW999 committed Jul 13, 2024
1 parent 5bbcc06 commit e76a09f
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/update-badge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update README version badge

on:
push:
tags:
- 'v*'

jobs:
update-badge:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get the latest tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}

- name: Update README with version badge
run: |
TAG=${{ steps.get_tag.outputs.tag }}
BADGE_URL="https://img.shields.io/badge/version-${TAG}-brightgreen"
sed -i "s|!\\[Version Badge\\](.*)|![Version Badge](${BADGE_URL})|" README.md
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add README.md
git commit -m "Update version badge to $TAG"
git push
31 changes: 31 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update HTML version

on:
push:
tags:
- 'v*'

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get the latest tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}

- name: Update version in HTML
run: |
TAG=${{ steps.get_tag.outputs.tag }}
sed -i "s/VERSION_PLACEHOLDER/$TAG/" index.html
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add index.html
git commit -m "Update version to $TAG"
git push
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ The second click on the bookmark (esc or button with a cross) will close **Gimme

## License

MIT © 2024 Sergey Vaitehovich
MIT © 2024 Sergey Vaitehovich ![Version Badge](https://img.shields.io/badge/version-VERSION_PLACEHOLDER-brightgreen)
1 change: 1 addition & 0 deletions images/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions index.html

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion js/gimme-style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
if (typeof window.GimmeStyle === 'undefined') {
/*
* GimmeStyle v0.9 | MIT License | Sergey Vaitehovich 2024
*/

if (window.GimmeStyle === undefined) {
let self = null;

window.GimmeStyle = {
Expand Down
35 changes: 31 additions & 4 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ summary {
cursor: pointer;
}

a:not(.demo *) {
a {
border-bottom: 1px dotted #999;
color: #999;
text-decoration: none;
Expand All @@ -93,7 +93,7 @@ a:not(.demo *):before { /* only for demo */
text-decoration: none;
}

a:not(.demo *):hover {
a:hover {
display: inline-block;
border-bottom-style: solid;
color: black;
Expand Down Expand Up @@ -164,10 +164,37 @@ hr {
width: 105px;
margin: 10px auto 0;
padding: 7px;
color: white;
background-color: darkgreen;
border: 0;
border-radius: 4px;
color: white;
text-decoration: none;
background-color: darkgreen;
}
.demo a:hover {
display: block;
border: 0;
color: white;
animation: none;
}

footer {
display: flex;
padding: 10px 20px;
border-top: thin solid #999;
}

footer a {
display: inline-block;
width: 22px;
height: 22px;
margin-right: 7px;
border: 0;
background: url("../images/github.svg") no-repeat center center;
background-size: 22px;
}

footer a:hover {
animation: none;
}

@keyframes pulse { /* only for demo */
Expand Down

0 comments on commit e76a09f

Please sign in to comment.