Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor updates to styles

  • Loading branch information...
commit 016b9360c942a66dd2d7596e98a8a088e2b300ab 1 parent 2439328
@daleharvey authored
View
17 priv/static/erldocs.css
@@ -25,6 +25,7 @@ p {
}
h1 {
+ display:inline;
font-size : 24px;
font-weight : bold;
}
@@ -53,6 +54,11 @@ dd {
margin-bottom : 8px;
}
+h4 a {
+ color:black;
+font-weight:bold;
+ /* font-size:80%; */
+}
a {
color : #B22222;
}
@@ -129,6 +135,7 @@ h2.modsummary {
font-size : 11px;
border-bottom : 1px solid #999;
margin-bottom : 15px;
+ margin-top : 10px;
}
.functions {
@@ -295,7 +302,7 @@ h2.modsummary {
text-shadow : #000 1px 1px 1px;
}
-#results .sub {
+.sub {
color : #555;
font-size : 10px;
white-space : nowrap;
@@ -327,6 +334,14 @@ h2.modsummary {
background : red;
}
+.app .sub {
+ position:absolute;
+ top:5px;
+ right:5px;
+ color:#999;
+ text-shadow:none;
+}
+
#sideinfo {
position : absolute;
top : 26px;
View
45 priv/static/erldocs.js
@@ -1,25 +1,28 @@
var ErlDocs = (function(index) {
+
/* Search box height? */
var RESULT_OFFSET_Y = 26;
+
/* Human readable keyCode index */
var KEY = {'BACKSPACE': 8, 'TAB': 9, 'NUM_PAD_CLEAR': 12, 'ENTER': 13, 'SHIFT': 16, 'CTRL': 17, 'ALT': 18, 'PAUSE': 19, 'CAPS_LOCK': 20, 'ESCAPE': 27, 'SPACEBAR': 32, 'PAGE_UP': 33, 'PAGE_DOWN': 34, 'END': 35, 'HOME': 36, 'ARROW_LEFT': 37, 'ARROW_UP': 38, 'ARROW_RIGHT': 39, 'ARROW_DOWN': 40, 'PRINT_SCREEN': 44, 'INSERT': 45, 'DELETE': 46, 'SEMICOLON': 59, 'WINDOWS_LEFT': 91, 'WINDOWS_RIGHT': 92, 'SELECT': 93, 'NUM_PAD_ASTERISK': 106, 'NUM_PAD_PLUS_SIGN': 107, 'NUM_PAD_HYPHEN-MINUS': 109, 'NUM_PAD_FULL_STOP': 110, 'NUM_PAD_SOLIDUS': 111, 'NUM_LOCK': 144, 'SCROLL_LOCK': 145, 'SEMICOLON': 186, 'EQUALS_SIGN': 187, 'COMMA': 188, 'HYPHEN-MINUS': 189, 'FULL_STOP': 190, 'SOLIDUS': 191, 'GRAVE_ACCENT': 192, 'LEFT_SQUARE_BRACKET': 219, 'REVERSE_SOLIDUS': 220, 'RIGHT_SQUARE_BRACKET': 221, 'APOSTROPHE': 222};
+
(function () {
- /* 0 - 9 */
- for (var i = 48; i <= 57; i++) {
+ /* 0 - 9 */
+ for (var i = 48; i <= 57; i++) {
KEY['' + (i - 48)] = i;
- }
- /* A - Z */
- for (i = 65; i <= 90; i++) {
+ }
+ /* A - Z */
+ for (i = 65; i <= 90; i++) {
KEY['' + String.fromCharCode(i)] = i;
- }
- /* NUM_PAD_0 - NUM_PAD_9 */
- for (i = 96; i <= 105; i++) {
+ }
+ /* NUM_PAD_0 - NUM_PAD_9 */
+ for (i = 96; i <= 105; i++) {
KEY['NUM_PAD_' + (i - 96)] = i;
- }
- /* F1 - F12 */
- for (i = 112; i <= 123; i++) {
+ }
+ /* F1 - F12 */
+ for (i = 112; i <= 123; i++) {
KEY['F' + (i - 112 + 1)] = i;
- }
+ }
})();
var $search = $("#search"),
@@ -50,10 +53,10 @@ var ErlDocs = (function(index) {
parentHeight = $parent.height(),
newTop = null;
- if (force) {
- $parent[0].scrollTop = scrollTop + childTop;
- return;
- }
+ if (force) {
+ $parent[0].scrollTop = scrollTop + childTop;
+ return;
+ }
if (childTop < 0) {
newTop = scrollTop + childTop;
@@ -157,11 +160,11 @@ var ErlDocs = (function(index) {
item = results[i];
if (item[0] === "app") {
- hash = "#" + item[1];
- path = "index";
+ hash = "#" + item[1];
+ path = "index";
} else {
- hash = (item[0] === "fun") ? "#" + item[2].split(":")[1] : "";
- path = item[1] + "/" + item[2].split(":")[0];
+ hash = (item[0] === "fun") ? "#" + item[2].split(":")[1] : "";
+ path = item[1] + "/" + item[2].split(":")[0];
}
url = CURRENT_ROOT + path + ".html?i=" + i + searchStr + hash;
@@ -231,7 +234,7 @@ var ErlDocs = (function(index) {
for (j = i - 1; j >= 0; j--) {
idx = results[j];
if (idx[0] !== "app" || idx[1] !== app) continue;
- $t.html(mod + ' (<a href="../index.html?i=' + j + '#' + app + '">' + app + '</a>)');
+ $t.after(' (<a href="../index.html?i=' + j + '#' + app + '">' + app + '</a>)');
return;
}
}
View
6 priv/sys.conf
@@ -8,10 +8,8 @@
% build for, either src/ or doc/ should exist under these dirs, wildcard
% paths are accepted
{apps,
- ["/home/daleharvey/www/erldocs.com/erlsrc/otp_src_R14A/erts/",
- "/home/daleharvey/www/erldocs.com/erlsrc/otp_src_R14A/lib/*/",
- "/home/daleharvey/www/erldocs.com/erlsrc/mochiweb-read-only/",
- "/home/daleharvey/www/erldocs.com/erlsrc/elib1/lib/"
+ ["/home/dale/lib/otp_src_R13B04/erts/",
+ "/home/dale/lib/otp_src_R13B04/lib/*/"
]}
]}
].
View
5 src/erldocs.erl
@@ -60,7 +60,7 @@ build_apps(Conf, Tpl, App, Index) ->
AppName = bname(App),
log("Building ~s (~p files)~n", [AppName, length(Files)]),
Map = fun (F) -> build_file_map(Conf, Tpl, AppName, F) end,
- [["app", AppName, AppName, "(application)"] |
+ [["app", AppName, AppName, "[application]"] |
pmapreduce(Map, fun lists:append/2, [], Files) ++ Index].
build_file_map(Conf, Tpl, AppName, File) ->
@@ -173,7 +173,7 @@ emit_index(L) ->
lists:sort(fun sort_index/2, L)).
index_html(["app", App, _, _Sum]) ->
- [{a, [{name, App}]}, {h1, [], [App]}];
+ [{a, [{name, App}]}, {h4, [], [App]}];
index_html(["mod", App, Mod, Sum]) ->
Url = App ++ "/" ++ Mod ++ ".html",
[{p,[], [{a, [{href, Url}], [Mod]}, {br,[],[]}, Sum]}];
@@ -319,6 +319,7 @@ tr_erlref({term,[{id, Term}], _Child}, _Acc) ->
tr_erlref({lib,[],Lib}, _Acc) ->
{h1, [], [lists:flatten(Lib)]};
tr_erlref({module,[],Module}, _Acc) ->
+ io:format("wtf ~p~n",[lists:flatten(Module)]),
{h1, [], [lists:flatten(Module)]};
tr_erlref({modulesummary, [], Child}, _Acc) ->
{h2, [{class, "modsummary"}], Child};
Please sign in to comment.
Something went wrong with that request. Please try again.