Commit Graph

33 Commits

Author SHA1 Message Date
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
c1805cc4e0 views: factor out paginator component.
* Refactor the paginator into a ViewComponent.
* Fix inconsistent spacing between paginator items.
* Fix a bug where the sequential paginator generated the wrong next /
  previous page links in the <link rel="{next|prev}"> tags in the <head>.
* Always include the final page as a hidden html element, so that it can
  be unhidden with custom CSS.
* Make it easier to change the pagination window.
2021-02-18 02:47:21 -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
27cac98516 posts: eliminate pool_id, favgroup_id url params.
Replace the `pool_id` and `favgroup_id` url params:

    https://danbooru.donmai.us/posts/123?pool_id=456
    https://danbooru.donmai.us/posts/123?favgroup_id=456

with the `q` param:

    https://danbooru.donmai.us/posts/123?q=pool:456
    https://danbooru.donmai.us/posts/123?q=favgroup:456
2021-01-29 23:01:44 -06:00
evazion
8299c969fb Fix #2061: <Link> elements for pools.
Add <link rel="prev"> and <link rel="next"> tags to the forum topic show
page, the pool show page, and the favgroup show page.

This is kind of useless now since Google hasn't used these tags for SEO
for years ([1]), and userscripts can use `#paginator-next` and
`#paginator-prev` to find the next/prev pages, but whatever.

[1]: https://yoast.com/google-doesnt-use-rel-prev-next-for-pagination
2020-04-30 19:57:06 -05:00
evazion
182e68cfe0 Fix #4423: Series pools should display deleted posts too by default. 2020-04-27 13:22:01 -05:00
evazion
f34f740c54 Fix #4338: meta description of pools lists "pages" instead of "posts" 2020-03-18 03:38:12 -05: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
083ce75c10 pools/gallery: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
4f024d2360 pools/show: fix N+1 query on pool show page.
Fix a N+1 query when fetching posts to render thumbnails. Also adds
support for the `limit` url param on the posts show page.
2019-08-09 00:05:50 -05:00
evazion
7cb7c2fbab Remove ruby DText implementation (#3206). 2017-07-19 16:48:42 -05:00
Albert Yi
87bcc07fae enable ragel parser for remaining dtext endpoints 2017-01-10 15:12:37 -08:00
r888888888
1047d1fd2b add more meta descriptions to more pages 2016-02-09 14:25:23 -08:00
Toks
1fffc2977f fixes #2121 2014-10-31 20:24:38 -04:00
Toks
ed6b08e65b Make large wiki/artist/pool title link to tag search 2014-10-13 17:44:40 -04:00
Toks
0544759dec fixes #1696 2013-05-30 19:05:51 -04:00
Toks
26d95f072f style pool and wiki page titles by their category
fixes #1690 and #1521
2013-05-30 15:13:53 -04:00
Toks
1fe8b59c7a fixes #1632 2013-05-19 19:20:03 -04:00
albert
0495d5c338 fixes #874 2013-03-19 22:48:13 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
a1945948fb fixes #909 2013-03-17 21:28:55 -04:00
albert
6927d07bc2 indicate when pools are deleted 2013-02-23 16:07:06 -05:00
albert
e7aff87c65 fix for pool selection 2013-02-19 13:30:55 -05:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00
albert
c8afd34d15 added ip addr search 2011-07-29 18:04:50 -04:00
albert
a16dfdf0dd fixes 2011-07-09 03:32:18 -04:00
albert
085995126c changes 2011-07-03 19:12:31 -04:00
albert
d6e4283cc7 refactoring 2011-06-12 16:41:23 -04:00
albert
e431452a11 improved pool simple edit interface 2011-03-03 18:26:50 -05:00
albert
6d0157265c pool views 2011-02-25 17:41:00 -05:00
albert
cd451109e8 stubbed in pool controller test 2011-01-20 18:30:36 -05:00