-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #890 from mstoltenburg/zeit-amp
Add new ZEIT ONLINE AMP theme
- Loading branch information
Showing
44 changed files
with
1,424 additions
and
763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
define([ | ||
'plugins/post-hash', | ||
'plugins/status', | ||
'plugins/predefined-types', | ||
'theme/scripts/js/plugins/ampify', | ||
'theme/scripts/js/plugins/button-pagination', | ||
'theme/scripts/js/plugins/social-share', | ||
// 'css!theme/liveblog', | ||
'tmpl!theme/container', | ||
'tmpl!theme/posts-list', | ||
'tmpl!theme/item/base', | ||
// 'tmpl!theme/item/posttype/image', | ||
'tmpl!theme/item/predefined/scorecard', | ||
'tmpl!theme/item/source/flickr', | ||
'tmpl!theme/item/source/google/images', | ||
'tmpl!theme/item/source/google/news', | ||
'tmpl!theme/item/source/google/web', | ||
'tmpl!theme/item/source/instagram', | ||
'tmpl!theme/item/source/twitter', | ||
'tmpl!theme/item/source/youtube', | ||
'tmpl!theme/plugins/after-button-pagination', | ||
'tmpl!theme/plugins/before-button-pagination', | ||
'tmpl!theme/plugins/social-share' | ||
], function() { | ||
'use strict'; | ||
liveblog.hashmark = '?'; | ||
liveblog.hashaddition = '#livedesk-root'; | ||
return { | ||
plugins: [ | ||
'ampify', | ||
'button-pagination', | ||
'social-share', | ||
'status' | ||
] | ||
}; | ||
}); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{>"themeBase/container"/} | ||
|
||
{! Empty default blocks !} | ||
|
||
{<headerContainer} | ||
{/headerContainer} | ||
|
||
{<footerContainer} | ||
{/footerContainer} | ||
|
||
{<userComment} | ||
{/userComment} | ||
|
||
{<contentTopContainer} | ||
<div class="liveblog-content-top"> | ||
<div class="liveblog-content-top-bar"> | ||
{+contentTop} | ||
{+status}{/status} | ||
{+statusNewPost}{/statusNewPost} | ||
{/contentTop} | ||
</div> | ||
</div> | ||
{/contentTopContainer} | ||
|
||
{<contentBottomContainer} | ||
{/contentBottomContainer} | ||
|
||
{<contentMiddle} | ||
<amp-live-list id="zon-live-list" data-poll-interval="15000" data-max-items-per-page="20" data-gimme="posts.view"> | ||
</amp-live-list> | ||
{/contentMiddle} |
Empty file.
138 changes: 138 additions & 0 deletions
138
plugins/embed/gui-themes/themes/zeit-amp/item/base.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{>"themeBase/item/base"/} | ||
|
||
{! Attention! Opening tag in headerContainer … !} | ||
{<headerContainer} | ||
<div class="liveblog-post"> | ||
<div class="post-header"> | ||
{+header}{/header} | ||
</div> | ||
{/headerContainer} | ||
|
||
{<contentContainer} | ||
<div class="post-content" itemprop="articleBody"> | ||
{+content} | ||
|
||
{+contentSideContainer}{/contentSideContainer} | ||
|
||
{+contentMainContainer} | ||
<div class="post-content-main"> | ||
{+contentMainBody} | ||
{+commentBefore}{/commentBefore} | ||
{+contentMainFull} | ||
<div class="post-content-full"> | ||
{+contentFull} | ||
{+contentCoreContainer} | ||
<div class="post-core-content"> | ||
{+contentCore} | ||
{/contentCore} | ||
</div> | ||
{/contentCoreContainer} | ||
{/contentFull} | ||
</div> | ||
{/contentMainFull} | ||
{+commentAfter}{/commentAfter} | ||
{/contentMainBody} | ||
</div> | ||
{/contentMainContainer} | ||
|
||
{/content} | ||
</div> | ||
{/contentContainer} | ||
|
||
{! … closing tag in footerContainer !} | ||
{<footerContainer} | ||
<div class="post-footer"> | ||
{+footer}{/footer} | ||
</div> | ||
</div> | ||
{+shareContainer}{/shareContainer} | ||
{/footerContainer} | ||
|
||
{<contentSideContainer}{/contentSideContainer} | ||
|
||
{<header} | ||
<div class="post-header-meta"> | ||
{+verificationLabel}{/verificationLabel} | ||
{+splitedTimeContainer}{/splitedTimeContainer} | ||
{+splitedDateContainer}{/splitedDateContainer} | ||
</div> | ||
<div class="post-header-user"> | ||
{+userInfo} | ||
{+userNameContainer}{/userNameContainer} | ||
{+userAvatar}{/userAvatar} | ||
{/userInfo} | ||
</div> | ||
{/header} | ||
|
||
{<footer}{/footer} | ||
|
||
{<share} | ||
{+socialShare}{/socialShare} | ||
{/share} | ||
|
||
{<userNameContainer} | ||
{+publisherNameContainer}{/publisherNameContainer} | ||
{/userNameContainer} | ||
|
||
{<publisherNameContainer} | ||
<span class="post-publisher-name" itemprop="author" itemscope itemtype="http://schema.org/Person"> | ||
<span itemprop="name">{+publisherName}{Creator.FullName}{/publisherName}</span> | ||
</span> | ||
{/publisherNameContainer} | ||
|
||
{<splitedDateContainer} | ||
<time itemprop="datePublished" datetime="{PublishedOn}" class="post-datetime">{PublishedOn|splitted-post-date}</time> | ||
{/splitedDateContainer} | ||
|
||
{<splitedTimeContainer} | ||
<span class="post-time">{PublishedOn|splitted-post-time}</span> | ||
{/splitedTimeContainer} | ||
|
||
{<verificationLabel}{/verificationLabel} | ||
|
||
{<additionalAttributes}{#Id}id="post-{Id}" data-sort-time="{Id}"{/Id} itemprop="liveBlogUpdate" itemscope itemtype="http://schema.org/BlogPosting" itemref="publisher"{/additionalAttributes} | ||
|
||
{<userAvatar} | ||
<div class="post-publisher-avatar"> | ||
{! {#AuthorImage}{@contextDump key="current" to="console"/}{/AuthorImage} !} | ||
{! {#AuthorImage}{@contextDump key="full" to="console"/}{/AuthorImage} !} | ||
{?AuthorImage} | ||
<amp-img class="post-publisher-avatar-img" src="{AuthorImage.href}" width="42" height="42" layout="fixed"></amp-img> | ||
{/AuthorImage} | ||
</div> | ||
{/userAvatar} | ||
|
||
{<contentAttr} | ||
<div class="attributes"> | ||
<svg class="source-icon"> | ||
<use xlink:href="#svg-icon-{+contentAttrIconClass}{+itemClass}{/itemClass}{/contentAttrIconClass}" /> | ||
</svg> | ||
{+contentAttrCode} | ||
<span>{+contentAttrName}{Author.Source.Name}{/contentAttrName}</span> | ||
{/contentAttrCode} | ||
</div> | ||
{/contentAttr} | ||
|
||
{!-- displayed for: | ||
--!} | ||
{<externalAmpAvatar} | ||
<div class="post-external-avatar"> | ||
<amp-img class="post-external-avatar-img" src="{+externalAvatarSrc}{/externalAvatarSrc}" width="42" height="42" layout="fixed"></amp-img> | ||
</div> | ||
{/externalAmpAvatar} | ||
|
||
{!-- displayed for: | ||
> image | ||
> google image | ||
> flickr | ||
--!} | ||
{<extenalAmpImageContainer} | ||
<a class="post-external-image-link" href="{+externalImageLink}{/externalImageLink}" target="_blank"> | ||
<div class="post-external-image"> | ||
<amp-img alt="{+externalImageAlt}{/externalImageAlt}" class="post-external-image-img" src="{+externalImageSrc}{/externalImageSrc}" {+externalImageSize}{/externalImageSize} layout="responsive"></amp-img> | ||
</div> | ||
</a> | ||
{/extenalAmpImageContainer} |
Empty file.
32 changes: 32 additions & 0 deletions
32
plugins/embed/gui-themes/themes/zeit-amp/item/posttype/image.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{>"{baseItem}"/} | ||
{<itemClass}image{/itemClass} | ||
|
||
{<contentCore} | ||
{?Meta.Content.href} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{:else} | ||
{+contenteBaseBefore}{/contenteBaseBefore} | ||
{+contentText}{/contentText} | ||
{/Meta.Content.href} | ||
{/contentCore} | ||
|
||
{<contentExternal} | ||
{+extenalAmpImageContainer}{/extenalAmpImageContainer} | ||
{+externalTextContainer}{/externalTextContainer} | ||
{/contentExternal} | ||
|
||
{<externalImageLink} | ||
{Meta.Content.href} | ||
{/externalImageLink} | ||
|
||
{<externalImageSrc} | ||
{Meta.Content.href} | ||
{/externalImageSrc} | ||
|
||
{<externalImageAlt} | ||
{Meta.caption} | ||
{/externalImageAlt} | ||
|
||
{<externalText} | ||
{Meta.caption} | ||
{/externalText} |
Empty file.
3 changes: 3 additions & 0 deletions
3
plugins/embed/gui-themes/themes/zeit-amp/item/predefined/scorecard.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{>"themeBase/item/posttype/base"/} | ||
{<itemClass}scorecard{/itemClass} | ||
{<userInfo}{/userInfo} |
Empty file.
26 changes: 26 additions & 0 deletions
26
plugins/embed/gui-themes/themes/zeit-amp/item/source/facebook.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{>"themeBase/item/source/base"/} | ||
{<itemClass}facebook{/itemClass} | ||
{<contentCore} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{+contentAttr}{/contentAttr} | ||
{/contentCore} | ||
{<contentExternal} | ||
{+externalAmpAvatar}{/externalAmpAvatar} | ||
{+externalInfoContainer}{/externalInfoContainer} | ||
{+externalTextContainer}{/externalTextContainer} | ||
{/contentExternal} | ||
{<externalInfo} | ||
{+externalInfoTitleContainer}{/externalInfoTitleContainer} | ||
{/externalInfo} | ||
|
||
{<externalInfoTitle}{Meta.from.name}{/externalInfoTitle} | ||
{<externalInfoTitleSrc}{Meta.permalink}{/externalInfoTitleSrc} | ||
{<externalText}{Meta.message|s}{/externalText} | ||
|
||
{<contentAttrName} | ||
facebook.com | ||
{/contentAttrName} | ||
|
||
{<externalAvatarSrc} | ||
//graph.facebook.com/{Meta.from.id}/picture | ||
{/externalAvatarSrc} |
25 changes: 25 additions & 0 deletions
25
plugins/embed/gui-themes/themes/zeit-amp/item/source/flickr.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{>"themeBase/item/source/base"/} | ||
{<itemClass}flickr{/itemClass} | ||
{<contentCore} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{+contentAttr}{/contentAttr} | ||
{/contentCore} | ||
{<contentExternal} | ||
{+extenalAmpImageContainer}{/extenalAmpImageContainer} | ||
{/contentExternal} | ||
|
||
{<externalImageLink} | ||
http://farm{Meta.farm}.staticflickr.com/{Meta.server}/{Meta.id}_{Meta.secret}.jpg | ||
{/externalImageLink} | ||
|
||
{<externalImageSrc} | ||
http://farm{Meta.farm}.staticflickr.com/{Meta.server}/{Meta.id}_{Meta.secret}.jpg | ||
{/externalImageSrc} | ||
|
||
{<externalImageAlt} | ||
{Meta.title} | ||
{/externalImageAlt} | ||
|
||
{<contentAttrName} | ||
flickr.com | ||
{/contentAttrName} |
Empty file.
38 changes: 38 additions & 0 deletions
38
plugins/embed/gui-themes/themes/zeit-amp/item/source/google/images.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{>"themeBase/item/source/google"/} | ||
{<itemClassAdditional}googleimage{/itemClassAdditional} | ||
{<contentCore} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{+contentAttr}{/contentAttr} | ||
{/contentCore} | ||
{<contentExternal} | ||
{+extenalAmpImageContainer}{/extenalAmpImageContainer} | ||
{+externalInfoContainer}{/externalInfoContainer} | ||
{+externalTextContainer}{/externalTextContainer} | ||
{/contentExternal} | ||
{<externalInfo} | ||
{+externalInfoTitleContainer}{/externalInfoTitleContainer} | ||
{/externalInfo} | ||
|
||
{<externalImageLink} | ||
{Meta.originalContextUrl} | ||
{/externalImageLink} | ||
|
||
{<externalImageSrc} | ||
{Meta.url} | ||
{/externalImageSrc} | ||
|
||
{<externalImageSize} | ||
width="{Meta.width}" height="{Meta.height}" | ||
{/externalImageSize} | ||
|
||
{<externalImageAlt} | ||
{Meta.visibleUrl} | ||
{/externalImageAlt} | ||
|
||
{<externalInfoTitle}{Meta.title|s}{/externalInfoTitle} | ||
{<externalInfoTitleSrc}{Meta.originalContextUrl}{/externalInfoTitleSrc} | ||
{<externalText}{Content|s}{/externalText} | ||
|
||
{<contentAttrIconClass} | ||
{/contentAttrIconClass} |
20 changes: 20 additions & 0 deletions
20
plugins/embed/gui-themes/themes/zeit-amp/item/source/google/news.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{>"themeBase/item/source/google"/} | ||
{<itemClassAdditional}googlenews{/itemClassAdditional} | ||
{<contentCore} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{+contentAttr}{/contentAttr} | ||
{/contentCore} | ||
{<contentExternal} | ||
{+externalInfoContainer}{/externalInfoContainer} | ||
{+externalTextContainer}{/externalTextContainer} | ||
{/contentExternal} | ||
{<externalInfo} | ||
{+externalInfoTitleContainer}{/externalInfoTitleContainer} | ||
{/externalInfo} | ||
{<externalInfoTitle}{Meta.title|s}{/externalInfoTitle} | ||
{<externalInfoTitleSrc}{Meta.unescapedUrl}{/externalInfoTitleSrc} | ||
{<externalText}{Content|s}{/externalText} | ||
|
||
{<contentAttrIconClass} | ||
{/contentAttrIconClass} |
20 changes: 20 additions & 0 deletions
20
plugins/embed/gui-themes/themes/zeit-amp/item/source/google/web.dust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{>"themeBase/item/source/google"/} | ||
{<itemClassAdditional}googlesearch{/itemClassAdditional} | ||
{<contentCore} | ||
{+contentExternalContainer}{/contentExternalContainer} | ||
{+contentAttr}{/contentAttr} | ||
{/contentCore} | ||
{<contentExternal} | ||
{+externalInfoContainer}{/externalInfoContainer} | ||
{+externalTextContainer}{/externalTextContainer} | ||
{/contentExternal} | ||
{<externalInfo} | ||
{+externalInfoTitleContainer}{/externalInfoTitleContainer} | ||
{/externalInfo} | ||
{<externalInfoTitle}{Meta.title|s}{/externalInfoTitle} | ||
{<externalInfoTitleSrc}{Meta.unescapedUrl}{/externalInfoTitleSrc} | ||
{<externalText}{Content|s}{/externalText} | ||
|
||
{<contentAttrIconClass} | ||
{/contentAttrIconClass} |
Oops, something went wrong.