Commit Graph

54 Commits

Author SHA1 Message Date
NamelessContributor
c762e3ddbc Add data-is-deprecated attribute to tags
Allows using custom CSS to highlight deprecated tags, fixes #5110
2022-05-10 17:17:15 +02:00
evazion
2e6f480d07 pools: fix pool gallery page layout.
Fix the /pools/gallery page layout being broken by 8841de68a.

This required refactoring the PostGalleryComponent to take a set of
PostPreviewComponents instead of a set of Posts.

The upshot is that it's technically possible to have adjustable
thumbnail sizes on the pool gallery page now (although this is not yet
exposed in the UI).
2021-12-05 02:52:07 -06:00
evazion
74e28e14b8 posts: factor out post gallery component.
Factor out thumbnail galleries into a PostGallery component.

This changes the html structure so that post galleries on all pages are
always wrapped in a `.posts-container` class. This fixes an issue with
thumbnails on the pool show page not being aligned correctly on mobile,
like they are on the post index page. This also affected thumbnail
galleries on other pages, like wiki pages and user profiles.
2021-12-02 22:18:00 -06:00
evazion
27e62de316 css: fix paginator position on most viewed posts page, top searches page.
Fix the paginator not being centered on the /explore/posts/viewed and
/explore/posts/searches pages.
2021-03-08 01:30:02 -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
7e8f859b24 tags: eliminate Tag.category_for method.
Tag.category_for looked up a tag's category in the Redis cache. This was
only used in a few places (in related tags, and on the popular/missed
search pages). Get rid of this method so we can work towards getting rid
of caching tag categories in Redis.
2020-12-27 21:03:26 -06:00
evazion
7a1efc2744 Fix #4522: Sidebar doesn't show most searched tags at certain times of day.
Revert back to previous workaround of fetching previous day if current
day returns no result. A terrible hack, really we should convert dates
to Reportbooru's timezone, but that has other complications.
2020-06-19 14:00:50 -05:00
evazion
a572a6614d popular/missed searches: fix blank views.
Fix missing call to `.each`.
2020-06-16 13:09:05 -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
01e9020b6a popular posts: add pagination. 2020-02-23 17:52:38 -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
e8590afa6d popular posts: fix date range handling.
* Fix the next button for the weekly timescale to jump to the next week,
  not the next day.
* Show the start and end dates for the weekly timescale.
* Use `Time.zone.today` instead of `Date.today` to respect the user's
  timezone setting.
2020-02-23 17:26:08 -06:00
evazion
7e67d3dd9c views: replace .category-N css classes with .tag-type-N
* Replace the .category-N CSS classes on tags with .tag-type-N. Before
  we were inconsistent about whether tag colors were indicated with
  .category-N or .tag-type-N. Now it's always .tag-type-N.

* Fix various places to not use Tag.category_for. Tag.category_for does
  one Redis call per tag lookup, which leads to N Redis calls on many
  pages. This was inefficient because usually we either already had the
  tags from the database, or we could fetch them easily.
2020-02-16 04:35:37 -06:00
evazion
815703a922 views: adjust more <meta> descriptions.
* Add <meta> descriptions to more pages.
* Adjust wiki/pool/forum pages to use an excerpt of the first paragraph.
2020-01-26 19:16:38 -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
evazion
b3eeb170cb explore/posts/intro: remove page.
This was an alternate frontpage that contained a list of previews of the
most popular tags. This page was never linked from anywhere and it was
unknown by most users.
2020-01-12 23:01:04 -06:00
evazion
12a845de92 explore/posts/popular: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
74ce866890 explore/posts/viewed: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
d9f154094f css: switch mod dashboard, keyboard shortcuts pages to flexbox.
* Switch /static/keyboard_shortcuts from float-based layout to flexbox.
* Switch /moderator/dashboard from float-based layout to flexbox.
* Remove various .clearfix, `clear: both` rules.
* Remove dead .quick-mod rule.
2019-10-02 01:52:24 -05:00
BrokenEagle
31d3215dad Fix page controller and action IDs
- Also fix affected CSS and JS files
2017-12-28 10:20:12 -08:00
r888888888
36948bbf33 move explore links to sidebar, fix popular searches action 2017-11-13 11:14:09 -08:00
r888888888
8b1fca4662 add most viewed posts page 2017-11-10 16:21:01 -08:00
r888888888
8458c62e8a eliminate month scale for popular searches (takes up too much space in redis) 2017-11-10 15:40:10 -08:00
r888888888
4fb55657c0 refactor cropped images into explore/posts/intro 2017-09-12 13:03:59 -07:00
evazion
6699e9d66f Fix autocomplete on intro page (fix #3109). 2017-06-04 08:43:51 -05:00
evazion
223e600eb0 /explore/posts/{popular,searches,missed_searches}: fix page wrapper ids. 2017-05-21 10:26:03 -05:00
Albert Yi
e67dec5581 indicate on missing searches report whether a wiki page exists 2016-12-29 16:59:08 -08:00
r888888888
ccf95957f9 remove week scaling for popular searches 2016-08-22 15:15:08 -07:00
r888888888
1806494014 remove year from popular search report 2016-02-16 16:37:12 -08:00
r888888888
1047d1fd2b add more meta descriptions to more pages 2016-02-09 14:25:23 -08:00
r888888888
fe4cb7f3ba track searches that return no results 2016-02-02 16:25:14 -08:00
r888888888
7e14aeb8b2 fix searches colorization 2015-11-10 11:34:18 -08:00
r888888888
6bbc957cdb colorize tags in popular searches 2015-10-28 13:59:34 -07:00
r888888888
c2f487067e include monthly view on popular search explorer 2015-10-20 19:09:09 -07:00
r888888888
26280368f7 change intro explorer to use popular searches 2015-08-11 12:21:16 -07:00
r888888888
f87c71cf23 remove post view counts, add search counts 2015-07-27 17:27:40 -07:00
r888888888
cc6da3ff89 fixes #2454: Add a new popular posts page for view counts 2015-07-24 15:56:41 -07:00
Toks
1fffc2977f fixes #2121 2014-10-31 20:24:38 -04:00
r888888888
a4911e3f65 * Refactor user settings page
* Change default route to posts#index
* Add footer to intro page
* Change promotion report to exclude deleted posts
2013-07-09 17:47:29 -07:00
r888888888
89695f1e18 cache intro page 2013-07-05 19:40:11 -07:00
r888888888
b21a0329ec style intro page 2013-07-03 13:10:23 -07:00
r888888888
77843119aa fix tag test 2013-06-30 22:53:29 -07:00
Toks
4e31d8f043 colorize tags in intro page 2013-06-28 10:04:17 -04:00
r888888888
1566e260bd improvements to intro page 2013-06-24 15:43:30 -07:00
r888888888
3bc4c886c3 tweak styles for intro page 2013-06-24 15:32:17 -07:00
r888888888
90e90e8be2 new action for intro page for new users 2013-06-24 15:09:00 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
27926df522 fixes #805 2013-03-09 20:48:37 -05:00
albert
bbc8797a10 implement blacklists for popular 2013-03-09 20:25:06 -05:00
albert
38e1ed3369 fixes #736 2013-03-09 20:14:53 -05:00