mirror of https://git.stjo.hn/planiverse
Use dynamically generated links
Removed hard-coded and relative links and replaced them with dynamically generated ones. Should allow Planiverse to be served from a subfolder.
This commit is contained in:
parent
0247f8b57e
commit
d0e5b5fe67
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>{{ $mastodon_domain }} | Thread</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="{{ url('css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ $mastodon_domain }} | Thread</h1>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>{{ $mastodon_domain }} | Timeline</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="{{ url('css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ $mastodon_domain }} | Timeline</h1>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<nav>
|
||||
<ul>
|
||||
<li><a href="/timeline/home">Timeline</a></li>
|
||||
<li><a href="/timeline/public">Public Timeline</a></li>
|
||||
<li><a href="/notifications">Notifications</a></li>
|
||||
<li><a href="{{ route('home') }}">Timeline</a></li>
|
||||
<li><a href="{{ route('public') }}">Public Timeline</a></li>
|
||||
<li><a href="{{ route('notifications') }}">Notifications</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>{{ $mastodon_domain }} | Notifications</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="{{ url('css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ $mastodon_domain }} | Notifications</h1>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>{{ $mastodon_domain }} | Public Timeline</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="{{ url('css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ $mastodon_domain }} | Public Timeline</h1>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<title>{{ $mastodon_domain }} | Status</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="{{ url('css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ $mastodon_domain }} | Status</h1>
|
||||
|
@ -19,7 +19,7 @@
|
|||
@endcomponent
|
||||
|
||||
@if ($logged_in)
|
||||
<form method="post" action="/status">
|
||||
<form method="post" action="{{ route('post_status') }}">
|
||||
<input
|
||||
type="text"
|
||||
name="spoiler_text"
|
||||
|
|
|
@ -22,22 +22,22 @@
|
|||
<div class="actions">
|
||||
<!-- Context -->
|
||||
<span title="Expand thread">
|
||||
<a href="/status/{{ $status['id'] }}/thread">⥈</a>
|
||||
<a href="{{ route('thread', ['id' => $status['id']]) }}">⥈</a>
|
||||
</span>
|
||||
|
||||
<!-- Reply -->
|
||||
<span title="Reply">
|
||||
<a href="/status/{{ $status['id'] }}">↵</a>
|
||||
<a href="{{ route('status', ['id' => $status['id']]) }}">↵</a>
|
||||
</span>
|
||||
|
||||
<!-- Reblog -->
|
||||
<span title="Reblog">
|
||||
@if ($status['reblogged'])
|
||||
<span class="reblogged">
|
||||
<a href="/status/{{ $status['id'] }}/unreblog">↺</a>
|
||||
<a href="{{ route('unreblog', ['id' => $status['id']]) }}">↺</a>
|
||||
</span>
|
||||
@else
|
||||
<a href="/status/{{ $status['id'] }}/reblog">↺</a>
|
||||
<a href="{{ route('reblog', ['id' => $status['id']]) }}">↺</a>
|
||||
@endif
|
||||
{{ $status['reblogs_count'] }}
|
||||
</span>
|
||||
|
@ -46,10 +46,10 @@
|
|||
<span title="Favourite">
|
||||
@if ($status['favourited'])
|
||||
<span class="favourited">
|
||||
<a href="/status/{{ $status['id'] }}/unfavourite">★</a>
|
||||
<a href="{{ route('unfavourite', ['id' => $status['id']]) }}">★</a>
|
||||
</span>
|
||||
@else
|
||||
<a href="/status/{{ $status['id'] }}/favourite">☆</a>
|
||||
<a href="{{ route('favourite', ['id' => $status['id']]) }}">☆</a>
|
||||
@endif
|
||||
{{ $status['favourites_count'] }}
|
||||
</span>
|
||||
|
|
|
@ -33,20 +33,26 @@ Route::get('/status/{status_id}', 'StatusController@show_status')
|
|||
->name('status');
|
||||
|
||||
Route::get('/status/{status_id}/reblog', 'StatusController@reblog_status')
|
||||
->name('reblog')
|
||||
->middleware('authorize');
|
||||
|
||||
Route::get('/status/{status_id}/unreblog', 'StatusController@unreblog_status')
|
||||
->name('unreblog')
|
||||
->middleware('authorize');
|
||||
|
||||
Route::get('/status/{status_id}/favourite', 'StatusController@favourite_status')
|
||||
->name('favourite')
|
||||
->middleware('authorize');
|
||||
|
||||
Route::get('/status/{status_id}/unfavourite', 'StatusController@unfavourite_status')
|
||||
->name('unfavourite')
|
||||
->middleware('authorize');
|
||||
|
||||
Route::get('/status/{status_id}/thread', 'StatusController@context');
|
||||
Route::get('/status/{status_id}/thread', 'StatusController@context')
|
||||
->name('thread');
|
||||
|
||||
Route::post('/status', 'StatusController@post_status')
|
||||
->name('post_status')
|
||||
->middleware('authorize');
|
||||
|
||||
Route::get('/notifications', 'NotificationsController@get_notifications')
|
||||
|
|
Loading…
Reference in New Issue