diff options
Diffstat (limited to '')
-rw-r--r-- | index.php | 55 |
1 files changed, 22 insertions, 33 deletions
@@ -32,6 +32,26 @@ foreach ($storiesDirContent as $storyName) { $currentStoryName = visibleName($currentStory); +function printEntities($entities) { + foreach ($entities as $entity=>$description) { + $name = visibleName($entity); + <!-- <?=$name;?> --> + <div class="row"> + <div class="col-md-7 text-center"> + <img class="img-fluid rounded mb-3 mb-md-0 figure-pic" src="stories/<?=urlencode($entity)?>/<?=urlencode($entity);?>/passphoto.png" alt="<?=$name;?>" title="<?=$name;?>"> + </div> + <div class="col-md-5"> + <h3><?=$name;?></h3> + <p class="figure-desc"><?=$description;?></p> + </div> + </div> + <!-- /.row --> + + <hr> + <?php + } +} + ?> <!DOCTYPE html> <html lang="de"> @@ -93,40 +113,9 @@ $currentStoryName = visibleName($currentStory); </div> </div> <?php - foreach ($characters as $character=>$characterDescription) { - $characterName = visibleName($character); - ?> - <!-- <?=$characterName;?> --> - <div class="row"> - <div class="col-md-7 text-center"> - <img class="img-fluid rounded mb-3 mb-md-0 figure-pic" src="stories/<?=urlencode($currentStory)?>/<?=urlencode($character);?>/passphoto.png" alt="<?=$characterName;?>" title="<?=$characterName;?>"> - </div> - <div class="col-md-5"> - <h3><?=$characterName;?></h3> - <p class="figure-desc"><?=$characterDescription;?></p> - </div> - </div> - <!-- /.row --> - - <hr> - <?php - } + printEntities($characters); } else { - foreach ($stories as $story=>$storyDescription) { - $storyName = visibleName($story); -?> - <div class="row"> - <div class="col-md-7 text-center"> - <img class="img-fluid mb-3 mb-md-0 story-logo" src="stories/<?=urlencode($story);?>/logo.png" alt="<?=$storyName;?>" title="<?=$storyName;?>"> - </div> - <div class="col-md-5"> - <h3><?=$storyName;?></h3> - <p class="figure-desc"><?=$storyDescription;?></p> - </div> - </div> - </div> -<? - } + printEntities(stories); } ?> </div> |