Skip to content

Commit 7201def

Browse files
authored
Add meta header + convert favicon for apple-touch-icon. (#8589)
1 parent 7986bb0 commit 7201def

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+108
-0
lines changed

app/lib/frontend/templates/views/shared/layout.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ d.Node pageLayoutNode({
3131
required String? moderationUrl,
3232
required ModerationSubject? moderationSubject,
3333
}) {
34+
final appleTouchIconUrl = faviconUrl.endsWith('.png')
35+
? faviconUrl
36+
: staticUrls.getAssetUrl('/static/img/apple-touch-icon.png');
3437
return d.fragment([
3538
d.unsafeRawHtml('<!DOCTYPE html>\n'),
3639
d.element(
@@ -85,7 +88,14 @@ d.Node pageLayoutNode({
8588
href:
8689
'https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Display:wght@400&family=Google+Sans+Text:wght@400;500;700&family=Google+Sans+Mono:wght@400;700&display=swap',
8790
),
91+
// default favicon
8892
d.link(rel: 'shortcut icon', href: faviconUrl),
93+
// WebClip icon(s) for Apple devices
94+
// https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
95+
d.meta(rel: 'apple-touch-icon', href: appleTouchIconUrl),
96+
d.meta(
97+
rel: 'apple-touch-icon-precomposed', href: appleTouchIconUrl),
98+
8999
d.link(
90100
rel: 'stylesheet',
91101
href: 'https://www.gstatic.com/glue/v25_0/ccb.min.css'),

app/test/frontend/golden/authorized_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>Pub Authorized Successfully</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/consent_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>Consent</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/create_publisher_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>Create publisher</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/error_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>error_title</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/help_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>Help | Dart packages</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<link rel="canonical" href="https://pub.dev/help"/>

app/test/frontend/golden/landing_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>The official repository for Dart and Flutter packages.</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<link rel="canonical" href="https://pub.dev/"/>

app/test/frontend/golden/my_activity_log_page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>My activity log</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/my_liked_packages.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>My liked packages</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

app/test/frontend/golden/my_packages.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<title>My packages | starting with oxygen</title>
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/>
2121
<link rel="shortcut icon" href="/favicon.ico?hash=mocked_hash_985685822"/>
22+
<meta rel="apple-touch-icon" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
23+
<meta rel="apple-touch-icon-precomposed" href="/static/hash-%%etag%%/img/apple-touch-icon.png"/>
2224
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
2325
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
2426
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>

0 commit comments

Comments
 (0)