mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 03:35:53 +00:00
hide changes after flag
This commit is contained in:
parent
1b2a5bb417
commit
2e5f90f543
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
22
templates/PortableInfoboxItemHeroMobileExperimental.mustache
Normal file
22
templates/PortableInfoboxItemHeroMobileExperimental.mustache
Normal 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>
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
Loading…
Reference in a new issue