diff options
author | dakkar <dakkar@luxion> | 2005-11-10 20:19:29 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2005-11-10 20:19:29 +0000 |
commit | cac81c5c401813e609a9b3345eec91a570071fab (patch) | |
tree | f45a7079a2ed6f09413940299fc0848908fbe68d /root | |
parent | * cambiato ordinamento dei tag (ora è sempre alfabetico) (diff) | |
download | Bookmarks-cac81c5c401813e609a9b3345eec91a570071fab.tar.gz Bookmarks-cac81c5c401813e609a9b3345eec91a570071fab.tar.bz2 Bookmarks-cac81c5c401813e609a9b3345eec91a570071fab.zip |
aggiunta la funzionalità di ricerca, e "finiti" gli stili
Diffstat (limited to 'root')
-rw-r--r-- | root/links | 24 | ||||
-rw-r--r-- | root/results | 54 | ||||
-rw-r--r-- | root/search | 10 | ||||
-rw-r--r-- | root/style.css | 52 | ||||
-rw-r--r-- | root/tags | 1 | ||||
-rw-r--r-- | root/toggle_details | 17 |
6 files changed, 140 insertions, 18 deletions
@@ -9,23 +9,7 @@ </title> <link rel="stylesheet" href="[% href.stylesheet() %]" type="text/css" /> [% href.js_library() %] - <script type="text/javascript"> - // <!-- - function toggle_details(linkid) { - var theDiv=$('link_details_' + linkid); - var theButton=$('link_toggle_' + linkid); - if (theDiv.style.display == 'none') { - Effect.SlideDown(theDiv); - theButton.textContent='^'; - } - else { - Effect.SlideUp(theDiv); - theButton.textContent='V'; - } - return false; - } - // --> - </script> + [% INCLUDE toggle_details %] </head> <body> <div id="tagset"> @@ -64,6 +48,7 @@ </ul> </div> </div> + [% INCLUDE search local=1 %] <div id="links"> <h2>Links:</h2> <div> @@ -93,6 +78,11 @@ </li> [% END %] </ul> + [%- IF link.descr %] + <div class="link descr"> + [%- link.descr -%] + </div> + [% END -%] </div> </div> </li> diff --git a/root/results b/root/results new file mode 100644 index 0000000..e3cc6d2 --- /dev/null +++ b/root/results @@ -0,0 +1,54 @@ +<html> + <head> + <title> + Search results + </title> + <link rel="stylesheet" href="[% href.stylesheet() %]" type="text/css" /> + [% href.js_library() %] + [% INCLUDE toggle_details %] + </head> + <body> + [% INCLUDE search %] + <div id="links" class="results"> + <h2>Links:</h2> + <div> + <ol> + [% FOR link IN links %] + <li> + <div class="link head"> + <span class="link icon"> + <img src="[% href.link_icon(link) %]" width="18" height="18" /> + </span> + <span class="link title"> + <a href="[% href.link(link) %]" title="[% link.url %]">[% link.title %]</a> + </span> + <span class="link appear" id="link_toggle_[% link.pk %]" onclick="toggle_details('[% link.pk %]')">V</span> + </div> + <div class="link details" style="display: none;" id="link_details_[% link.pk %]"> + <div> + <span class="link edit"> + <a href="[% href.edit_link(link) %]" target="_self">edit</a> + </span> + <ul> + [% FOR rtag IN link.tags %] + <li> + <span class="tag name"> + <a href="[% href.to_tag(rtag) %]" target="_self">[% rtag.name %]</a> + </span> + </li> + [% END %] + </ul> + [%- IF link.descr %] + <div class="link descr"> + [%- link.descr -%] + </div> + [% END -%] + </div> + </div> + </li> + [% END %] + </ol> + </div> + </div> + </body> +</html> diff --git a/root/search b/root/search new file mode 100644 index 0000000..198bc35 --- /dev/null +++ b/root/search @@ -0,0 +1,10 @@ +<div id="search[% IF local; '-local'; END %]"> + <form action="[% href.search() %]" method="get"> + <p> + <label for="term">Search:</label> + <input type="text" id="term" name="q" size="30" /> + <input type="hidden" name="tags" value="[% IF local; FOR tag IN tagset.tags; tag.pk _ ' '; END; END %]" /> + <input type="submit" name="go" value=">" /> + </p> + </form> +</div>
\ No newline at end of file diff --git a/root/style.css b/root/style.css index ff8aa36..6fbb706 100644 --- a/root/style.css +++ b/root/style.css @@ -20,6 +20,7 @@ div#all-tags ol { list-style: none; margin:0;padding:0;border:0; + margin-top: 30px; } div#all-tags li { @@ -112,7 +113,7 @@ div#related ul li span.tag.add a div#links { padding:0;border:0;margin:0; - margin-top: 85px; + margin-top: 115px; } div#links h2 { @@ -160,6 +161,11 @@ div#links ol > li div.link.details ul li padding:0;margin:0;border:0; padding-left: 5px; margin-left: 5px; border-left: solid thin black; } +div#links ol > li div.link.descr +{ + background-color: rgb(180,180,180); + border: solid thin black; +} /* add form */ label { @@ -176,4 +182,48 @@ input[type=submit] { border: none; background-color: red; +} + +/* search form */ +div#search, +div#search-local +{ + position: fixed; left:0; + width:100%;height:30px; + background-color: white; + z-index: 2; + margin:0;padding:0;border:0; + border: solid thin black; +} +div#search /* in tags list */ +{ + top:0; +} +div#search-local /* in links list */ +{ + top:80px; +} +div#search p, +div#search-local p +{ + margin:0;padding:0;border:0; +} +div#search input[type=text], +div#search-local input[type=text] +{ + border:none; + border-top: solid thin black; +} + +div#search input[type=submit], +div#search-local input[type=submit] +{ + position: absolute; + top:0;right:0; +} + +/* search results */ +div#links.results +{ + margin-top: 40px; }
\ No newline at end of file @@ -4,6 +4,7 @@ <link rel="stylesheet" href="[% href.stylesheet() %]" type="text/css" /> </head> <body> + [% INCLUDE search %] <div id="all-tags"> <ol> [% FOR tag IN tags %] diff --git a/root/toggle_details b/root/toggle_details new file mode 100644 index 0000000..f2095d2 --- /dev/null +++ b/root/toggle_details @@ -0,0 +1,17 @@ + <script type="text/javascript"> + // <!-- + function toggle_details(linkid) { + var theDiv=$('link_details_' + linkid); + var theButton=$('link_toggle_' + linkid); + if (theDiv.style.display == 'none') { + Effect.SlideDown(theDiv); + theButton.textContent='^'; + } + else { + Effect.SlideUp(theDiv); + theButton.textContent='V'; + } + return false; + } + // --> + </script> |