Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Galleries as JSON+JS for all themes #1765

Closed
wants to merge 21 commits into from

Conversation

Projects
None yet
3 participants
@ralsina
Copy link
Member

commented May 28, 2015

Working on #1764 and #1623

Review on Reviewable

@ralsina ralsina changed the title [WIP] Refactor galleries again [WIP] Implement Galleries as JSON+JS for all themes May 29, 2015

@ralsina ralsina referenced this pull request May 29, 2015

Closed

Make galleries (and maybe slides?) work with base theme #1764

2 of 3 tasks complete

@ralsina ralsina changed the title [WIP] Implement Galleries as JSON+JS for all themes Implement Galleries as JSON+JS for all themes May 29, 2015

@ralsina

This comment has been minimized.

Copy link
Member Author

commented May 29, 2015

@Aeyoun this adds JS galleries to base... is that ok with you? Base is your baby :-)

The main goal is to let all the other themes just inherit gallery.tmpl and not have to tweak it.
For example, consider how it looks here https://themes.getnikola.com/v7/lanyon/galleries/demo/index.html ... with these changes it "Just Works".

<meta name="viewport" content="width=device-width">
<title>My Nikola Site | My Nikola Site</title>

<link href="assets/css/rst.css" rel="stylesheet" type="text/css">

This comment has been minimized.

Copy link
@da2x

da2x May 29, 2015

Contributor

Type is not needed for text/css.

This comment has been minimized.

Copy link
@ralsina

ralsina May 29, 2015

Author Member

I thought some validator or other complained if it was not there?

This comment has been minimized.

Copy link
@ralsina

ralsina May 29, 2015

Author Member

In any case, I have no idea why this file is in this diff. It's exactly the same in master :-(

ralsina added some commits Jun 2, 2015

@Kwpolska

This comment has been minimized.

Copy link
Member

commented Jun 5, 2015

  1. The way you load jQuery and flowr is hacky, and will not make USE_CDN=False users happy; it would be easier to just put the JS in the usual place for all pages (besides, I already sneaked some JS into base when no-one looked)
  2. The galleries are now completely inaccessible to people with JavaScript disabled; previous versions had graceful fallback with the images still visible (just add the <noscript> bit back in)
  3. Why does base have its own render function? Why are there no such functions in bootstrap and bootstrap3? What would happen if you did not put the function there?
@ralsina

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2015

@Kwpolska

  1. You mean putting jquery in base and using USE_CDN to load one or the other? Done
  2. I don't much mind that usecase. Sure I can add it, but the web in general is inaccessible with JS disabled. In this specific case, sure, why not. Done
  3. Because base didn't have it before, bootstrap* did: https://github.com/getnikola/nikola/blob/refactor-galleries-gain/nikola/data/themes/bootstrap/templates/gallery.tmpl#L49

ralsina added some commits Jun 9, 2015

wat

@Kwpolska Kwpolska force-pushed the master branch from d4befbe to 8a69e98 Jun 17, 2015

@ralsina

This comment has been minimized.

Copy link
Member Author

commented May 14, 2017

I will take another shot at this, but this bitrot way too much.

@ralsina ralsina closed this May 14, 2017

@Kwpolska Kwpolska deleted the refactor-galleries-gain branch May 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.