hide changes after flag

This commit is contained in:
Tomasz Napieralski 2016-02-08 15:57:57 +01:00
parent 1b2a5bb417
commit 2e5f90f543
7 changed files with 50 additions and 50 deletions

View file

@ -13,13 +13,13 @@ class PortableInfoboxRenderService extends WikiaService {
'header' => 'PortableInfoboxItemHeader.mustache',
'image' => 'PortableInfoboxItemImage.mustache',
'image-mobile' => 'PortableInfoboxItemImageMobile.mustache',
'image-mobile-old' => 'PortableInfoboxItemImageMobileOld.mustache',
'image-mobile-experimental' => 'PortableInfoboxItemImageMobileExperimental.mustache',
'data' => 'PortableInfoboxItemData.mustache',
'group' => 'PortableInfoboxItemGroup.mustache',
'horizontal-group-content' => 'PortableInfoboxHorizontalGroupContent.mustache',
'navigation' => 'PortableInfoboxItemNavigation.mustache',
'hero-mobile' => 'PortableInfoboxItemHeroMobile.mustache',
'hero-mobile-old' => 'PortableInfoboxItemHeroMobileOld.mustache',
'hero-mobile-experimental' => 'PortableInfoboxItemHeroMobileExperimental.mustache',
'image-collection' => 'PortableInfoboxItemImageCollection.mustache',
'image-collection-mobile' => 'PortableInfoboxItemImageCollectionMobile.mustache'
];
@ -152,10 +152,10 @@ class PortableInfoboxRenderService extends WikiaService {
$image = $helper->extendImageData( $image );
$data['image'] = $image;
if (!empty($wgEnableSeoFriendlyImagesForMobile)) {
$markup = $this->renderItem( 'hero-mobile', $data );
if ( !empty( $wgEnableSeoFriendlyImagesForMobile ) ) {
$markup = $this->renderItem( 'hero-mobile-experimental', $data );
} else {
$markup = $this->renderItem( 'hero-mobile-old', $data );
$markup = $this->renderItem( 'hero-mobile', $data );
}
} else {
$markup = $this->renderItem( 'title', $data[ 'title' ] );
@ -202,10 +202,10 @@ class PortableInfoboxRenderService extends WikiaService {
}
if ( $helper->isWikiaMobile() ) {
if (!empty($wgEnableSeoFriendlyImagesForMobile)) {
$templateName = $templateName . self::MOBILE_TEMPLATE_POSTFIX;
if ( !empty( $wgEnableSeoFriendlyImagesForMobile ) ) {
$templateName = $templateName . self::MOBILE_TEMPLATE_POSTFIX . '-experimental';
} else {
$templateName = $templateName . self::MOBILE_TEMPLATE_POSTFIX . '-old';
$templateName = $templateName . self::MOBILE_TEMPLATE_POSTFIX;
}
}
} else {

View file

@ -8,15 +8,9 @@
</hgroup>
{{/title}}
{{#image}}
<figure class="article-media" data-ref="{{ref}}">
<a href="{{url}}">
<!-- remove data-src, class and data-params after wikiaMobile is gone -->
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" alt="{{alt}}"
data-src="{{thumbnail}}" class="lazy media" data-params='[{"full":"{{url}}"}]' />
<noscript>
<img src="{{url}}" alt="{{alt}}">
</noscript>
</a>
</figure>
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"
data-src="{{thumbnail}}" class="pi-image-thumbnail lazy media article-media" alt="{{alt}}"
data-image-key="{{name}}" data-image-name="{{name}}" data-ref="{{ref}}"
data-params='[{"name":"{{name}}", "full":"{{url}}"}]'/>
{{/image}}
</div>

View file

@ -0,0 +1,22 @@
<div class="pi-item pi-hero">
{{#title}}
<hgroup class="pi-hero-title-wrapper pi-item-spacing">
<h2 class="pi-hero-title">{{{value}}}</h2>
{{#image.caption}}
<h3 class="pi-hero-caption">{{{image.caption}}}</h3>
{{/image.caption}}
</hgroup>
{{/title}}
{{#image}}
<figure class="article-media" data-ref="{{ref}}">
<a href="{{url}}">
<!-- remove data-src, class and data-params after wikiaMobile is gone -->
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" alt="{{alt}}"
data-src="{{thumbnail}}" class="lazy media" data-params='[{"full":"{{url}}"}]' />
<noscript>
<img src="{{url}}" alt="{{alt}}">
</noscript>
</a>
</figure>
{{/image}}
</div>

View file

@ -1,16 +0,0 @@
<div class="pi-item pi-hero">
{{#title}}
<hgroup class="pi-hero-title-wrapper pi-item-spacing">
<h2 class="pi-hero-title">{{{value}}}</h2>
{{#image.caption}}
<h3 class="pi-hero-caption">{{{image.caption}}}</h3>
{{/image.caption}}
</hgroup>
{{/title}}
{{#image}}
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"
data-src="{{thumbnail}}" class="pi-image-thumbnail lazy media article-media" alt="{{alt}}"
data-image-key="{{name}}" data-image-name="{{name}}" data-ref="{{ref}}"
data-params='[{"name":"{{name}}", "full":"{{url}}"}]'/>
{{/image}}
</div>

View file

@ -1,12 +1,6 @@
<div class="pi-item pi-image">
<figure class="article-media" data-ref="{{ref}}">
<a href="{{url}}">
<!-- remove data-src, class and data-params after wikiaMobile is gone -->
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" alt="{{alt}}"
data-src="{{thumbnail}}" class="lazy media" data-params='[{"full":"{{url}}"}]' />
<noscript>
<img src="{{url}}" alt="{{alt}}">
</noscript>
</a>
</figure>
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"
data-src="{{thumbnail}}" class="pi-image-thumbnail lazy media article-media" alt="{{alt}}"
data-image-key="{{name}}" data-image-name="{{name}}" data-ref="{{ref}}"
data-params='[{"name":"{{name}}", "full":"{{url}}"}]'/>
</div>

View file

@ -0,0 +1,12 @@
<div class="pi-item pi-image">
<figure class="article-media" data-ref="{{ref}}">
<a href="{{url}}">
<!-- remove data-src, class and data-params after wikiaMobile is gone -->
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D" alt="{{alt}}"
data-src="{{thumbnail}}" class="lazy media" data-params='[{"full":"{{url}}"}]' />
<noscript>
<img src="{{url}}" alt="{{alt}}">
</noscript>
</a>
</figure>
</div>

View file

@ -1,6 +0,0 @@
<div class="pi-item pi-image">
<img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"
data-src="{{thumbnail}}" class="pi-image-thumbnail lazy media article-media" alt="{{alt}}"
data-image-key="{{name}}" data-image-name="{{name}}" data-ref="{{ref}}"
data-params='[{"name":"{{name}}", "full":"{{url}}"}]'/>
</div>