mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update base layouts
This commit is contained in:
parent
d26da6af95
commit
4c30ad4940
7 changed files with 61 additions and 8 deletions
47
app/Util/Site/Config.php
Normal file
47
app/Util/Site/Config.php
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Util\Site;
|
||||||
|
|
||||||
|
use Cache;
|
||||||
|
|
||||||
|
class Config {
|
||||||
|
|
||||||
|
public static function get() {
|
||||||
|
return Cache::remember('api:site:configuration', now()->addMinutes(30), function() {
|
||||||
|
return [
|
||||||
|
'uploader' => [
|
||||||
|
'max_photo_size' => config('pixelfed.max_photo_size'),
|
||||||
|
'max_caption_length' => config('pixelfed.max_caption_length'),
|
||||||
|
'album_limit' => config('pixelfed.max_album_length'),
|
||||||
|
'image_quality' => config('pixelfed.image_quality'),
|
||||||
|
|
||||||
|
'optimize_image' => config('pixelfed.optimize_image'),
|
||||||
|
'optimize_video' => config('pixelfed.optimize_video'),
|
||||||
|
|
||||||
|
'media_types' => config('pixelfed.media_types'),
|
||||||
|
'enforce_account_limit' => config('pixelfed.enforce_account_limit')
|
||||||
|
],
|
||||||
|
|
||||||
|
'activitypub' => [
|
||||||
|
'enabled' => config('federation.activitypub.enabled'),
|
||||||
|
'remote_follow' => config('federation.activitypub.remoteFollow')
|
||||||
|
],
|
||||||
|
|
||||||
|
'ab' => [
|
||||||
|
'lc' => config('exp.lc'),
|
||||||
|
'rec' => config('exp.rec'),
|
||||||
|
'loops' => config('exp.loops')
|
||||||
|
],
|
||||||
|
|
||||||
|
'site' => [
|
||||||
|
'domain' => config('pixelfed.domain.app'),
|
||||||
|
'url' => config('app.url')
|
||||||
|
]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function json() {
|
||||||
|
return json_encode(self::get(), JSON_FORCE_OBJECT);
|
||||||
|
}
|
||||||
|
}
|
2
resources/assets/js/app.js
vendored
2
resources/assets/js/app.js
vendored
|
@ -14,7 +14,7 @@ if (token) {
|
||||||
console.error('CSRF token not found.');
|
console.error('CSRF token not found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.App = {};
|
window.App = window.App || {};
|
||||||
|
|
||||||
window.App.boot = function() {
|
window.App.boot = function() {
|
||||||
new Vue({ el: '#content'});
|
new Vue({ el: '#content'});
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
<link rel="canonical" href="{{request()->url()}}">
|
<link rel="canonical" href="{{request()->url()}}">
|
||||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||||
@stack('styles')
|
@stack('styles')
|
||||||
|
|
||||||
|
<script type="text/javascript">window.App = {}; window.App.config = {!!App\Util\Site\Config::json()!!}</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="">
|
<body class="">
|
||||||
@include('layouts.partial.noauthnav')
|
@include('layouts.partial.noauthnav')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ app()->getLocale() }}">
|
<html lang="{{ app()->getLocale() }}">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
@ -25,12 +24,17 @@
|
||||||
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
|
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
|
||||||
<link rel="canonical" href="{{request()->url()}}">
|
<link rel="canonical" href="{{request()->url()}}">
|
||||||
@if(request()->cookie('dark-mode'))
|
@if(request()->cookie('dark-mode'))
|
||||||
|
|
||||||
<link href="{{ mix('css/appdark.css') }}" rel="stylesheet" data-stylesheet="dark">
|
<link href="{{ mix('css/appdark.css') }}" rel="stylesheet" data-stylesheet="dark">
|
||||||
@else
|
@else
|
||||||
|
|
||||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@stack('styles')
|
@stack('styles')
|
||||||
|
|
||||||
|
<script type="text/javascript">window.App = {}; window.App.config = {!!App\Util\Site\Config::json()!!}</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="{{Auth::check()?'loggedIn':''}}">
|
<body class="{{Auth::check()?'loggedIn':''}}">
|
||||||
@include('layouts.partial.nav')
|
@include('layouts.partial.nav')
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
<link rel="canonical" href="{{request()->url()}}">
|
<link rel="canonical" href="{{request()->url()}}">
|
||||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||||
@stack('styles')
|
@stack('styles')
|
||||||
|
|
||||||
|
<script type="text/javascript">window.App = {}; window.App.config = {!!App\Util\Site\Config::json()!!}</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="">
|
<body class="">
|
||||||
<main id="content">
|
<main id="content">
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||||
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
|
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
|
||||||
<link href="{{ mix('css/landing.css') }}" rel="stylesheet">
|
<link href="{{ mix('css/landing.css') }}" rel="stylesheet">
|
||||||
|
<script type="text/javascript">window.App = {}; window.App.config = {!!App\Util\Site\Config::json()!!}</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="">
|
<body class="">
|
||||||
<main id="content">
|
<main id="content">
|
||||||
|
|
|
@ -9,9 +9,5 @@
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript" src="{{ mix('js/timeline.js') }}"></script>
|
<script type="text/javascript" src="{{ mix('js/timeline.js') }}"></script>
|
||||||
<script type="text/javascript" src="{{ mix('js/compose.js') }}"></script>
|
<script type="text/javascript" src="{{ mix('js/compose.js') }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">window.App.boot()</script>
|
||||||
new Vue({
|
|
||||||
el: '#content'
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
@endpush
|
Loading…
Reference in a new issue