Skip to content

Commit

Permalink
Add a development banner to generated development specification (#512)
Browse files Browse the repository at this point in the history
* Add a development banner to generated development specification

* Update .github/workflows/pages.yml

Co-authored-by: Antanas Vaitkus <antanas.vaitkus90@gmail.com>

---------

Co-authored-by: Antanas Vaitkus <antanas.vaitkus90@gmail.com>
  • Loading branch information
ml-evs and vaitkus authored Apr 4, 2024
1 parent af4995a commit 308ee83
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
git fetch origin gh-pages
git checkout gh-pages
mkdir -p specification/develop
# patch dev specification to include banner
sed -i 's|<body class="with-toc">|<body class="with-toc"><div class="banner-container"><div class="banner">This is a development version of the specification.</div></div>|g' optimade.html
mv optimade.html specification/develop/index.html
git add specification/develop/index.html
git commit -m "Deploy develop specification to GitHub Pages: ${SHA}"
Expand Down
23 changes: 23 additions & 0 deletions tests/makefiles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ body {
--field-indent: 9em; /* default indent of fields in field lists */
}

/*Banner for development version*/
.banner-container {
max-width: 60rem;
min-width: 60rem;
height: 50px;
position: fixed;
top: 0;
color: var(--code-bg-color);
background: var(--code-fg-color);
border: outset 2px var(--tertiary);
align-items: center;
display: flex;
justify-content: center;
}

.banner {
text-transform: uppercase;
text-align: center;
vertical-align: middle;
font-size: 1.5em;
display: table-cell;
}

/* "page layout" */
main, footer, header {
line-height:1.6;
Expand Down

0 comments on commit 308ee83

Please sign in to comment.