Skip to content

Commit

Permalink
Approach ampproject#3: Configure amp-live-list through attributes
Browse files Browse the repository at this point in the history
* Introduce new attributes to configure amp-live-list and fill our needs.
  disable-scrolling, disable-pagination, i-amphtml-container.
* On the amp-live-list side:
  * Don't throw if item does not have data-sort-time attribute, simply ignore it.
  * This will allow custom use cases like amp-story differ between dynamic elements
    and non-dynamic ones.
  * Get custom container if specified, if not, continue using <div items>
* On the amp-story side:
  * Build a custom amp-live-list with the previously mentioned attributes.
  • Loading branch information
Enriqe committed Apr 3, 2019
1 parent 89afaf8 commit 35fc1c4
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 118 deletions.
2 changes: 1 addition & 1 deletion examples/amp-story/live-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
</head>

<body>
<amp-story live-story poster-portrait-src="./assets/replay.jpg" publisher-logo-src="./assets/replay.jpg" publisher="Google Images" title="Fantasy Figures">
<amp-story live-story="15000" poster-portrait-src="./assets/replay.jpg" publisher-logo-src="./assets/replay.jpg" publisher="Google Images" title="Fantasy Figures">
<amp-story-page id="cover" data-sort-time="1552330790">
<amp-story-grid-layer template="fill">
<amp-img layout="fill" src="./assets/GettyImages-1023059890.jpg"></amp-img>
Expand Down
Loading

0 comments on commit 35fc1c4

Please sign in to comment.