Пример #1
0
function getOGImages()
{
    $dir = "resources/images/introduction";
    $images = loadJpgFiles($dir);
    for ($i = 0; $i < count($images); $i++) {
        $imagePath = "obrazky/uvodni/" . substr("{$dir}/{$images[$i]}", 30);
        echo "<meta property=\"og:image\" content=\"http://www.patchwork-verka.cz/{$imagePath}\" />";
    }
}
Пример #2
0
function createCarouselItems($dir)
{
    $images = loadJpgFiles($dir);
    for ($i = 0; $i < count($images); $i++) {
        if ($i === 0) {
            echo "<div class=\"active item\">";
        } else {
            echo "<div class=\"item\">";
        }
        $pom = $i + 1;
        $imagePath = "/obrazky/uvodni/" . substr("{$dir}/{$images[$i]}", 30);
        echo "<img class=\"img-responsive center-block\" src=\"{$imagePath}\" alt=\"Úvod - foto {$pom}.\" />";
        echo "</div>";
    }
}
Пример #3
0
function createImageGallery($dir, $altName)
{
    $images = loadJpgFiles($dir);
    $images = array_reverse($images);
    echo "<div class=\"row\">";
    for ($i = 0; $i < count($images); $i++) {
        $refImagePath = "/obrazky/galerie/" . substr("{$dir}/{$images[$i]}", 25);
        $imagePath = "/obrazky/nahledy/" . substr("{$dir}/{$images[$i]}", 25);
        $pom = $i + 1;
        echo "<div class=\"col-md-4 col-sm-6 col-xs-12 gallery\">";
        echo "<a href=\"{$refImagePath}\" target=\"_blank\" title=\"Zobrazení obrázku v galerii {$altName}\" class=\"thumbnail\">";
        echo "<img alt=\"{$altName} - foto {$pom}.\" src=\"{$imagePath}\" class=\"img-responsive\">";
        echo "</a>";
        echo "</div>";
    }
    echo "</div>";
}