amp-html

Disqus on an amp page inside an amp-iframe

别等时光非礼了梦想. 提交于 2019-11-30 15:29:47
I try to implement Disqus on an amp document. My idea is to use an amp-iframe which loads a small document which only contains Disqus. I used this amp frame <amp-iframe width="300" height="300" layout="responsive" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-scripts" resizable frameborder="0" seamless src="/disquss/name-of-blog-post"> <div overflow tabindex=0 role=button aria-label="Read more">more!</div> </amp-iframe> However, chrome throws a content security policy violation: Refused to load the script ' https://a.disquscdn.com/next/embed/lounge.load

Can AMP be used as both mobile and desktop versions?

梦想的初衷 提交于 2019-11-30 13:04:29
I didn't find a straight answer on that anywhere as it clearly say in the name (AMP) itself too, that it's used for a static mobile web pages. I found out that amp tag is used on desktop version like for example ampproject.org has So it's unclear to me now whether the AMP can ( is benefitial to ) be used on desktop version as well? It is possible, your site is going to work well on both Desktop and Mobile devices, it's going to load properly and work really fast. BUT, keep in mind that AMP is more oriented toward mobile devices, all of the current libraries that you can use are definitely

Apply Google AMP (Accelerated Mobile Pages) to ASP.NET Core site

醉酒当歌 提交于 2019-11-30 09:08:44
问题 I'm trying to create an AMP page with ASPNET Core MVC. I haven't been able to find many documents if any. For ASPNET, it was suggested to use DisplayModes to create a Google AMP Display. However, ASPNet Core doesn't support DisplayModes and I'm trying to figure a way to work around it. Any suggestions would be greatly appreciated! @model Models.Article @{ Layout = null; } <!doctype html> <html amp> <head> <meta charset="utf-8"> <link rel="canonical" href="/article.cshtml"> <link rel="amphtml"

How can I test the CDN of Google's AMP Project?

落爺英雄遲暮 提交于 2019-11-30 05:34:43
Quoted from here: https://www.ampproject.org/docs/get_started/about-amp.html AMP is a way to build web pages for static content that render fast. AMP in action consists of three different parts: AMP HTML AMP JS AMP CDN AMP HTML is HTML with some restrictions for reliable performance and some extensions for building rich content beyond basic HTML. The AMP JS library ensures the fast rendering of AMP HTML pages. The AMP CDN (optionally) delivers the AMP HTML pages. Quoted from here: https://www.ampproject.org/how-it-works/ Google is offering a service that delivers AMP HTML documents given their

AMP form submitting with post

跟風遠走 提交于 2019-11-29 20:57:33
问题 I've a website for years with a few forms to login etc. Recently I made it all Google's AMP proof, but the forms stopped working. I'm searching for days now, but I can't find the right answer. First I included all the necessary scripts and code, just like on this page. After that, the first error came up: "Form submission failed:: Response must contain the AMP-Access-Control-Allow-Source-Origin header​​​". Then I added headers to the page. After that, the first error is gone, but the second

Can AMP be used as both mobile and desktop versions?

五迷三道 提交于 2019-11-29 18:36:09
问题 I didn't find a straight answer on that anywhere as it clearly say in the name (AMP) itself too, that it's used for a static mobile web pages. I found out that amp tag is used on desktop version like for example ampproject.org has So it's unclear to me now whether the AMP can ( is benefitial to ) be used on desktop version as well? 回答1: It is possible, your site is going to work well on both Desktop and Mobile devices, it's going to load properly and work really fast. BUT, keep in mind that

How to create a responsive hamburger menu in AMP HTML

不羁岁月 提交于 2019-11-29 12:04:18
问题 I'm trying to create an AMP HTML website (see https://www.ampproject.org) But i can't find anywhere how you are supposed to create a responsive hamburger menu ? Javascript is not allowed and there are no AMP Components available for it ? 回答1: AMP now has support for menu using the amp-sidebar component. 回答2: I have accomplished this with the use of a :target pseudoclass. HTML <nav id="slide-in-menu"> ...nav menu content... </nav> <section class="content-section"> <a href="#slide-in-menu"

AMP-html page not displaying as intended in Google Search

给你一囗甜甜゛ 提交于 2019-11-29 11:56:33
I have been reading through the possibilities of AMP, but I cannot seem to grasp why my page is not showing like Google shows it in their demo (see http://g.co/amp ). My regular page is this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>An example of an AMP Project; a part of a self-writen paper about maintainability</title> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <meta name="language" content="NL"/> <meta name="description" content="Every software engineering project has a certain degree of maintainability. Period."> <meta name="viewport" content

How can I test the CDN of Google's AMP Project?

偶尔善良 提交于 2019-11-29 03:37:13
问题 Quoted from here: https://www.ampproject.org/docs/get_started/about-amp.html AMP is a way to build web pages for static content that render fast. AMP in action consists of three different parts: AMP HTML AMP JS AMP CDN AMP HTML is HTML with some restrictions for reliable performance and some extensions for building rich content beyond basic HTML. The AMP JS library ensures the fast rendering of AMP HTML pages. The AMP CDN (optionally) delivers the AMP HTML pages. Quoted from here: https://www

AMP Form submission redirect or response

女生的网名这么多〃 提交于 2019-11-29 02:36:29
Good morning, I have a form on a test AMP page (is AMP validate) and the form works: I receive the email with result (I use a php to handle it). I don't know (I did some try but I think I still missing an example) the syntax for let the AMP page responce correctly (now I get "Subscription failed!" but I do get the email) or redirect after submission. Here my example: AMP page with form (I receive form result after submission but I don't know how to redirect or get "Subscription successful!" message) Non AMP page with form (I receive form result and it redirect correctly) action-xhr file