Merge pull request #362 from jonnybarnes/develop

MTM: Fix some links
This commit is contained in:
Jonny Barnes 2022-08-13 20:30:08 +01:00 committed by GitHub
commit b74bdd01ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1567 additions and 1265 deletions

View file

@ -83,4 +83,16 @@ class NotesController extends Controller
return view('notes.tagged', compact('notes', 'tag'));
}
/**
* Page to create a new note.
*
* Dummy page for now.
*
* @return View
*/
public function create(): View
{
return view('notes.create');
}
}

View file

@ -16,7 +16,7 @@ class Kernel extends HttpKernel
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,

View file

@ -4,6 +4,7 @@ namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
class CSPHeader
{
@ -16,6 +17,10 @@ class CSPHeader
*/
public function handle($request, Closure $next)
{
if (App::environment('local', 'development')) {
return $next($request);
}
// headers have to be single-line strings,
// so we concat multiple lines
// phpcs:disable Generic.Files.LineLength.TooLong

View file

@ -14,7 +14,6 @@
"ext-intl": "*",
"ext-json": "*",
"cviebrock/eloquent-sluggable": "^9.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"indieauth/client": "^1.1",
"intervention/image": "^2.4",
@ -38,7 +37,8 @@
"beyondcode/laravel-dump-server": "^1.0",
"fakerphp/faker": "^1.9.2",
"laravel/dusk": "^6.0",
"laravel/pint": "^0.2.3",
"laravel/pint": "^1.0.0",
"laravel/sail": "^1.15",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^6.1",
"phpunit/php-code-coverage": "^9.2",

839
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -2,17 +2,17 @@
// You can find the keys here : https://dev.twitter.com/
return [
'API_URL' => 'api.twitter.com',
'API_VERSION' => '1.1',
'AUTHENTICATE_URL' => 'https://api.twitter.com/oauth/authenticate',
'AUTHORIZE_URL' => 'https://api.twitter.com/oauth/authorize',
'ACCESS_TOKEN_URL' => 'oauth/access_token',
'REQUEST_TOKEN_URL' => 'oauth/request_token',
'USE_SSL' => true,
return [
'API_URL' => 'api.twitter.com',
'API_VERSION' => '1.1',
'AUTHENTICATE_URL' => 'https://api.twitter.com/oauth/authenticate',
'AUTHORIZE_URL' => 'https://api.twitter.com/oauth/authorize',
'ACCESS_TOKEN_URL' => 'oauth/access_token',
'REQUEST_TOKEN_URL' => 'oauth/request_token',
'USE_SSL' => true,
'CONSUMER_KEY' => env('TWITTER_CONSUMER_KEY'),
'CONSUMER_SECRET' => env('TWITTER_CONSUMER_SECRET'),
'ACCESS_TOKEN' => env('TWITTER_ACCESS_TOKEN'),
'ACCESS_TOKEN_SECRET' => env('TWITTER_ACCESS_TOKEN_SECRET'),
];
'CONSUMER_KEY' => env('TWITTER_CONSUMER_KEY'),
'CONSUMER_SECRET' => env('TWITTER_CONSUMER_SECRET'),
'ACCESS_TOKEN' => env('TWITTER_ACCESS_TOKEN'),
'ACCESS_TOKEN_SECRET' => env('TWITTER_ACCESS_TOKEN_SECRET'),
];

65
docker-compose.yml Normal file
View file

@ -0,0 +1,65 @@
# For more information: https://laravel.com/docs/sail
version: '3'
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.1
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.1/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
networks:
- sail
depends_on:
- pgsql
- redis
pgsql:
image: 'postgres:14'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'sail-pgsql:/var/lib/postgresql/data'
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- sail
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
networks:
sail:
driver: bridge
volumes:
sail-pgsql:
driver: local
sail-redis:
driver: local

1846
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,30 +6,30 @@
"license": "CC0-1.0",
"dependencies": {
"normalize.css": "^8.0.1",
"puppeteer": "^14.1.0"
"puppeteer": "^16.1.0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/preset-env": "^7.18.6",
"autoprefixer": "^10.2.4",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"autoprefixer": "^10.4.8",
"babel-loader": "^8.2.1",
"browserlist": "^1.0.1",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.2.0",
"cssnano": "^5.0.2",
"eslint": "^8.6.0",
"eslint-webpack-plugin": "^3.0.1",
"cssnano": "^5.1.12",
"eslint": "^8.21.0",
"eslint-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^2.6.1",
"postcss": "^8.1.6",
"postcss": "^8.4.16",
"postcss-combine-duplicated-selectors": "^10.0.2",
"postcss-combine-media-query": "^1.0.1",
"postcss-import": "^14.0.0",
"postcss-loader": "^7.0.0",
"postcss-loader": "^7.0.1",
"pre-commit": "^1.1.3",
"stylelint": "^14.9.1",
"stylelint-config-standard": "^25.0.0",
"stylelint-config-standard": "^27.0.0",
"stylelint-webpack-plugin": "^3.1.1",
"webpack": "^5.3.2",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"scripts": {

View file

@ -0,0 +1,7 @@
@extends('master')
@section('title')New Note « @stop
@section('content')
<p>This was a page where I could create new notes. maybe it will be again one day…</p>
@stop

View file

@ -142,6 +142,7 @@ Route::group(['domain' => config('url.longurl')], function () {
Route::get('/feed.atom', [FeedsController::class, 'notesAtom']);
Route::get('/feed.json', [FeedsController::class, 'notesJson']);
Route::get('/feed.jf2', [FeedsController::class, 'notesJf2']);
Route::get('/new', [NotesController::class, 'create']);
Route::get('/{id}', [NotesController::class, 'show']);
Route::get('/tagged/{tag}', [NotesController::class, 'tagged']);
});
@ -182,6 +183,9 @@ Route::group(['domain' => config('url.longurl')], function () {
// Places
Route::get('places', [PlacesController::class, 'index']);
Route::get('places/{place}', [PlacesController::class, 'show']);
// Micropub
Route::redirect('/micropub/create', '/notes/new');
});
// Short URL