Skip to content

Commit

Permalink
Copy styles source into docs upon build (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen authored Jul 26, 2023
1 parent 26f9b09 commit 88b2384
Show file tree
Hide file tree
Showing 16 changed files with 305 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
npm run build --if-present
git config user.name ${GITHUB_ACTOR}
git config user.email ${PUSHER_EMAIL}
git add docs/*/*.html docs/*/*.md
git diff-index --quiet HEAD || (npm run pdf --if-present && git add docs/*/*.pdf && git commit -m "auto-refreshed")
git add docs/*/*.html docs/*/*.md docs/*/styles/*
git diff-index --quiet HEAD docs/*/*.html docs/*/*.md docs/*/styles/* || (npm run pdf --if-present && git add docs/*/*.pdf && git commit -m "auto-refreshed")
git push
env:
PUSHER_EMAIL: ${{ github.event.pusher.email }}
Binary file added docs/odata-csdl-json/odata-csdl-json.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-csdl-json/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
Binary file added docs/odata-csdl-xml/odata-csdl-xml.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-csdl-xml/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-data-aggregation-ext/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
Binary file modified docs/odata-json-format/odata-json-format.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-json-format/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
Binary file added docs/odata-protocol/odata-protocol.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-protocol/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-url-conventions/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ a:target {

a[href^="#OData"],
a[href^="#RFC"],
a[href^="#SQL"] {
a[href^="#rfc"] {
font-weight: bold;
}

a[href^="#OData"]::before,
a[href^="#RFC"]::before,
a[href^="#SQL"]::before {
a[href^="#rfc"]::before {
content: "[";
font-weight: bold;
}

a[href^="#OData"]::after,
a[href^="#RFC"]::after,
a[href^="#SQL"]::after {
a[href^="#rfc"]::after {
content: "]";
font-weight: bold;
}
Expand Down
7 changes: 6 additions & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
const fs = require("fs");
const Number = require("./number");
const pandoc = require("./pandoc");
const fs = require("fs");
const { PassThrough } = require("stream");

fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function (
doc
) {
if (doc.isDirectory() && doc.name.startsWith("odata-")) {
fs.cpSync(
__dirname + "/../styles",
__dirname + "/../docs/" + doc.name + "/styles",
{ recursive: true }
);
var md = fs.createWriteStream(
__dirname + "/../docs/" + doc.name + "/" + doc.name + ".md"
);
Expand Down
91 changes: 91 additions & 0 deletions styles/markdown-styles-v1.7.3b.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/* OASIS specification styles for HTML generated from Markdown or similar sources */
/* usually used after basic w3.css */
/* Paul Knight 2018-09-27 */
/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */
/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */
/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */
/* pk 2018-10-25 - v1.5 added use of <h6> as citation tag for References section or elsewhere */
/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of <hr /> as a page break when generating PDF from the HTML */
/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */
/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */
/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */
/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */
/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/
/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */
/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */

body {
margin-left: 3pc;
margin-right: 3pc;
font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;
font-size:12pt;
line-height:1.2;
}

html{overflow-x:auto}

/* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */
h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt}
h1big{font-size: 24pt}
h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA}
/* style for h6, for use as Reference tag */
h6{font-size:12pt; line-height:1.0}
h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;}
/* not needed - can just use brackets in the label itself */
/* h6::before {content: "["} */
/* h6::after {content: "]"} */

/* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */
hr{page-break-before: always;}


/* Table styles - bordered with option for striped */
table {
border-collapse: collapse;
}

table {
border-collapse:collapse;
border-spacing:0;
width:100%;
display:table;
font-size:12pt;
margin-top: 6pt;
}

table, th, td {
border: 1pt solid black;
padding:6pt 6pt;
text-align:left;
vertical-align:top;
}
th {
color:#ffffff;
background-color: #446CAA;
}
/* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */
.table-striped tbody tr:nth-child(even){background-color:#d6f3ff}

/* style for code blocks */
pre {
background-color:#f0f0f0;
padding: 6px;
}

code,kbd,samp{
font-family:CourierNew, "Courier New", monospace;
white-space: pre-wrap;
font-size: 10pt;
}

/* offset block quote */
blockquote {
background-color:#f0f0f0;
padding-left: 10px;
border-left: solid lightgray 6px;
}

/* space bullets a bit */
li {
margin: 3px 0;
}
Loading

0 comments on commit 88b2384

Please sign in to comment.