Skip to content

Commit

Permalink
Add draft watermark to PR versions of site
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Albertella <[email protected]>
  • Loading branch information
reiterative committed Nov 11, 2024
1 parent 40c3216 commit 041f4d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
if: github.ref != 'refs/heads/main'
run: echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV

- name: Add draft message watermark to css if PR
if: github.ref != 'refs/heads/main'
- run: cat docs/stylesheets/draft.css >> docs/stylesheets/elisa.css

- name: Setup python
uses: actions/setup-python@v5
with:
Expand Down
10 changes: 10 additions & 0 deletions docs/stylesheets/draft.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

.md-content__inner.md-typeset:before {
content: "DRAFT FROM PR";
-webkit-transform: rotate(351deg);
-moz-transform: rotate(351deg);
-o-transform: rotate(351deg);
transform: rotate(351deg);
font-size: 10em;
color: rgba(255, 5, 5, 0.17);
}

0 comments on commit 041f4d2

Please sign in to comment.