Commit Graph

233 Commits

Author SHA1 Message Date
evazion
21a9bb2c63 jobs: rename /delayed_jobs to /jobs.
Rename the /delayed_jobs endpoint to just /jobs since it's no longer
based on DelayedJob.
2022-01-02 21:21:16 -06:00
evazion
094ed4c11d css: standardize font sizes.
Fix various elements to use standard font sizes instead of ad-hoc sizes.

Noticeable changes:

* Tags in autocomplete are slightly smaller.
* The favorite heart icon on posts is slightly smaller.
* Pool titles on thumbnails in the pool gallery page are slightly bigger.
* The page footer is slightly smaller.
* Timestamps on comments and forum posts are very slightly smaller.
* "Pending"/"approved"/"rejected" labels on forum posts are very slightly smaller.
2021-10-25 05:59:40 -05:00
nonamethanks
e9d845e7cc Update site map 2021-08-15 02:16:56 -05:00
evazion
d482b87a9e docs: fix outdated link in dtext help.
`kaga_(kantai_collection)` was aliased to `kaga_(kancolle)`.
2021-06-23 06:23:29 -05:00
evazion
7b60a476e5 sources: add artist profile links to fetch source data box.
Add site icons linking to all the artist's sites in the fetch source
data box.

Some artist entries have a large number of URLs. Various heuristics are
applied to try to present the most useful URLs first. Dead URLs and
redundant URLs (Pixiv stacc and Twitter intent URLs) are filtered out.
Remaining URLs are sorted first by site (to put sites like Pixiv and
Twitter first), then by URL (to break ties when an artist has multiple
accounts on the same site).

Some sites have shitty hard-to-read icons. It can't be helped. The icons
are the official favicons of each site.
2021-02-26 01:24:30 -06:00
evazion
1c1d784547 css: rework color scheme to use new color palette.
Add a new color palette and rework all site colors (both light mode and dark mode) to
use the new palette.

This ensures that colors are used consistently, from a carefully designed color palette,
instead of being chosen at random.

Before, colors in light mode were chosen on an ad-hoc basis, which resulted in a lot of
random colors and inconsistent design.

The new palette has 7 hues: red, orange, yellow, green, blue, azure (a lighter blue), and
purple. There's also a greyscale. Each hue has 10 shades of brightness, which (including
grey) gives us 80 total colors.

Colors are named like this:

    var(--red-0);    /* very light red */
    var(--red-2);    /* light red */
    var(--red-5);    /* medium red */
    var(--red-7);    /* dark red */
    var(--red-9);    /* very dark red */
    var(--green-7);  /* dark green */
    var(--blue-5);   /* medium blue */
    var(--purple-3); /* light purple */
                     /* etc */

The color palette is designed to meet the following criteria:

* To have close equivalents to the main colors used in the old color scheme,
  especially tag colors, so that changes to major colors are minimized.
* To produce a set of colors that can be used as as main text colors, as background
  colors, and as accent colors, both in light mode and dark mode.
* To ensure that colors at the same brightness level have the same perceived brightness.
  Green-4, blue-4, red-4, purple-4, etc should all have the same brightness and contrast
  ratios. This way colors look balanced. This is actually a difficult problem, because human
  color perception is non-linear, so you can't just scale brightness values linearly.

There's a color palette test page at https://danbooru.donmai/static/colors

Notable changes to colors in light mode:

* Username colors are the same as tag colors.
* Copyright tags are a deeper purple.
* Builders are a deeper purple (fixes #4626).
* Moderators are green.
* Gold users are orange.
* Parent borders are a darker green.
* Child borders are a darker orange.
* Unsaved notes have a thicker red border.
* Selected notes have a thicker blue (not green) border.
2021-02-22 02:32:49 -06:00
evazion
1e80540a04 css: refactor CSS to use Tailwind-style utility classes.
Refactor CSS to use standard Tailwind-style utility classes instead of
ad-hoc rules. This eliminates a lot of single-purpose rules for specific
UI elements and standardizes margins to be more consistent throughout
the site.

Utility classes are defined manually on an as-needed basis instead of
importing Tailwind as a whole. Naming conventions mostly follow
Tailwind's conventions, otherwise they follow Bootstrap.

* https://tailwindcss.com/docs/
* https://getbootstrap.com/docs/5.0/utilities/spacing/
2021-02-16 09:28:38 -06:00
evazion
32dd14f461 Remove /admin/dashboard page.
This page was just a combination of the forum listing and the bulk
update requests listing. It got zero hits in the last week.
2021-01-16 03:32:11 -06:00
evazion
ceeed1e692 pagination: refactor page limits.
Refactor page limits to a) be explicitly listed in the User class (not
hidden away in the Danbooru config) and b) explicitly depend on the
CurrentUser (not implicitly by way of Danbooru.config.max_numbered_pages).
2021-01-11 21:09:06 -06:00
evazion
96f08b78c5 /contact: update contact page with more contact methods. 2020-12-25 00:47:08 -06:00
evazion
c17678d509 routes: add a new 404 page.
* Fix a bug where non-GET 404 requests weren't handled.
* Fix a bug where non-HTML 404 requests weren't handled.
* Show a random image from a specified pool on the 404 page.
2020-12-24 00:17:35 -06:00
evazion
8221c8dcba users: inline search form on /users index page.
* Add the user search form to the /users page.
* Remove the /users/search page.
2020-12-21 22:42:50 -06:00
evazion
53653372ec notes: include search form on search results page.
Also eliminate /notes/search endpoint.
2020-12-18 01:59:39 -06:00
evazion
2e633f84f6 emails: add /emails index page.
Add emails index page at https://danbooru.donmai.us/emails. Mods can use
this page to view and search emails belonging to users below mod level.
2020-12-13 21:21:08 -06:00
evazion
adc1c2c2cc autocomplete: refactor javascript to use /autocomplete endpoint.
This refactors the autocomplete Javascript to use a single dedicated
/autocomplete.json endpoint instead of a bunch of separate endpoints.

This simplifies the autocomplete Javascript by making it so that instead
of calling a different endpoint for each type of query (for users, wiki
pages, pools, artists, etc), then having to parse the results of each
call to get the data we need, we can call a single endpoint that returns
exactly what we need.

This also means we don't have to parse searches clientside in order to
autocomplete metatags. Instead we can just pass the search term to the
server and let it parse the search, which is easy to do serverside.

Finally, this makes autocomplete easier to test, and it makes it easier
to add more sophisticated autocomplete behavior, since most of the logic
lives serverside.
2020-12-13 00:45:22 -06:00
evazion
3a3d456bd2 html: standardize font sizes and heading tags.
Standardize font sizes and heading tags (<h1>-<h6>) to be more
consistent across the site.

Changes:

* Introduce font size CSS variables and start replacing hardcoded font
  sizes with standard sizes.
* Change header tags to use only one <h1> per page. One <h1> per page is
  recommended for SEO purposes. Usually this is for the page title, like
  in forum threads or wiki pages.
* Standardize on <h2> for section headers in sidebars and <h3> for
  smaller subsection headers. Don't use <h4>-<h6>.
* In DText, make h1-h4 headers all the same size. Standard wiki style is
  to ignore h1-h3 and start at h4.
* In DText, make h4-h6 the same size as the h1-h3 tags outside of DText.
* In the tag list, change the <h1> and <h2> tag category headers to <h3>.
* Make usernames in comments and forum posts smaller. Also change the
  <h4> tag for the commenter name to <div class="author-name">.
* Make the tag list, paginator, and nav menu smaller on mobile.
* Change h1#app-name-header to a#app-name-header.
2020-07-23 17:34:17 -05:00
evazion
afef9cc9ab tests: fix tests. 2020-07-13 19:30:40 -05:00
evazion
42f0112c38 seo: increase sitemap coverage.
Rework sitemaps to provide more coverage of the site. We want every
important page on the site - including every post, tag, and wiki page -
to be indexed by Google. We do this by generating sitemaps and sitemap
indexes that contain links to every important page on the site.
2020-07-10 00:18:30 -05:00
evazion
e18c258be5 Rewrite Terms of Service (fix #4415). 2020-07-06 02:55:57 -05:00
evazion
b5fc8fff6e Add privacy policy (#4415). 2020-07-06 02:53:01 -05:00
evazion
9a03582513 Add OpenSearch suggestion support.
Add autocomplete support when searching Danbooru from the Chrome address
bar. If you type "danb<tab>" in the address bar then search for a tag,
then autocomplete results from Danbooru will appear as search
suggestions in Chrome.

Note that the "Autocomplete searches and URLs" Chrome setting must be
enabled for this to work.

Ref:

* http://dev.chromium.org/tab-to-search
* https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Supporting_search_suggestions_in_search_plugins
* https://github.com/dewitt/opensearch/blob/master/mediawiki/Specifications/OpenSearch/Extensions/Suggestions/1.1/Draft%201.wiki
2020-07-04 17:52:53 -05:00
evazion
aa1a21aece Add OpenSearch support (/opensearch.xml).
Add https://danbooru.donmai.us/opensearch.xml. This file tells browsers
how to perform searches on Danbooru.

In Chrome, this lets you type "danb<tab>" in the address bar to perform
a search on Danbooru.

In Firefox, you have to click the "..." icon next to the address bar,
then choose "Add Search Engine". After that, you can search Danbooru
from the address bar.

Ref:

* http://dev.chromium.org/tab-to-search
* https://developer.mozilla.org/en-US/docs/Web/OpenSearch
* https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md
* https://en.wikipedia.org/wiki/OpenSearch
2020-07-04 17:52:49 -05:00
evazion
101e8a13b8 /posts: fix blank tag sidebars.
Fix the sidebar on the /posts index page sometimes being blank. This
could happen when either the related tag calculation was too slow and
timed out, or when Reporbooru was unavailable and we couldn't fetch the
list of popular tags.

In the tag list would otherwise be blank, we fall back to frequent tags
(the most common tags on the current page of results).

Also change it so that if Reportbooru is unconfigured, we fail
gracefully by returning blank results instead of failing with an
exception. This is so we can still view the popular searches and missed
searches pages during testing (even though they'll be blank).
2020-06-16 12:58:41 -05:00
evazion
a4df18e650 Refactor Reportbooru API clients.
* Combine MissedSearchService, PostViewCountService, and
  PopularSearchService into single ReportbooruService class.
* Use Danbooru::Http for these services instead of HTTParty.
2020-06-14 00:32:42 -05:00
evazion
b6ed63841d footer: fix exception if git hash isn't defined.
The git hash may be undefined when running in a Docker container.
2020-06-08 18:12:32 -05:00
evazion
31c7abd2e9 footer: fix social icon links.
Image links were broken on pages like /artists/new because the links
were relative to the current page url, not to the root url.
2020-05-12 16:13:55 -05:00
evazion
26d6e23377 Fix #4425: Add Danbooru Discord server prominently
* Add Discord, Twitter, and Github links to site footer.
* Remove "Desktop mode" and "Keyboard shortcuts" links from footer.
  Users can use the desktop site option in their browser to switch
  between desktop and mobile mode.
* Remove git hash from footer. Users can hover over the Github logo to
  see the hash instead.
2020-05-08 17:14:22 -05:00
evazion
698f742046 keyboard shortcuts: document 'Z' key (fix #4390). 2020-04-17 00:35:47 -05:00
evazion
89a3c0b09d users: update explanation on account deactivation page.
* Refer to it as deactivating your account, not deleting your account.
* Update explanation to clarify what is and is not deleted.
* Warn that deactivation cannot be undone.
2020-03-24 18:00:06 -05:00
evazion
63f7311489 comments: allow new users to comment.
Remove the rule that users less than a week old can't leave comments.
2020-03-21 23:06:47 -05:00
evazion
79e7b9308e pundit: convert misc privilege checks in views to pundit. 2020-03-20 18:03:50 -05:00
evazion
92aeb8728f pundit: convert ip bans to pundit. 2020-03-20 18:03:01 -05:00
evazion
565a6572a7 pundit: convert user name change requests to pundit.
Fix discrepancy between index action and show action. The index
action allowed members to see name changes for undeleted users, but the
show action didn't.
2020-03-20 18:03:00 -05:00
evazion
9960290666 views: reduce font size of footer. 2020-03-06 19:56:53 -06:00
evazion
36f77942c3 views: hide git hash in footer on mobile.
Reduce clutter so footer fits on one line.
2020-03-06 19:56:44 -06:00
evazion
39ad0d2210 settings: rename "disable responsive mode" to "enable desktop mode"
Desktop mode is a better description. Most users don't know what responsive mode means.
2020-03-06 19:37:11 -06:00
evazion
475d6ae7cf modqueue: move url from /moderator/post/queue to /modqueue. 2020-02-29 17:46:58 -06:00
evazion
29ed12b238 admins: remove ability to manually process BURs.
Remove the ability for admins to manually submit BURs without going
through the forum.
2020-02-28 14:23:31 -06:00
evazion
e1fd3f6ed9 mods: remove ability to manually perform mass edits.
Remove the ability for mods to manually perform mass edits without going
through the forum.
2020-02-28 14:21:31 -06:00
evazion
463b1b734e Add curated posts page.
Add a curated posts page at /explore/posts/curated. Curated posts are
the most favorited posts by contributor-level users (users with
unlimited upload permissions).

Also add an order:curated tag using for use in regular searches.
2020-02-23 17:52:38 -06:00
evazion
a214989447 controllers: move /moderator/post/disapprovals to /post_disapprovals. 2020-02-15 07:10:45 -06:00
evazion
60ff2ae929 models: rename post/pool archives to post/pool versions. 2020-02-15 06:52:10 -06:00
evazion
6468df6d44 dmails: allow marking dmails as unread.
* Add ability to mark dmails as unread.
* Fix users.unread_dmail_count to not count deleted dmails.
* Fix show action so that API calls don't mark dmails as read.
* Don't show the unread dmail notice on the /dmails page itself.
* Stop using users.has_mail flag.
2020-02-01 15:49:33 -06:00
evazion
6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00
BrokenEagle
4cef0e45c2 Create the ability to send reports to moderators
- Limited to Builders+
-- Moderator+ can also use as they may be too busy ATM
- Only on users, comments, and forum posts
- Multiple reports can be generated per instance
- Primarily posts to a moderator-only topic for viewability
- Secondarily has a table for searchability
-- Viewable only by moderators
2020-01-18 06:40:20 +00:00
evazion
ec8c427ef3 reports/uploads: remove upload report page. 2020-01-13 12:58:20 -06:00
evazion
1ab6a353ca Remove /meta_searches/tags page.
This was a search page that let you search for tags, aliases, and
implications at the same time. It never got much use and it's been
broken for a while now (the search form passed the wrong param to the
controller).
2020-01-07 11:10:56 -06:00
evazion
82564355e6 Add better error page for database timeouts. 2019-12-16 13:38:06 -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
72f17fd1de Fix #3534: Remove Janitor Trials. 2019-11-17 02:10:24 -06:00