Commit Graph

17 Commits

Author SHA1 Message Date
evazion
f1b5c34b4d posts: show length of videos and animations in thumbnails.
Show the length of videos and animated posts in the thumbnail. The
length is shown the top left corner in MM:SS format. This replaces the
play button icon.

Show a speaker icon instead of a music note icon for posts with sound.

Doing this requires doing `.includes(:media_asset)` in a bunch of
places to avoid N+1 queries when we access the post's duration.
2021-10-25 02:56:55 -05: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
1b30b71a07 posts: refactor post previews to use ViewComponent.
Refactor the post preview html to use the ViewComponent framework. This
lets us encapsulate all the HTML, CSS, and helper methods for a UI
component in a single place.

See https://viewcomponent.org.
2021-01-14 21:17:57 -06:00
evazion
72e56d8856 PostPresenter.preview: standardize on show_deleted: true.
Standardize on using `show_deleted: true` instead of `tags: "status:any"`
when rendering thumbnails and we want to show deleted thumbnails.

Also fixes it so that deleted thumbnails are shown when reordering pools
and favorite groups.
2020-02-18 19:22:57 -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
c86c61c9a4 Fix #4162: Remove browser autocomplete from most inputs. 2020-01-10 16:08:34 -06:00
evazion
e147a34664 pool orders: disable drag-and-drop ordering for pools with >100 posts.
Previously if a pool had >100 posts then the 'Order' link wouldn't
appear in the navbar, but it was still possible to visit the pool order
page directly. If a user did so, only the first 100 posts in the pool
would be shown in the drag-and-drop widget. If they tried to reorder the
pool anyway, then everything beyond the first 100 posts would be
silently removed from the pool.

Now we always show the 'Order' link, but we disable the drag-and-drop
reordering widget when the pool has >100 posts to prevent posts from
being silently removed.
2019-08-25 21:28:32 -05:00
evazion
edc0c9df32 Fix exception in /pools/:id/order/edit. 2019-08-25 21:06:16 -05:00
evazion
115ed16a96 pools: store post_ids as array instead of string (fix #3979) 2018-11-08 15:09:31 -06:00
evazion
ed7b80c016 /{pools,favgroups}/:id/order/edit: add blacklist controls. 2017-07-11 21:18:00 -05:00
evazion
12dd0f3a48 Pool/favgroup orders: include post id in hidden post placeholder.
This is so hidden posts are distinguishable from one another.
2016-11-20 06:21:51 +00:00
evazion
f073e14574 Don't display hidden posts on pool/favgroups order pages (fix #2762). 2016-11-20 06:06:29 +00:00
Toks
91f8fddb18 fixes #1177 and more pretty pool name cases 2013-04-04 12:34:26 -04:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00
albert
24bf21540a refactoring views 2011-08-16 18:47:01 -04:00
albert
d6e4283cc7 refactoring 2011-06-12 16:41:23 -04:00