Squashed commit of the following: commit ade162a90192325721fb5007dbd9976a3121c968 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Nov 4 12:08:51 2017 +0000 Compress frontend assets commit cbb35750b1068f0cc5eaccd330ac5ba6ad514491 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Nov 4 12:02:58 2017 +0000 the brotli executable has been renamed to `brotli` commit 413b330d6982653fb7edf49c83a3464335dde1ad Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Nov 4 11:17:32 2017 +0000 Update changelog commit 4fc41cf546743fc6ae31a4c62c0f8152f13067d7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Nov 4 09:47:55 2017 +0000 Add some minor layout improvements for mobile commit 5b4c5a16589f54469bdbb6aa3829a5e0d2ed2591 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Nov 2 10:26:47 2017 +0000 Recompiled assets commit fe14725f39d529c560f47c525e4deb70ea60b990 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Nov 2 10:26:11 2017 +0000 Add solarized light colour scheme commit e359f66b069efbe65b60780687a8d21d09f259c2 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Nov 2 10:24:50 2017 +0000 Refer to termcolors not base16 base numbers commit 0d794e1b69dc2f98bc663d4b4804fa47d484dc98 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Nov 2 10:23:07 2017 +0000 Use termcolors so we can pull in other colour schemes such as solarized commit 28e2ec2a4495d045876677703158ff3c547dd503 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Nov 1 20:56:55 2017 +0000 Allow theme to be selected, save the selection in the session commit 53e2aafa93324538dbcc8220b1eca5a1087d2a2f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 15:41:18 2017 +0000 colour picker now shows current value commit 6a9a0a880bbd0d01394bf6403f5ec607d5b300f6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 15:14:19 2017 +0000 Use a form element commit ff7f0e35c3e17872bebc45c8eba328f4a4352903 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 15:10:57 2017 +0000 Add option to change colour scheme in the HTML, js to add next commit 6b9de5869835cc44d9db162f0d217f302f7025ec Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 15:07:52 2017 +0000 Add the base16 colour schemes commit e18ff119c33edd135e4b4b34052381803d39734f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 11:59:40 2017 +0000 Remove bullet points from tags commit f4f013c323073f7b4e8b7e196d0078aab3d29878 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 30 10:30:39 2017 +0000 Some more styling, particularly tags, added a base16 colour scheme commit 81e8773969503e8d52840039b6fe0922cabd3dcc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Oct 27 16:20:29 2017 +0100 Compiled app.css commit 19e960b713fd880cccfd7e2db63013b5b2127dbd Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Oct 27 16:17:17 2017 +0100 Remove unused .scss files commit 5900d8a4bb4fc54003b84e42dd938d44e8fb46ea Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Oct 27 16:14:58 2017 +0100 Most pages now have acceptible layout, removed colour scheme, will be in future commit commit ec15d1c5e388f8224ffbc3a2074714cc9bc4ce6b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Oct 26 19:02:40 2017 +0100 Updated frontend css commit 2000e5c582ac3dd45c9b67bf680d219a60190725 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Oct 26 19:01:14 2017 +0100 Very basic restyling of the site commit a3959377ff4595ab956dfb82fa7404fcdde81310 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Oct 23 09:00:30 2017 +0100 Improved spacing/indenting of html in views commit 66f2dcfd1f2c5a779cedad78c11f627c2d39e01f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Oct 22 22:45:10 2017 +0100 Remove most styles
168 lines
6.5 KiB
PHP
168 lines
6.5 KiB
PHP
<?php
|
||
|
||
/*
|
||
|--------------------------------------------------------------------------
|
||
| Web Routes
|
||
|--------------------------------------------------------------------------
|
||
|
|
||
| Here is where you can register web routes for your application. These
|
||
| routes are loaded by the RouteServiceProvider within a group which
|
||
| contains the "web" middleware group. Now create something great!
|
||
|
|
||
*/
|
||
|
||
Route::group(['domain' => config('url.longurl')], function () {
|
||
Route::get('/', 'NotesController@index');
|
||
|
||
//Static project page
|
||
Route::view('projects', 'projects');
|
||
|
||
//Static colophon page
|
||
Route::view('colophon', 'colophon');
|
||
|
||
//The login routes to get authe'd for admin
|
||
Route::get('login', 'AuthController@showLogin')->name('login');
|
||
Route::post('login', 'AuthController@login');
|
||
|
||
//Admin pages grouped for filter
|
||
Route::group([
|
||
'middleware' => 'myauth',
|
||
'namespace' => 'Admin',
|
||
'prefix' => 'admin',
|
||
], function () {
|
||
Route::get('/', 'HomeController@welcome');
|
||
|
||
//Articles
|
||
Route::group(['prefix' => 'blog'], function () {
|
||
Route::get('/', 'ArticlesController@index');
|
||
Route::get('/create', 'ArticlesController@create');
|
||
Route::post('/', 'ArticlesController@store');
|
||
Route::get('/{id}/edit', 'ArticlesController@edit');
|
||
Route::put('/{id}', 'ArticlesController@update');
|
||
Route::delete('/{id}', 'ArticlesController@destroy');
|
||
});
|
||
|
||
//Notes
|
||
Route::group(['prefix' => 'notes'], function () {
|
||
Route::get('/', 'NotesController@index');
|
||
Route::get('/create', 'NotesController@create');
|
||
Route::post('/', 'NotesController@store');
|
||
Route::get('/{id}/edit', 'NotesController@edit');
|
||
Route::put('/{id}', 'NotesController@update');
|
||
Route::delete('/{id}', 'NotesController@destroy');
|
||
});
|
||
|
||
//Micropub Clients
|
||
Route::group(['prefix' => 'clients'], function () {
|
||
Route::get('/', 'ClientsController@index');
|
||
Route::get('/create', 'ClientsController@create');
|
||
Route::post('/', 'ClientsController@store');
|
||
Route::get('/{id}/edit', 'ClientsController@edit');
|
||
Route::put('/{id}', 'ClientsController@update');
|
||
Route::delete('/{id}', 'ClientsController@destroy');
|
||
});
|
||
|
||
//Contacts
|
||
Route::group(['prefix' => 'contacts'], function () {
|
||
Route::get('/', 'ContactsController@index');
|
||
Route::get('/create', 'ContactsController@create');
|
||
Route::post('/', 'ContactsController@store');
|
||
Route::get('/{id}/edit', 'ContactsController@edit');
|
||
Route::put('/{id}', 'ContactsController@update');
|
||
Route::delete('/{id}', 'ContactsController@destroy');
|
||
Route::get('/{id}/getavatar', 'ContactsController@getAvatar');
|
||
});
|
||
|
||
//Places
|
||
Route::group(['prefix' => 'places'], function () {
|
||
Route::get('/', 'PlacesController@index');
|
||
Route::get('/create', 'PlacesController@create');
|
||
Route::post('/', 'PlacesController@store');
|
||
Route::get('/{id}/edit', 'PlacesController@edit');
|
||
Route::put('/{id}', 'PlacesController@update');
|
||
Route::get('/{id}/merge', 'PlacesController@mergeIndex');
|
||
Route::get('/{place1_id}/merge/{place2_id}', 'PlacesController@mergeEdit');
|
||
Route::post('/merge', 'PlacesController@mergeStore');
|
||
Route::delete('/{id}', 'PlacesController@destroy');
|
||
});
|
||
});
|
||
|
||
//Blog pages using ArticlesController
|
||
Route::group(['prefix' => 'blog'], function () {
|
||
Route::get('/feed.rss', 'FeedsController@blogRss');
|
||
Route::get('/feed.atom', 'FeedsController@blogAtom');
|
||
Route::get('/feed.json', 'FeedsController@blogJson');
|
||
Route::get('/s/{id}', 'ArticlesController@onlyIdInURL');
|
||
Route::get('/{year?}/{month?}', 'ArticlesController@index');
|
||
Route::get('/{year}/{month}/{slug}', 'ArticlesController@show');
|
||
});
|
||
|
||
//Notes pages using NotesController
|
||
Route::group(['prefix' => 'notes'], function () {
|
||
Route::get('/', 'NotesController@index');
|
||
Route::get('/feed.rss', 'FeedsController@notesRss');
|
||
Route::get('/feed.atom', 'FeedsController@notesAtom');
|
||
Route::get('/feed.json', 'FeedsController@notesJson');
|
||
Route::get('/{id}', 'NotesController@show');
|
||
Route::get('/tagged/{tag}', 'NotesController@tagged');
|
||
});
|
||
Route::get('note/{id}', 'NotesController@redirect'); // for legacy note URLs
|
||
|
||
// Likes
|
||
Route::group(['prefix' => 'likes'], function () {
|
||
Route::get('/', 'LikesController@index');
|
||
Route::get('/{like}', 'LikesController@show');
|
||
});
|
||
|
||
// Bookmarks
|
||
Route::group(['prefix' => 'bookmarks'], function () {
|
||
Route::get('/', 'BookmarksController@index');
|
||
Route::get('/{bookmark}', 'BookmarksController@show');
|
||
});
|
||
|
||
// Token Endpoint
|
||
Route::post('api/token', 'TokenEndpointController@create');
|
||
|
||
// Micropub Endpoints
|
||
Route::get('api/post', 'MicropubController@get')->middleware('micropub.token');
|
||
Route::post('api/post', 'MicropubController@post')->middleware('micropub.token');
|
||
Route::post('api/media', 'MicropubController@media')->middleware('micropub.token')->name('media-endpoint');
|
||
|
||
//webmention
|
||
Route::get('webmention', 'WebMentionsController@get');
|
||
Route::post('webmention', 'WebMentionsController@receive');
|
||
|
||
//Contacts
|
||
Route::get('contacts', 'ContactsController@index');
|
||
Route::get('contacts/{nick}', 'ContactsController@show');
|
||
|
||
//Places
|
||
Route::get('places', 'PlacesController@index');
|
||
Route::get('places/{slug}', 'PlacesController@show');
|
||
|
||
Route::get('search', 'SearchController@search');
|
||
|
||
Route::post('update-colour-scheme', 'SessionStoreController@saveColour');
|
||
});
|
||
|
||
//Short URL
|
||
Route::group(['domain' => config('url.shorturl')], function () {
|
||
Route::get('/', 'ShortURLsController@baseURL');
|
||
Route::get('@', 'ShortURLsController@twitter');
|
||
Route::get('+', 'ShortURLsController@googlePlus');
|
||
Route::get('α', 'ShortURLsController@appNet');
|
||
|
||
Route::get('{type}/{id}', 'ShortURLsController@expandType')->where(
|
||
[
|
||
'type' => '[bt]',
|
||
'id' => '[0-9A-HJ-NP-Z_a-km-z]+',
|
||
]
|
||
);
|
||
|
||
Route::get('h/{id}', 'ShortURLsController@redirect');
|
||
Route::get('{id}', 'ShortURLsController@oldRedirect')->where(
|
||
[
|
||
'id' => '[0-9A-HJ-NP-Z_a-km-z]{4}',
|
||
]
|
||
);
|
||
});
|