accelerated-mobile-page

How to display dynamic data in Accelerated Mobile Pages(AMP) from firebase

喜欢而已 提交于 2020-01-04 05:09:53
问题 I am using firebase backend database for the site (mostly have a 2 page to display content business page, product page) I try to create AMP page with PHP but it's not working. I have lots of business/product to display in APM (page structure is same for both content/data is different to display) How to do this? I try to search in google getting option to make dynamic AMP only using AMP list AMP List I am saving all the JSON file to my hosting, but how to call that JSON file for particular AMP

IFrame contents do not show up in an hidden div container

痞子三分冷 提交于 2019-12-23 03:29:26
问题 I have got some problems while displaying an Iframe content within hidden DIV-Container. As soon as the link gets clicked, the div container gets visible, that works so far, but the content within, which is an amp-iframe itself do not show up. Something is preventing the Iframe from loading the content. Here is some code extract: <a href="#" class="bsel" [text]="visible ? 'On' : 'Off'" on="tap:AMP.setState({visible: !visible})"> Click me </a> ...... <div id="showInfo" [class]="visible ? 'show

How to load external header and footer HTML in AMP-HTML pages

落爺英雄遲暮 提交于 2019-12-13 03:47:21
问题 I am converting an existing HTML to AMP-HTML. In older HTML I am loading footer and header which are in separate HTML files which are loaded by using jquery as mentioned in the below code. $("#divHeader").load('../header.html'); $("#divFooter").load('../footer.html'); These HTML have only static data. Is there any way to add these HTML in AMP pages? I cannot use amp-iframe because amp-iframe cannot be within first 75% of the viewport and has to be 600px away from the top as mentioned in this

AMP Html <a target=“_blank”> not working on iphone safari browser to go new window

会有一股神秘感。 提交于 2019-12-12 20:02:30
问题 Recently I am developing a progressive web app with Accelerated Mobile Pages (AMP). I have to add anchor link with target="_blank" so that a user click on that link will be redirected to a new window with anchor location. <a href="External_Url" rel="external" target="_blank">Click</a> It's working fine on Android browser but target="_blank" is totally not working on the iOS Safari browser. I know this can be solved with Javascript but here at AMP we can not use any Javascript due to

IFrame contents do not show up in an hidden div container

对着背影说爱祢 提交于 2019-12-06 16:03:01
I have got some problems while displaying an Iframe content within hidden DIV-Container. As soon as the link gets clicked, the div container gets visible, that works so far, but the content within, which is an amp-iframe itself do not show up. Something is preventing the Iframe from loading the content. Here is some code extract: <a href="#" class="bsel" [text]="visible ? 'On' : 'Off'" on="tap:AMP.setState({visible: !visible})"> Click me </a> ...... <div id="showInfo" [class]="visible ? 'show' : 'hide'" class="hide"> <amp-iframe width=600 height=500 scrolling=yes frameborder="1" layout=

Google requiring certain properties for certain types when adding Schema.org markup?

吃可爱长大的小学妹 提交于 2019-12-04 04:58:17
问题 I tried to add Schema.org markup on my site, with the type Article , then adding some properties on it, when checked on Google Structured Data Testing Tool, it said required certain properties, like dataPublished , author etc. I can add some properties to meet the requirement, but not all of them. Is this requirement real? I mean really required by the rule? Or just Google rule? I came across this page https://developers.google.com/search/docs/data-types/articles It said for non-AMP, those

Using Accelerated Mobile Pages with Bootstrap

不打扰是莪最后的温柔 提交于 2019-11-30 02:16:27
问题 I have a website that uses Bootstrap. Technically, I'm using Bootstrap 4 at the moment. I want to leverage Accelerated Mobile Pages (AMP) in the publicly-facing parts of my page. However, I have several errors that I can't seem to shake. This has me wondering, can I even use Bootstrap with an Accelerated Mobile Page? Am I even allowed to use JavaScript in Accelerated Mobile Pages? Bootstrap has JavaScript for the hamburger menu on mobile phones. Yet, when I run the validator, I see errors

AMP: easy way to toggle a CSS class?

爱⌒轻易说出口 提交于 2019-11-28 08:30:43
I'm build an Accelerated Mobile Page (AMP) template and was wondering if there is an easy way of toggling a CSS class on tab. I know about stuff like: <h2 class="headline" on="tap:list.toggleVisibility" > <ul id="list"></ul> But this writes inline-styles - I'd rather toggle a custom CSS class but couldn't find an example on the AMP page. AMP.setState with bindings like <h2 [class]="myclasses"> looked like the way to go but manipulating the state is pretty hard with the tools they give you ... This can be done via amp-bind . You can use an implicit state variable, e.g. visible , to track the