mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-14 05:13:46 +02:00
This PR refactors some texts on the about page (again), and also a adds two new endpoints for a database table that I have now made public that tracks the coffee cups I've had. The endpoint itself is not public now but I might make a page (something like `/about/coffee`) that presents it in a not-ugly way. Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/28
41 lines
No EOL
1.1 KiB
PHP
41 lines
No EOL
1.1 KiB
PHP
<?php
|
|
|
|
namespace VLW;
|
|
|
|
/**
|
|
* # Media
|
|
* Constants related to media files
|
|
*/
|
|
const MEDIA_DIR = "/public/assets/media/";
|
|
const ICONS_DIR = MEDIA_DIR . "icons/";
|
|
const DEFAULT_BUTTON_ICON = ICONS_DIR . "chevron.svg";
|
|
|
|
/**
|
|
* # Search
|
|
* Constants for the search API endpoint
|
|
*/
|
|
const SEARCH_QUERY_MAX_LENGTH = 2048;
|
|
const SEARCH_UPDATE_CACHE_PARM = "update";
|
|
|
|
/**
|
|
* # Timeline
|
|
* Constants related to the work timeline
|
|
*/
|
|
const TIMELINE_PREVIEW_LIMIT_PARAM = "limit";
|
|
const TIMELINE_PREVIEW_LIMIT_COUNT = 5;
|
|
|
|
/**
|
|
* # Coffee
|
|
* Constants related to the coffee endpoints
|
|
*/
|
|
const COFFEE_STATS_UPDATE_PARAM = "update";
|
|
|
|
/**
|
|
* # Forgejo
|
|
* Constants related to the fetching and caching of real-time prog. language use on Forgejo
|
|
*/
|
|
const FORGEJO_HREF = "https://git.vlw.se/explore/repos?q=&sort=recentupdate&language=";
|
|
const FORGEJO_ENDPOINT_USER = "/api/v1/users/%s";
|
|
const FORGEJO_ENDPOINT_SEARCH = "/api/v1/repos/search?uid=%s";
|
|
const FORGEJO_SI_BYTE_MULTIPLE = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
const FORGEJO_UPDATE_CACHE_PARAM = "update"; |