Commit 0063209979

0063209979f22d7d63333047b6e2de187f28ff9c

parent: 4e146a6d1f

Unregistered key

cmc <hello@cmc.pub> · 2025-03-11 23:25 UTC

move from cleberg.net to cmc.pub

Layout: unified · split

.DS_Store deleted

Binary file not shown.

README.md +2 −2
@@ -26,7 +26,7 @@ sudo apt install nginx-full php php-cgi php-fpm minify
26Clone the repo: 26Clone the repo:
27 27
28``` 28```
29git clone https://git.sr.ht/~cmc/hn/ 29git clone https://git.sr.ht/~Christian Cleberg/hn/
30``` 30```
31 31
32If you need to minify CSS changes: 32If you need to minify CSS changes:
@@ -92,7 +92,7 @@ This project currently doesn't use versioning. See the git log instead.
92 92
93## Authors 93## Authors
94 94
95* **CMC** - *Literally everything* - [cmc](https://sr.ht/~cmc/) 95* **CMC** - *Literally everything* - [Christian Cleberg](https://sr.ht/~Christian Cleberg/)
96 96
97## License 97## License
98 98
index.php +2 −2
@@ -2,8 +2,8 @@
2 2
3require_once 'src/Controller/RouteController.php'; 3require_once 'src/Controller/RouteController.php';
4 4
5$GLOBALS['full_domain'] = 'https://hn.cleberg.net'; 5$GLOBALS['full_domain'] = 'https://hn.cmc.pub';
6$GLOBALS['author_name'] = 'cmc'; 6$GLOBALS['author_name'] = 'Christian Cleberg';
7$GLOBALS['site_title'] = 'hn'; 7$GLOBALS['site_title'] = 'hn';
8 8
9$route = new HN\Controllers\RouteController($_SERVER['REQUEST_URI']); 9$route = new HN\Controllers\RouteController($_SERVER['REQUEST_URI']);
src/Controller/FeedController.php +1 −1
@@ -38,7 +38,7 @@ class FeedController
38 * Request template to be presented to the user 38 * Request template to be presented to the user
39 * 39 *
40 * @access public 40 * @access public
41 * @author cmc <hello@cleberg.net> 41 * @author Christian Cleberg <hello@cmc.pub>
42 */ 42 */
43 public function render(): void 43 public function render(): void
44 { 44 {
src/Controller/RouteController.php +1 −1
@@ -26,7 +26,7 @@ class RouteController
26 * 26 *
27 * @access public 27 * @access public
28 * @return void No return type; send user to FeedController->render() or a 404 error 28 * @return void No return type; send user to FeedController->render() or a 404 error
29 * @author cmc <hello@cleberg.net> 29 * @author Christian Cleberg <hello@cmc.pub>
30 */ 30 */
31 public function routeUser(): void 31 public function routeUser(): void
32 { 32 {
src/Model/ApiService.php +10 −10
@@ -8,7 +8,7 @@ namespace HN\Models;
8 * @access public 8 * @access public
9 * @param string $api_url The API endpoint to use for extraction 9 * @param string $api_url The API endpoint to use for extraction
10 * @return mixed The API results formatted into an HTML section 10 * @return mixed The API results formatted into an HTML section
11 * @author cmc <hello@cleberg.net> 11 * @author Christian Cleberg <hello@cmc.pub>
12 */ 12 */
13function GetApiResults(string $api_url): mixed 13function GetApiResults(string $api_url): mixed
14{ 14{
@@ -23,7 +23,7 @@ function GetApiResults(string $api_url): mixed
23 * @param mixed $api_results The decoded API results 23 * @param mixed $api_results The decoded API results
24 * @param string $inline_title The <h1> title to use in the HTML 24 * @param string $inline_title The <h1> title to use in the HTML
25 * @return string $html_output The formatted HTML result of stories from the API or the error message 25 * @return string $html_output The formatted HTML result of stories from the API or the error message
26 * @author cmc <hello@cleberg.net> 26 * @author Christian Cleberg <hello@cmc.pub>
27 */ 27 */
28function ParseStories(mixed $api_results, string $inline_title): string 28function ParseStories(mixed $api_results, string $inline_title): string
29{ 29{
@@ -47,7 +47,7 @@ function ParseStories(mixed $api_results, string $inline_title): string
47 * @param mixed $api_results The decoded API results 47 * @param mixed $api_results The decoded API results
48 * @param string $inline_title The <h1> title to use in the HTML 48 * @param string $inline_title The <h1> title to use in the HTML
49 * @return string $html_output The formatted HTML result of stories from the API 49 * @return string $html_output The formatted HTML result of stories from the API
50 * @author cmc <hello@cleberg.net> 50 * @author Christian Cleberg <hello@cmc.pub>
51 */ 51 */
52function ParseUser(mixed $api_results, string $inline_title): string 52function ParseUser(mixed $api_results, string $inline_title): string
53{ 53{
@@ -94,7 +94,7 @@ function ParseUser(mixed $api_results, string $inline_title): string
94 * @param mixed $api_results The decoded API results 94 * @param mixed $api_results The decoded API results
95 * @param string $inline_title The <h1> title to use in the HTML 95 * @param string $inline_title The <h1> title to use in the HTML
96 * @return string $html_output The formatted HTML result of stories from the API or the error message 96 * @return string $html_output The formatted HTML result of stories from the API or the error message
97 * @author cmc <hello@cleberg.net> 97 * @author Christian Cleberg <hello@cmc.pub>
98 */ 98 */
99function ParseItem(mixed $api_results): string 99function ParseItem(mixed $api_results): string
100{ 100{
@@ -132,7 +132,7 @@ function ParseItem(mixed $api_results): string
132 * @access public 132 * @access public
133 * @param mixed $api_results The decoded API results 133 * @param mixed $api_results The decoded API results
134 * @return string The formatted HTML result of stories from the API or the error message 134 * @return string The formatted HTML result of stories from the API or the error message
135 * @author cmc <hello@cleberg.net> 135 * @author Christian Cleberg <hello@cmc.pub>
136 */ 136 */
137function GetItem(mixed $api_results): string 137function GetItem(mixed $api_results): string
138{ 138{
@@ -154,7 +154,7 @@ function GetItem(mixed $api_results): string
154 * @access public 154 * @access public
155 * @param mixed $api_results The decoded API results 155 * @param mixed $api_results The decoded API results
156 * @return string The formatted HTML result of stories from the API or the error message 156 * @return string The formatted HTML result of stories from the API or the error message
157 * @author cmc <hello@cleberg.net> 157 * @author Christian Cleberg <hello@cmc.pub>
158 */ 158 */
159function ConstructStory(mixed $api_results): string 159function ConstructStory(mixed $api_results): string
160{ 160{
@@ -189,7 +189,7 @@ function ConstructStory(mixed $api_results): string
189 * @access public 189 * @access public
190 * @param mixed $api_results The decoded API results 190 * @param mixed $api_results The decoded API results
191 * @return string The formatted HTML result of stories from the API or the error message 191 * @return string The formatted HTML result of stories from the API or the error message
192 * @author cmc <hello@cleberg.net> 192 * @author Christian Cleberg <hello@cmc.pub>
193 */ 193 */
194function ConstructStoryDiscussion(mixed $api_results): string 194function ConstructStoryDiscussion(mixed $api_results): string
195{ 195{
@@ -241,7 +241,7 @@ function ConstructStoryDiscussion(mixed $api_results): string
241 * @access public 241 * @access public
242 * @param mixed $api_results The decoded API results 242 * @param mixed $api_results The decoded API results
243 * @return string The formatted HTML result of stories from the API or the error message 243 * @return string The formatted HTML result of stories from the API or the error message
244 * @author cmc <hello@cleberg.net> 244 * @author Christian Cleberg <hello@cmc.pub>
245 */ 245 */
246function ConstructComment(mixed $api_results): string 246function ConstructComment(mixed $api_results): string
247{ 247{
@@ -265,7 +265,7 @@ function ConstructComment(mixed $api_results): string
265 * @access public 265 * @access public
266 * @param mixed $api_results The decoded API results 266 * @param mixed $api_results The decoded API results
267 * @return string The formatted HTML result of stories from the API or the error message 267 * @return string The formatted HTML result of stories from the API or the error message
268 * @author cmc <hello@cleberg.net> 268 * @author Christian Cleberg <hello@cmc.pub>
269 */ 269 */
270function ConstructPoll(mixed $api_results): string 270function ConstructPoll(mixed $api_results): string
271{ 271{
@@ -278,7 +278,7 @@ function ConstructPoll(mixed $api_results): string
278 * @access public 278 * @access public
279 * @param mixed $api_results The decoded API results 279 * @param mixed $api_results The decoded API results
280 * @return string The formatted HTML result of stories from the API or the error message 280 * @return string The formatted HTML result of stories from the API or the error message
281 * @author cmc <hello@cleberg.net> 281 * @author Christian Cleberg <hello@cmc.pub>
282 */ 282 */
283function ConstructPollOpt(mixed $api_results): string 283function ConstructPollOpt(mixed $api_results): string
284{ 284{
src/Model/CacheService.php +1 −1
@@ -5,6 +5,6 @@
5 * 5 *
6 * @access public 6 * @access public
7 * @return void 7 * @return void
8 * @author cmc <hello@cleberg.net> 8 * @author Christian Cleberg <hello@cmc.pub>
9 */ 9 */
10function CacheService() {}\ No newline at end of file 10function CacheService() {}\ No newline at end of file