diff options
Diffstat (limited to 'src/pages/index.php')
-rw-r--r-- | src/pages/index.php | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/src/pages/index.php b/src/pages/index.php new file mode 100644 index 0000000..c9bf2bc --- /dev/null +++ b/src/pages/index.php @@ -0,0 +1,183 @@ +<?php + +require_once dirname(__DIR__) . '/layout.php'; + +$i18n = i18n([ + 'de' => [ + 'topics' => 'Themenbereiche', + 'volunteering' => 'Ehrenämter & Mitgliedschaften', + 'social' => 'Social & Media', + 'other' => 'Weitere Links', + ], + 'en' => [ + 'topics' => 'Topics', + 'volunteering' => 'Volunteering & Memberships', + 'social' => 'Social & Media', + 'other' => 'Other Links', + ], + 'jp' => [ + 'topics' => '話題', + 'volunteering' => 'Ehrenämterと会員', + 'social' => 'ソーシャルとメディア', + 'other' => 'その他', + ], +]); +$t = $i18n['translate']; + +$volunteering = [ + [ + 'link' => 'https://web.ecogood.org/de/', + 'title' => 'International Federation for the Economy for the Common Good e.V.', + 'extra' => [ + 'link' => 'https://bayern.ecogood.org/', + 'title' => 'in Bayern', + ], + 'icon' => '/assets/img/volunteering/gwoe_icon_57x57.png', + ], + [ + 'link' => 'https://www.bund-naturschutz.de', + 'title' => 'BUND Naturschutz in Bayern e.V.', + 'extra' => [ + 'link' => 'https://rhoen-grabfeld.bund-naturschutz.de', + 'title' => 'Kreisgruppe Rhön-Grabfeld', + ], + 'icon' => '/assets/img/volunteering/bns-favicon-32x32.png', + ], + [ + 'link' => 'https://www.fairhandeln.de', + 'title' => 'Aktion Eine Welt e.V.', + 'icon' => '/assets/img/volunteering/EWL.png', + ], +]; + +$media = [ + [ + 'link' => 'https://gemeinwohl-development.de', + 'title' => 'GEMEINWOHL.development', + 'icon' => '/assets/img/social/gd-favicon.png', + ], + [ + 'link' => 'https://gitlab.com/dweipert-3138720606', + 'title' => 'GitLab', + 'icon' => '/assets/img/social/favicon-7901bd695fb93edb07975966062049829afb56cf11511236e61bcf425070e36e.png', + ], + [ + 'link' => 'https://github.com/dweipert-3138720606', + 'title' => 'GitHub', + 'icon' => '/assets/img/social/GitHub-Mark-Light-32px.png', + ], + [ + 'link' => 'https://git.dweipert.de', + 'title' => 'Git Projects', + 'icon' => '/assets/img/social/Git-Icon-1788C.png', + ], +]; + +$other = [ + [ + 'link' => 'https://www.bad-neustadt.de/unsere-stadt/familie-freizeit/vereine', + 'title' => 'Vereine in Bad Neustadt', + ], +]; + +ob_start(); +?> +<style> +.container { + margin: 0 auto; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + justify-content: space-around; +} + +.container a { + text-decoration: none; +} + +.container ul { + padding: 0; + margin: 0; + list-style-type: none; +} + +.container li + li { + margin-top: 0.75rem; +} + +.volunteering h2 { + margin-top: 0; +} + +.volunteering__list li { + text-align: left; +} +.volunteering__list li > img { + max-height: 1.5em; + max-width: 1.5em; + vertical-align: -6px; +} + +.social__list li > a { + display: flex; + align-items: center; +} +.social__list li > a > img { + max-height: 1.5em; + max-width: 1.5em; +} +</style> +<?php +$head = ob_get_clean(); + +ob_start(); +?> +<div class="container"> + <div class="volunteering"> + <h2><?php echo $t('volunteering'); ?></h2> + <ul class="volunteering__list"> + <?php foreach ($volunteering as $idx => $v): ?> + <li> + <img src="<?php echo $v['icon']; ?>" alt="<?php echo $v['title']; ?>"> + <a href="<?php echo $v['link']; ?>" target="_blank"><?php echo $v['title']; ?></a> + <?php if (isset($v['extra'])): ?> + <span>— <a href="<?php echo $v['extra']['link']; ?>"><?php echo $v['extra']['title']; ?></a></span> + <?php endif; ?> + </li> + <?php endforeach; ?> + </ul> + </div> + + <div class="social"> + <h2><?php echo $t('social'); ?></h2> + <ul class="social__list"> + <?php foreach ($media as $idx => $m): ?> + <li> + <a href="<?php echo $m['link']; ?>" target="_blank"> + <img src="<?php echo $m['icon']; ?>" alt="<?php echo $m['title']; ?>"> + <?php echo $m['title']; ?> + </a> + </li> + <?php endforeach; ?> + </ul> + </div> + + <div class="other"> + <h2><?php echo $t('other'); ?></h2> + <ul class="social__list"> + <?php foreach ($other as $idx => $o): ?> + <li> + <a href="<?php echo $o['link']; ?>" target="_blank"> + <?php echo $o['title']; ?> + </a> + </li> + <?php endforeach; ?> + </ul> + </div> +</div> +<?php +$content = ob_get_clean(); + +layout($head, $content); |