Skip to content

Commit 320f373

Browse files
authored
Added courses for landing page (#204)
1 parent d5fe142 commit 320f373

File tree

10 files changed

+288
-230
lines changed

10 files changed

+288
-230
lines changed

app/School/Course.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\School;
4+
5+
class Course
6+
{
7+
public function __construct(
8+
public string $name,
9+
public string $description,
10+
public string $image,
11+
public string $link
12+
) {}
13+
}

app/School/Courses.php

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?php
2+
3+
namespace App\School;
4+
5+
use Illuminate\Support\Collection;
6+
7+
class Courses
8+
{
9+
/**
10+
* Get the teachers items.
11+
*
12+
* @return array
13+
*/
14+
public static function teachers(): Collection
15+
{
16+
return collect([
17+
Teacher::make('Михаил Протасевич', '/img/community/protasevich.jpg', [
18+
new Course(
19+
'Laravel Reverb',
20+
'Современный подход к реализации веб-сокетов на Laravel',
21+
'/img/ui/courses/reverb.svg',
22+
'https://www.youtube.com/playlist?list=PLiOhsP3M5j5wJmOW-pd85abUB3iqpaiZy'
23+
),
24+
new Course(
25+
'Разработка пакета под Laravel',
26+
'От инициализации и тестирования до управления ресурсами',
27+
'/img/ui/courses/chest.svg',
28+
'https://www.youtube.com/playlist?list=PLiOhsP3M5j5x_NCEhb09gnH_RCj-Vflxs'
29+
),
30+
new Course(
31+
'Laravel и его друзья',
32+
'Полезные пакеты, решения и новости',
33+
'/img/ui/courses/laravel.svg',
34+
'https://www.youtube.com/playlist?list=PLiOhsP3M5j5wz0OoYum7LkXTEjKF_Ywb_'
35+
),
36+
]),
37+
38+
Teacher::make('Данил Щуцкий', '/img/community/danil-shutsky.jpg', [
39+
new Course(
40+
'Отношения в Eloquent',
41+
'Основы применения различных связей',
42+
'/img/ui/courses/relationship.svg',
43+
'https://www.youtube.com/playlist?list=PLTucyHptHtTmEUKZhY40SrXPhUuPdp1bD'
44+
),
45+
new Course(
46+
'Под капотом',
47+
'Как это работает? Давайте погрузимся во внутренности фреймворка',
48+
'/img/ui/courses/chest.svg',
49+
'https://www.youtube.com/playlist?list=PLTucyHptHtTnkmEwK0Yxxl-L9Z_8XOK6c'
50+
),
51+
new Course(
52+
'Laravel с нуля',
53+
'Воплотите свои идеи после руководство для абсолютных новичков',
54+
'/img/ui/courses/laravel.svg',
55+
'https://www.youtube.com/playlist?list=PLTucyHptHtTkUbXaikXEmCWL8GradRx9I'
56+
),
57+
new Course(
58+
'MoonShine 2',
59+
'Установка и применение админ-панели по шагам наглядно и понятно',
60+
'/img/ui/courses/moonshine.svg',
61+
'https://www.youtube.com/playlist?list=PLTucyHptHtTnFB4pLj1FpqEMwu7qv3xbG'
62+
),
63+
]),
64+
65+
Teacher::make('Максим Орлов', '/img/community/orlov.jpg', [
66+
new Course(
67+
'Деплой',
68+
'Деплой (CI/CD) Laravel на хостинг автоматически (3 способа)',
69+
'/img/ui/courses/deploy.svg',
70+
'https://www.youtube.com/playlist?list=PLXCVm4GFpx5BNlRCGZqVFK1IMUampm3Q_'
71+
),
72+
new Course(
73+
'Laravel',
74+
'Рассмотрим все возможности фреймворка на 2023 год.',
75+
'/img/ui/courses/laravel.svg',
76+
'https://www.youtube.com/playlist?list=PLXCVm4GFpx5CZf4X5ppNJTPsaGwSlBXLX'
77+
),
78+
new Course(
79+
'Laravel Helpers',
80+
'Мои функции хелперы с которыми я работаю ежедневно.',
81+
'/img/ui/courses/helpers.svg',
82+
'https://www.youtube.com/playlist?list=PLXCVm4GFpx5DMQeuzyQwZW8QtslxsUxFy'
83+
),
84+
new Course(
85+
'Tailwind',
86+
'Верстаем ВКонтакте с помощью инструмента Tailwind',
87+
'/img/ui/courses/tailwind.svg',
88+
'https://www.youtube.com/playlist?list=PLXCVm4GFpx5AjF_3jMD6tsDI6eS-yc92U'
89+
),
90+
]),
91+
92+
Teacher::make('Дмитрий Афанасьев', '/img/community/afanasyev.jpg', [
93+
new Course(
94+
'Git',
95+
'Обязательно знать и уметь применять систему контроля версий',
96+
'/img/ui/courses/git.svg',
97+
'https://www.youtube.com/playlist?list=PLoonZ8wII66iUm84o7nadL-oqINzBLk5g'
98+
),
99+
new Course(
100+
'Эксперт PHP',
101+
'В курсе будут рассмотрены наиболее популярные функции и механики языка PHP.',
102+
'/img/ui/courses/php.svg',
103+
'https://www.youtube.com/playlist?list=PLoonZ8wII66iZSicLNXhE4bxUYaKhIc-L'
104+
),
105+
new Course(
106+
'Основы Laravel',
107+
'Пошаговый видеокурс по фреймворку Laravel. Версии фреймворка используемые в курсе: 5.7.2 - 8.*',
108+
'/img/ui/courses/laravel.svg',
109+
'https://www.youtube.com/playlist?list=PLoonZ8wII66iP0fJPHhkLXa3k7CMef9ak'
110+
),
111+
new Course(
112+
'Шаблоны проектирования',
113+
'Рассмотрены и реализуйте паттерны на языке PHP.',
114+
'/img/ui/courses/template.svg',
115+
'https://www.youtube.com/playlist?list=PLoonZ8wII66hKbEvIVAZnp1h4CE-4Mtk4'
116+
),
117+
]),
118+
]);
119+
}
120+
121+
/**
122+
* Get the courses items.
123+
*
124+
* @return array
125+
*/
126+
public static function items(): Collection
127+
{
128+
return static::teachers()
129+
->map(fn (Teacher $teacher) => $teacher->courses)
130+
->flatten();
131+
}
132+
}

app/School/Teacher.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace App\School;
4+
5+
use Illuminate\Support\Collection;
6+
7+
class Teacher
8+
{
9+
/**
10+
* @var Collection Courses
11+
*/
12+
public Collection $courses;
13+
14+
public function __construct(public $name, public $image, iterable $courses = [])
15+
{
16+
$this->courses = new Collection($courses);
17+
}
18+
19+
/**
20+
* @param string $name
21+
* @param string $image
22+
* @param iterable $courses
23+
*
24+
* @return self
25+
*/
26+
public static function make(string $name, string $image, iterable $courses = []): Teacher
27+
{
28+
return new self($name, $image, $courses);
29+
}
30+
31+
/**
32+
* @return $this
33+
*/
34+
public function addCourse(Course $course): self
35+
{
36+
$this->courses->push($course);
37+
38+
return $this;
39+
}
40+
}

public/build/assets/app-DKT7jrpA.css renamed to public/build/assets/app-BEZ5dSej.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/app-DhmmTq3Y.js renamed to public/build/assets/app-Kqr10Ojd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"src": "public/img/ui/warning.svg"
1313
},
1414
"resources/css/app.scss": {
15-
"file": "assets/app-DKT7jrpA.css",
15+
"file": "assets/app-BEZ5dSej.css",
1616
"src": "resources/css/app.scss",
1717
"isEntry": true
1818
},
1919
"resources/js/app.js": {
20-
"file": "assets/app-DhmmTq3Y.js",
20+
"file": "assets/app-Kqr10Ojd.js",
2121
"name": "app",
2222
"src": "resources/js/app.js",
2323
"isEntry": true,

resources/css/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ $utilities: (
107107
@import 'marketing';
108108
@import 'post';
109109
@import 'gagarin';
110+
@import 'slider';
110111

111112
.avatar {
112113
border-radius: 10em;

resources/css/slider.scss

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
$animationSliderSpeed: 40s;
2+
3+
// Animation
4+
@keyframes scroll {
5+
0% {
6+
transform: translateX(0);
7+
}
8+
100% {
9+
transform: translateX(calc(-250px * 7));
10+
}
11+
}
12+
13+
// Styling
14+
.slider {
15+
margin: auto;
16+
overflow: hidden;
17+
position: relative;
18+
width: 100%;
19+
20+
&::before,
21+
&::after {
22+
background: linear-gradient(to right, var(--bs-body-bg) 0%, rgba(255, 255, 255, 0) 100%);
23+
content: '';
24+
height: 100%;
25+
position: absolute;
26+
width: 200px;
27+
z-index: 2;
28+
pointer-events: none;
29+
}
30+
31+
&::after {
32+
right: 0;
33+
top: 0;
34+
transform: rotateZ(180deg);
35+
}
36+
37+
&::before {
38+
left: 0;
39+
top: 0;
40+
}
41+
42+
.slide-track {
43+
animation: scroll $animationSliderSpeed linear infinite;
44+
display: flex;
45+
width: calc(250px * 14);
46+
}
47+
48+
.slide {
49+
min-width: 250px;
50+
width: 20rem;
51+
}
52+
}

0 commit comments

Comments
 (0)