mirror of
https://github.com/btdig/dhtcrawler2.git
synced 2025-01-31 10:31:37 +00:00
separate embedded css style into page.temp
This commit is contained in:
parent
db93cd73f9
commit
4d31535727
@ -16,7 +16,9 @@
|
||||
-define(ONEDAY_SECS, 24*60*60).
|
||||
|
||||
start(IP, Port, PoolSize) ->
|
||||
mongo_sup:start_pool(?DB_POOLNAME, PoolSize, {IP, Port}).
|
||||
mongo_sup:start_pool(?DB_POOLNAME, PoolSize, {IP, Port}),
|
||||
Conn = mongo_pool:get(?DB_POOLNAME),
|
||||
db_store_mongo:init(Conn).
|
||||
|
||||
stop() ->
|
||||
mongo_sup:stop_pool(?DB_POOLNAME).
|
||||
|
@ -119,11 +119,11 @@ format_one_result({multi, Hash, {Name, Files}, Announce, CTime}, ShowAll) ->
|
||||
format_one_result(Hash, Name, Files, Announce, CTime, ShowAll).
|
||||
|
||||
format_one_result(Hash, Name, Files, Announce, CTime, ShowAll) ->
|
||||
?TEXT("<li><p style=\"font-size: 120%;\">
|
||||
?TEXT("<li><p class=\"search-title\">
|
||||
<a target='_blank' href=\"/e/http_handler:index?q=~s\">~s</a></p><ul>~s</ul>",
|
||||
[Hash, Name, format_files(Files, ShowAll)]) ++
|
||||
?TEXT("<p style=\"font-size:80%\">Index at: ~s | File count: ~p | Announce count: ~p
|
||||
<a href=\"~s\" style=\"font-size:120%\"> Download</a></p>",
|
||||
?TEXT("<p class=\"search-detail\">Index at: ~s | File count: ~p | Query count: ~p
|
||||
<a href=\"~s\" class=\"download-tip\"> Download</a></p>",
|
||||
[format_time_string(CTime), length(Files), Announce, format_magnet(Hash)]).
|
||||
|
||||
format_files(Files, false) ->
|
||||
@ -142,7 +142,7 @@ format_file({more, Len}) ->
|
||||
?TEXT("<li>...~b more files</li>", [Len]);
|
||||
|
||||
format_file({Name, Length}) ->
|
||||
?TEXT("<li>~s <span style=\"color:#888;\">~s</span></li>",
|
||||
?TEXT("<li>~s <span class=\"file-size\">~s</span></li>",
|
||||
[Name, size_string(Length)]).
|
||||
|
||||
format_view(Hash) ->
|
||||
|
@ -29,6 +29,18 @@ body { margin:0; padding:0; }
|
||||
.search-box #s_text {
|
||||
width: 200px;
|
||||
}
|
||||
p.search-title {
|
||||
font-size:120%;
|
||||
}
|
||||
p.search-detail {
|
||||
font-size:80%;
|
||||
}
|
||||
a.download-tip {
|
||||
font-size:110%;
|
||||
}
|
||||
span.file-size {
|
||||
color:#888;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
Loading…
Reference in New Issue
Block a user