Skip to content

Commit

Permalink
Add version tag to header
Browse files Browse the repository at this point in the history
  • Loading branch information
pervoj committed Mar 31, 2024
1 parent d3b0c2e commit d3e2af2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
uses: actions/checkout@v4
- name: Build the Storybook documentation
run: |
TAG=$(git describe --tags --abbrev=0 2> /dev/null || git rev-parse --abbrev-ref HEAD)
sed -i "s/\"devel\"/\"$TAG\"/g" .storybook/manager-head.html
npm install
npm run build-storybook
- name: Deploy the built pages
Expand Down
18 changes: 17 additions & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<style>
.sidebar-header div a img {
.sidebar-header > div:first-of-type a img {
height: 2rem;
}

.sidebar-header > div {
justify-content: space-between;
gap: 0.75rem;
}

.sidebar-header > div:first-of-type:after {
content: "devel";
display: block;
font-size: 0.65rem;
border-radius: 100vmax;
padding: 0.1em 0.3em;
border: 1px solid currentColor;
color: #39a7ff;
opacity: 0.75;
}
</style>

0 comments on commit d3e2af2

Please sign in to comment.