Skip to content

Commit

Permalink
fix #104 - update default style (#105)
Browse files Browse the repository at this point in the history
* fix #104 - update default style

* bigger font size
  • Loading branch information
Basile-z authored Feb 10, 2019
1 parent b7bd9d7 commit dbede4d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 68 deletions.
17 changes: 10 additions & 7 deletions src/symboldatabase.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import config;
import item;


/** Gather data about modules to document into a SymbolDatabase and return the database.
/**
* Gather data about modules to document into a SymbolDatabase and return the database.
*
* Params:
*
* config = harbored-mod configuration.
* writer = Writer (e.g. HTMLWriter), used to determine links for symbols (as Writer
* config = harbored-mod configuration.
* writer = Writer (e.g. HTMLWriter), used to determine links for symbols (as Writer
* decides where to put symbols).
* files = Filenames of all modules to document.
* files = Filenames of all modules to document.
*
* Returns: SymbolDatabase with collected data.
*/
Expand All @@ -45,6 +45,8 @@ SymbolDatabase gatherData(Writer)(ref const(Config) config, Writer writer, strin

return database;
}

///
class SymbolDatabase
{
/// Names of modules to document.
Expand Down Expand Up @@ -78,8 +80,9 @@ class SymbolDatabase

//TODO if all the AAs are too slow, try RedBlackTree before completely overhauling

/** Get a link to documentation of symbol specified by word (if word is a symbol).
*
/**
* Get a link to documentation of symbol specified by word (if word is a symbol).
*
* Searching for a symbol matching to word is done in 3 stages:
* 1. Assume word starts by a module name (with or without parent packages of the
* module), look for matching modules, and if any, try to find the symbol there.
Expand Down
126 changes: 65 additions & 61 deletions strings/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ body {
padding: 0;
}

a:link {
color: #B03931;
}
a:visited {
color: #B03931;
}
a:hover {
color: #742620;
}

div.main {
overflow: hidden;
background-color: #F8F8F8;
Expand All @@ -24,7 +34,7 @@ div.main {

div.breadcrumbs {
color: white;
background-color: #333;
background-color: #943029;
padding: 1.0em 0.5em 0.0em 0.5em;
left: 0;
box-sizing: border-box;
Expand All @@ -42,7 +52,7 @@ div.breadcrumbs a {
}

div.breadcrumbs span.highlight, div.breadcrumbs span a {
color: #DAAF07;
color: #E0E0E0;
}

div.breadcrumbs input {
Expand Down Expand Up @@ -95,10 +105,10 @@ div.breadcrumbs input {
/* anchors need to compensate for the fixed-pos breadcrumbs */
a.anchor
{
display: block;
position: relative;
top: -48px;
visibility: hidden;
display: block;
position: relative;
top: -48px;
visibility: hidden;
}

/** SEARCH RESULTS **/
Expand All @@ -111,13 +121,13 @@ a.anchor
text-align: left;
color: black;
margin-top: 2em;
font-size: 70%;
font-size: 100%;
z-index: 1000;
overflow-y: scroll;
}

#results a {
color: blue;
color: #B03931;
}


Expand All @@ -128,15 +138,15 @@ div.sidebar {
float: left;
margin-right: -1px;
border-right: 1px solid #D0D0D0;
background-color: #F8F8F0;
background-color: #E0E0E0;
}


div.toc {
padding: 1.5em 0.75em 1em 0.5em;
font-size: 0.55em;
padding: 1.5em .75em .35em 0.5em;
font-size: 80%;
line-height: 1.95em;
display:block;
display:block;
}

@media only screen and (max-width: 800px)
Expand All @@ -161,7 +171,7 @@ div.toc {
padding: 0 0.6em;
}
a.hide, a.show {
color: #111;
color: #111;
text-decoration: none;
}
.hide {
Expand All @@ -172,17 +182,17 @@ a.hide, a.show {
.show {
background-color: #F8F8F0;
border-bottom-right-radius:3px;
display: none;
display: none;
}
.hide:target + .show {
display: inline;
display: inline;
position: absolute;
}
.hide:target {
display: none;
display: none;
}
.hide:target ~ .toc {
display:none;
display:none;
}


Expand All @@ -208,7 +218,6 @@ div.toc ul ul {


div.toc a {
color: #111;
font-size: 1.25em;
}

Expand Down Expand Up @@ -239,7 +248,7 @@ div.toc span.package a {
/* Highlight the current module/package */
div.toc .selected {
border-radius: 2px;
background-color: #DAAF07 !important;
background-color: #F8F8F8 !important;
padding: 0.325em 0.2em;
/* counteracts the text movement caused by the padding */
margin: -0.325em -0.2em;
Expand All @@ -252,7 +261,7 @@ div.toc .selected {
div.content {
margin-top: 48px;
padding: 1.5em;
font-size: 90%;
font-size: 100%;
line-height: 130%;
overflow: hidden;
border-left: 1px solid #D0D0D0;
Expand Down Expand Up @@ -288,7 +297,7 @@ div.content tr {
div.content table {
border-collapse: collapse;
border-bottom: 1px dashed #333;
font-size: 90%;
font-size: 100%;
line-height: 130%;
margin: 1em 0;
}
Expand Down Expand Up @@ -375,7 +384,7 @@ div.aggregate-symbol div.members {
order: -1;
-webkit-order: -1;
padding-bottom: 0.3em;
border-bottom: 10px solid #333;
border-bottom: 3px solid #333;
margin: 1em 0em 1.5em 0em;
}

Expand All @@ -387,24 +396,19 @@ div.symbol {
}

a.anchor:target + div.symbol {
border: 2px solid #DAAF07;
border: 2px solid #943029;
border-radius: 0;
background-color: #F8F8F0;
background-color: #F7F3F3;
}



/**** SECTION-SPECIFIC STYLES ****/

.section.seealso, .section.note, .section.imports {
font-size: 75%;
font-size: 90%;
line-height: 135%;
/* background-color: #F0F0C0; */
/* background-color: #DA7F07; */
/* background-color: #DA8F07; */
/* background-color: #DA9F07; */
background-color: #DAAF07;
/* background-color: #EABD08; */
background-color: #E0E0E0;
padding: 1em;
margin-bottom: 0.5em;
}
Expand Down Expand Up @@ -442,7 +446,7 @@ a.anchor:target + div.symbol {
margin: 0;
list-style-type: none;
padding-left: 1.5em;

-moz-column-count: 4;
-moz-column-gap: 20px;
-webkit-column-count: 4;
Expand Down Expand Up @@ -486,7 +490,7 @@ a.anchor:target + div.symbol {
column-gap: 7px;
}
}


.section.imports ul a {
color: #111;
Expand All @@ -507,19 +511,19 @@ a.anchor:target + div.symbol {

/**** FOOTER ****/

footer
{
text-align: center;
font-size: 60%;
color: white;
background-color: #333;
footer {
text-align: center;
font-size: 60%;
color: white;
background-color: #943029;
}

footer a
{
color: white;
footer a:link {
color: white;
}
footer a:visited {
color: white;
}



/**** CODE ****/
Expand Down Expand Up @@ -551,7 +555,7 @@ div.error {
/* Markdown inline code and $(D code) */
code.prettyprint, .d_inline_code {
font-family: monospace;
color: #333;
color: white;
background-color:rgba(0,0,0,0.04);
border-radius: .15em;
border: 1px solid #C0C0C0;
Expand Down Expand Up @@ -583,10 +587,10 @@ div.section td code:not(.prettyprint) {
}

.hljs {
display: block; padding: 1em;
background: #282B2E;
overflow-x: auto;
display: block;
padding: 1em;
background: #E0E0E0;
overflow-x: auto;
}

.hljs-keyword,
Expand All @@ -599,33 +603,33 @@ div.section td code:not(.prettyprint) {
.nginx .hljs-title,
.css .hljs-id,
.tex .hljs-special {
color: #93C763;
color: #801010;
}

.hljs-number {
color: #FFCD22;
color: #e52525;
}

.hljs {
color: #E0E2E4;
color: black;
}

.css .hljs-tag,
.css .hljs-pseudo {
color: #D0D2B5;
color: black;
}

.hljs-attribute,
.hljs .hljs-constant {
color: #668BB0;
color: black;
}

.xml .hljs-attribute {
color: #B3B689;
color: black;
}

.xml .hljs-tag .hljs-value {
color: #E8E2B7;
color: black;
}

.hljs-code,
Expand All @@ -636,20 +640,20 @@ div.section td code:not(.prettyprint) {

.hljs-class,
.hljs-hexcolor {
color: #93C763;
color: black;
}

.hljs-regexp {
color: #D39745;
color: black;
}

.hljs-at_rule,
.hljs-at_rule .hljs-keyword {
color: #A082BD;
color: black;
}

.hljs-doctype {
color: #557182;
color: black;
}

.hljs-link_url,
Expand Down Expand Up @@ -680,11 +684,11 @@ div.section td code:not(.prettyprint) {
.apache .hljs-cbracket,
.tex .hljs-command,
.hljs-prompt {
color: #8CBBAD;
color: black;
}

.hljs-string {
color: #EC7600;
color: #e52525;
}

.hljs-comment,
Expand All @@ -698,7 +702,7 @@ div.section td code:not(.prettyprint) {
.hljs-shebang,
.apache .hljs-sqbracket,
.tex .hljs-formula {
color: #818E96;
color: #391d10;
}

.hljs-keyword,
Expand Down

0 comments on commit dbede4d

Please sign in to comment.