fix: make configs serializable
This commit is contained in:
parent
e5ac640025
commit
c7a1b41a19
8 changed files with 175 additions and 207 deletions
|
@ -1,31 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
class Bookmark {
|
|
||||||
/**
|
|
||||||
* @var string The name of the bookmark.
|
|
||||||
*/
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string The URL of the bookmark.
|
|
||||||
*/
|
|
||||||
public $url;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string The description of the bookmark.
|
|
||||||
*/
|
|
||||||
public $description;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bookmark constructor.
|
|
||||||
* @param string $name The name of the bookmark.
|
|
||||||
* @param string $url The URL of the bookmark.
|
|
||||||
* @param string $description The description of the bookmark.
|
|
||||||
*/
|
|
||||||
public function __construct($name, $url, $description) {
|
|
||||||
$this->name = $name;
|
|
||||||
$this->url = $url;
|
|
||||||
$this->description = $description;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
class BookmarkCategory {
|
|
||||||
/**
|
|
||||||
* @var string The name of the bookmark category.
|
|
||||||
*/
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array An array of Bookmark objects.
|
|
||||||
*/
|
|
||||||
public $bookmarks;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BookmarkCategory constructor.
|
|
||||||
* @param string $name The name of the bookmark category.
|
|
||||||
* @param array $bookmarks An array of Bookmark objects.
|
|
||||||
*/
|
|
||||||
public function __construct($name, $bookmarks = array()) {
|
|
||||||
$this->name = $name;
|
|
||||||
$this->bookmarks = $bookmarks;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +1,103 @@
|
||||||
<?php
|
<?php
|
||||||
use App\Models\Bookmark;
|
|
||||||
use App\Models\BookmarkCategory;
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
new BookmarkCategory("Friends' Websites", [
|
[
|
||||||
new Bookmark("nick99nack", "http://www.nick99nack.com/", "Currently in the process of taking over the internet. I Totally didn't steal any of his stuff."),
|
'name' => "Friends' Websites",
|
||||||
new Bookmark("campos", "https://campos02.me/", "Cool brazilian dude, does programming and stuff"),
|
'bookmarks' => [
|
||||||
new Bookmark("Sashi", "https://joshuaalto.com/", "Site redesign #8! I'll find a website style I enjoy eventually, I swear!"),
|
[
|
||||||
new Bookmark("noone", "http://strangenessnetworks.com/", "Strangeness Networks, noone's website."),
|
'name' => "nick99nack",
|
||||||
new Bookmark("raf", "https://notashelf.dev/", "is a shelf"),
|
'url' => "http://www.nick99nack.com/",
|
||||||
new Bookmark("CamK06", "https://starman0620.neocities.org/", "Now with more outdated HTML!"),
|
'description' => "Currently in the process of taking over the internet. I Totally didn't steal any of his stuff."
|
||||||
new Bookmark("HIDEN", "https://hiden.pw/", "Moar buttons!"),
|
],
|
||||||
new Bookmark("coco", "http://cocomark.neocities.org/", "needs to go to the brain store"),
|
[
|
||||||
new Bookmark("Toxidation", "http://toxi.pw/", "h (idk if this is his actual domain he has like 5)"),
|
'name' => "campos",
|
||||||
new Bookmark("xproot", "http://xproot.pw/", "a random internet person on this very random planet")
|
'url' => "https://campos02.me/",
|
||||||
]),
|
'description' => "Cool brazilian dude, does programming and stuff"
|
||||||
new BookmarkCategory("Cool Projects", [
|
],
|
||||||
new Bookmark("ToS;DR", "https://tosdr.org/", "\"I have read and agree to the Terms\" is the biggest lie on the web. They aim to fix that."),
|
[
|
||||||
new Bookmark("NINA", "https://nina.chat/", "Yahoo! Messenger (and soon AOL) revival"),
|
'name' => "Sashi",
|
||||||
new Bookmark("Escargot", "https://escargot.chat/", "MSN/WLM revival"),
|
'url' => "https://joshuaalto.com/",
|
||||||
]),
|
'description' => "Site redesign #8! I'll find a website style I enjoy eventually, I swear!"
|
||||||
new BookmarkCategory("Other Cool Stuff", [
|
],
|
||||||
new Bookmark("WinWorld", "http://www.winworldpc.com/", "WinWorld is an online museum dedicated to the preservation and sharing of vintage, abandoned, and pre-release software."),
|
[
|
||||||
new Bookmark("ToastyTech", "http://toastytech.com/", "Nathan's Toasty Technology Page"),
|
'name' => "noone",
|
||||||
new Bookmark("Optimized for no one", "http://www.hoary.org/browse/", "Optimized for no one, but pretty much OK with . . ."),
|
'url' => "http://strangenessnetworks.com/",
|
||||||
new Bookmark("Cameron's World", "http://www.cameronsworld.net/", "A love letter to the Internet of old.")
|
'description' => "Strangeness Networks, noone's website."
|
||||||
])
|
],
|
||||||
|
[
|
||||||
|
'name' => "raf",
|
||||||
|
'url' => "https://notashelf.dev/",
|
||||||
|
'description' => "is a shelf"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "CamK06",
|
||||||
|
'url' => "https://starman0620.neocities.org/",
|
||||||
|
'description' => "Now with more outdated HTML!"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "HIDEN",
|
||||||
|
'url' => "https://hiden.pw/",
|
||||||
|
'description' => "Moar buttons!"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "coco",
|
||||||
|
'url' => "http://cocomark.neocities.org/",
|
||||||
|
'description' => "needs to go to the brain store"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Toxidation",
|
||||||
|
'url' => "http://toxi.pw/",
|
||||||
|
'description' => "h (idk if this is his actual domain he has like 5)"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "xproot",
|
||||||
|
'url' => "http://xproot.pw/",
|
||||||
|
'description' => "a random internet person on this very random planet"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Cool Projects",
|
||||||
|
'bookmarks' => [
|
||||||
|
[
|
||||||
|
'name' => "ToS;DR",
|
||||||
|
'url' => "https://tosdr.org/",
|
||||||
|
'description' => "\"I have read and agree to the Terms\" is the biggest lie on the web. They aim to fix that."
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "NINA",
|
||||||
|
'url' => "https://nina.chat/",
|
||||||
|
'description' => "Yahoo! Messenger (and soon AOL) revival"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Escargot",
|
||||||
|
'url' => "https://escargot.chat/",
|
||||||
|
'description' => "MSN/WLM revival"
|
||||||
|
],
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Other Cool Stuff",
|
||||||
|
'bookmarks' => [
|
||||||
|
[
|
||||||
|
'name' => "WinWorld",
|
||||||
|
'url' => "http://www.winworldpc.com/",
|
||||||
|
'description' => "WinWorld is an online museum dedicated to the preservation and sharing of vintage, abandoned, and pre-release software."
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "ToastyTech",
|
||||||
|
'url' => "http://toastytech.com/",
|
||||||
|
'description' => "Nathan's Toasty Technology Page"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Optimized for no one",
|
||||||
|
'url' => "http://www.hoary.org/browse/",
|
||||||
|
'description' => "Optimized for no one, but pretty much OK with . . ."
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "Cameron's World",
|
||||||
|
'url' => "http://www.cameronsworld.net/",
|
||||||
|
'description' => "A love letter to the Internet of old."
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,60 +1,71 @@
|
||||||
<?php
|
<?php
|
||||||
use App\Models\Project;
|
|
||||||
use App\Models\ProjectCategory;
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
new ProjectCategory("Websites", [
|
[
|
||||||
new Project(
|
'name' => "Websites",
|
||||||
"diskfloppy.me",
|
'projects' => [
|
||||||
"The website you're looking at right now!",
|
[
|
||||||
"https://github.com/floppydisk05/diskfloppy.me",
|
'name' => "diskfloppy.me",
|
||||||
[ "PHP", "CSS" ]),
|
'description' => "The website you're looking at right now!",
|
||||||
new Project(
|
'url' => "https://github.com/floppydisk05/diskfloppy.me",
|
||||||
"NetDrivers",
|
'languages' => ["PHP", "CSS"]
|
||||||
"Driver downloads website.",
|
],
|
||||||
"https://github.com/floppydisk05/NetDrivers",
|
[
|
||||||
[ "Ruby", "CSS" ])
|
'name' => "NetDrivers",
|
||||||
]),
|
'description' => "Driver downloads website.",
|
||||||
new ProjectCategory("APIs", [
|
'url' => "https://github.com/floppydisk05/NetDrivers",
|
||||||
new Project(
|
'languages' => ["Ruby", "CSS"]
|
||||||
"trivia-api",
|
]
|
||||||
"API to serve random trivia questions.",
|
]
|
||||||
"https://github.com/floppydisk05/trivia-api",
|
],
|
||||||
[ "JavaScript" ]
|
[
|
||||||
)
|
'name' => "APIs",
|
||||||
]),
|
'projects' => [
|
||||||
new ProjectCategory("Discord Bots", [
|
[
|
||||||
new Project(
|
'name' => "trivia-api",
|
||||||
"PlexBot",
|
'description' => "API to serve random trivia questions.",
|
||||||
"A basic bot to play music from the configured Plex server in a Discord voice channel.",
|
'url' => "https://github.com/floppydisk05/trivia-api",
|
||||||
"https://github.com/floppydisk05/PlexBot",
|
'languages' => ["JavaScript"]
|
||||||
[ "Python" ]
|
]
|
||||||
)
|
]
|
||||||
]),
|
],
|
||||||
new ProjectCategory("Abandoned Projects", [
|
[
|
||||||
new Project(
|
'name' => "Discord Bots",
|
||||||
"website-cf",
|
'projects' => [
|
||||||
"Rewrite of my personal website in Adobe ColdFusion.",
|
[
|
||||||
"https://github.com/floppydisk05/website-cf",
|
'name' => "PlexBot",
|
||||||
[ "Adobe ColdFusion" ]
|
'description' => "A basic bot to play music from the configured Plex server in a Discord voice channel.",
|
||||||
),
|
'url' => "https://github.com/floppydisk05/PlexBot",
|
||||||
new Project(
|
'languages' => ["Python"]
|
||||||
"WinBotJDA",
|
]
|
||||||
"Rewrite of CamK06's WinBot using Java and DiscordJDA.",
|
]
|
||||||
"https://github.com/floppydisk05/WinBotJDA",
|
],
|
||||||
[ "Java" ]
|
[
|
||||||
),
|
'name' => "Abandoned Projects",
|
||||||
new Project(
|
'projects' => [
|
||||||
"delayed-eject",
|
[
|
||||||
"Scripts which eject the cd drive a lot to annoy nick.",
|
'name' => "website-cf",
|
||||||
"https://github.com/floppydisk05/delayed-eject",
|
'description' => "Rewrite of my personal website in Adobe ColdFusion.",
|
||||||
[ "Shell", "C" ]
|
'url' => "https://github.com/floppydisk05/website-cf",
|
||||||
),
|
'languages' => ["Adobe ColdFusion"]
|
||||||
new Project(
|
],
|
||||||
"php-sound",
|
[
|
||||||
"Plays a specified sound file or files on the web server when a php page is loaded.",
|
'name' => "WinBotJDA",
|
||||||
"https://github.com/floppydisk05/php-sound",
|
'description' => "Rewrite of CamK06's WinBot using Java and DiscordJDA.",
|
||||||
[ "PHP", "Shell" ]
|
'url' => "https://github.com/floppydisk05/WinBotJDA",
|
||||||
)
|
'languages' => ["Java"]
|
||||||
])
|
],
|
||||||
|
[
|
||||||
|
'name' => "delayed-eject",
|
||||||
|
'description' => "Scripts which eject the cd drive a lot to annoy nick.",
|
||||||
|
'url' => "https://github.com/floppydisk05/delayed-eject",
|
||||||
|
'languages' => ["Shell", "C"]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => "php-sound",
|
||||||
|
'description' => "Plays a specified sound file or files on the web server when a php page is loaded.",
|
||||||
|
'url' => "https://github.com/floppydisk05/php-sound",
|
||||||
|
'languages' => ["PHP", "Shell"]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
@section('description', 'This is the personal homepage of floppydisk.')
|
@section('description', 'This is the personal homepage of floppydisk.')
|
||||||
@section('content')
|
@section('content')
|
||||||
@foreach ($categories as $category)
|
@foreach ($categories as $category)
|
||||||
<h1>{{ $category->name }}</h1>
|
<h1>{{ $category['name'] }}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
@foreach ($category->bookmarks as $bookmark)
|
@foreach ($category['bookmarks'] as $bookmark)
|
||||||
<li><a href="{{ $bookmark->url }}">{{ $bookmark->name }}</a> - {{ $bookmark->description }}</li>
|
<li><a href="{{ $bookmark['url'] }}">{{ $bookmark['name'] }}</a> - {{ $bookmark['description'] }}</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
@section('description', 'This is the personal homepage of floppydisk.')
|
@section('description', 'This is the personal homepage of floppydisk.')
|
||||||
@section('content')
|
@section('content')
|
||||||
@foreach ($categories as $category)
|
@foreach ($categories as $category)
|
||||||
<h1>{{ $category->name}}</h1>
|
<h1>{{ $category['name']}}</h1>
|
||||||
@foreach ($category->projects as $project)
|
@foreach ($category['projects'] as $project)
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ $project->url }}">{{ $project->name }}</a> - {{ $project->description }}<br/>
|
<a href="{{ $project['url'] }}">{{ $project['name'] }}</a> - {{ $project['description'] }}<br/>
|
||||||
<b>Languages:</b> {{ implode(", ", $project->languages) }}
|
<b>Languages:</b> {{ implode(", ", $project['languages']) }}
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
Loading…
Reference in a new issue