Skip to content

Commit

Permalink
MCH2022 stylo (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
annejan authored Jun 27, 2022
1 parent 7e74f5b commit 3c5e260
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 59 deletions.
21 changes: 21 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,25 @@ class Kernel extends HttpKernel
'2fa' => \App\Http\Middleware\AuthenticatorMiddleware::class,
'webauthn' => \LaravelWebauthn\Http\Middleware\WebauthnMiddleware::class,
];

/**
* Returns the version of the application by fetching and displaying the version.json file
*
* @return string URL
*/
public static function applicationVersion(): string
{
// Silence is ok here
$versionJson = @file_get_contents(public_path("/version.json"));
if (!$versionJson) {
return 'Undefined';
}

$versionData = json_decode($versionJson, true);
if (is_array($versionData) && array_key_exists('version', $versionData)) {
return $versionData['version'];
}

return 'Unknown';
}
}
51 changes: 4 additions & 47 deletions config/l5-swagger.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'default' => 'default',
'documentations' => [
Expand Down Expand Up @@ -95,7 +97,7 @@
'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'),

/*
* Absolute path to directories that should be exclude from scanning
* Absolute path to directories that should be excluded from scanning
* @deprecated Please use `scanOptions.exclude`
* `scanOptions.exclude` overwrites this
*/
Expand Down Expand Up @@ -147,52 +149,7 @@
*/
'securityDefinitions' => [
'securitySchemes' => [
/*
* Examples of Security schemes
*/
/*
'api_key_security_example' => [ // Unique name of security
'type' => 'apiKey', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
'description' => 'A short description for security scheme',
'name' => 'api_key', // The name of the header or query parameter to be used.
'in' => 'header', // The location of the API key. Valid values are "query" or "header".
],
'oauth2_security_example' => [ // Unique name of security
'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
'description' => 'A short description for oauth2 security scheme.',
'flow' => 'implicit', // The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".
'authorizationUrl' => 'http://example.com/auth', // The authorization URL to be used for (implicit/accessCode)
//'tokenUrl' => 'http://example.com/auth' // The authorization URL to be used for (password/application/accessCode)
'scopes' => [
'read:projects' => 'read your projects',
'write:projects' => 'modify projects in your account',
]
],
*/

/* Open API 3.0 support
'passport' => [ // Unique name of security
'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
'description' => 'Laravel passport oauth2 security.',
'in' => 'header',
'scheme' => 'https',
'flows' => [
"password" => [
"authorizationUrl" => config('app.url') . '/oauth/authorize',
"tokenUrl" => config('app.url') . '/oauth/token',
"refreshUrl" => config('app.url') . '/token/refresh',
"scopes" => []
],
],
],
'sanctum' => [ // Unique name of security
'type' => 'apiKey', // Valid values are "basic", "apiKey" or "oauth2".
'description' => 'Enter token in format (Bearer <token>)',
'name' => 'Authorization', // The name of the header or query parameter to be used.
'in' => 'header', // The location of the API key. Valid values are "query" or "header".
],
*/
],
],
'security' => [
/*
* Examples of Securities
Expand Down
Binary file added public/img/corner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ body {

.logo {
position: absolute;
opacity: 0.75;
max-width: 20%;
left: 10px;
top: 10px;
left: 0;
top: 5px;
}

.searchform,
Expand Down
16 changes: 12 additions & 4 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<!-- Branding Image -->
<a class="navbar-brand" href="{{ url('/') }}">
{{ config('app.name', 'Laravel') }}
{{ config('app.name', 'Hatchery') }}
</a>
</div>

Expand Down Expand Up @@ -121,9 +121,9 @@
{
"@context": "https://schema.org",
"@type": "Organization",
"url": "https://badge.team",
"name": "Badge.Team",
"logo": "https://badge.team/img/bs.png",
"url": "{{ url('') }}",
"name": "Badge.Team Hatchery",
"logo": "{{ url('/img/bs.png') }}",
"foundingDate": "2017",
"contactPoint": {
"@type": "ContactPoint",
Expand All @@ -137,5 +137,13 @@
<livewire:scripts>

@yield('script')
<footer class="bg-light text-center text-lg-start">
<!-- Copyright -->
<div class="text-center p-3">
© {{ date('Y') }} badge.team Hatchery
<span id="application_version">{{ App\Http\Kernel::applicationVersion() }}</span>
</div>
<!-- Copyright -->
</footer>
</body>
</html>
16 changes: 12 additions & 4 deletions resources/views/layouts/app_splash.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
</head>
<body>
@include('partials.messages')
<img class="logo" src="/img/bs.png" alt="Badge.r & smol snek" />
<img class="logo" src="/img/corner.png" alt="MCH2022 corner" />
@yield('content')
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"url": "https://badge.team",
"name": "Badge.Team",
"logo": "https://badge.team/img/bs.png",
"url": "{{ url('') }}",
"name": "Badge.Team Hatchery",
"logo": "{{ url('/img/bs.png') }}",
"foundingDate": "2017",
"contactPoint": {
"@type": "ContactPoint",
Expand All @@ -76,5 +76,13 @@
<livewire:scripts>

@yield('script')
<footer class="bg-light text-center text-lg-start">
<!-- Copyright -->
<div class="text-center p-3">
© {{ date('Y') }} badge.team Hatchery
<span id="application_version">{{ App\Http\Kernel::applicationVersion() }}</span>
</div>
<!-- Copyright -->
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@endif
<div class="content text-center">
<div class="title m-b-md">
<h1 class="hatcher"><span class="hidden-xs">{{ request()->getHost() }}</span> {{ config('app.name', 'Laravel') }}</h1>
<h1 class="hatcher"><span class="hidden-xs small">{{ request()->getHost() }}</span> {{ config('app.name', 'Hatchery') }}</h1>
</div>
<div class="spacer col-md-12 hidden-xs"></div>
<div class="links">
Expand Down

0 comments on commit 3c5e260

Please sign in to comment.