Skip to content

Commit

Permalink
Refactor swg example using amp-access-iframe (#28320)
Browse files Browse the repository at this point in the history
  • Loading branch information
qidonna committed May 12, 2020
1 parent b65705a commit e0498eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
Expand Up @@ -28,7 +28,7 @@
"services": [
{
"type": "iframe",
"iframeSrc": "//localhost:8000/examples/amp-subscriptions-iframe.provider.html",
"iframeSrc": "//localhost:8000/examples/amp-subscriptions-google/amp-subscriptions-iframe.provider.html",
"iframeVars": [
"READER_ID",
"CANONICAL_URL",
Expand Down Expand Up @@ -167,6 +167,15 @@
padding: 16px;
background: #ffc;
}

amp-subscriptions-dialog {
text-align: center;
padding: 5px;
}

#subscribebutton {
display: inline-block;
}

</style>
</head>
Expand Down Expand Up @@ -217,8 +226,8 @@
<article>
<figure>
<amp-img
src="img/hero@1x.jpg"
srcset="img/hero@1x.jpg 1x, img/hero@2x.jpg 2x"
src="../img/hero@1x.jpg"
srcset="../img/hero@1x.jpg 1x, ../img/hero@2x.jpg 2x"
layout="responsive" width="360" placeholder
alt="Curabitur convallis, urna quis pulvinar feugiat, purus diam posuere turpis, sit amet tincidunt purus justo et mi."
height="216">
Expand All @@ -236,7 +245,7 @@ <h1 itemprop="headline">Lorem Ipsum</h1>
</header>

<div class="author">
<amp-img src="img/sample.jpg" id="author-avatar" placeholder
<amp-img src="../img/sample.jpg" id="author-avatar" placeholder
height="50" width="50">
</amp-img>
<div class="byline">
Expand Down Expand Up @@ -311,8 +320,8 @@ <h1 itemprop="headline">Lorem Ipsum</h1>

<figure>
<amp-img class="full-bleed" placeholder
src="img/sea@1x.jpg"
srcset="img/sea@1x.jpg 1x, img/sea@2x.jpg 2x"
src="../img/sea@1x.jpg"
srcset="../img/sea@1x.jpg 1x, img/sea@2x.jpg 2x"
layout="responsive" width="360"
alt="Fusce pretium tempor justo, vitae consequat dolor maximus eget."
height="216">
Expand Down Expand Up @@ -362,7 +371,7 @@ <h1 itemprop="headline">Lorem Ipsum</h1>
</template>
<template type="amp-mustache" subscriptions-dialog subscriptions-display="NOT data.loggedIn">
<div>Dialog for non logged in users<div>
<div subscriptions-display="NOT data.loggedIn"
<div id="subscribebutton" subscriptions-display="NOT data.loggedIn"
subscriptions-action="subscribe"
subscriptions-service="subscribe.google.com"
subscriptions-decorate>Login</div>
Expand Down
@@ -1,8 +1,8 @@
<!doctype html>
<html>
<head>
<script src="../extensions/amp-access/0.1/iframe-api/build/index.js"></script>

<script src="/extensions/amp-access/0.1/iframe-api/build/index.js"></script>
<script>

var pageConfig;
Expand Down

0 comments on commit e0498eb

Please sign in to comment.