LOCALSTEPMAKE_TEMPLATES=lilypond ly
LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
README_TOP_FILES= DEDICATION THANKS
-EXTRA_DIST_FILES= texinfo.css lilypond.css lilypond-ie-fixes.css TRANSLATION
+EXTRA_DIST_FILES= TRANSLATION
include $(depth)/make/stepmake.make
HTML_PAGE_NAMES= index devel translations
OUT_HTML_FILES= $(HTML_PAGE_NAMES:%=$(outdir)/%.html)
+OUT_CSS_FILES= $(CSS_FILES:%.css=$(outdir)/%.css)
default: local-doc
$(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
$(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
+$(OUT_HTML_FILES): $(OUT_CSS_FILES)
+
+$(outdir)/%.css: %.css
+ ln -f $< $@
+
po-update:
make -C po po-update
content="Top-level index to the standard documentation for
LilyPond @TOPLEVEL_VERSION@">
<style type="text/css">
- .navigation { background-color: #e8ffe8;
- padding: 2; border: #c0ffc0 1px solid;
- text-align: center;
- font-weight: bold;
- font-family: avantgarde, sans-serif;
- font-size: 110%; }
a.title { font-weight: bold; font-size: 110%; }
ul { margin-left: 1em; padding: 0pt; border: 0pt; }
ul li { margin-top: 0.2em; }
td.left-column { padding-right: 1em; }
td.right-column { padding-left: 1em; }
- hr { border:0; height:1; color: #000000; background-color: #000000; }
</style>
</head>
<body>
-
- <div class="navigation">
- <h1>LilyPond documentation</h1>
- </div>
- <div align="center" class="titlepage">
+ <div class="header">
+ <h1 class="header">LilyPond documentation</h1>
+ </div>
+ <div align="center">
<p>
<strong>Version @TOPLEVEL_VERSION@</strong>
<br>
padding: 0;
height: 100%;
font-size: 100%;
- font-family: "Century Schoolbook L", Georgia, serif;
margin-right: auto;
margin-left: auto;
+ color: black;
+ background-color: white;
}
/***********************************************************/
/* HEADERS */
/***********************************************************/
-h4 {
+h4, h3, h2, .unnumberedsubsubsec, .subsubheading {
color: #151959;
}
-h3 {
- color: #151959;
-}
-
h2 {
font-size: x-large;
- color: #151959;
}
.unnumberedsubsubsec, .subsubheading {
font-size: large;
- color: #151959;
}
/***********************************************************/
/***********************************************************/
a:link, a:visited, a:hover, a:active {color:#2E5479; text-decoration: none;}
a:hover {text-decoration: underline;}
-a:active {color:#CCF;}
+a:active {color:#CCCCFF;}
/***********************************************************/
/* BLOCK FORMATTING */
/***********************************************************/
blockquote {
- border: 1px solid #cccccc;
+ border: 1px solid #CCCCCC;
padding: 3px;
width: 40em;
}
background-color: #666666;
}
table.cartouche {
- border: 2px dotted #cccccc;
+ border: 2px dotted #CCCCCC;
margin-left: auto;
margin-right: auto;
width: 85%;
/* NAVIGATION */
/***********************************************************/
+div.header {
+ background-color: #E8FFE8;
+ padding: 2;
+ border: #C0FFC0 1px solid;
+ text-align: center;
+}
+
+h1.header {
+ font-weight: bold;
+ font-family: avantgarde, sans-serif;
+ font-size: 220%;
+}
+
.nav_table {
width: 100%;
background-color: #CCD3CC;
font-size: 0.8em;
}
-
-
+.footer {
+ background-color: #E8FFE8;
+ padding: 5;
+ border: #C0FFC0 1px solid;
+ font-size: 80%;
+}
/***********************************************************/
-/* OVERRIDES FOR PRINTING... */
+/* OVERRIDES FOR PRINTING */
/***********************************************************/
@media print {
/* Hide the sidebar: */
body { padding-left: 0; }
#tocframe { display: none; }
.nav_table { display: none; }
-}
\ No newline at end of file
+}
"""
footer = '''
-<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
+<div class="footer">
<p>
-<font size="-1">
%(footer_name_version)s
<br>
<address>
%(footer_report_errors)s </address>
<br>
%(footer_suggest_docs)s
-</font>
+<br>
</p>
</div>
'''
html_tag_re = re.compile ('(?i)<html>')
doctype_re = re.compile ('(?i)<!DOCTYPE')
doctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n'
+css_re = re.compile ('(?i)<link rel="stylesheet" type="text/css" href="[^">]*?lilypond.css">')
+end_head_tag_re = re.compile ('(?i)</head>')
+css_link = '<link rel="stylesheet" type="text/css" href="%sDocumentation/lilypond.css">\n'
-def add_header (s):
- """Add header (<body> and doctype)"""
+def add_header (s, prefix):
+ """Add header (<body>, doctype and CSS)"""
if header_tag_re.search (s) == None:
- body = '<body bgcolor="white" text="black" \\1>'
+ body = '<body\\1>'
(s, n) = body_tag_re.subn (body + header, s, 1)
if not n:
(s, n) = html_tag_re.subn ('<html>' + header, s, 1)
if doctype_re.search (s) == None:
s = doctype + s
+
+ if css_re.search (s) == None:
+ depth = (prefix.count ('/') - 1) * '../'
+ s = end_head_tag_re.sub ((css_link % depth) + '</head>', s)
return s
title_tag_re = re.compile ('.*?<title>(.*?)</title>', re.DOTALL)
s = s.replace ('%', '%%')
s = hack_urls (s, prefix)
- s = add_header (s)
+ s = add_header (s, prefix)
### add footer
if footer_tag_re.search (s) == None:
at-dir = $(doc-dir)/
at-ext = .in
-
+CSS_FILES := $(call src-wildcard,*.css)
+EXTRA_DIST_FILES += $(CSS_FILES)