Skip to content

Commit

Permalink
Merge pull request #882 from superdesk/zeit-online-wip
Browse files Browse the repository at this point in the history
Zeit online wip
  • Loading branch information
nistormihai committed Jun 18, 2015
2 parents 122c915 + 06fd087 commit 928e384
Show file tree
Hide file tree
Showing 135 changed files with 2,041 additions and 64 deletions.
26 changes: 13 additions & 13 deletions plugins/embed/gui-resources/scripts/js/build/main.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions plugins/embed/gui-resources/scripts/js/lib/dust/helpers/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ define(['dust/core', 'lib/gettext', 'moment', 'moment-timezone'], function(dust,
}
return date.format(gt.pgettext('moment', 'post-date'));
};
dust.filters['splitted-post-time'] = function(string) {
var date = moment(string);
if (gt.pgettext('moment', 'timezone') !== 'timezone') {
date.tz(gt.pgettext('moment', 'timezone'));
}
return date.format(gt.pgettext('moment', 'splitted-post-time'));
};
dust.filters['splitted-post-date'] = function(string) {
var date = moment(string);
if (gt.pgettext('moment', 'timezone') !== 'timezone') {
date.tz(gt.pgettext('moment', 'timezone'));
}
return date.format(gt.pgettext('moment', 'splitted-post-date'));
};
dust.filters['closed-date'] = function(string) {
var date = moment(string);
if (gt.pgettext('moment', 'timezone') !== 'timezone') {
Expand Down
2 changes: 2 additions & 0 deletions plugins/embed/gui-resources/scripts/js/lib/require/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ define([
// we keep a mapper with the language codes to moment lanugage codes.
var defaultsMapper = {
'post-date': 'llll',
'splitted-post-time': 'LT',
'splitted-post-date': 'LL',
'closed-date': 'llll',
'status-time': 'HH:mm',
'pretty-day-time': 'HH:mm',
Expand Down
24 changes: 24 additions & 0 deletions plugins/embed/gui-resources/scripts/js/plugins/predefined-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

define([
'plugins',
'dust',
'lib/utils'
], function (plugins, dust, utils) {
plugins['predefined-types'] = function (config) {
utils.dispatcher.on('before-render.post-view', function (view) {
if (view.model.get('item') !== 'posttype/normal') {
return;
}
var Meta = view.model.get('Meta'),
predefinedType;
if (Meta['post-predefined-type']) {
predefinedType = Meta['post-predefined-type'].text.toLowerCase();
if (dust.cache['theme/item/predefined/' + predefinedType]) {
view.setTemplate('theme/item/predefined/' + predefinedType);
}
}
});
};
return plugins['predefined-types'];
});
2 changes: 2 additions & 0 deletions plugins/embed/gui-themes/themes/base/translation.dust
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ _('Share this post on Google+');
_('Share this post via Email');
_('%(full_name)s commentator');
pgettext('moment', 'post-date');
pgettext('moment', 'splitted-post-time');
pgettext('moment', 'splitted-post-date');
pgettext('moment', 'closed-date');
pgettext('moment', 'months');
pgettext('moment', 'monthsShort');
Expand Down
28 changes: 28 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online-solo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
define([
// 'plugins/scroll-pagination',
'plugins/button-pagination',
'plugins/twitter-widgets',
'plugins/post-hash',
'plugins/social-share',
'plugins/status',
'plugins/wrappup-toggle',
'plugins/predefined-types',
'css!theme/liveblog',
'tmpl!theme/container',
'tmpl!theme/item/base',
'tmpl!theme/plugins/social-share',
'tmpl!theme/item/predefined/scorecard'
], function(dust, gt, moment) {
'use strict';

return {
plugins: [
// 'scroll-pagination',
'button-pagination',
'twitter-widgets',
'social-share',
'status',
'wrappup-toggle'
]
};
});
Empty file.
23 changes: 23 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online-solo/container.dust
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{>"themeBase/container"/}

{! Empty default blocks !}

{<headerContainer}
{/headerContainer}

{<footerContainer}
{/footerContainer}

{<contentTopContainer}
<div class="liveblog-content-top">
<div class="liveblog-content-top-bar">
{+contentTop}
{+status}{/status}
{+statusNewPost}{/statusNewPost}
{/contentTop}
</div>
</div>
{/contentTopContainer}

{<contentBottomContainer}
{/contentBottomContainer}
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
28 changes: 28 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online-solo/item/base.dust
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{>"themeBase/item/base"/}

{! Attention! Opening tag in headerContainer … !}
{<headerContainer}
<div class="liveblog-post">
<div class="post-header">
{+header}{/header}
</div>
{/headerContainer}

{! … closing tag in footerContainer !}
{<footerContainer}
<div class="post-footer">
{+footer}{/footer}
</div>
</div>
{+shareContainer}{/shareContainer}
{/footerContainer}

{<contentSideContainer}{/contentSideContainer}

{<header}{/header}

{<footer}{/footer}

{<share}
{+socialShare}{/socialShare}
{/share}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{>"themeBase/item/posttype/base"/}
{<itemClass}scorecard{/itemClass}
155 changes: 155 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online-solo/liveblog.css

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online-solo/liveblog.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "../zeit-online/liveblog";

.liveblog-postlist {
li {
padding-left: 0;

.post-header {
display: none;
}
&.scorecard {
.liveblog-post {
&:before {
content: none;
}
}
}
}
}

.liveblog-post {
&:after {
content: none;
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div data-gimme="post.share-social" class="share-box" style="visibility:hidden">
<span><a href="#" class="social facebook" title="_('Share this post on Facebook');" data-gimme="fb">Facebook</a></span>
<span><a href="#" class="social twitter" title="_('Share this post on Twitter');" data-gimme="twt">Twitter</a></span>
{#showLin}<span><a href="#" class="social linkedin" title="_('Share this post on Linkedin');" data-gimme="lin">LinkedIn</a></span>{/showLin}
{#showPin}<span><a href="#" class="social pinterest" title="_('Share this post on Pinterest');" data-gimme="pin">Pinterest</a></span>{/showPin}
<span><a href="#" class="social google" title="_('Share this post on Google+');" data-gimme="ggl">Google +</a></span>
<span><a href="{emailurl}" class="social email" title="_('Share this post via Email');" target="_blank">Mail</a></span>
</div>
28 changes: 28 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
define([
// 'plugins/scroll-pagination',
'plugins/button-pagination',
'plugins/twitter-widgets',
'plugins/post-hash',
'plugins/social-share',
'plugins/status',
'plugins/wrappup-toggle',
'plugins/predefined-types',
'css!theme/liveblog',
'tmpl!theme/container',
'tmpl!theme/item/base',
'tmpl!theme/plugins/social-share',
'tmpl!theme/item/predefined/scorecard'
], function(dust, gt, moment) {
'use strict';

return {
plugins: [
// 'scroll-pagination',
'button-pagination',
'twitter-widgets',
'social-share',
'status',
'wrappup-toggle'
]
};
});
Empty file.
23 changes: 23 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online/container.dust
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{>"themeBase/container"/}

{! Empty default blocks !}

{<headerContainer}
{/headerContainer}

{<footerContainer}
{/footerContainer}

{<contentTopContainer}
<div class="liveblog-content-top">
<div class="liveblog-content-top-bar">
{+contentTop}
{+status}{/status}
{+statusNewPost}{/statusNewPost}
{/contentTop}
</div>
</div>
{/contentTopContainer}

{<contentBottomContainer}
{/contentBottomContainer}
Empty file.
Empty file.
48 changes: 48 additions & 0 deletions plugins/embed/gui-themes/themes/zeit-online/item/base.dust
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{>"themeBase/item/base"/}

{! Attention! Opening tag in headerContainer … !}
{<headerContainer}
<div class="liveblog-post">
<div class="post-header">
{+header}{/header}
</div>
{/headerContainer}

{! … 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}

{<splitedDateContainer}
<span class="post-datetime">{PublishedOn|splitted-post-date}</span>
{/splitedDateContainer}

{<splitedTimeContainer}
<span class="post-time">{PublishedOn|splitted-post-time}</span>
{/splitedTimeContainer}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{>"themeBase/item/posttype/base"/}
{<itemClass}scorecard{/itemClass}
{<userInfo}{/userInfo}
Loading

0 comments on commit 928e384

Please sign in to comment.