key.blade.php 3.91 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
2
3
4
5
@extends('layouts.subPages', ['page' => 'key'])

@section('title', $title )

@section('content')
Davide Aprea's avatar
Davide Aprea committed
6

7
<link type="text/css" rel="stylesheet" href="{{ mix('css/key.css') }}"/>
Davide Aprea's avatar
Davide Aprea committed
8
9
10
11
12
13
14
@if(Cookie::get('dark_mode') === "2")
	<link type="text/css" rel="stylesheet" href="{{ mix('css/key-dark.css') }}"/>
@elseif(Cookie::get('dark_mode') === "1")
	<link type="text/css" rel="stylesheet" href="{{ mix('css/key.css') }}"/>
@else
    <link type="text/css" rel="stylesheet" media="(prefers-color-scheme:dark)" href="{{ mix('css/key-dark.css') }}"/>
@endif
Dominik Hebeler's avatar
Dominik Hebeler committed
15
16
<div id="key-site">
    <div class="section">
17
18
19
20
21
        <h1>{{ trans('key.h1')}}</h1>
        <p>{!! trans('key.p1', ['url1' => LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/beitritt'), 'url2' => LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/spende')])!!}</p>
        <p>{{ trans('key.p2') }}</p>
        <p>{{ trans('key.p3') }}</p>
        <p>{{ trans('key.p4') }}</p>
22
        @if(isset($keystatus) && $keystatus !== null)
23
24
        <p>{{ trans('key.p5') }}</p>
        <ol>
25
26
27
            <li>
                @lang ('key.li1')
                <div class="copyLink">
28
                    <input id="loadSettings" class="loadSettings" type="text" value="{{$cookieLink}}" readonly>
29
30
31
32
33
34
35
                    <button class="js-only btn btn-default" onclick="var copyText = document.getElementById('loadSettings');copyText.select();copyText.setSelectionRange(0, 99999);document.execCommand('copy');">@lang('settings.copy')</button>
                </div>
            </li>
            </br>
            <li>
                @lang('key.li2')
                <div class="copyLink">
36
                    <input id="searchString" class="loadSettings" type="text" value="{{route("resultpage", ["key" => $cookie]) . "&eingabe=%s"}}" readonly>
37
38
39
                    <button class="js-only btn btn-default" onclick="var copyText = document.getElementById('searchString');copyText.select();copyText.setSelectionRange(0, 99999);document.execCommand('copy');">@lang('settings.copy')</button>
                </div>
            </li>
40
        </ol>
41
        @endif
Dominik Hebeler's avatar
Dominik Hebeler committed
42
    </div>
43
44
45
46
    @if(app('App\Models\Key')->canChange())
    <div class="section">
        <h3>@lang('key.custom.h3')</h3>
        <p>@lang('key.custom.p1')</p>
47
        <a class="btn btn-default" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('changeKeyOne')) }}">@lang('key.custom.a1')</a>
48
49
    </div>
    @endif
Dominik Hebeler's avatar
Dominik Hebeler committed
50
    <div class="section">
51
52
53
54
55
56
        @if(isset($keystatus) && $keystatus === false)
        <p class="error">@lang('key.empty')</p>
        @endif
        @if(isset($keyValid) && $keyValid === false)
        <p class="error">@lang('key.invalidKey')</p>
        @endif
57
        <div id="form-wrapper">
58
            <form id="enter-key-form" method="post">
59
                <input type="hidden" name="redirUrl" value="{{ Request::input('redirUrl', '') }}" />
60
61
                <input type="text" name="keyToSet" value="{{$cookie === '' ? '' : $cookie}}" placeholder="@lang('key.placeholder1')" autofocus>
                <button type="submit" class="btn btn-default">OK</button>
62
            </form>
63
64
            @if(isset($keystatus) && $keystatus !== null)
            <form id="remove-key" method="post" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('KeyController@removeKey', ['redirUrl' => url()->full()])) }}">
65
                <input type="hidden" name="redirUrl" value="{{ Request::input('redirUrl', '') }}" />
Phil Höfer's avatar
Phil Höfer committed
66
                <button type="submit" class="btn btn-default">@lang('key.removeKey')</button>
67
68
            </form>
            @endif
69
70
        </div>      
        @if(Request::input('redirUrl', '') !== '' && parse_url(Request::input('redirUrl', ''), PHP_URL_HOST) === parse_url(url()->full(), PHP_URL_HOST))
71
72
        <div id="back-link"><a href="{{Request::input('redirUrl')}}">@lang('key.backLink')</a></div>
        @endif
Dominik Hebeler's avatar
Dominik Hebeler committed
73
74
75
    </div>
</div>
@endsection