Skip to content

Commit

Permalink
Updates to HTML build in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rartino authored Mar 22, 2024
2 parents b8e3075 + e42919e commit bce1fc9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 43 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
- name: Commit to gh-pages
run: |
git branch -D gh-pages || true
git checkout -b gh-pages
git checkout gh-pages
git add optimade.html
git commit -m "Deploy to GitHub Pages: ${SHA}"
mkdir -p specification/develop
mv optimade.html specification/develop/index.html
git commit -m "Deploy develop specification to GitHub Pages: ${SHA}"
if git diff --cached --quiet; then
exit 0
fi
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Makeconf*
.DS_Store
schemas/output
schemas/example/output
*.pdf
*.html
73 changes: 33 additions & 40 deletions tests/makefiles/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
/* This is an OPTIMADE adjustment of the minimal CSS for HTML output from Docutils. */

:root {
--bg-color: white;
Expand All @@ -10,10 +9,10 @@
--secondary: #50fa7b;
--tertiary: #ff414d;
--quaternary: #7a2dd0;
--external-refs: var(--secondary);
--external-refs: var(--tertiary);
--inline-refs: var(--primary);
--monospace-font-family: "JetBrains Mono", monospace;
--sans-serif-font-family: Roboto, Arial, Helvetica, 'Liberation Sans', sans-serif;
--monospace-font-family: monospace;
--sans-serif-font-family: sans-serif;
}

@media (prefers-color-scheme: dark) {
Expand All @@ -26,26 +25,45 @@
--secondary: #50fa7b;
--tertiary: #ff414d;
--quaternary: #7a2dd0;
--external-refs: var(--secondary);
--inline-refs: var(--tertiary);
--monospace-font-family: "JetBrains Mono", monospace;
--sans-serif-font-family: Roboto, Arial, Helvetica, 'Liberation Sans', sans-serif;
--external-refs: var(--tertiary);
--inline-refs: var(--primary);
--monospace-font-family: monospace;
--sans-serif-font-family: sans-serif;

}
}

body {
font-family: var(--sans-serif-font-family);
font-size: 16px;
max-width: 60rem;
margin-left: 10rem;
margin-right: auto;
margin-top: 0;
margin-bottom: 0;
color: var(--fg-color);
background-color: var(--bg-color);
--field-indent: 9em; /* default indent of fields in field lists */
}

div.document {
margin: 0 auto;
margin-left: auto;
margin-right: auto;
max-width: 900px;
background-color: var(--bg-color);
/* "page layout" */
main, footer, header {
line-height:1.6;
/* avoid long lines --> better reading */
/* optimum is 45…75 characters/line <http://webtypography.net/2.1.2> */
/* OTOH: lines should not be too short because of missing hyphenation, */
max-width: 60rem;
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */
margin: auto;
}
main {
counter-reset: table figure;
background-color: var(--bg-color);
}
footer, header {
font-size: smaller;
padding: 0.5em 2%;
border: none;
}

.reference.internal {
Expand Down Expand Up @@ -379,31 +397,6 @@ p img, p video, figure img, figure video {
/* Document Structure */
/* ****************** */

/* "page layout" */
body {
margin: 0;
max-width: 900px;
background-color: var(--bg-color);
--field-indent: 9em; /* default indent of fields in field lists */
}
main, footer, header {
line-height:1.6;
/* avoid long lines --> better reading */
/* optimum is 45…75 characters/line <http://webtypography.net/2.1.2> */
/* OTOH: lines should not be too short because of missing hyphenation, */
max-width: 60rem;
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */
margin: auto;
}
main {
counter-reset: table figure;
background-color: var(--bg-color);
}
footer, header {
font-size: smaller;
padding: 0.5em 2%;
border: none;
}

/* Table of Contents */
ul.auto-toc > li > p {
Expand Down

0 comments on commit bce1fc9

Please sign in to comment.