Skip to content

Commit

Permalink
Add “Template 3” coming soon and center showcase. (ampproject#232)
Browse files Browse the repository at this point in the history
* Add “Template 3” coming soon and center showcase.

* Rename 1x thumbnail image for template 3.
  • Loading branch information
tonyruscoe authored and camelburrito committed Mar 7, 2017
1 parent c945582 commit 0b23656
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions components/lightbox/template-preview.snip.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- This component is specific to www and might not be re-usable without css edits -->

{{#template-preview}}
{{#lightbox-id}}
<amp-lightbox id="{{lightbox-id}}" layout="nodisplay" class="ampstart-device-preview relative">
<div class="ampstart-device-preview-mask absolute top-0 right-0 left-0 bottom-0 {{classes}}" role="button" on="tap:{{lightbox-id}}.close" tabindex="0"></div>
<amp-selector>
Expand Down Expand Up @@ -77,4 +78,5 @@ <h3>Preview</h3>
</div>
</amp-selector>
</amp-lightbox>
{{/lightbox-id}}
{{/template-preview}}
9 changes: 8 additions & 1 deletion css/www/index/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,18 @@
}
}

.www-index-showcase amp-carousel {
max-width: 709px;
}

.www-index-showcase amp-img {
cursor: pointer;
margin-top: 1px;
}

.www-index-showcase amp-img[on] {
cursor: pointer;
}

.ampstart-footer small {
font-size: var(--h6);
}
Binary file added img/www/index/theme3_coming_soon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/www/index/theme3_coming_soon_2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ <h3 class="caps pt4 pb2">{{title}}</h3>

<section class="www-index-showcase px4">
<h2 class="center mb4">Built with AMP Start</h2>
<amp-carousel type="carousel" layout="fixed-height" height="414" controls class="mb4">
<amp-carousel type="carousel" layout="fixed-height" height="414" controls class="mb4 mx-auto">
{{#showcase-template-previews}}
{{#template-preview}}
{{#img}}
<amp-img src="{{{url}}}" {{#2x_url}}srcset="{{{url}}} 1x,{{{.}}} 2x"{{/2x_url}} width="{{width}}" height="{{height}}" class="ampstart-card" title="View {{title}}" on="tap:{{lightbox-id}}"></amp-img>
<amp-img src="{{{url}}}" {{#2x_url}}srcset="{{{url}}} 1x,{{{.}}} 2x"{{/2x_url}} width="{{width}}" height="{{height}}" class="ampstart-card" title="View {{title}}"{{#lightbox-id}} on="tap:{{lightbox-id}}"{{/lightbox-id}}></amp-img>
{{/img}}
{{/template-preview}}
{{/showcase-template-previews}}
Expand Down
11 changes: 11 additions & 0 deletions www/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@
"src": "templates/themes/2/home.amp.html",
"download": "archive/home.zip"
}
},
{
"template-preview": {
"title": "Opinionated Template 3: Coming Soon",
"img": {
"width": "231",
"height": "410",
"url": "../img/www/index/theme3_coming_soon.png",
"2x_url": "../img/www/index/theme3_coming_soon_2x.png"
}
}
}
],
"notification": {
Expand Down

0 comments on commit 0b23656

Please sign in to comment.