aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2023-06-14 22:07:28 +0100
committerFrankie B <frankieraybrown@gmail.com>2023-06-14 22:15:44 +0100
commitc338c310ac584408bfa01c3e6f18986d4e03baab (patch)
tree89d6c25e2deb7ff2c3e9a49bf298fd552c34b81a
parent57190b2f773a340d4a6ebb1785bf8bc4e90eeef2 (diff)
feat: projects page
-rw-r--r--config/projects.php138
-rw-r--r--resources/views/pages/projects.blade.php16
-rw-r--r--routes/web.php4
3 files changed, 158 insertions, 0 deletions
diff --git a/config/projects.php b/config/projects.php
new file mode 100644
index 0000000..36a150e
--- /dev/null
+++ b/config/projects.php
@@ -0,0 +1,138 @@
+<?php
+class ProjectURL {
+ /**
+ * @var string The name of the ProjectURL.
+ */
+ public $name;
+
+ /**
+ * @var string The URL of the ProjectURL.
+ */
+ public $url;
+
+ /**
+ * Bookmark constructor.
+ * @param string $name The name of the ProjectURL.
+ * @param string $url The URL of the ProjectURL.
+ */
+ public function __construct($name, $url) {
+ $this->name = $name;
+ $this->url = $url;
+ }
+}
+
+class Project {
+ /**
+ * @var string The name of the project.
+ */
+ public $name;
+
+ /**
+ * @var string The description of the project.
+ */
+ public $description;
+
+ /**
+ * @var string The URL of the project.
+ */
+ public $url;
+
+ /**
+ * @var array Languages used in the project.
+ */
+ public $languages;
+
+ /**
+ * BookmarkCategory constructor.
+ * @param string $name The name of the project.
+ * @param string $description The description of the project.
+ * @param string The URL of the project.
+ * @param array $languages Languages used in the project.s
+ */
+ public function __construct($name, $description, $url, $languages = array()) {
+ $this->name = $name;
+ $this->description = $description;
+ $this->url = $url;
+ $this->languages = $languages;
+ }
+}
+
+class ProjectCategory {
+ /**
+ * @var string The name of the bookmark category.
+ */
+ public $name;
+
+ /**
+ * @var array An array of Project objects.
+ */
+ public $projects;
+
+ /**
+ * BookmarkCategory constructor.
+ * @param string $name The name of the bookmark category.
+ * @param array $projects An array of Project objects.
+ */
+ public function __construct($name, $projects = array()) {
+ $this->name = $name;
+ $this->projects = $projects;
+ }
+}
+
+
+return [
+ new ProjectCategory("Websites", [
+ new Project(
+ "diskfloppy.me",
+ "The website you're looking at right now!",
+ "https://github.com/floppydisk05/diskfloppy.me",
+ [ "PHP", "CSS" ]),
+ new Project(
+ "NetDrivers",
+ "Driver downloads website.",
+ "https://github.com/floppydisk05/NetDrivers",
+ [ "Ruby", "CSS" ])
+ ]),
+ new ProjectCategory("APIs", [
+ new Project(
+ "trivia-api",
+ "API to serve random trivia questions.",
+ "https://github.com/floppydisk05/trivia-api",
+ [ "JavaScript" ]
+ )
+ ]),
+ new ProjectCategory("Discord Bots", [
+ new Project(
+ "PlexBot",
+ "A basic bot to play music from the configured Plex server in a Discord voice channel.",
+ "https://github.com/floppydisk05/PlexBot",
+ [ "Python" ]
+ )
+ ]),
+ new ProjectCategory("Abandoned Projects", [
+ new Project(
+ "website-cf",
+ "Rewrite of my personal website in Adobe ColdFusion.",
+ "https://github.com/floppydisk05/website-cf",
+ [ "Adobe ColdFusion" ]
+ ),
+ new Project(
+ "WinBotJDA",
+ "Rewrite of CamK06's WinBot using Java and DiscordJDA.",
+ "https://github.com/floppydisk05/WinBotJDA",
+ [ "Java" ]
+ ),
+ new Project(
+ "delayed-eject",
+ "Scripts which eject the cd drive a lot to annoy nick.",
+ "https://github.com/floppydisk05/delayed-eject",
+ [ "Shell", "C" ]
+ ),
+ new Project(
+ "php-sound",
+ "Plays a specified sound file or files on the web server when a php page is loaded.",
+ "https://github.com/floppydisk05/php-sound",
+ [ "PHP", "Shell" ]
+ )
+ ])
+];
diff --git a/resources/views/pages/projects.blade.php b/resources/views/pages/projects.blade.php
new file mode 100644
index 0000000..dcb3c43
--- /dev/null
+++ b/resources/views/pages/projects.blade.php
@@ -0,0 +1,16 @@
+<?php $categories = app('config')->get('projects'); ?>
+@extends('layouts.default')
+@section('title', 'test')
+@section('description', 'This is the personal homepage of floppydisk.')
+@section('content')
+@foreach ($categories as $category)
+ <h1>{{ $category->name}}</h1>
+ @foreach ($category->projects as $project)
+ <div>
+ <a href="{{ $project->url }}">{{ $project->name }}</a> - {{ $project->description }}<br/>
+ <b>Languages:</b> {{ implode(", ", $project->languages) }}
+ </div>
+ <br/>
+ @endforeach
+@endforeach
+@stop
diff --git a/routes/web.php b/routes/web.php
index 97506dd..4bdc1c2 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -20,3 +20,7 @@ Route::get('/', function () {
Route::get('/bookmarks', function () {
return View::make('pages.bookmarks');
});
+
+Route::get('/projects', function () {
+ return View::make('pages.projects');
+});