Commit Graph

31 Commits

Author SHA1 Message Date
Sodbileg Gansukh
cf30adacce
Added navbar options (#906) 2022-11-11 11:30:32 +08:00
Sodbileg Gansukh
d652252699 Remove gallery card related CSS and JS 2021-11-17 17:02:16 +08:00
Paul Davis
b927cf62ed
Adjust infinite scroll selector to target article.post-card (#763)
The tag archive header shares the same classes as post cards, but have different elements.

This changes the selector to target article.post-card, which ignores header.post-card
2021-03-11 13:32:57 -05:00
John O'Nolan
f590fb029a Tag archive 2021-03-04 18:31:29 -05:00
Kevin Ansfield
307c334cd5
🐛 Fixed images on infinite scroll index pages being stretched in Safari (#636)
closes #634, closes #635

- use `document.importNode` to create a clone of post card elements when pulling them in from infinite scroll pages
- cloning the element means the element's owner document matches the viewed document and ensures images in the inserted post card elements are sized according to the viewed document
2019-10-24 17:15:34 +01:00
Kevin Ansfield
ff51925567
Fixed sticky title and author hover JS (#629)
no issue

- replaces author hover JS that was lost during merge
- replaces `floating-header.js` with `sticky-nav-title.js` containing the relevant JS that was lost during merge with a cleanup for unused variables and unnecessary event listeners
- removes reference to non-existent `{{> floating-header}}` partial
2019-10-21 10:02:05 +01:00
Kevin Ansfield
978ffe0eb6
Concatenated all JS into a single file (#624)
no issue

- moved large inline JS from templates into separate JS files
  - floating header
  - gallery card support
- use `gulp-concat` to concatenate all JS files into a single `built/casper.js` file
- reduces external JS file requests from 3 (jquery, infinite-scroll.js, jquery.fitvids.js) down to 2 (jquery, casper.js) and reduces page size by removing repeated inline code
2019-10-20 15:55:06 +02:00
汪磊
3c2347c7f9 🎨 Optimised infinite scroll (#503)
no issue
- removed jQuery usage
- use the `<link rel="next">` tag provided by Ghost to determine the next page to fetch
2018-12-05 12:38:11 +00:00
Aileen Nowak
d5002f2c51 🐛 Fixed infinitescroll when a paged url is loaded directly (#447)
closes #445
- added an fn to sanitize the pathname, that might include a pagination url
- fixed an issue, where the request would still be made if the current page is bigger than max pages
- added comments
2018-04-10 10:04:43 +01:00
Kevin Ansfield
41bcbb7157 💨 Infinite scroll perf improvements
no issue
- swap jQuery HTML parsing and insertion for pure DOM
- remove fade animation
- increase buffer by 100px so next page request happens sooner
2018-04-09 11:03:48 +01:00
John O'Nolan
f08f07fd7e Fixed Firefox responsive video bug
Closes https://github.com/TryGhost/Casper/issues/330

As usual Firefox is the bane of fucking everything and despite IE7 calling multiple times wanting its rendering back, here we are. Responsive video embeds insider a flexbox element do not work in Firefox and require an additional (very specific) wrapping div. I've adjusted the Fitvids.js script here to include that div in its injection along with the requisite styles. It's a horrible hack. Spent 2 hours trying to find another way but I cant.
2017-07-31 19:38:16 +04:00
Aileen Nowak
8690450eae 🎣 Infinite scroll: no API request on last page
no issue

Brings back a little safety guard: when the current page is also the last page, don't make an API request to the server.
2017-07-11 12:32:58 +07:00
Kevin Ansfield
0f9410fb3d 💄 refactor infinite scroll (#325)
closes #321, closes #323
- use `requestAnimationFrame` and related techniques to minimise scroll processing
- add an `isLoading` guard to ensure we don't try to process anything until the next page has been loaded+inserted
- check for a 404 as an indication we've loaded as many pages as possible at which point the scroll behaviour is removed
- sanitize `window.location.pathname` to remove hash params and any double-slashes that may result
- add a 100px buffer from the bottom of the screen so that it's not necessary to exactly hit the bottom before infinite loading is triggered
2017-07-10 19:53:42 +07:00
汪磊
d3a9af0666 Remove infinitescroll in single page (#319)
* Remove infinitescroll in single page

* Update infinitescroll.js
2017-06-27 18:03:51 +07:00
Aileen Nowak
0914d43a86 💄 Infinite scroll (#316)
* 💄  Infinite scroll

closes #314

Adds infinite scroll logic to Casper 2.0

* use jquery min and not slim
2017-06-21 13:10:09 +01:00
John O'Nolan
bc9e5a0b2e Second pass 2.0 2017-05-31 19:09:50 +01:00
John O'Nolan
eda0ec4db2 First pass 2.0 design 2017-05-15 21:03:47 +01:00
John O'Nolan
7af816a48e Merge pull request #172 from mankittens/master
Improvement to .post-content .full-img
2015-03-02 09:32:12 +02:00
Matthew Guy
a5dcaf6cd5 Removed references to .full-img, debounce, and smartresize, and replaced with pure CSS
issue #172
New code will center all post images and allow them to extend beyond the main text column. No JavaScript or special classes required.
2015-03-02 02:21:19 -05:00
Paul Adam Davis
46dc55769e Navigation 2015-02-27 19:33:27 +00:00
jeremija
a149b03a2f Fixes variable image width bug
closes #95
 - added onload event listeners to images
2014-09-15 21:51:59 +02:00
Jilles Soeters
2cf5c0cb87 Optimize index.js and add style consistency
Declared all jQuery objects once where needed instead of diving into the DOM multiple times for the same object.

Added style consistency between variable declarations, if/else statements and functions.
2014-09-07 23:34:40 +02:00
John O'Nolan
00eca81a1e Bouncy ball of love 2014-07-22 13:21:33 +02:00
Fabian Becker
53b33f2d4a Update jquery.fitvids.js to 1.1
fixes #80
2014-03-01 03:51:08 +01:00
John O'Nolan
0efa582d77 Better responsive images
Closes #76
2014-01-31 14:35:24 +07:00
John O'Nolan
4616c5bd1d Responsive videos by default u guyz 2013-10-31 18:35:57 +01:00
John O'Nolan
49e774889c Full refactor 2013-09-02 22:59:52 +01:00
John O'Nolan
85b74ea393 Next pass on Casper refactor
* New Helpers
* Updated Helpers
* New reponsive header styles
* New global blog icon
* Responsive styles adjustments
2013-09-02 22:59:51 +01:00
John O'Nolan
701746c102 Move home header image to inline img / refactor headings 2013-09-02 22:59:51 +01:00
John O'Nolan
d6fec8d50f First pass at new Casper homepage 2013-09-02 22:59:50 +01:00
John O'Nolan
820b222f8e Changed theme structure. Moved all assets into /assets/ 2013-09-02 22:56:52 +01:00