From 925bfcecc5bb29bf4cff521d82b569a078bc2612 Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 17 Apr 2016 00:03:45 +0200 Subject: [PATCH] client/help: split search help into sections --- client/css/help.styl | 7 + client/html/help-search-general.hbs | 87 ++++ client/html/help-search-posts.hbs | 172 ++++++++ client/html/help-search-tags.hbs | 129 ++++++ client/html/help-search-users.hbs | 81 ++++ client/html/help-search.hbs | 487 +---------------------- client/html/help.hbs | 2 +- client/html/user_list_header.hbs | 2 +- client/js/controllers/help_controller.js | 8 +- client/js/views/help_view.js | 29 +- 10 files changed, 521 insertions(+), 483 deletions(-) create mode 100644 client/html/help-search-general.hbs create mode 100644 client/html/help-search-posts.hbs create mode 100644 client/html/help-search-tags.hbs create mode 100644 client/html/help-search-users.hbs diff --git a/client/css/help.styl b/client/css/help.styl index a2532ac..dfd3bcd 100644 --- a/client/css/help.styl +++ b/client/css/help.styl @@ -15,3 +15,10 @@ font-size: 1.6em &:first-child margin-top: 0 + nav + text-align: center + ul + margin: 0 auto + text-align: left + nav.secondary + font-size: 0.95em diff --git a/client/html/help-search-general.hbs b/client/html/help-search-general.hbs new file mode 100644 index 0000000..27ee963 --- /dev/null +++ b/client/html/help-search-general.hbs @@ -0,0 +1,87 @@ +

Search queries are built of tokens that are separated by spaces. Each token +can be of following form:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SyntaxToken typeDescription
<value>anonymous tokensbasic filters
<key>:<value>named tokensadvanced filters
order:<style>order tokenssort results
special:<value>special tokensfilters usually tied to the logged in user
+ +

Most of anonymous and named tokens support ranged and composite values that +take following form:

+ + + + + + + + + + + + + + + + + + + + +
a,b,cwill show things that satisfy either a, + b or c.
1..will show things that are equal to or greater than 1.
..4will show things that are equal to at most 4.
1..4will show things that are equal to 1, 2, 3 or 4.
+ +

Date/time values can be of following form:

+ + + +

Some fields, such as user names, can take wildcards (*).

+ +

All tokens can be negated by prepending them with -.

+ +

Order token values can be appended with ,asc or +,desc to control the sort direction, which can be also controlled +by negating the whole token.

+ +

Example

+ +

Searching for posts with following query:

+ +
sea -fav-count:8.. type:swf uploader:Pirate
+ +

will show flash files tagged as sea, that were liked by seven people at +most, uploaded by user Pirate.

+ diff --git a/client/html/help-search-posts.hbs b/client/html/help-search-posts.hbs new file mode 100644 index 0000000..1c17aa4 --- /dev/null +++ b/client/html/help-search-posts.hbs @@ -0,0 +1,172 @@ +

Anonymous tokens

+ +

Filter posts tagged with given <value>.

+ +

Named tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idhaving specific post ID
scorehaving given score
uploaderuploaded by given user
commentcommented by given user
favfavorited by given user
fav-countfavorited by given number of users
comment-counthaving given number of comments
tag-counthaving given number of tags
note-counthaving given number of annotations
feature-counthaving been featured given number of times
dateposted at given date
file-sizehaving given file size (in bytes)
image-widthhaving given image width (where applicable)
image-heighthaving given image height (where applicable)
image-areahaving given number of pixels (image width * image height)
typegiven type of posts (<value> can be either image, flash/swf, youtube/yt, video or animation)
+ +

Order tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
randomas random as it can get
idhighest to lowest post ID
scorehighest scored
fav-countloved by most
comment-countmost commented first
tag-countwith most tags
note-countwith most annotations
file-sizelargest files first
image-widthwidest images first
image-heighttallest images first
image-arealargest images first
creation-datenewest to oldest (pretty much same as id)
edit-datelike creation-date, only looks at last edit time
fav-daterecently added to favorites by anyone
comment-daterecently commented by anyone
feature-daterecently featured
feature-countmost often featured
+ +

Special tokens

+ + + + + + + + + + + + + + + + + + + + +
likedposts liked by currently logged in user
dislikedposts disliked by currently logged in user
favposts added to favorites by currently logged in user
tumbleweedposts with score of 0, without comments and without favorites
diff --git a/client/html/help-search-tags.hbs b/client/html/help-search-tags.hbs new file mode 100644 index 0000000..666881a --- /dev/null +++ b/client/html/help-search-tags.hbs @@ -0,0 +1,129 @@ +

Anonymous tokens

+ +

Same as name token.

+ +

Named tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
namehaving given name (accepts wildcards)
categoryhaving given category
creation-datecreated at given date
creation-timealias of creation-date
last-edit-dateedited at given date
last-edit-timealias of last-edit-date
edit-datealias of last-edit-date
edit-timealias of last-edit-date
usagesused in given number of posts
usage-countalias of usages
post-countalias of usages
suggestion-countwith given number of suggestions
implication-countwith given number of implications
+ +

Order tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
randomas random as it can get
nameA to Z
categorycategory (A to Z)
creation-daterecently created first
creation-timealias of creation-date
last-edit-daterecently edited first
last-edit-timealias of creation-time
edit-datealias of creation-time
edit-timealias of creation-time
usagesused in most posts first
usage-countalias of usages
post-countalias of usages
suggestion-countwith most suggestions first
implication-countwith most implications first
+ +

Special tokens

+ +

None.

diff --git a/client/html/help-search-users.hbs b/client/html/help-search-users.hbs new file mode 100644 index 0000000..31cbc12 --- /dev/null +++ b/client/html/help-search-users.hbs @@ -0,0 +1,81 @@ +

Anonymous tokens

+ +

Same as name token.

+ +

Named tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
namehaving given name (doesn't accept wildcards yet)
creation-dateregistered at given date
creation-timealias of creation-date
last-login-date + whose most recent login date matches given date
last-login-time + alias of last-login-date +
login-date + alias of last-login-date +
login-timealias of last-login-date +
+ +

Order tokens

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
randomas random as it can get
nameA to Z
creation-datenewest to oldest
creation-timealias of creation-date
last-login-daterecently active first
last-login-timealias of last-login-date
login-datealias of last-login-date
login-timealias of last-login-date
+ +

Special tokens

+ +

None.

diff --git a/client/html/help-search.hbs b/client/html/help-search.hbs index ddbe5c1..8771e6b 100644 --- a/client/html/help-search.hbs +++ b/client/html/help-search.hbs @@ -1,479 +1,10 @@ -

General search syntax

+ -

Search queries are built of tokens that are separated by spaces. Each token -can be of following form:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SyntaxToken typeDescription
<value>anonymous tokensbasic filters
<key>:<value>named tokensadvanced filters
order:<style>order tokenssort results
special:<value>special tokensfilters usually tied to the logged in user
- -

Most of anonymous and named tokens support ranged and composite values that -take following form:

- - - - - - - - - - - - - - - - - - - - -
a,b,cwill show things that satisfy either a, - b or c.
1..will show things that are equal to or greater than 1.
..4will show things that are equal to at most 4.
1..4will show things that are equal to 1, 2, 3 or 4.
- -

Date/time values can be of following form:

- - - -

Some fields, such as user names, can take wildcards (*).

- -

All tokens can be negated by prepending them with -.

- -

Order token values can be appended with ,asc or -,desc to control the sort direction, which can be also controlled -by negating the whole token.

- -

Example

- -

Searching for posts with following query:

- -
sea -fav-count:8.. type:swf uploader:Pirate
- -

will show flash files tagged as sea, that were liked by seven people at -most, uploaded by user Pirate.

- -

Post search tokens

- -

Anonymous tokens

- -

Filter posts tagged with given <value>.

- -

Named tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idhaving specific post ID
scorehaving given score
uploaderuploaded by given user
commentcommented by given user
favfavorited by given user
fav-countfavorited by given number of users
comment-counthaving given number of comments
tag-counthaving given number of tags
note-counthaving given number of annotations
feature-counthaving been featured given number of times
dateposted at given date
file-sizehaving given file size (in bytes)
image-widthhaving given image width (where applicable)
image-heighthaving given image height (where applicable)
image-areahaving given number of pixels (image width * image height)
typegiven type of posts (<value> can be either image, flash/swf, youtube/yt, video or animation)
- -

Order tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
randomas random as it can get
idhighest to lowest post ID
scorehighest scored
fav-countloved by most
comment-countmost commented first
tag-countwith most tags
note-countwith most annotations
file-sizelargest files first
image-widthwidest images first
image-heighttallest images first
image-arealargest images first
creation-datenewest to oldest (pretty much same as id)
edit-datelike creation-date, only looks at last edit time
fav-daterecently added to favorites by anyone
comment-daterecently commented by anyone
feature-daterecently featured
feature-countmost often featured
- -

Special tokens

- - - - - - - - - - - - - - - - - - - - -
likedposts liked by currently logged in user
dislikedposts disliked by currently logged in user
favposts added to favorites by currently logged in user
tumbleweedposts with score of 0, without comments and without favorites
- -

User search tokens

- -

Anonymous tokens

- -

Same as name token.

- -

Named tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - -
namehaving given name (doesn't accept wildcards yet)
creation-dateregistered at given date
creation-timealias of creation-date
last-login-date - whose most recent login date matches given date
last-login-time - alias of last-login-date -
login-date - alias of last-login-date -
login-timealias of last-login-date -
- -

Order tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
randomas random as it can get
nameA to Z
creation-datenewest to oldest
creation-timealias of creation-date
last-login-daterecently active first
last-login-timealias of last-login-date
login-datealias of last-login-date
login-timealias of last-login-date
- -

Special tokens

- -

None.

- -

Tag search tokens

- -

Anonymous tokens

- -

Same as name token.

- -

Named tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
namehaving given name (accepts wildcards)
categoryhaving given category
creation-datecreated at given date
creation-timealias of creation-date
last-edit-dateedited at given date
last-edit-timealias of last-edit-date
edit-datealias of last-edit-date
edit-timealias of last-edit-date
usagesused in given number of posts
usage-countalias of usages
post-countalias of usages
suggestion-countwith given number of suggestions
implication-countwith given number of implications
- -

Order tokens

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
randomas random as it can get
nameA to Z
categorycategory (A to Z)
creation-daterecently created first
creation-timealias of creation-date
last-edit-daterecently edited first
last-edit-timealias of creation-time
edit-datealias of creation-time
edit-timealias of creation-time
usagesused in most posts first
usage-countalias of usages
post-countalias of usages
suggestion-countwith most suggestions first
implication-countwith most implications first
- -

Special tokens

- -

None.

+
diff --git a/client/html/help.hbs b/client/html/help.hbs index 2656f18..c187a29 100644 --- a/client/html/help.hbs +++ b/client/html/help.hbs @@ -1,5 +1,5 @@
-