doc module: style h[1-6], table and code
Headers have different sizes Tables have borders Table headers are left-aligned Codes are displayed inline (except inside pre) and have scrollbars if necessary refs #6484 fixes #6632
This commit is contained in:
parent
e005333806
commit
9af89e6ccf
|
@ -2,6 +2,7 @@
|
|||
$urlHelper = $this->getHelper('Url');
|
||||
$view = $this;
|
||||
?>
|
||||
<div class="chapter">
|
||||
<?= preg_replace_callback(
|
||||
'/<a\s+(?P<attribs>[^>]*?\s+)?href="#(?P<fragment>[^"]+)"/im',
|
||||
function($match) use ($toc, $urlHelper, $view) {
|
||||
|
@ -36,3 +37,4 @@ $view = $this;
|
|||
},
|
||||
$chapterHtml
|
||||
); ?>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
$urlHelper = $this->getHelper('Url');
|
||||
$view = $this;
|
||||
?>
|
||||
<div class="chapter">
|
||||
<?= preg_replace_callback(
|
||||
'/<a\s+(?P<attribs>[^>]*?\s+)?href="#(?P<fragment>[^"]+)"/im',
|
||||
function($match) use ($toc, $moduleName, $urlHelper, $view) {
|
||||
|
@ -36,3 +37,4 @@ $view = $this;
|
|||
},
|
||||
$chapterHtml
|
||||
); ?>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,33 @@
|
|||
.toc {
|
||||
float: left;
|
||||
width: 33.333%
|
||||
// W3C Recommendation <http://www.w3.org/TR/CSS21/sample.html> (except h4)
|
||||
h1 { font-size: 2em !important; }
|
||||
h2 { font-size: 1.5em !important; }
|
||||
h3 { font-size: 1.17em !important; }
|
||||
h4 { font-size: 1em !important; }
|
||||
h5 { font-size: .83em !important; }
|
||||
h6 { font-size: .75em !important; }
|
||||
|
||||
div.chapter {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.doc {
|
||||
float: left;
|
||||
width: 66.667%
|
||||
table th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
border: solid 1px lightgray;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
code {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
padding: 0.2em;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
pre > code {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue