Updated js and css

This commit is contained in:
shrkey
2016-09-23 22:46:20 +01:00
parent f076269ac3
commit 8568d497a3
7 changed files with 144 additions and 2 deletions

View File

@@ -28,6 +28,13 @@
Flatdoc.run({ Flatdoc.run({
fetcher: Flatdoc.github('darkwaterfoundation/docs', '640.md') fetcher: Flatdoc.github('darkwaterfoundation/docs', '640.md')
}); });
$(document).on('flatdoc:ready', function() {
// Highlight all the codes
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script> </script>
</head> </head>
<body role='flatdoc'> <body role='flatdoc'>

View File

@@ -28,6 +28,13 @@
Flatdoc.run({ Flatdoc.run({
fetcher: Flatdoc.github('darkwaterfoundation/docs', 'escape.md') fetcher: Flatdoc.github('darkwaterfoundation/docs', 'escape.md')
}); });
$(document).on('flatdoc:ready', function() {
// Highlight all the codes
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script> </script>
</head> </head>
<body role='flatdoc'> <body role='flatdoc'>

View File

@@ -28,6 +28,13 @@
Flatdoc.run({ Flatdoc.run({
fetcher: Flatdoc.github('darkwaterfoundation/docs', 'expansions.md') fetcher: Flatdoc.github('darkwaterfoundation/docs', 'expansions.md')
}); });
$(document).on('flatdoc:ready', function() {
// Highlight all the codes
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script> </script>
</head> </head>
<body role='flatdoc'> <body role='flatdoc'>

84
flatdoc/support/theme.css Normal file
View File

@@ -0,0 +1,84 @@
.title-card {
text-rendering: optimizeLegibility !important;
-webkit-font-smoothing: antialiased !important;
-moz-osx-font-smoothing: grayscale; }
.title-card {
background: #1d3b47;
background-position: center center;
background-size: cover;
color: #ccc;
text-align: center;
position: relative;
z-index: 1;
width: 100%;
display: table; }
.title-card > .in {
display: table-cell;
vertical-align: middle; }
.title-card .headline {
vertical-align: middle;
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
/* text-shadow: 0 0 4px rgba(0, 0, 0, 0.5); */
padding-left: 40px;
padding-right: 40px;
max-width: 800px;
line-height: 1.7; }
.title-card h1 {
font-family: 'Open Sans', sans-serif;
font-size: 3.3em;
font-weight: 300;
line-height: 1.1;
margin-bottom: 0.5em;
color: #fff; }
.title-card p {
font-family: montserrat, sans-serif;
color: #b8eaea;
font-weight: bold;
font-size: 1.3em; }
.title-card h5 {
margin-top: 150px;
font-family: montserrat, sans-serif;
font-weight: bold;
color: #fff;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 1.8em; }
.title-card h5 span {
display: inline-block;
padding: 5px 20px;
border: solid 3px #fff; }
@media (max-width: 768px) /* Tablet */ {
.title-card h5 {
margin-top: 100px; }
}
@media (max-width: 480px) /* Mobile */ {
.title-card {
padding: 50px 0; }
.title-card .headline {
padding-left: 10px;
padding-right: 10px;
min-height: none; }
.title-card h1 {
font-size: 2.2em; }
.title-card p {
font-size: 1.1em; }
.title-card h5 {
margin-top: 40px;
font-size: 0.9em; }
}

23
flatdoc/support/theme.js Normal file
View File

@@ -0,0 +1,23 @@
(function($) {
$(document).on('flatdoc:ready', function() {
$("#misc, #basic").remove();
$("pre > code").each(function() {
var $code = $(this);
var m = $code.text().match(/<body class='([^']*)'/);
if (m) {
var $q = $("<blockquote><a href='#"+m[1]+"' class='button light'>Toggle</a></blockquote>");
$q.find('a').click(function() {
var klass = $(this).attr('href').substr(1);
$('body').toggleClass(klass);
if (klass === 'big-h3') $.anchorjump('#theme-options');
if (klass === 'large-brief') $.anchorjump('#flatdoc');
});
$code.after($q);
}
});
});
})(jQuery);

View File

@@ -29,11 +29,18 @@
Flatdoc.run({ Flatdoc.run({
fetcher: Flatdoc.github('darkwaterfoundation/docs', 'readme.md') fetcher: Flatdoc.github('darkwaterfoundation/docs', 'readme.md')
}); });
$(document).on('flatdoc:ready', function() {
// Highlight all the codes
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script> </script>
</head> </head>
<body role='flatdoc' class='large-brief'> <body role='flatdoc' class='large-brief'>
<!-- <div class='title-area title-card' style='background-image: url(https://unsplash.it/1920/1080/?image=403)'> <div class='title-area title-card' style='background-image: url(https://unsplash.it/1920/1080/?image=403)'>
<div class='in'> <div class='in'>
<div class='headline'> <div class='headline'>
<h1>Documentation is easy.</h1> <h1>Documentation is easy.</h1>
@@ -41,7 +48,7 @@
<h5><span>Flatdoc - Dark Theme</span></h5> <h5><span>Flatdoc - Dark Theme</span></h5>
</div> </div>
</div> </div>
</div> --> </div>
<div class='header'> <div class='header'>
<div class='left'> <div class='left'>

View File

@@ -28,6 +28,13 @@
Flatdoc.run({ Flatdoc.run({
fetcher: Flatdoc.github('darkwaterfoundation/docs', 'soar.md') fetcher: Flatdoc.github('darkwaterfoundation/docs', 'soar.md')
}); });
$(document).on('flatdoc:ready', function() {
// Highlight all the codes
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script> </script>
</head> </head>
<body role='flatdoc'> <body role='flatdoc'>