Commit Graph

29 Commits

Author SHA1 Message Date
evazion
a8577b2b94 posts: remove data-* attributes from #image element.
These attributes can be found on the `.image-container` element instead.
2020-07-31 15:16:01 -05:00
evazion
da9c2a26ce Merge branch 'master' into mobile-mode-default-image-size 2020-07-23 16:22:37 -05:00
evazion
df32e0da72 seo: remove obsolete itemprop microdata attributes.
Remove obsolete itemprop attributes. These were originally added in
2dd4b4c, but they haven't been working since e334c34 removed the
itemscope and itemtype attributes. They never worked right because they
weren't nested properly, and they were never really useful because
Google doesn't use the ImageObject schema for anything.

* https://developers.google.com/search/docs/guides/intro-structured-data
* https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
* https://schema.org/docs/gs.html
* https://schema.org/ImageObject
2020-07-08 14:59:35 -05:00
BrokenEagle
131e526a15 Show large image size by default on mobile devices 2020-06-13 04:07:15 +00:00
evazion
87a51129b8 posts: add back "resize to window" link.
* Add back "Resize to window" link.
* Add Z shortcut for resize to window link (mnemonic: Z for zoom image).
* Resize images to screen width by default on both desktop and mobile.
* Make it so that notes are nested directly inside the .image-container
  element with the image, instead of inside a separate .note-container
  element. This means .image-container and .note-container are now the
  same element. This is so that the size of the .note-container is
  driven by the size of the image, which ensures that notes are
  automatically resized as the image is resized.
2020-03-26 21:55:59 -05:00
evazion
a5418abb31 pundit: convert posts to pundit. 2020-03-20 18:03:01 -05:00
evazion
59b277ead1 users: drop id_to_name, name_to_id caching.
Changes:

* Drop Users.id_to_name.
* Don't cache Users.name_to_id.
* Replace calls to name_to_id with find_by_name when possible.
* Don't autodefine creator_name in belongs_to_creator.
* Don't autodefine updater_name in belongs_to_updater.
* Instead manually define creator_name / updater_name only on models that need
  to return these fields in the api.

id_to_name was cached to reduce the impact of N+1 query patterns in
certain places, especially in api responses that return creator_name /
updater_name fields. But it still meant we were doing N calls to
memcache. Using `includes` to prefetch users avoids this N+1 pattern.

name_to_id had no need be cached, it was never used in any performance-
sensitive contexts.

Avoiding caching also avoids the need to keep these caches consistent.
2019-08-18 11:24:42 -05:00
r888888888
bb228d5735 add favorite action underneath image 2017-09-05 14:41:33 -07:00
r888888888
e1c7fbc373 Revert "move post desc to header at top"
This reverts commit 0ab51f3a83.
2016-05-31 11:15:44 -07:00
r888888888
0ab51f3a83 move post desc to header at top 2016-05-28 14:14:32 -07:00
r888888888
8862c486bb update dtext gem, include more contextual tags on images 2016-03-24 17:26:20 -07:00
r888888888
c400a20b64 remove title from images 2016-03-15 11:06:21 -07:00
r888888888
fd8340dec4 include tags in image alt/title for seo 2016-03-10 15:04:00 -08:00
r888888888
2dd4b4cbff add schema.org metatags 2016-02-09 14:02:47 -08:00
Toks
71cd5ce783 fixes #2114 2014-05-29 22:55:35 -04:00
r888888888
22bd07072a #1849: filter images for safebooru 2013-07-18 17:27:00 -07:00
Toks
f890dbf109 fixes #1462 2013-05-17 18:28:46 -04:00
Toks
ed66f71fad fixes #1408; fix blacklist for uploaders 2013-04-23 18:57:16 -04:00
r888888888
7a747e9ac0 fixes #1371, additional fixes to seed script 2013-04-19 15:21:43 -07:00
albert
ccc725a631 layout changes 2013-02-23 20:48:35 -05:00
albert
64efef4ecf rearrange layout, fix tag blacklist js 2013-02-23 20:45:33 -05:00
albert
3cbcd1e6b9 tweaks 2012-04-18 12:20:49 -04:00
albert
1ef7ef49a5 added share links, moved image resize back to notice banner style 2012-03-30 14:28:46 -04:00
albert
7269ec0076 removed small image support 2012-03-13 18:28:32 -04:00
albert
189ad7052d fixed image resizing 2011-09-11 20:25:13 -04:00
albert
9e287726e3 work 2011-05-29 03:47:06 -04:00
albert
f051e04550 sync 2010-10-08 18:42:26 -04:00
albert
5610731b35 sync 2010-08-18 18:42:33 -04:00
albert
23656e3fa9 * Continued work on improving post view templates
* Added statistics-based estimator for related tag calculator
* Fleshed out IpBan class based on changes to Danbooru 1.xx
2010-04-29 17:32:15 -04:00