Skip to content

Commit

Permalink
Minifying js and css, updating styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveWilkes committed Dec 1, 2018
1 parent 14bf592 commit f0b56af
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
8 changes: 6 additions & 2 deletions docs/src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ li.current {
border-bottom: 1px solid #010101;
}

.hljs-type, .hljs-keyword, .hljs-title {
font-weight: normal;
.hljs-type, .hljs-keyword, .hljs-title, .hljs-meta-string, .hljs-meta {
font-weight: normal !important;
}

.hljs-meta {
color: #4EC9B0;
}
1 change: 1 addition & 0 deletions docs/src/css/styles.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions docs/src/scripts/docs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
$(document).ready(function () {
$(function () {
var hlCode = document.querySelectorAll('pre code.cs'),
i,
i, l,
hlLength = hlCode.length,
mapperRegex = new RegExp('\\bMapper\\b', 'g'),
typeRegex = new RegExp('(new</span>\\W+|class</span> <span class="hljs-title">|&lt;)([A-Z][^&\\\( ]+)( |{|\\\(|&gt;)', 'g'),
genericTypeRegex = new RegExp('(IDictionary|Dictionary|IEnumerable|IReadOnlyCollection|Collection|List)&lt;', 'g'),
mapperRegex = /\bMapper\b/g,
typeRegex = /(new<\/span>\W+|class<\/span> <span class="hljs-title">|public<\/span>\W+|: <span class="hljs-title">|&lt;)([A-Z][^& \(\[\]]+)( |{|\(|\[\]&gt;|&gt;)/g,
genericTypeRegex = /(I{0,1}Dictionary|IEnumerable|IReadOnlyCollection|I{0,1}Collection|I{0,1}List)&lt;/g,
observer = new MutationObserver(function (mutations) {
for (var mutation of mutations) {
for (i = 0, l = mutations.length; i < l; ++i) {
var mutation = mutations[i];
if (mutation.attributeName === 'class') {
var innerHTML = mutation.target.innerHTML
.replace(mapperRegex, '<span class="hljs-type">Mapper</span>')
Expand Down
1 change: 1 addition & 0 deletions docs/src/scripts/docs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ site_dir: 'docs/site'

extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/vs2015.min.css
- css/styles.css
- css/styles.min.css

extra_javascript:
- scripts/docs.js
- scripts/docs.min.js

nav:
- General Use:
Expand Down

0 comments on commit f0b56af

Please sign in to comment.