Skip to content
Commits on Source (3)
......@@ -523,6 +523,33 @@ function getScreenshots($os) {
return isset($screenshots[$os]) ? $screenshots[$os] : null;
}
function getImageOrientation($imgPath) {
$aspect = 'landscape';
if (substr($imgPath, 0, 4) != "http" && substr($imgPath, 0, 2) == '//') {
$imgPath = 'http:'.$imgPath;
}
$size = getimagesize($imgPath);
if ($size[0] < $size[1]) {
$aspect = 'portrait';
}
return $aspect;
}
function drawScreenshots($screenshots) {
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2 '.getImageOrientation($screenshot['src']).'">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
}
/*
* Draw the download section.
* If a OS is given it will draw a carousel of screenshots instead of a VLC icon.
......@@ -546,18 +573,7 @@ function drawVLCdownloadSection($os = null, $dropdownItems = null, $displayMainO
</div>
<?php
} else {
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'"/>';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
drawScreenshots($screenshots);
}
?>
<div class="v-align <?php echo is_null($screenshots) ? 'col-sm-7' : 'col-sm-5'?>">
......
......@@ -80,6 +80,10 @@ $bg-color-hover: rgba(0, 0, 0, 0.4);
@include aspect-ratio(16, 9);
}
#header-carousel .screenshot2.portrait img {
max-height: 100%;
}
#header-carousel img {
text-align: center;
max-width: 100%;
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -21,20 +21,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -20,18 +20,7 @@
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
drawScreenshots($screenshots);
?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......
......@@ -19,20 +19,7 @@
?>
<section class="download-wrapper">
<div class="row reorder-xs">
<?php
echo '<div class="v-align carousel-padding-xs col-xs-12 col-sm-5 col-sm-offset-1 col-sm-pull-1"><div id="header-carousel">';
$first = true;
foreach($screenshots as $screenshot) {
$src = $first ? $screenshot['src'] : '';
$srcLazy = $first ? '' : $screenshot['src'];
$dom = '<div class="screenshot2">';
$dom .= '<img src="'.$src.'" alt="'.$screenshot['name'].'" data-lazy="'.$srcLazy.'">';
$dom .= '</div>';
echo $dom;
$first = false;
}
echo '</div></div>';
?>
<?php drawScreenshots($screenshots); ?>
<div class="v-align col-sm-5">
<div class="center-font-xs">
<?php image('largeVLC.png', 'Large Orange VLC media player Traffic Cone Logo', 'big-vlc-img img-responsive visible-xs-inline-block v-align'); ?>
......