aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/generator/template
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/template')
-rw-r--r--lib/rdoc/generator/template/darkfish/_head.rhtml3
-rw-r--r--lib/rdoc/generator/template/darkfish/css/fonts.css12
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js14
-rw-r--r--lib/rdoc/generator/template/json_index/js/searcher.js1
4 files changed, 16 insertions, 14 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml
index 70f1c188d6..f308526823 100644
--- a/lib/rdoc/generator/template/darkfish/_head.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_head.rhtml
@@ -3,7 +3,8 @@
<title><%= h @title %></title>
<script type="text/javascript">
- var rdoc_rel_prefix = "<%= rel_prefix %>/";
+ var rdoc_rel_prefix = "<%= asset_rel_prefix %>/";
+ var index_rel_prefix = "<%= rel_prefix %>/";
</script>
<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
diff --git a/lib/rdoc/generator/template/darkfish/css/fonts.css b/lib/rdoc/generator/template/darkfish/css/fonts.css
index e9e721183b..57302b5183 100644
--- a/lib/rdoc/generator/template/darkfish/css/fonts.css
+++ b/lib/rdoc/generator/template/darkfish/css/fonts.css
@@ -17,7 +17,7 @@
font-weight: 400;
src: local("Source Code Pro"),
local("SourceCodePro-Regular"),
- url("fonts/SourceCodePro-Regular.ttf") format("truetype");
+ url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
}
@font-face {
@@ -26,7 +26,7 @@
font-weight: 700;
src: local("Source Code Pro Bold"),
local("SourceCodePro-Bold"),
- url("fonts/SourceCodePro-Bold.ttf") format("truetype");
+ url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
}
/*
@@ -46,7 +46,7 @@
font-weight: 300;
src: local("Lato Light"),
local("Lato-Light"),
- url("fonts/Lato-Light.ttf") format("truetype");
+ url("../fonts/Lato-Light.ttf") format("truetype");
}
@font-face {
@@ -55,7 +55,7 @@
font-weight: 300;
src: local("Lato Light Italic"),
local("Lato-LightItalic"),
- url("fonts/Lato-LightItalic.ttf") format("truetype");
+ url("../fonts/Lato-LightItalic.ttf") format("truetype");
}
@font-face {
@@ -64,7 +64,7 @@
font-weight: 700;
src: local("Lato Regular"),
local("Lato-Regular"),
- url("fonts/Lato-Regular.ttf") format("truetype");
+ url("../fonts/Lato-Regular.ttf") format("truetype");
}
@font-face {
@@ -73,7 +73,7 @@
font-weight: 700;
src: local("Lato Italic"),
local("Lato-Italic"),
- url("fonts/Lato-RegularItalic.ttf") format("truetype");
+ url("../fonts/Lato-RegularItalic.ttf") format("truetype");
}
/*
diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js
index b789a65631..38f877ed40 100644
--- a/lib/rdoc/generator/template/darkfish/js/darkfish.js
+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js
@@ -59,7 +59,7 @@ function hookSearch() {
var html = '';
// TODO add relative path to <script> per-page
- html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
+ html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
if (result.params)
html += '<span class="params">' + result.params + '</span>';
html += '</a>';
@@ -121,9 +121,9 @@ function highlightClickTarget( event ) {
};
};
-function loadAsync(path, success) {
+function loadAsync(path, success, prefix) {
$.ajax({
- url: rdoc_rel_prefix + path,
+ url: prefix + path,
dataType: 'script',
success: success,
cache: true
@@ -154,8 +154,8 @@ $(document).ready( function() {
});
}
- loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
- loadAsync('js/search.js', search_success_function('search_loaded'));
- loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
- loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
+ loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
+ loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
+ loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
+ loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
});
diff --git a/lib/rdoc/generator/template/json_index/js/searcher.js b/lib/rdoc/generator/template/json_index/js/searcher.js
index 0419f2a117..b3b1c58a0f 100644
--- a/lib/rdoc/generator/template/json_index/js/searcher.js
+++ b/lib/rdoc/generator/template/json_index/js/searcher.js
@@ -172,6 +172,7 @@ Searcher.prototype = new function() {
result.path = info[2];
result.params = info[3];
result.snippet = info[4];
+ result.badge = info[6];
return result;
}