diff --git a/public/api/db.php b/public/api/db.php index e3b08d9..80d900c 100644 --- a/public/api/db.php +++ b/public/api/db.php @@ -91,4 +91,23 @@ function get_db() { } return $pdo; +} + +// --------------------------------------------------------------------- +// Category Definitions +// Returns associative Array of Category Keys to Labels, Icons, +// and Colors. Shared between Citizen Participation Portal and +// Moderation Page. +// ToDo: Move to Database Table. +// --------------------------------------------------------------------- +function get_categories() { + return [ + 'consumption' => ['label' => 'Geschäfte', 'faIcon' => 'fa-cart-shopping', 'color' => '#C00000'], + 'building' => ['label' => 'Bauen', 'faIcon' => 'fa-building', 'color' => '#E65100'], + 'energy' => ['label' => 'Energie', 'faIcon' => 'fa-bolt', 'color' => '#FFC000'], + 'environment' => ['label' => 'Umwelt', 'faIcon' => 'fa-seedling', 'color' => '#92D050'], + 'mobility' => ['label' => 'Mobilität', 'faIcon' => 'fa-bus', 'color' => '#0070C0'], + 'industry' => ['label' => 'Industrie', 'faIcon' => 'fa-industry', 'color' => '#7030A0'], + 'other' => ['label' => 'Sonstiges', 'faIcon' => 'fa-thumbtack', 'color' => '#7F7F7F'], + ]; } \ No newline at end of file