Copy styles.css from support into generated docs/ folder

This commit is contained in:
Johann Rudloff 2021-01-04 19:32:20 +01:00
parent 1a025131e3
commit 68a5f1f1b7
3 changed files with 330 additions and 0 deletions

View File

@ -146,10 +146,12 @@ endif
install-support:
mkdir -p ${PREFIX}/${NAME_VERSION}/support/chez
mkdir -p ${PREFIX}/${NAME_VERSION}/support/docs
mkdir -p ${PREFIX}/${NAME_VERSION}/support/racket
mkdir -p ${PREFIX}/${NAME_VERSION}/support/gambit
mkdir -p ${PREFIX}/${NAME_VERSION}/support/js
install support/chez/* ${PREFIX}/${NAME_VERSION}/support/chez
install support/docs/* ${PREFIX}/${NAME_VERSION}/support/docs
install support/racket/* ${PREFIX}/${NAME_VERSION}/support/racket
install support/gambit/* ${PREFIX}/${NAME_VERSION}/support/gambit
install support/js/* ${PREFIX}/${NAME_VERSION}/support/js

View File

@ -504,6 +504,7 @@ makeDoc pkg opts =
)
writeHtml ("</dl>")
writeHtml htmlFooter
coreLift $ closeFile outFile
pure $ the (List Error) []
)
| errs => pure errs
@ -519,6 +520,13 @@ makeDoc pkg opts =
)
writeHtml "</ul>"
writeHtml htmlFooter
coreLift $ closeFile outFile
css <- readDataFile "docs/styles.css"
Right outFile <- coreLift $ openFile (docBase </> "styles.css") WriteTruncate
| Left err => pure [InternalError $ ("error opening file \"" ++ (docBase </> "styles.css") ++ "\": " ++ (show err))]
coreLift $ fPutStr outFile css
coreLift $ closeFile outFile
runScript (postbuild pkg)
pure []

320
support/docs/styles.css Normal file
View File

@ -0,0 +1,320 @@
html, body {
margin: 0;
padding: 0;
border: 0;
height: 100%;
font-family: "Trebuchet MS", Helvetica, sans-serif;
font-size: 11pt;
background-color: #FFF;
}
a, a:active, a:visited {
text-decoration: none;
color: inherit;
}
a:hover {
text-decoration: underline;
}
header {
padding: 5px 11px;
border-bottom: 3px solid #659FDB;
box-shadow: 0 -8px 22px 0px;
background-color: #252525;
color: white;
font-size: 9pt;
}
.wrapper {
min-height: 100%;
}
header nav, header strong {
font-size: 11pt;
}
header nav {
float: right;
}
footer {
height: 30px;
width: 100%;
border-top: 1px solid #AAAAAA;
margin-top: -31px;
text-align: center;
color: #666;
line-height: 30px;
font-size: 9pt;
background: none repeat scroll 0 0 #DDDDDD;
}
.container {
padding: 10px 10px 41px 20px;
}
body.index .container a:visited {
color: #666;
}
body.index .container a:hover {
color: #04819E;
}
h1 {
margin: 0;
margin-bottom: 5px;
font-size: 14pt;
font-family: "Trebuchet MS", Helvetica, sans-serif;
}
body.namespace h1 {
border-bottom: 1px solid #BBB;
padding-bottom: 2px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
hr {
margin: 0;
padding: 0;
border: 0;
border-bottom: 1px solid #BBB;
}
p {
margin: 0;
padding: 0;
}
.code {
font-family: "Lucida Console", Monaco, monospace;
font-size: 10pt;
}
.decls {
margin-top: 15px;
}
.decls > dt {
font-family: "Lucida Console", Monaco, monospace;
font-size: 10pt;
line-height: 20px;
padding: 2px 0;
border: 1px solid #CCC;
background-color: #F0F0F0;
display: table;
width: 100%;
}
.decls > dt > :first-child {
padding-left: 6px;
}
.decls > dt > :last-child {
padding-right: 6px;
}
.decls > dd {
margin: 10px 0 10px 20px;
font-family: Arial, sans-serif;
font-size: 10pt;
}
.decls > dd > p {
margin-bottom: 8px;
}
.decls > dd > dl:not(.decls):not(:first-child) {
padding-top: 5px;
border-top: 1px solid #EEE;
}
.decls > dd > dl:not(.decls) > dt {
display: block;
min-width: 70px;
float: left;
font-weight: bold;
}
.decls > dd > dl:not(.decls) > dd {
margin-bottom: 2px;
}
.fixity {
font-style: italic;
font-weight: normal !important;
}
dd.fixity {
cursor: default;
}
.word {
display: table-cell;
white-space: nowrap;
width: 0;
}
.signature {
display: table-cell;
width: 100%;
}
.name {
display: table-cell;
white-space: nowrap;
width: 0;
}
.documented, .name {
cursor: default;
}
.documented {
font-weight: bold;
}
a.function {
color: #00BA00;
}
.function {
color: #007C21;
}
a.constructor {
color: #FF0000;
}
.constructor {
color: #BF3030;
}
a.type {
color: #0000FF;
}
.type {
color: #050599;
}
.keyword {
color: inherit;
}
.boundvar {
color: #BF30BF; /* Too much colour makes it hard to differ the rest of the colours */
color: inherit;
}
.boundvar.implicit {
text-decoration: underline;
}
/******************* Old colours
a {
color: #04819E;
}
a:visited {
color: #26A3BF;
}
********************/
ul.names {
border: 1px solid #666;
}
ul.names li:nth-child(odd) {
background-color: #EEEEEF;
}
ul.names li:nth-child(even) {
background-color: white;
}
ul.names li {
padding-left: 5px;
}
ul.names li a {
display: inline-block;
width: 100%;
padding: 2px 0;
}