1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Added search feature back

This commit is contained in:
Jeremy Ruston 2013-03-20 09:01:44 +00:00
parent 91de9033f9
commit 505ce42bbc
5 changed files with 31 additions and 29 deletions

View File

@ -278,6 +278,10 @@ a.tw-tiddlylink-missing {
padding: 1em;
}
.tw-search-results {
padding: 1em;
}
.tw-drop-down .tw-tab-buttons button {
background-color: #ececec;
}
@ -301,6 +305,10 @@ a.tw-tiddlylink-missing {
<<box-shadow "inset 0 1px 8px rgba(0, 0, 0, 0.15)">>
}
.sidebar-header .tw-edit-texteditor input, .tw-edit-texteditor textarea {
width: 90%;
}
canvas.tw-edit-bitmapeditor {
cursor: crosshair;
-moz-user-select: none;

View File

@ -6,7 +6,7 @@ title: $:/templates/PageTemplate
<!-- The sidebar header -->
<header class="sidebar-header">
{{SiteTitle}}.title <br><small>{{SiteSubtitle}}</small><br>
{{SiteTitle}}.title <br><small>{{SiteSubtitle}}</small><br><br>
{{$:/templates/SideBar}}

View File

@ -1,6 +0,0 @@
title: $:/templates/SearchPreviewTemplate
<div class="title">
<<view title text>>
</div>
<<view text wikified>>

View File

@ -1,22 +0,0 @@
title: $:/templates/SearchResultTemplate
{{tw-search-result{
<li>
<<link throughField:title hover:"$:/temp/SearchPreviewDropDownLocation" qualifyHoverTitle:yes><
<<view title text>>
>>
</li>
}}}
<<reveal state:"$:/temp/SearchPreviewDropDownLocation" type:popup position:right qualifyTiddlerTitles:yes><
<div class="tw-tiddler-frame" style="color: black; width: 400px;">
<<tiddler template:$:/templates/SearchPreviewTemplate>>
</div>
>>

View File

@ -1,6 +1,27 @@
title: $:/templates/SideBar
<!-- The implementation of tabs here is currently a bit unreadable -->
<form class="form-search">
@@.search-query
<$edit tiddler="$:/temp/search" type="search" requireFocus="yes"/>
@@
<$reveal state="$:/temp/search" type="nomatch" text="">
<div class="tw-search-results">
<$list filter="[!is[system]searchVia[$:/temp/search]sort[title]limit[50]]" emptyMessage="//No results//"/>
</div>
</$reveal>
</form>
<$reveal state="$:/temp/search" type="match" text="">
<div class="tw-tab-set">
<div class="tw-tab-buttons"><$button type="set" set="$:/state/sideBarTabSet" setTo="openTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Open</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="allTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">All</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="toolsTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">Tools</$button><$button type="set" set="$:/state/sideBarTabSet" setTo="moreTab" qualifyTiddlerTitles="yes" selectedClass="tw-tab-selected">More</$button></div>
<div class="tw-tab-contents">
@ -19,3 +40,4 @@ title: $:/templates/SideBar
</$reveal>
</div>
</$reveal>