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 b74b2e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
- name: Set domain
run: echo "DOMAIN=osep.elisa.tech" >> $GITHUB_ENV

- name: Set base URL for preview if PR
- name: Adjust BASE_URL and css if this is a PR
if: github.ref != 'refs/heads/main'
run: echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV
run: |
echo "BASE_URL=https://${{ env.DOMAIN }}/${{ env.PR_PATH}}/" >> $GITHUB_ENV
cat docs/stylesheets/draft.css >> docs/stylesheets/elisa.css
- name: Setup python
uses: actions/setup-python@v5
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 b74b2e2

Please sign in to comment.