Skip to content

Commit

Permalink
fix missing viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz committed Dec 11, 2020
1 parent 0e5bf5f commit 4af6708
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta charset="utf-8">
<title>Restrict Duplicate Selection</title>
<link rel="canonical" href="<% canonical %>">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width" />
<script async="" src="https://cdn.ampproject.org/v0.js"></script>
<!-- ## Setup -->
<!-- Import the `amp-bind` component to hold the selected fruits -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/fr/index.amp.html" />
<link rel="alternate" href="https://amp.dev/static/samples/internationalization/alternate/fr/index.mobile.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="canonical" href="https://amp.dev/static/samples/internationalization/alternate/fr/" />
<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/fr/index.amp.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/index.amp.html" />
<link rel="alternate" href="https://amp.dev/static/samples/internationalization/alternate/index.mobile.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="canonical" href="https://amp.dev/static/samples/internationalization/alternate/" />
<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/index.amp.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="hreflang を使って正規ページ、モバイルページ、AMPページがあるサイトの i18n の例" />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/ja/index.amp.html" />
<link rel="alternate" href="https://amp.dev/static/samples/internationalization/alternate/ja/index.mobile.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="hreflang を使って正規ページ、モバイルページ、AMPページがあるサイトの i18n の例" />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="canonical" href="https://amp.dev/static/samples/internationalization/alternate/ja/" />
<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/alternate/ja/index.amp.html" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/basic/fr/index.amp.html" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/basic/index.amp.html" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="hreflang を使って正規ページ、モバイルページ、AMPページがあるサイトの i18n の例" />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="viewport" content="width=device-width"/>

<link rel="amphtml" href="https://amp.dev/static/samples/internationalization/basic/ja/index.amp.html" />

Expand Down
2 changes: 1 addition & 1 deletion frontend/templates/layouts/default.j2
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{# Origin Trial for Dynamic Autoplay Delegation #}
<meta http-equiv="origin-trial" content="AviuuiVhVdQ3GpVtxSpyMT+XsL/qGGYmyiyLvYSKPL3rRDLipe/ard5x+DXVlrATtolwX75VtpSKc9IEzLDd4AkAAABmeyJvcmlnaW4iOiJodHRwczovL2FtcC5kZXY6NDQzIiwiZmVhdHVyZSI6IkV4cGVyaW1lbnRhbEF1dG9wbGF5RHluYW1pY0RlbGVnYXRpb24iLCJleHBpcnkiOjE1NzA1Nzg0NDF9">

<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/>
<meta name="viewport" content="width=device-width"/>

<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style>
<noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
Expand Down
7 changes: 3 additions & 4 deletions platform/lib/samples/DocumentParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const AMPHTML_BOILERPLATE =
/* eslint-disable */
const BEAUTIFY_OPTIONS = {
indent_size: 2,
"wrap_attributes": "force",
'wrap_attributes': 'force',
//"wrap_attributes_indent_size": 4,
unformatted: ['noscript', 'style', 'head', 'script'],
'indent-char': ' ',
'no-preserve-newlines': '',
'extra_liners': []
'extra_liners': [],
};
/* eslint-enable */

Expand Down Expand Up @@ -255,8 +255,7 @@ class DocumentParser {
replaceAmpHtmlEmailRuntimeAddViewport(string) {
return string.replace(
'<style amp4email-boilerplate>body{visibility:hidden}</style>',
'<meta name="viewport" content="width=device-width,minimum-scale' +
'=1,initial-scale=1">' +
'<meta name="viewport" content="width=device-width">' +
AMPHTML_BOILERPLATE
);
}
Expand Down
2 changes: 1 addition & 1 deletion playground/src/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="viewport" content="width=device-width">

<title>
{{^htmlWebpackPlugin.options.validator}}
Expand Down

0 comments on commit 4af6708

Please sign in to comment.