Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles for headers inside user markdown #64

Merged
merged 2 commits into from
Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added static/fonts/SourceCodePro-Light.ttf
Binary file not shown.
Binary file added static/fonts/SourceCodePro-Regular.ttf
Binary file not shown.
63 changes: 62 additions & 1 deletion static/styles/jsdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,51 @@ h6 {
font-style: italic;
}

.usertext h1 {
font-family: "Source Code Pro", monospace;
font-size: 24px;
margin: 2.5em 0 1em;
font-weight: 300;
}

.usertext h2 {
font-family: "Source Code Pro", monospace;
font-size: 18px;
margin: 2em 0 0.5em;
font-weight: 300;

}

.usertext h3 {
font-family: "Source Code Pro", monospace;
font-size: 15px;
margin: 1.5em 0 0;
font-weight: 300;
}

.usertext h4 {
font-family: "Source Code Pro", monospace;
font-size: 14px;
margin: 0 0 0;
font-weight: 400;
}

.usertext h5 {
font-size: 12px;
margin: 1em 0 0;
font-weight: normal;
color: #666;
}

.usertext h6 {
font-size: 11px;
margin: 1em 0 0;
font-weight: normal;
font-style: normal;
color: #666;
}


tt, code, kbd, samp {
font-family: Consolas, Monaco, 'Andale Mono', monospace;
background: #f4f4f4;
Expand Down Expand Up @@ -692,4 +737,20 @@ html[data-search-mode] .level-hide {
url('../fonts/Montserrat-Bold.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Montserrat-Bold.woff') format('woff'), /* Pretty Modern Browsers */
url('../fonts/Montserrat-Bold.ttf') format('truetype'); /* Safari, Android, iOS */
}
}

@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 300;
font-display: swap;
src: local('Source Code Pro Light'), local('SourceCodePro-Light'), url(fonts/SourceCodePro-Light.ttf) format('truetype');
}

@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(fonts/SourceCodePro-Regular.ttf) format('truetype');
}
6 changes: 3 additions & 3 deletions tmpl/container.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<sup class="variation"><?js= doc.variation ?></sup>
<?js } ?></h2>
<?js if (doc.classdesc) { ?>
<div class="class-description"><?js= doc.classdesc ?></div>
<div class="class-description usertext"><?js= doc.classdesc ?></div>
<?js } ?>
<?js } else if (doc.kind === 'module' && doc.modules) { ?>
<?js doc.modules.forEach(function(module) { ?>
Expand All @@ -45,7 +45,7 @@
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.modules) { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<div class="description usertext"><?js= doc.description ?></div>
<?js } ?>

<?js doc.modules.forEach(function(module) { ?>
Expand All @@ -57,7 +57,7 @@
<?js= self.partial('details.tmpl', doc) ?>

<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<div class="description usertext"><?js= doc.description ?></div>
<?js } ?>

<?js if (doc.examples && doc.examples.length) { ?>
Expand Down
4 changes: 2 additions & 2 deletions tmpl/exceptions.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<?js if (data.description && data.type && data.type.names) { ?>
<dl>
<dt>
<div class="param-desc">
<div class="param-desc usertext">
<?js= data.description ?>
</div>
</dt>
Expand All @@ -22,7 +22,7 @@
<dd></dd>
</dl>
<?js } else { ?>
<div class="param-desc">
<div class="param-desc usertext">
<?js if (data.description) { ?>
<?js= data.description ?>
<?js } else if (data.type && data.type.names) { ?>
Expand Down
2 changes: 1 addition & 1 deletion tmpl/mainpage.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var self = this;
</section>
<?js } ?>
<?js if (data.readme) { ?>
<section class="readme">
<section class="readme usertext">
<article><?js= data.readme ?></article>
</section>
<?js } ?>
2 changes: 1 addition & 1 deletion tmpl/members.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var self = this;
<?js= this.partial('details.tmpl', data) ?>

<?js if (data.description) { ?>
<div class="description">
<div class="description usertext">
<?js= data.description ?>
</div>
<?js } ?>
Expand Down
4 changes: 2 additions & 2 deletions tmpl/method.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ var self = this;
?><?js= (data.signature || '') ?></h4>

<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<p class="summary usertext"><?js= summary ?></p>
<?js } ?>
<?js } ?>

<?js= this.partial('details.tmpl', data) ?>

<?js if (data.kind !== 'module' && data.description) { ?>
<div class="description">
<div class="description usertext">
<?js= data.description ?>
</div>
<?js } ?>
Expand Down
1 change: 0 additions & 1 deletion tmpl/properties.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?js
var data = obj;
var props = data.subprops || data.properties;

/* sort subprops under their parent props (like opts.classname) */
var parentProp = null;
props.forEach(function(prop, i) {
Expand Down