Commit Graph

29 Commits

Author SHA1 Message Date
evazion
07e23204b6 rubocop: fix various Rubocop warnings. 2021-06-17 04:17:53 -05: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
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
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
b5fc8fff6e Add privacy policy (#4415). 2020-07-06 02:53:01 -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
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
34c3df78d9 /sitemap.xml: exclude posts that aren't visible. 2020-01-12 23:01:37 -06:00
evazion
12a845de92 explore/posts/popular: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
9cf5b1f01c dtext: add dtext cheatsheet popup. 2019-11-10 14:48:17 -06:00
evazion
90fa67d4c1 Remove unused terms of service banner.
No longer used, inadvertently hidden in a6233f297e.
2019-08-14 01:46:44 -05:00
Albert Yi
f4be87d4b7 include 200 posts in sitemap 2018-10-16 15:29:41 -07:00
Albert Yi
af73084515 scope sitemap results to yesterday 2018-10-16 15:28:51 -07:00
Albert Yi
6ca9b65716 add dynamic sitemap.xml 2018-10-11 10:13:54 -07:00
Albert Yi
eddc789df2 fix js bugs 2018-04-26 15:01:57 -07:00
r888888888
a95af95eae move desktop mode to user pref 2017-12-15 13:52:25 -08:00
r888888888
ba1399abef desktop mode redirects back to original page 2017-04-24 15:54:04 -07:00
r888888888
929d6e7ec5 add glob patten for missing routes 2016-08-30 14:42:01 -07:00
Toks
51a7e36509 fix tests 2013-06-30 11:37:15 -04:00
Toks
513122c480 restrict ToS url redirect to local urls; see #1813 2013-06-30 11:17:19 -04:00
albert
c5bf7b6c47 fixes #1241 2013-04-09 18:15:04 -04:00
albert
17f036b103 fixes #984 2013-03-20 00:17:05 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
ae6e8fce30 unified error handling system 2013-02-22 14:45:39 -05:00
albert
1506fe88cd fix pool version link 2013-02-04 18:34:25 -08:00
albert
7bca79e71a fixesg 2013-01-14 11:23:43 -05:00
albert
e670412731 fixes #185 2011-12-29 17:34:46 -05:00
albert
158810d9f0 fixed comment test 2011-05-16 09:27:06 -04:00
albert
c6304c6e08 views 2010-11-19 16:24:17 -05:00