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

AMP support: show static image #143

Open
paulschreiber opened this issue Nov 10, 2018 · 2 comments
Open

AMP support: show static image #143

paulschreiber opened this issue Nov 10, 2018 · 2 comments

Comments

@paulschreiber
Copy link
Contributor

On AMP pages, show a static image for chessboard images:

if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
  // render static image
} else {
 // rendering chessboard as usual
}
@yo35
Copy link
Owner

yo35 commented Jan 1, 2019

Hi,

What do you mean by "a static image"? A PNG image held on the server-side, maybe to have it served from a CDN? This would require to generate the chessboard images on the server-side, thus refactor all the FEN parsing and board generation code, which is currently executed on the client-side.

I'm reluctant to implement two (or even more) different rendering processes for the chessboard, because of the additional maintenance and testing effort would not be sustainable.

@paulschreiber
Copy link
Contributor Author

Yes, something would have to be generated on the server side.

You could use or create a third-party service that transforms chess boards to PNGs, like this one for math: https://s0.wp.com/latex.php?latex=i%5Chbar%5Cfrac%7B%5Cpartial%7D%7B%5Cpartial+t%7D%5Cleft%7C%5CPsi%28t%29%5Cright%3E%3DH%5Cleft%7C%5CPsi%28t%29%5Cright%3E&bg=ffffff&fg=000&s=0&zoom=4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants