Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 75508baf

Přidáno uživatelem Marek Lovčí před asi 4 roky(ů)

Merge origin/develop into master

Zobrazit rozdíly:

README.md
38 38

  
39 39
Migrace dat z Mockaroo je tímto okamžikem obsolete.
40 40

  
41
### Výchozí uživatel
42

  
43
Je nadefinován výchozí (testovací) uživatel.
44

  
45
**Login** admin@kaplicky.com **heslo** admin
46

  
41 47
## Jak zprovoznit bootstrap a kompilaci SASS souborů
42 48

  
43 49
1. Ujistěte se, že v sekci **Run/Edit Configurations** máte nastavený **Document root** na složku `public` v kořenovém adresáři (jinak aplikace **nenajde** vygenerované css soubory).
44 50
2. Spusťte `composer install` (soubor pro composer už by měl být updatován) pro nainstalování balíčku `laravel/ui`.
45 51
3. Spusťte v terminálu příkaz `npm install && npm run dev`, příkaz zkompiluje všechny dostupné sass (`resources/sass`) do css souboru typicky do složky `public/css`.
46 52
    1. Nastavením příkazu `npm run watch` se sass automaticky překompiluje při detekci změny.
53

  
54
## Nastavení Mailtrap účtu pro odesílání registračních zpráv
55

  
56
Pro správné nastavení posílání emailů je nutné poupravit soubor `.env`. Najděte v souboru sekci `MAIL_...` a nahraďte je níže uvedenými hodnotami:
57

  
58
```shell script
59
MAIL_MAILER=smtp
60
MAIL_HOST=smtp.mailtrap.io
61
MAIL_PORT=2525
62
MAIL_USERNAME=d1eae987fe913e
63
MAIL_PASSWORD=d109bc15f3dc66
64
MAIL_ENCRYPTION=tls
65
MAIL_FROM_ADDRESS=merlot@merlot.org
66
MAIL_FROM_NAME="${APP_NAME}"
67
```
68

  
69
Pro přístup k mail serveru je nutné se příhlásit na stránce https://mailtrap.io/ s níže přidanými přihlašovacími údaji:
70

  
71
email:`jnohac@students.zcu.cz`
72
heslo:`merlot2020Betammajl`
73

  
74
Následně je konkrétní mail server přístupný z Inboxu `Demo inbox`.
75

  
app/Http/Controllers/ArtefactController.php
5 5
use App\Artefact;
6 6
use App\ArtefactCategory;
7 7
use App\Category;
8
use Illuminate\Http\Request;
9
use Illuminate\Support\Facades\DB;
8
use App\User;
9
use Illuminate\Contracts\View\Factory;
10
use Illuminate\Http\RedirectResponse;
11
use Illuminate\Support\Facades\Auth;
12
use Illuminate\View\View;
10 13

  
11 14
class ArtefactController extends Controller
12 15
{
16
    const ORDER_COLUMN = 'page';
17

  
13 18
    public function __construct()
14 19
    {
15 20
        $this->middleware('auth');
16 21
    }
17 22

  
23
    /**
24
     * Prepare all necessary data for shown Artefact.
25
     * These are current count of likes, if it set to
26
     * a favorites by a logged user and all metadata
27
     * connected to the artefact.
28
     *
29
     * @param       $artefacts  all artefacts
30
     * @return      mixed       modified artefacts
31
     */
32
    public function prepData($artefacts)
33
    {
34
        foreach($artefacts as $artefact)
35
        {
36
            $artefact['likes'] = Artefact::find($artefact->id)->users()->count();
37
            $artefact['favourite'] = is_null(User::find(Auth::id())->likesArtefacts()->find($artefact->id)) ? false : true;
38
            $metadata = Artefact::find($artefact->id)->metadata()->orderBy(self::ORDER_COLUMN)->get();
39

  
40
            foreach ($metadata as $item)
41
            {
42
                $item['favourite'] = is_null(User::find(Auth::id())->likesMetadata()->find($item->id)) ? false : true;
43
            }
44

  
45
            $artefact['metadata'] = $metadata;
46
        }
47

  
48
        return $artefacts;
49
    }
50

  
18 51
    /**
19 52
     * Returns view of all artefacts.
20 53
     *
21
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
54
     * @return Factory|View
22 55
     */
23 56
    public function default()
24 57
    {
25
        $artefacts = Artefact::all();
26

  
58
        $artefacts = Artefact::simplePaginate(1);
59
        $artefacts = $this->prepData($artefacts);
27 60
        return view('artefact.default', ['artefacts' => $artefacts]);
28 61
    }
29 62

  
30 63
    /**
31 64
     * Returns view of artefacts related to the chosen category
32 65
     *
33
     * @param $id       id of the category
34
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
66
     * @param $id id of the category
67
     * @return Factory|View
35 68
     */
36 69
    public function showCategory($id)
37 70
    {
38
        $cateogryArtefacts = ArtefactCategory::where('category_id', $id)->get();
39
        if(count($cateogryArtefacts) > 0)
71
        $artefacts = Category::find($id)->artefacts()->simplePaginate(1);
72
        $artefacts = $this->prepData($artefacts);
73
        return view('artefact.default', ['artefacts' => $artefacts]);
74
    }
75

  
76
    /**
77
     * Returns view of artefacts related to the chosen categories
78
     *
79
     * @param $id string with categories ids
80
     * @return Factory|View
81
     */
82
    public function showCategories($id)
83
    {
84
        //Parsing text for individual ids of categories
85
        $textWithIds  = $id;
86
        $pieces = explode(",", $textWithIds);
87
        $arrStrToInt = array();
88
        for($i = 0;$i < count($pieces); $i++)
40 89
        {
41
            $artefacts = array();
42
            foreach($cateogryArtefacts as $ar)
90
            if($pieces[$i] == null || !strcmp($pieces[$i], ""))
43 91
            {
44
                array_push($artefacts, Artefact::where('id', $ar->artefact_id)->get());
92
                continue;
45 93
            }
46
            return view('artefact.category', ['artefacts' => $artefacts]);
94

  
95
            array_push($arrStrToInt, (int)$pieces[$i]);
47 96
        }
48
        else
97

  
98
        //Creating array of all artefacts ids
99
        $arrArtIds = array();
100
        foreach($arrStrToInt as $cat)
49 101
        {
50
            return view('artefact.category', ['artefacts' => array()]);
102
            $tmpArtefacts = Category::find($cat)->artefacts()->get();
103
            foreach($tmpArtefacts as $art)
104
            {
105
                array_push($arrArtIds, $art->id);
106
            }
51 107
        }
108

  
109
        $artefacts = Artefact::whereIn('id', $arrArtIds)->simplePaginate(1);
110
        $artefacts = $this->prepData($artefacts);
111
        return view('artefact.default', ['artefacts' => $artefacts]);
52 112
    }
53 113

  
54 114
    /**
55 115
     * Returns view of single artefact given by its id.
56 116
     *
57 117
     * @param $id int id of the artefact
58
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
118
     * @return Factory|View
59 119
     */
60 120
    public function view($id)
61 121
    {
122
        $artefact = Artefact::where('id', $id)->simplePaginate(1);
123
        $artefact = $this->prepData($artefact);
124
        //return view('artefact.view', ['artefact' => $artefact]);
125
        return view('artefact.default', ['artefacts' => $artefact]);
126
    }
127

  
128
    /**
129
     * Likes artefact given by its id.
130
     *
131
     * @param $id int id of metadata
132
     * @return RedirectResponse
133
     */
134
    public function like($id)
135
    {
136
        $user = User::find(Auth::id());
137
        $artefact = Artefact::find($id);
138

  
139
        $user->likesArtefacts()->attach($artefact);
140

  
141
        return back()->withInput();
142
    }
143

  
144
    /**
145
     * Unlikes artefact given by its id.
146
     *
147
     * @param $id int id of metadata
148
     * @return RedirectResponse
149
     */
150
    public function unlike($id)
151
    {
152
        $user = User::find(Auth::id());
62 153
        $artefact = Artefact::find($id);
63
        $artefact['likes'] = Artefact::find($id)->users()->count();
64 154

  
65
        return view('artefact.view', ['artefact' => $artefact]);
155
        $user->likesArtefacts()->detach($artefact);
156

  
157
        return back()->withInput();
66 158
    }
159

  
160
    /**
161
     * Returns artefact given by its id.
162
     *
163
     * @param $id int id of artefact
164
     * @return RedirectResponse
165
     */
166
    /*public function view($id)
167
    {
168
        //$user = User::find(Auth::id());
169
        //$artefact = Artefact::find($id);
170

  
171
        $artefacts = Artefact::withCount('users')->orderByDesc('users_count')->get()->take(10);
172

  
173

  
174
            $currentPage = -1; // You can set this to any page you want to paginate to
175

  
176
            for($i=0;$i<10;$i++){
177
                if($artefacts[$i]->id==$id) $currentPage = $i+1;
178
            }
179
            // Make sure that you call the static method currentPageResolver()
180
            // before querying users
181
            \Illuminate\Pagination\Paginator::currentPageResolver(function () use ($currentPage) {
182
                return $currentPage;
183
            });
184

  
185

  
186

  
187
        $artefacts = Artefact::withCount('users')->orderByDesc('users_count')->limit(10)->paginate(1);
188

  
189
        $artefacts = ArtefactController::prepData($artefacts);
190
        return view('artefact.default', ['artefacts' => $artefacts]);
191
        /*foreach($artefacts as $item)
192
        {
193
            $id = $item->id;
194
            $item['likes'] = Artefact::find($id)->users()->count();
195
            $item['favourite'] = is_null(User::find(Auth::id())->likesArtefacts()->find($id)) ? false : true;
196
        }*/
197

  
198

  
199
        //return back()->withInput();
200
    /*}*/
67 201
}
app/Http/Controllers/Auth/RegisterController.php
3 3
namespace App\Http\Controllers\Auth;
4 4

  
5 5
use App\Http\Controllers\Controller;
6
use App\Mail\RegisterMail;
6 7
use App\Providers\RouteServiceProvider;
7 8
use App\User;
9
use Illuminate\Routing\UrlGenerator;
8 10
use Illuminate\Foundation\Auth\RegistersUsers;
9 11
use Illuminate\Support\Facades\Hash;
12
use Illuminate\Support\Facades\Mail;
10 13
use Illuminate\Support\Facades\Validator;
11 14

  
12 15
class RegisterController extends Controller
......
64 67
     */
65 68
    protected function create(array $data)
66 69
    {
67
        //dd($data);
70
        $stringH = Hash::make($data['email'] . $data['name']);
71
        $vowels = array("/", "\\");
72
        $stringHModified = str_replace($vowels, "", $stringH);
73

  
74
        //Mail::to($data['email'])->send(new RegisterMail("http://localhost/verify/". $stringHModified));
75
        Mail::to($data['email'])->send(new RegisterMail(url("/verify/") . "/" . $stringHModified));//http://localhost/register/verify/..
68 76

  
69 77
        return User::create([
70 78
            'name' => $data['name'],
71 79
            'email' => $data['email'],
72 80
            'password' => Hash::make($data['password']),
81
            'register_hash' => $stringHModified,
73 82
        ]);
74 83
    }
75 84
}
app/Http/Controllers/ChartsController.php
1
<?php
2

  
3
namespace App\Http\Controllers;
4

  
5
use App\User;
6
use Illuminate\Contracts\Foundation\Application;
7
use Illuminate\Contracts\View\Factory;
8
use Illuminate\Http\RedirectResponse;
9
use Illuminate\Support\Facades\Auth;
10
use App\Http\Controllers\Image;
11
use Illuminate\View\View;
12
use App\Artefact;
13

  
14
class ChartsController extends Controller
15
{
16
    public function __construct()
17
    {
18
        $this->middleware('auth');
19
    }
20

  
21
    /**
22
     * Display a listing of the resource.
23
     *
24
     * @return Application|Factory|View
25
     */
26
    public function index()
27
    {
28
        if(Auth::check())
29
        {
30
            $artefacts = Artefact::withCount('users')->orderByDesc('users_count')->get()->take(10);
31
            foreach($artefacts as $item)
32
            {
33
                $id = $item->id;
34
                $item['likes'] = Artefact::find($id)->users()->count();
35
                $item['favourite'] = is_null(User::find(Auth::id())->likesArtefacts()->find($id)) ? false : true;
36
            }
37

  
38
            $data = array(
39
                'title' => 'Charts',
40
                'artefacts' => $artefacts
41
            );
42
            return view('charts.index') -> with($data);
43
        }
44
        else
45
        {
46
            $data = array(
47
                'title' => 'Welcome to the MERLOT page',
48
            );
49
            //return view('index', compact('title'));
50
            return view('pages.index') -> with($data);
51
        }
52
    }
53

  
54

  
55
}
app/Http/Controllers/DetailsController.php
3 3
namespace App\Http\Controllers;
4 4

  
5 5
use App\ArtefactUser;
6
use App\User;
6 7
use Illuminate\Http\Request;
7 8
use App\Metadata;
8 9
use App\Artefact;
10
use Illuminate\Support\Facades\Auth;
9 11

  
10 12
class DetailsController extends Controller
11 13
{
14
    const ORDER_COLUMN = 'page';
15

  
12 16
    public function __construct()
13 17
    {
14 18
        $this->middleware('auth');
......
32 36
     * Display the specified resource.
33 37
     *
34 38
     * @param  int  $id
35
     * @return \Illuminate\Http\Response
39
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
36 40
     */
37 41
    public function show($id)
38 42
    {
39
        $data = array(
40
            'id' => $id,
41
            'arrArtefact' => Artefact::find($id),
42
            'likes' => Artefact::find($id)->users()->count(),
43
            'metadata' => Metadata::where('artefact_id', $id)->get()
44
        );
45
        return view('detail.index') -> with($data);
43
        if (is_null(Artefact::find($id)))
44
        {
45
            return view('detail.index', ['metadata' => []]);
46
        }
47

  
48
        $metadata = Artefact::find($id)->metadata()->orderBy(self::ORDER_COLUMN)->get();
49
        foreach($metadata as $item)
50
        {
51
            $item['favourite'] = is_null(User::find(Auth::id())->likesMetadata()->find($item->id)) ? false : true;
52
        }
53

  
54
        return view('detail.index', ['metadata' => $metadata]);
46 55
    }
47 56

  
57
    /**
58
     * Likes metadata given by its id.
59
     *
60
     * @param $id int id of metadata
61
     * @return \Illuminate\Http\RedirectResponse
62
     */
63
    public function like($id)
64
    {
65
        $user = User::find(Auth::id());
66
        $metadata = Metadata::find($id);
67

  
68
        $user->likesMetadata()->attach($metadata);
69

  
70
        return back()->withInput();
71
    }
72

  
73
    /**
74
     * Unlikes metadata given by its id.
75
     *
76
     * @param $id int id of metadata
77
     * @return \Illuminate\Http\RedirectResponse
78
     */
79
    public function unlike($id)
80
    {
81
        $user = User::find(Auth::id());
82
        $metadata = Metadata::find($id);
83

  
84
        $user->likesMetadata()->detach($metadata);
85

  
86
        return back()->withInput();
87
    }
48 88
}
app/Http/Controllers/FavoriteArtefactsController.php
2 2

  
3 3
namespace App\Http\Controllers;
4 4

  
5
use App\ArtefactUser;
5
use Illuminate\Contracts\Foundation\Application;
6
use Illuminate\Contracts\View\Factory;
6 7
use Illuminate\Support\Facades\Auth;
7 8
use App\User;
8 9
use App\Artefact;
9 10
use App\Http\Controllers\Image;
11
use Illuminate\View\View;
10 12

  
11 13
class FavoriteArtefactsController extends Controller
12 14
{
15
    const ORDER_COLUMN = 'page';
16

  
13 17
    public function __construct()
14 18
    {
15 19
        $this->middleware('auth');
16 20
    }
17 21

  
22
    /**
23
     * Prepare all necessary data for shown Artefact.
24
     * These are current count of likes, if it set to
25
     * a favorites by a logged user and all metadata
26
     * connected to the artefact.
27
     *
28
     * @param       $artefacts  all artefacts
29
     * @return      mixed       modified artefacts
30
     */
31
    public function prepData($artefacts)
32
    {
33
        foreach($artefacts as $artefact)
34
        {
35
            $artefact['likes'] = Artefact::find($artefact->id)->users()->count();
36
            $artefact['favourite'] = is_null(User::find(Auth::id())->likesArtefacts()->find($artefact->id)) ? false : true;
37
            $metadata = Artefact::find($artefact->id)->metadata()->orderBy(self::ORDER_COLUMN)->get();
38
            foreach ($metadata as $item)
39
            {
40
                $item['favourite'] = is_null(User::find(Auth::id())->likesMetadata()->find($item->id)) ? false : true;
41
            }
42
            $artefact['metadata'] = $metadata;
43
        }
44
        return $artefacts;
45
    }
46

  
18 47
    /**
19 48
     * Display a listing of the resource.
20 49
     *
21
     * @return \Illuminate\Http\Response
50
     * @return Application|Factory|View
22 51
     */
23 52
    public function index()
24 53
    {
25 54
        if(Auth::check())
26 55
        {
27 56
            $id = Auth::id();
28
            $artefacts = User::find($id)->likesArtefacts()->get();
29
            foreach($artefacts as $item)
30
            {
31
                $item['likes'] = Artefact::find($item->id)->users()->count();
32
            }
33

  
34
            $data = array(
35
                'title' => 'Favorite artefacts',
36
                'user' => $id,
37
                'artefacts' => $artefacts
38
            );
39
            return view('favartefacts.index') -> with($data);
57
            $artefacts = User::find($id)->likesArtefacts()->simplePaginate(1);
58
            $artefacts = $this->prepData($artefacts);
59
            return view('artefact.default', ['artefacts' => $artefacts]);
40 60
        }
41 61
        else
42 62
        {
43
            $data = array(
44
                'title' => 'Welcome to the MERLOT page',
45
            );
46
            //return view('index', compact('title'));
47
            return view('pages.index') -> with($data);
63
            return view('pages.index');
48 64
        }
49 65
    }
50 66

  
......
52 68
     * Display the specified resource.
53 69
     *
54 70
     * @param  int  $id
55
     * @return \Illuminate\Http\Response
71
     * @return Application|Factory|View
56 72
     */
57 73
    public function show($id)
58 74
    {
59
        $artefacts = User::find($id)->likesArtefacts()->get();
60
        foreach($artefacts as $item)
61
        {
62
            $item['likes'] = Artefact::find($item->id)->users()->count();
63
        }
64

  
65

  
66
        $data = array(
67
            'title' => 'Favorite artefacts',
68
            'id' => $id,
69
            'user' => User::find($id),
70
            'userId' => Auth::id(),
71
            'artefacts' => $artefacts
72
        );
73
        return view('favartefacts.index') -> with($data);
75
        $artefacts = User::find($id)->likesArtefacts()->simplePaginate(1);
76
        $artefacts = $this->prepData($artefacts);
77
        return view('artefact.default', ['artefacts' => $artefacts]);
74 78
    }
75 79

  
76 80
}
app/Http/Controllers/FavoriteMetadataController.php
16 16
        $this->middleware('auth');
17 17
    }
18 18

  
19
    /**
20
     * Show list of favourite metadata.
21
     *
22
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
23
     */
19 24
    public function index()
20 25
    {
21 26
        $metadata = User::find(Auth::id())->likesMetadata()->orderBy(self::ORDER_COLUMN)->get();
......
27 32
        return view('favmetadata.index', ['metadata' => $metadata]);
28 33
    }
29 34

  
35
    /**
36
     * Unlike metadata given by its id.
37
     *
38
     * @param $id int id of metadata
39
     * @return \Illuminate\Http\RedirectResponse
40
     */
41
    public function unlike($id)
42
    {
43
        $user = User::find(Auth::id());
44
        $metadata = Metadata::find($id);
45

  
46
        $user->likesMetadata()->detach($metadata);
47

  
48
        return back()->withInput();
49
    }
50

  
30 51
}
app/Http/Controllers/VerifyRegisterController.php
1
<?php
2

  
3

  
4
namespace App\Http\Controllers;
5

  
6

  
7
use App\User;
8
use Illuminate\Contracts\View\Factory;
9
use Illuminate\View\View;
10

  
11
class VerifyRegisterController extends Controller
12
{
13
    public function __construct()
14
    {
15
        $this->middleware('auth');
16
    }
17

  
18
    /**
19
     * Verify registration link with time and user database,
20
     * if the user exists. If everything checks out, the user's
21
     * account will be activated.
22
     *
23
     * @param $id string hash of created user
24
     * @return Factory|View
25
     */
26
    public function verifyUser($id)
27
    {
28
        $userV = User::where('register_hash', $id)->get();
29
        $text = "";
30
        if(!$userV->isEmpty())
31
        {
32
            $created = $userV[0]->created_at;
33
            $now = date('Y-m-d h:i:s');
34
            $interval = $created->diff($now);
35

  
36
            if($interval->d >= 2)
37
            {
38
                $text = "Registration link expired!\n Need to create new account";
39
                $userV[0]->delete();
40
            }
41
            else if(isset($userV[0]->email_verified_at))
42
            {
43
                $text = "Registration link already activated!";
44
            }
45
            else
46
            {
47
                $userV[0]->email_verified_at = date('Y-m-d h:i:s');
48
                $userV[0]->save();
49
                $text = "Registration of the user " . $userV[0]->name . " has been successful.";
50
            }
51
        }
52
        else
53
        {
54
            $text = "The link is not valid!";
55
        }
56
        return view('verify.index', ['text' => $text]);
57
    }
58
}
app/Http/Kernel.php
17 17
        \App\Http\Middleware\TrustProxies::class,
18 18
        \Fruitcake\Cors\HandleCors::class,
19 19
        \App\Http\Middleware\CheckForMaintenanceMode::class,
20
        //\Illuminate\Session\Middleware\StartSession::class,
21
        //\Illuminate\View\Middleware\ShareErrorsFromSession::class,
20 22
        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
21 23
        \App\Http\Middleware\TrimStrings::class,
22 24
        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
app/Mail/RegisterMail.php
1
<?php
2

  
3
namespace App\Mail;
4

  
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9

  
10
class RegisterMail extends Mailable
11
{
12
    use Queueable, SerializesModels;
13

  
14
    public $stringHash;
15

  
16
    /**
17
     * Create a new message instance.
18
     *
19
     * @return void
20
     */
21
    public function __construct($stringH)
22
    {
23
        $this->stringHash = $stringH;
24
    }
25

  
26
    /**
27
     * Build the message.
28
     *
29
     * @return $this
30
     */
31
    public function build()
32
    {
33
        return $this->markdown('email.register');
34
    }
35
}
app/User.php
20 20
     * @var array
21 21
     */
22 22
    protected $fillable = [
23
         'name', 'email', 'password'
23
         'name', 'email', 'password', 'register_hash'
24 24
    ];
25 25

  
26 26
    /**
composer.json
14 14
        "guzzlehttp/guzzle": "^6.3",
15 15
        "laravel/framework": "^7.0",
16 16
        "laravel/tinker": "^2.0",
17
        "laravel/ui": "^2.0"
17
        "laravel/ui": "^2.0",
18
        "spatie/laravel-cookie-consent": "^2.12"
18 19
    },
19 20
    "require-dev": {
20 21
        "facade/ignition": "^2.0",
composer.lock
4 4
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5
        "This file is @generated automatically"
6 6
    ],
7
    "content-hash": "f0dcbdc80776ca79d6311b8f92c5a4b5",
7
    "content-hash": "f58cabd0613b5fb1c84929018285ce2e",
8 8
    "packages": [
9 9
        {
10 10
            "name": "asm89/stack-cors",
......
1966 1966
            ],
1967 1967
            "time": "2020-02-21T04:36:14+00:00"
1968 1968
        },
1969
        {
1970
            "name": "spatie/laravel-cookie-consent",
1971
            "version": "2.12.4",
1972
            "source": {
1973
                "type": "git",
1974
                "url": "https://github.com/spatie/laravel-cookie-consent.git",
1975
                "reference": "e455e6b45c68464ab8aad585ed51d1a098f967e4"
1976
            },
1977
            "dist": {
1978
                "type": "zip",
1979
                "url": "https://api.github.com/repos/spatie/laravel-cookie-consent/zipball/e455e6b45c68464ab8aad585ed51d1a098f967e4",
1980
                "reference": "e455e6b45c68464ab8aad585ed51d1a098f967e4",
1981
                "shasum": ""
1982
            },
1983
            "require": {
1984
                "illuminate/cookie": "~5.8.0|^6.0|^7.0",
1985
                "illuminate/support": "~5.8.0|^6.0|^7.0",
1986
                "illuminate/view": "~5.8.0|^6.0|^7.0",
1987
                "php": "^7.2"
1988
            },
1989
            "require-dev": {
1990
                "fzaninotto/faker": "~1.4",
1991
                "orchestra/testbench": "~3.8.0|^4.0|^5.0"
1992
            },
1993
            "type": "library",
1994
            "extra": {
1995
                "laravel": {
1996
                    "providers": [
1997
                        "Spatie\\CookieConsent\\CookieConsentServiceProvider"
1998
                    ]
1999
                }
2000
            },
2001
            "autoload": {
2002
                "psr-4": {
2003
                    "Spatie\\CookieConsent\\": "src"
2004
                }
2005
            },
2006
            "notification-url": "https://packagist.org/downloads/",
2007
            "license": [
2008
                "MIT"
2009
            ],
2010
            "authors": [
2011
                {
2012
                    "name": "Freek Van der Herten",
2013
                    "email": "freek@spatie.be",
2014
                    "homepage": "https://spatie.be",
2015
                    "role": "Developer"
2016
                },
2017
                {
2018
                    "name": "Willem Van Bockstal",
2019
                    "email": "willem@spatie.be",
2020
                    "homepage": "https://spatie.be",
2021
                    "role": "Developer"
2022
                }
2023
            ],
2024
            "description": "Make your Laravel app comply with the crazy EU cookie law",
2025
            "homepage": "https://github.com/spatie/cookie-consent",
2026
            "keywords": [
2027
                "comply",
2028
                "cookie",
2029
                "cookie-consent",
2030
                "eu",
2031
                "law",
2032
                "spatie"
2033
            ],
2034
            "time": "2020-05-14T16:57:04+00:00"
2035
        },
1969 2036
        {
1970 2037
            "name": "swiftmailer/swiftmailer",
1971 2038
            "version": "v6.2.3",
......
5506 5573
    "platform": {
5507 5574
        "php": "^7.2.5"
5508 5575
    },
5509
    "platform-dev": [],
5510
    "plugin-api-version": "1.1.0"
5576
    "platform-dev": []
5511 5577
}
database/factories/ArtefactFactory.php
10 10

  
11 11
$factory->define(Artefact::class, function ($faker) {
12 12
    return [
13
        'name' => $faker->opera,
13
        'name' => $faker->words($nb = 3, $asText = true),
14 14
        'author' => $faker->name,
15 15
        'made_in' => $faker->countryCode,
16 16
        'publisher' => $faker->company,
database/factories/UserFactory.php
27 27
        'remember_token' => Str::random(10),
28 28
        'created_at' => now(),
29 29
        'updated_at' => now(),
30
        'register_hash' => Str::random(10),
30 31
    ];
31 32
});
database/migrations/2020_04_06_000000_CreateUsersTable.php
23 23
            $table->string('password');
24 24
            $table->rememberToken();
25 25
            $table->timestamps();
26
            $table->string('register_hash');
26 27
        });
27 28
    }
28 29

  
database/seeds/DatabaseSeeder.php
21 21
            'remember_token' => Str::random(10),
22 22
            'created_at' => now(),
23 23
            'updated_at' => now(),
24
            'register_hash' => Str::random(10),
24 25
        ]);
25 26

  
26 27
        // Populate users
public/css/app.css
10885 10885
body {
10886 10886
  background-color: #272727;
10887 10887
  font-family: Nunito;
10888
  /*.form-control:focus {
10889
      background-color: $theme-color-five;
10890
      margin-top: -1px;
10891
      border-top-color: $theme-color-five;
10892
      border-left-color: $theme-color-five;
10893
      border-right-color: $theme-color-five;
10894
      border-bottom-color: 0.5pt $theme-color-one;
10895
      color: $theme-color-one;
10896
      box-shadow: none;
10897
      font-size: 8pt;
10898
  }*/
10899
  /*footer {
10900
      background: $theme-color-four;
10901
      color: $theme-color-five;
10902
      display: block;
10903
      height: 50px;
10904
      position: fixed;
10905
      left: 0;
10906
      bottom: 0;
10907
      width: 100%;
10888
  padding-top: 5.1rem;
10889
  /*.content {
10890
      position: relative;
10891

  
10892
      //Circle style button
10893
      .btn-circle.rounded-circle {
10894
          padding: 6px 0px;
10895
          font-size: 16px;
10896
          text-align: center;
10897
      }
10898
      .btn-categories
10899
      {
10900
          position: absolute;
10901
          border-width: 5px;
10902
          background-color: $theme-color-five;
10903
          border-color: $theme-color-four;
10904
          color:$theme-color-four;
10905
          outline: none !important;
10906
          box-shadow: none !important;
10907
          font-weight: $font-weight-two;
10908

  
10909
          &:active
10910
          {
10911
              background-color: $theme-color-three;
10912
              border-color: $theme-color-four;
10913
              outline: none !important;
10914
              box-shadow: none !important;
10915
              color:$theme-color-five;
10916
          }
10917
      }
10908 10918
  }*/
10909 10919
}
10910 10920

  
......
10915 10925
  letter-spacing: 3px;
10916 10926
}
10917 10927

  
10928
body .carousel {
10929
  margin-top: -5.1rem;
10930
}
10931

  
10918 10932
body .carousel .carousel-inner .museum-logo {
10919 10933
  display: flex;
10920 10934
  justify-content: center;
......
10924 10938
  z-index: 1;
10925 10939
}
10926 10940

  
10941
body .carousel .carousel-inner .museum-logo img {
10942
  width: 7.5rem;
10943
}
10944

  
10927 10945
body .carousel .carousel-inner .social-logo {
10928 10946
  text-align: center;
10929
  justify-content: space-between;
10947
  justify-content: space-around;
10930 10948
  flex-wrap: nowrap;
10931 10949
  position: absolute;
10932 10950
  top: 25%;
......
10935 10953
  z-index: 1;
10936 10954
}
10937 10955

  
10956
body .carousel .carousel-inner .social-logo img {
10957
  width: 2.0625rem;
10958
}
10959

  
10938 10960
body .carousel .carousel-inner .carousel-button {
10939 10961
  bottom: 10%;
10940 10962
  left: 50%;
......
10953 10975
body .carousel .carousel-caption {
10954 10976
  top: 50%;
10955 10977
  bottom: auto;
10978
  padding-left: 1rem;
10979
  padding-right: 1rem;
10956 10980
  transform: translateY(-50%);
10957 10981
  background-color: rgba(239, 218, 179, 0.5);
10958 10982
}
10959 10983

  
10960
body .carousel .carousel-caption p {
10961
  font-size: 8pt;
10962
  color: #272727;
10963
}
10964

  
10965 10984
body .text {
10966 10985
  font-weight: 400;
10967 10986
  font-size: 8pt;
......
10998 11017
  color: #ead4b0;
10999 11018
}
11000 11019

  
11020
body .text-headline-desktop {
11021
  font-weight: 600;
11022
  font-size: 24pt;
11023
  color: #ead4b0;
11024
}
11025

  
11001 11026
body .text-page {
11002 11027
  font-weight: 600;
11003 11028
  font-size: 7pt;
......
11023 11048

  
11024 11049
body .auth .col-form-label {
11025 11050
  text-align: left;
11026
  padding-top: 0px;
11027
  padding-bottom: 0px;
11051
  padding-top: 0;
11052
  padding-bottom: 0;
11028 11053
}
11029 11054

  
11030 11055
body .auth .form-control {
11031
  padding: 0px;
11056
  padding: 0;
11032 11057
  height: 17pt;
11033
  border-radius: 0%;
11058
  border-radius: 0;
11059
}
11060

  
11061
body .auth .form-control:focus {
11062
  border-top-color: #272727;
11063
  border-left-color: #272727;
11064
  border-right-color: #272727;
11065
  border-bottom-color: 0.5pt #ffffff;
11066
  box-shadow: none;
11067
}
11068

  
11069
body input:-webkit-autofill {
11070
  -webkit-box-shadow: 0 0 0 50px #272727 inset !important;
11071
  -webkit-text-fill-color: #ffffff;
11072
  background-color: #272727 !important;
11073
}
11074

  
11075
body input:-webkit-autofill:active,
11076
body input:-webkit-autofill:focus,
11077
body input:-webkit-autofill:visited,
11078
body input:-webkit-autofill:hover {
11079
  -webkit-box-shadow: 0 0 0 50px #272727 inset !important;
11080
  -webkit-text-fill-color: #ffffff;
11081
  background-color: #272727 !important;
11034 11082
}
11035 11083

  
11036 11084
body .card-body {
......
11049 11097
  color: #ffffff;
11050 11098
  box-shadow: none;
11051 11099
  font-size: 8pt;
11100
  outline: none;
11052 11101
}
11053 11102

  
11054 11103
body .form-control:active,
11055 11104
body .form-control:focus,
11056
body .form-control:visited {
11105
body .form-control:visited,
11106
body .form-control:hover {
11107
  outline: none;
11057 11108
  background-color: #272727;
11058 11109
  margin-top: -1px;
11059 11110
  border-top-color: #272727;
......
11083 11134
  color: #ffffff;
11084 11135
  border: 0.5pt solid #ffffff;
11085 11136
  border-radius: 0;
11086
  width: 6.5rem;
11087
  height: 2rem;
11137
  padding: 0.4675rem 2.475rem;
11088 11138
  font-weight: 400;
11089 11139
}
11090 11140

  
11091 11141
body .button-square:active,
11092 11142
body .button-square:focus,
11093
body .button-square:visited {
11143
body .button-square:visited,
11144
body .button-square:hover {
11094 11145
  outline: none;
11095 11146
  box-shadow: none;
11147
  color: #ffffff;
11148
}
11149

  
11150
body .button-square:hover {
11151
  color: #ead4b0;
11096 11152
}
11097 11153

  
11098 11154
body .pin-left:before {
......
11109 11165

  
11110 11166
body .pin-left {
11111 11167
  border-left: 0.5pt solid #ead4b0;
11112
  display: inline-block;
11113
  margin: 10rem 50px 0px -5rem;
11114 11168
  position: fixed;
11115
  top: 0;
11116 11169
  bottom: 0;
11117 11170
  text-align: left;
11118
  width: 100%;
11171
  left: 50%;
11172
  transform: translateX(-50%);
11173
  width: 70%;
11119 11174
}
11120 11175

  
11121 11176
body .pin-left .text {
11122 11177
  margin-left: 0.5rem;
11178
  margin-bottom: 0.2rem;
11123 11179
}
11124 11180

  
11125 11181
body .pin-left p {
11126
  margin-top: 0pt;
11127
  margin-bottom: 0pt;
11182
  margin-top: 0;
11183
  margin-bottom: 0;
11128 11184
}
11129 11185

  
11130 11186
body li {
......
11148 11204
  background-repeat: no-repeat;
11149 11205
}
11150 11206

  
11207
body .fav-cat-mybooks {
11208
  color: #ddd1b9;
11209
  text-align: center;
11210
  font-size: 1.9rem;
11211
}
11212

  
11213
body .fav-cat-nofav {
11214
  text-align: center;
11215
  color: #efdab3;
11216
  background-color: #272727;
11217
  border-color: #efdab3;
11218
}
11219

  
11151 11220
body .artefacts-area h5,
11152 11221
body .artefact-area h5 {
11153 11222
  color: #ddd1b9;
11154
  font-weight: 600;
11155
  line-height: 20pt;
11156
  font-size: 21pt;
11223
  text-overflow: ellipsis;
11224
  overflow: hidden;
11225
  white-space: nowrap;
11226
  line-height: 0.9rem;
11227
  font-size: 1.1rem;
11157 11228
}
11158 11229

  
11159 11230
body .artefacts-area h6,
11160 11231
body .artefact-area h6 {
11161 11232
  color: #ddd1b9;
11162
  font-size: 14pt;
11233
  font-size: 0.9rem;
11163 11234
  font-weight: 400;
11164 11235
}
11165 11236

  
......
11178 11249
body .artefacts-area .left_panel_info,
11179 11250
body .artefact-area .left_panel_info {
11180 11251
  margin-top: 15px;
11181
  margin-left: -10px;
11182
  max-width: 250px;
11252
  max-width: 70%;
11183 11253
}
11184 11254

  
11185 11255
body .artefacts-area .right_panel_info,
11186 11256
body .artefact-area .right_panel_info {
11187 11257
  margin-top: 15px;
11188
  margin-right: -15px;
11258
}
11259

  
11260
body .artefacts-area .likes_text,
11261
body .artefact-area .likes_text {
11262
  text-align: center;
11189 11263
}
11190 11264

  
11191 11265
body .artefacts-area .card-cus-bottom,
11192 11266
body .artefact-area .card-cus-bottom {
11193 11267
  background-color: #272727;
11268
  padding-right: 0;
11269
  padding-left: 0;
11194 11270
}
11195 11271

  
11196 11272
body .artefacts-area .inter_info:before,
11197 11273
body .artefact-area .inter_info:before {
11198
  background-image: url(/images/Button_Info_50.png?cf6e509b9294d4138459f1846c7effdf);
11199
  width: 60px;
11200
  height: 60px;
11274
  background-image: url(/images/Button_Info.svg?92f55a6c483b585543ec80f3fd3461de);
11275
  width: 8vw;
11276
  height: 8vw;
11201 11277
}
11202 11278

  
11203 11279
body .artefacts-area .inter_like,
......
11207 11283

  
11208 11284
body .artefacts-area .inter_like:before,
11209 11285
body .artefact-area .inter_like:before {
11210
  background-image: url(/images/Hearth_Empty_50.png?d969cd4d381634ef975e503608b3ab48);
11211
  width: 60px;
11212
  height: 60px;
11286
  background-image: url(/images/Heart_Empty.svg?974f069a126736e569df0f463d68c026);
11287
  width: 8vw;
11288
  height: 8vw;
11213 11289
}
11214 11290

  
11215 11291
body .artefacts-area .inter_like_filled:before,
11216 11292
body .artefact-area .inter_like_filled:before {
11217
  background-image: url(/images/Hearth_Filled_50.png?77bb26c3aba063c00aba1a2f07059d71);
11218
  width: 60px;
11219
  height: 60px;
11293
  background-image: url(/images/Heart_Filled.svg?e5b962dc0fd67a2042277b9826016c9c);
11294
  width: 8vw;
11295
  height: 8vw;
11296
}
11297

  
11298
body .artefacts-area .charts .inter_info,
11299
body .artefacts-area .charts .inter_like,
11300
body .artefacts-area .charts .inter_like_filled,
11301
body .artefact-area .charts .inter_info,
11302
body .artefact-area .charts .inter_like,
11303
body .artefact-area .charts .inter_like_filled {
11304
  display: inline;
11305
}
11306

  
11307
body .artefacts-area .charts .inter_info:before,
11308
body .artefacts-area .charts .inter_like:before,
11309
body .artefacts-area .charts .inter_like_filled:before,
11310
body .artefact-area .charts .inter_info:before,
11311
body .artefact-area .charts .inter_like:before,
11312
body .artefact-area .charts .inter_like_filled:before {
11313
  width: 3rem;
11314
  height: 3rem;
11220 11315
}
11221 11316

  
11222 11317
body .artefacts-area .inter_info,
......
11278 11373
}
11279 11374

  
11280 11375
body .artefact-area .inter_like:before {
11281
  background-image: url(/images/Hearth_Empty_Small.png?252b4c7a69920aa18f2fc75a93aaa90a);
11282
  width: 25px;
11283
  height: 19px;
11376
  background-image: url(/images/Heart_Empty.svg?974f069a126736e569df0f463d68c026);
11377
  width: 1.563rem;
11378
  height: 1.25rem;
11379
}
11380

  
11381
body .artefact-area .inter_like_filled:before {
11382
  background-image: url(/images/Heart_Filled.svg?e5b962dc0fd67a2042277b9826016c9c);
11383
  width: 1.563rem;
11384
  height: 1.25rem;
11284 11385
}
11285 11386

  
11286 11387
body .artefact-area .inter_info {
......
11288 11389
}
11289 11390

  
11290 11391
body .artefact-area .inter_info:before {
11291
  background-image: url(/images/Button_Info_Small.png?9bc35ac07e9ec5a6b75d9af964e80512);
11292
  width: 29px;
11293
  height: 29px;
11392
  background-image: url(/images/Button_Info.svg?92f55a6c483b585543ec80f3fd3461de);
11393
  width: 1.875rem;
11394
  height: 1.875rem;
11294 11395
}
11295 11396

  
11296 11397
body .artefact-area .artefact-likes {
......
11300 11401
}
11301 11402

  
11302 11403
body .metadata-area h2 {
11404
  color: #ddd1b9;
11303 11405
  font-weight: 600;
11304 11406
  font-size: 12pt;
11305 11407
}
......
11320 11422
  color: #ddd1b9;
11321 11423
  border-bottom: 0.042rem solid #ddd1b9;
11322 11424
  display: inline-block;
11323
  margin: 3.35rem 3.125rem 0 0;
11425
  margin: 2.75rem 3.125rem 0 0;
11324 11426
}
11325 11427

  
11326
body .metadata-area .pin-horizontal:before {
11428
body .metadata-area .pin-horizontal:after {
11327 11429
  content: "";
11328 11430
  background-color: #ddd1b9;
11329 11431
  position: relative;
11330 11432
  height: 0.5rem;
11331 11433
  width: 0.5rem;
11332 11434
  border-radius: 50%;
11333
  display: inline-block;
11334
  top: 1.5rem;
11335
  left: 50vw;
11435
  display: block;
11436
  margin-left: auto;
11437
  top: 0.25rem;
11336 11438
}
11337 11439

  
11338 11440
body .metadata-area .pin-horizontal .metadata {
......
11341 11443
  align-items: baseline;
11342 11444
}
11343 11445

  
11344
body .metadata-area .pin-horizontal .metadata span {
11446
body .metadata-area .pin-horizontal .metadata a {
11447
  color: #ddd1b9;
11448
  text-decoration: none;
11449
}
11450

  
11451
body .metadata-area .pin-horizontal .metadata a span {
11345 11452
  font-weight: 600;
11346 11453
}
11347 11454

  
......
11362 11469
  border-bottom: 0.042rem solid #ffffff;
11363 11470
}
11364 11471

  
11365
body .metadata-area .white-pin:before {
11472
body .metadata-area .white-pin:after {
11366 11473
  content: "";
11367 11474
  background-color: #ffffff;
11368 11475
}
11369 11476

  
11477
body .metadata-area .white-pin .metadata a {
11478
  color: #ffffff;
11479
}
11480

  
11370 11481
body .metadata-area .white-pin .metadata .arrow-down {
11371 11482
  border-top: 0.25rem solid #ffffff;
11372 11483
}
......
11394 11505
  font-size: 7pt;
11395 11506
}
11396 11507

  
11508
body .metadata-area .metadata-text .artefact-info .inter_like:before {
11509
  background-image: url(/images/Heart_Empty.svg?974f069a126736e569df0f463d68c026);
11510
  width: 3.125rem;
11511
  height: 3.125rem;
11512
  margin-right: 0;
11513
}
11514

  
11515
body .metadata-area .metadata-text .artefact-info .inter_like:hover,
11516
body .metadata-area .metadata-text .artefact-info .inter_like:focus,
11517
body .metadata-area .metadata-text .artefact-info .inter_like:active {
11518
  background-color: transparent !important;
11519
  border-color: transparent !important;
11520
  outline: none !important;
11521
  box-shadow: none !important;
11522
}
11523

  
11397 11524
body .metadata-area .metadata-text .artefact-info .inter_like_filled:before {
11398
  background-image: url(/images/Hearth_Filled_50.png?77bb26c3aba063c00aba1a2f07059d71);
11399
  width: 50px;
11400
  height: 50px;
11525
  background-image: url(/images/Heart_Filled.svg?e5b962dc0fd67a2042277b9826016c9c);
11526
  width: 3.125rem;
11527
  height: 3.125rem;
11528
  margin-right: 0;
11401 11529
}
11402 11530

  
11403 11531
body .metadata-area .metadata-text .artefact-info .inter_like_filled:hover,
......
11409 11537
  box-shadow: none !important;
11410 11538
}
11411 11539

  
11412
body .content {
11413
  position: relative;
11540
body .modal {
11541
  font-weight: 400;
11542
  color: #ddd1b9;
11543
  font-size: 8pt;
11414 11544
}
11415 11545

  
11416
body .content .btn-circle.rounded-circle {
11417
  padding: 6px 0px;
11418
  font-size: 16px;
11419
  text-align: center;
11546
body .modal .modal-header {
11547
  border-bottom: 1px solid #ddd1b9;
11420 11548
}
11421 11549

  
11422
body .content .btn-categories {
11423
  position: absolute;
11424
  border-width: 5px;
11550
body .modal .modal-header .close {
11551
  color: #ddd1b9;
11552
  text-shadow: none;
11553
}
11554

  
11555
body .modal .modal-content {
11425 11556
  background-color: #272727;
11426
  border-color: #ead4b0;
11427
  color: #ead4b0;
11428
  outline: none !important;
11429
  box-shadow: none !important;
11430
  font-weight: 600;
11431 11557
}
11432 11558

  
11433
body .content .btn-categories:active {
11434
  background-color: #efdab3;
11435
  border-color: #ead4b0;
11436
  outline: none !important;
11437
  box-shadow: none !important;
11559
body .modal .modal-footer {
11560
  border-top: 1px solid #ddd1b9;
11561
}
11562

  
11563
body .modal .modal-footer .btn {
11564
  background-color: #ddd1b9;
11438 11565
  color: #272727;
11439 11566
}
11440 11567

  
11441
body .cat-col-md-2 {
11442
  margin: 2%;
11568
body .image-modal .close {
11569
  font-size: 24pt;
11570
  color: #ddd1b9;
11571
  text-shadow: none;
11572
  position: absolute;
11573
  top: 1rem;
11574
  right: 0.125rem;
11575
  opacity: 1;
11576
  cursor: pointer;
11577
  pointer-events: initial;
11443 11578
}
11444 11579

  
11445 11580
body .btn.btn-dark.cat-tile {
......
11452 11587
  text-align: center;
11453 11588
  outline: none !important;
11454 11589
  box-shadow: none !important;
11455
  font-size: 8mm;
11456
  word-wrap: break-word;
11457
  height: 40mm;
11458
  width: 100%;
11590
  overflow: hidden;
11591
  text-overflow: ellipsis;
11592
  font-size: 22pt;
11593
  padding: 4rem 1rem;
11459 11594
}
11460 11595

  
11461 11596
body .btn.btn-dark.cat-tile:active,
......
11467 11602
  color: #272727;
11468 11603
}
11469 11604

  
11605
body .btn-dark:not(:disabled):not(.disabled).active {
11606
  background-color: #ead4b0;
11607
  color: white;
11608
  border-color: #272727;
11609
}
11610

  
11470 11611
body .category-h2 {
11471 11612
  color: #ead4b0;
11472 11613
}
11473 11614

  
11474
.arrow {
11475
  position: absolute;
11476
  width: 0;
11477
  height: 0;
11478
  margin: 2rem;
11479
  cursor: pointer;
11480
  border: 0.59055rem solid transparent;
11615
body .head-title.text-center.cat-main-topic h1 {
11616
  font-size: 1.9rem;
11617
}
11618

  
11619
body .cat-main-menu {
11620
  font-size: 1.75rem;
11621
  text-align: center;
11622
  margin-bottom: 30pt;
11623
}
11624

  
11625
body .cat-main-menu a,
11626
body .cat-main-menu a:visited {
11627
  color: #ddd1b9;
11628
  text-decoration: none;
11629
}
11630

  
11631
body .cat-main-menu a:hover {
11632
  color: #ead4b0;
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff