Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a82ec87

Browse files
committed
Adds entity metadata support.
1 parent 60c34f6 commit a82ec87

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

extensions/amp-story/1.0/test/validator-amp-story.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
3030
</head>
3131
<body>
32-
<amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png" poster-portrait-src="http://me.com/portrait.jpg" poster-square-src="http://me.com/square.jpg" poster-landscape-src="http://me.com/landscape.jpg" background-audio="http://me.com/path/to/my.mp3">
32+
<amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png" poster-portrait-src="http://me.com/portrait.jpg" poster-square-src="http://me.com/square.jpg" poster-landscape-src="http://me.com/landscape.jpg" background-audio="http://me.com/path/to/my.mp3" entity="Someone else" entity-logo-src="http://someoneelse.com/logo.png" entity-url="http://someoneelse.com/profile">
3333
<amp-story-page id="1" background-audio="path/to/my.mp3" auto-advance-after="any-value">
3434
<amp-story-grid-layer template="horizontal">
3535
<h5 animate-in="drop">

extensions/amp-story/1.0/test/validator-amp-story.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PASS
3030
| <script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
3131
| </head>
3232
| <body>
33-
| <amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png" poster-portrait-src="http://me.com/portrait.jpg" poster-square-src="http://me.com/square.jpg" poster-landscape-src="http://me.com/landscape.jpg" background-audio="http://me.com/path/to/my.mp3">
33+
| <amp-story standalone title="My Story" publisher="Me" publisher-logo-src="http://me.com/logo.png" poster-portrait-src="http://me.com/portrait.jpg" poster-square-src="http://me.com/square.jpg" poster-landscape-src="http://me.com/landscape.jpg" background-audio="http://me.com/path/to/my.mp3" entity="Someone else" entity-logo-src="http://someoneelse.com/logo.png" entity-url="http://someoneelse.com/profile">
3434
| <amp-story-page id="1" background-audio="path/to/my.mp3" auto-advance-after="any-value">
3535
| <amp-story-grid-layer template="horizontal">
3636
| <h5 animate-in="drop">

extensions/amp-story/amp-story.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,18 @@ The `amp-story` component represents an entire story. The component itself imple
251251
<td width="40%"><strong>poster-landscape-src [optional]</strong></td>
252252
<td>A URL to the <a href="#poster-guidelines-(for-poster-portrait-src,-poster-landscape-src,-and-poster-square-src)">story poster</a> in landscape format (4x3 aspect ratio).</td>
253253
</tr>
254+
<tr id="entity">
255+
<td width="40%"><strong>entity [optional]</strong></td>
256+
<td>The name of the story's creating entity. For example: <code>entity="User"</code>, where User created the story on the publisher's platform.</td>
257+
</tr>
258+
<tr id="entity-logo-src">
259+
<td width="40%"><strong>entity-logo-src [optional]</strong></td>
260+
<td>A URL to the story creating entity's logo in square format (1x1 aspect ratio). For example <code>entity-logo-src="https://example.com/logo/1x1.png"</code>, where 1x1.png is a 96x96 px logo.</td>
261+
</tr>
262+
<tr id="entity-url">
263+
<td width="40%"><strong>entity-url [optional]</strong></td>
264+
<td>A URL to the story creating entity's platform. For example <code>entity-url="https://example.com/profile/user"</code>, which links to User's profile on the publisher's platform.</td>
265+
</tr>
254266
<tr id="supports-landscape">
255267
<td width="40%"><strong>supports-landscape [optional]</strong></td>
256268
<td>Enables landscape orientation support on mobile devices and a full bleed landscape experience on desktop devices.</td>

extensions/amp-story/validator-amp-story.protoascii

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ tags: { # <amp-story>
4141
protocol: "https"
4242
}
4343
}
44+
attrs: {
45+
name: "entity"
46+
}
47+
attrs: {
48+
name: "entity-logo-src"
49+
value_url: {
50+
protocol: "http"
51+
protocol: "https"
52+
}
53+
}
54+
attrs: {
55+
name: "entity-url"
56+
value_url: {
57+
protocol: "http"
58+
protocol: "https"
59+
}
60+
}
4461
attrs: {
4562
name: "poster-landscape-src"
4663
value_url: {

0 commit comments

Comments
 (0)