Commit Graph

288 Commits

Author SHA1 Message Date
BrokenEagle
57befe894d Fix the error from missing jQuery-ui effects 2020-01-07 22:32:01 +00:00
evazion
ba7c38cfe0 forum: fix .forum-topic-row selector.
The .forum-topic-row class was removed. Use different selector instead.

This rule ensures the timestamp doesn't wrap on small screens.
2020-01-07 02:51:19 -06:00
evazion
ee212f8ebb css: fix references to data-user attributes on <body> tag.
Fixup for 5e03c3d84.
2020-01-05 16:41:42 -06:00
BrokenEagle
5e03c3d84e Adjust naming of user and model attributes
- Remove unnecessary attributes that cause additional SQL queries
- Remove unneeded check for nil on current_item
2020-01-05 19:46:08 +00:00
BrokenEagle
4b904dff5a Convert classes to use data attributes
- Remote resolved classes on post flags since they were unused
2020-01-04 22:02:45 +00:00
BrokenEagle
043944e1dd Convert index tables to using table builder 2020-01-04 22:02:43 +00:00
evazion
c251d145e4 Revert "Add Danbooru Winter Sale."
This reverts commit 963f1f7991.
2020-01-02 01:29:55 -06:00
evazion
44140c6ec8 Merge pull request #4238 from BrokenEagle/add-scary-font
Add scary font
2020-01-02 01:28:39 -06:00
BrokenEagle
4c6d3a5608 Added scary font 2020-01-01 03:06:40 +00:00
evazion
27c797f5c6 Fix #4230: Inconsistency between DText preview and DText renders of inline DText. 2019-12-28 13:28:45 -06:00
evazion
bb4be383b9 Fix #4231: Allow artist commentary titles to be formatted with DText. 2019-12-28 12:37:37 -06:00
evazion
963f1f7991 Add Danbooru Winter Sale.
* 25% off Gold and Platinum accounts.
* Free 6 tag searches for Member-level users.
* Runs from midnight Dec. 25th to 28th (UTC time).
2019-12-24 15:39:29 -06:00
evazion
48e0569832 login: add /login & /logout routes, rename 'sign in' to 'login'.
* Replace /session/new with /login and /session/sign_out with /logout.
* Rename 'sign in' to 'login'.

This changes are to make urls cleaner and terminology more consistent.
2019-12-14 15:27:13 -06:00
evazion
57b09c39b2 css: fix stylelint errors. 2019-12-13 19:10:56 -06:00
evazion
5394dbc3d2 tagging: lower happy/sad tag count thresholds.
Lower the frowny face tag threshold from 25 to 10 tags and the happy
face tag threshold from 35 to 20 tags.
2019-12-07 19:03:40 -06:00
evazion
81f7d14fa3 uploads: bump iqdb similarity threshold 65% -> 70%. 2019-12-07 11:24:39 -06:00
evazion
a559278953 notes: fix scrollbars appearing when using certain fonts. 2019-12-02 21:14:41 -06:00
evazion
5791f4e805 recommendations: show favcount beneath recommended posts.
* Add favorite count beneath recommended posts. Clicking the favcount
  loads more recommended posts like that post.
* Increase number of recommendations shown on post show page.
2019-12-02 03:08:01 -06:00
evazion
efda9f37e1 recommendations: add search form, allow searching by username. 2019-12-02 02:26:21 -06:00
evazion
41b30fc64c recommendations: open user recommendations to all users.
* Open recommendations to all users (not just gold).
* Show recommendations on all posts (not just posts after 2017).
* Allow users to browse recommendations for other users.
* Increase number of recommended posts returned.
* Change endpoints to /recommended_posts?user_id=1234 and
  /recommended_posts?post_id=1234 and add json/xml support.
2019-12-01 00:44:04 -06:00
evazion
c0006b0b9a dtext: fix link colors bleeding through spoiler tags (again).
Caused by upgrading webpacker in f8e109f6d. This changed the load order
of the CSS files, which was significant because the rules for tag colors
and for spoiler tags had equal specificity.
2019-11-26 21:09:30 -06:00
evazion
980a4b82b9 notes: adjust line-height for new fonts.
`line-height: normal;` produces large gaps between lines when using
non-default font families or font sizes. `line-height: 1.25;` reduces
these gaps.
2019-11-26 01:27:41 -06:00
evazion
b43008a506 notes: add multiple new fonts (#4212).
Add the following fonts:

* Comic (Comic Relief)
* Slab Sans (Anton)
* Slab Serif (Rokkitt)
* Formal Serif (Lora)
* Formal Cursive (Petit Formal Script)
* Print (Kalam)
* Hand (Indie Flower)
* Narrow (Archivo Narrow)
* Blackletter (Unifraktur Maguntia)

Add the following font aliases:

* Comic Sans MS is aliased to Comic Relief.
* Arial Narrow is aliased to Archivo Narrow.
* Rockwell is aliased to Rokkitt.
* Impact is aliased to Anton.
2019-11-26 01:27:41 -06:00
evazion
761cbc47c1 notes: fix word breaks inside links.
https://danbooru.donmai.us/forum_topics/9127?page=286#forum_post_161140
2019-11-25 02:52:40 -06:00
evazion
320ff01e07 login: remove 'remember' checkbox; make session cookies permanent.
Remove the "Remember" checkbox from the login page. Make session cookies
permanent instead. Phase out legacy `user_name` and `password_hash` cookies.

Previously a user's session cookies would be cleared whenever they
closed their browser window, which would log them out of the site. To
work around this, when the "Remember" box was checked on the login page
(which it was by default), the user's name and password hash (!) would
be stored in separate permanent cookies, which would be used to
automatically log the user back in when their session cookies were
cleared. We can avoid all of this just by making the session cookies
themselves permanent.
2019-11-17 17:50:23 -06:00
evazion
72f17fd1de Fix #3534: Remove Janitor Trials. 2019-11-17 02:10:24 -06:00
evazion
fedb525305 notes: add fallback font for comic sans (#4212). 2019-11-16 22:43:16 -06:00
evazion
378559ff47 autocomplete: make number of results configurable (partly).
Add `Danbooru.Autocomplete.MAX_RESULTS` param that controls the number
of results returned by autocomplete.

This does not work with tag autocomplete for Builders. Builder
autocomplete still needs to be refactored and unified with Member
autocomplete.

Also fix a bug in the /saved_searches/labels endpoint where the limit
param wasn't respected.
2019-11-13 01:47:41 -06:00
evazion
89c5ac73af autocomplete: switch to async/await. 2019-11-13 01:47:41 -06:00
evazion
2d1eabbe5f autocomplete: factor out clearing of menu bindings. 2019-11-13 01:47:37 -06:00
evazion
f9881e5414 autocomplete: add saved search label autocomplete in more places. 2019-11-12 20:24:24 -06:00
evazion
9cf5b1f01c dtext: add dtext cheatsheet popup. 2019-11-10 14:48:17 -06:00
evazion
19549e2c12 css: fix overlong parent/child preview boxes on post show page.
Bug: if a post had a large number of child posts, the child post preview
box would expand beyond the width of the screen.

Setting `min-width: 0` makes the flexbox column shrink instead of
expand.
2019-11-05 20:58:07 -06:00
evazion
90fef76121 artists: reorganize index page.
* Make other names searchable.
* Add post count and update timestamp.
* Add edit / delete / undelete links.
2019-11-04 16:45:19 -06:00
evazion
75ca53a9a1 autocomplete: fix underscore-to-space conversion in usernames.
Didn't handle names with multiple underscores correctly.
2019-11-04 15:45:07 -06:00
evazion
3a908f84bb wiki pages: use names instead of ids in urls.
Switching to using wiki names in URLs instead of IDs:

* https://danbooru.donami.us/wiki_pages/vocaloid
* https://danbooru.donami.us/wiki_pages/hatsune_miku

ID numbers can still be used, but they redirect to the name instead:

* https://danbooru.donami.us/wiki_pages/11 (redirects to /wiki_pages/touhou).

Numeric tags are prefixed with '~' to distinguish them from IDs:

* https://danbooru.donami.us/wiki_pages/2019 (the wiki with id 2019)
* https://danbooru.donami.us/wiki_pages/~2019 (the wiki for the tag named 2019)

The tag names 'new' and 'search' are disallowed to prevent conflicts
with existing routes:

* https://danbooru.donami.us/wiki_pages/new
* https://danbooru.donami.us/wiki_pages/search
2019-10-31 19:04:18 -05:00
evazion
91fd5e1bff js: add "ctrl+enter to submit form" shortcut.
Press Ctrl+Enter inside any text box to submit the form.
2019-10-31 00:27:43 -05:00
evazion
9cfb753c1b post tooltips: fix null deref when tooltips are disabled.
Fix an exception that is triggered by mousing out of a thumbnail when
tooltips are disabled. Caused by trying to access `qtip.cache` when
`qtip` is null.
2019-10-30 23:43:52 -05:00
evazion
4f858384bb dark mode: make header elements brighter. 2019-10-28 21:57:49 -05:00
evazion
f54885b72e css: update dtext external link icon selector.
DText was changed so that the .dtext-external-link class is now applied to all external links.
Previously it applied only to named links (ex: "google":[http://www.google.com]), not bare
links (ex: http://www.google.com).
2019-10-23 21:33:15 -05:00
evazion
5abbab644d font awesome: switch from svg+js to webfonts.
https://fontawesome.com/how-to-use/on-the-web/other-topics/performance

The default version of Font Awesome uses Javascript to replace <i> tags
with dynamically generated SVG elements. This adds a lot of weight to
the Javascript bundle (at least 1MB+), even when using subsetting to
load only the icons we actually use. The web font version is less
featureful than the JS version, but much lighter weight.
2019-10-22 16:20:53 -05:00
evazion
103742eb6c Fix #4058: FontAwesome CDN is slow/blocking.
Switch to the free self-hosted version of FontAwesome. We're not using
any Pro icons, so the Pro version isn't necessary.
2019-10-22 12:02:26 -05:00
evazion
e9a3ed563c dtext: fix tag colors bleeding through [spoiler] tags.
https://danbooru.donmai.us/forum_topics/9127?page=283#forum_post_160443
2019-10-18 07:56:55 -05:00
evazion
649c10ecf8 Fix #4194: Add CSS IDs to the uploads page. 2019-10-17 01:03:13 -05:00
evazion
d2c6d6d17b iqdb: hide low similarity results behind "show" link. 2019-10-16 23:53:09 -05:00
evazion
57de1d8ef3 /uploads: raise iqdb similarity threshold to 50%. 2019-10-15 01:12:08 -05:00
evazion
0059597f1e /uploads: fix manually clicking 'Similar' button.
Manually clicking Similar called `/iqdb_queries` instead of
`/iqdb_queries.js`, which caused it to update the page incorrectly.
2019-10-15 00:49:31 -05:00
evazion
f7116ad1c4 post previews: fix thumbnail width/height outside post index.
Normally thumbnails have a fixed size of 154x154, but that's not always
desirable outside of the posts index because it creates empty gaps
around thumbnails.
2019-10-14 21:16:04 -05:00
evazion
fa37b1edcd iqdb: lower similarity cutoff, return more results (fix #4190).
* Change cutoffs on upload page to max 5 results, min. 20% similarity.
* Change cutoffs on standalone /iqdb_queries page to max 20 results, min. 0% similarity.
* /iqdb_queries.json: add `limit` and `similarity` params to change default cutoffs.
2019-10-14 21:16:04 -05:00
evazion
ca54e2d67b iqdb: simplify ajax call.
Also add support for .xml responses to /iqdb_queries.
2019-10-14 21:16:04 -05:00