-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added controller for regional gala * added infinite scroll for projects * added images * added texts * separate success page from user registration * added regional gala pages * added routes * added cards * change emited event on success * updated paginated grid * added infinete scroll in modal * Update navbar
- Loading branch information
1 parent
ff31d53
commit 3e9d6ac
Showing
19 changed files
with
1,702 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Models\County; | ||
use App\Models\Project; | ||
use Inertia\Inertia; | ||
|
||
class RegionalController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
$testimonials = [ | ||
[ | ||
'content' => '11111 Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo expedita voluptas culpa sapiente alias molestiae. Numquam corrupti in laborum sed rerum et corporis.', | ||
'name' => 'Judith Black', | ||
'job' => 'CEO', | ||
'company' => 'Workcation' | ||
], | ||
[ | ||
'content' => '222222222 Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo expedita voluptas culpa sapiente alias molestiae. Numquam corrupti in laborum sed rerum et corporis.', | ||
'name' => 'Judith Black', | ||
'job' => 'CEO', | ||
'company' => 'Workcation' | ||
] | ||
]; | ||
|
||
$links = [ | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
], | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
], | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
] | ||
]; | ||
|
||
$editions = [ | ||
[ | ||
'href' => '1', | ||
'name' => 'Campionatul de bine 2020' | ||
], | ||
[ | ||
'href' => '2', | ||
'name' => 'Campionatul de bine 2019' | ||
], | ||
[ | ||
'href' => '3', | ||
'name' => 'Campionatul de bine 2018' | ||
], | ||
]; | ||
|
||
$articles = [ | ||
[ | ||
'id' => 1, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
[ | ||
'id' => 2, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
[ | ||
'id' => 3, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
]; | ||
|
||
$projects = Project::publish()->paginate(9)->withQueryString(); | ||
$counties = County::whereHas('projects')->get(['name', 'id']); | ||
return Inertia::render('Public/Regional/Regional', [ | ||
'query' => $projects, | ||
'counties' => $counties, | ||
'testimonials' => $testimonials, | ||
'links' => $links, | ||
'editions' => $editions, | ||
'articles' => $articles | ||
]); | ||
} | ||
|
||
public function edition() | ||
{ | ||
$testimonials = [ | ||
[ | ||
'content' => '11111 Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo expedita voluptas culpa sapiente alias molestiae. Numquam corrupti in laborum sed rerum et corporis.', | ||
'name' => 'Judith Black', | ||
'job' => 'CEO', | ||
'company' => 'Workcation' | ||
], | ||
[ | ||
'content' => '222222222 Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo expedita voluptas culpa sapiente alias molestiae. Numquam corrupti in laborum sed rerum et corporis.', | ||
'name' => 'Judith Black', | ||
'job' => 'CEO', | ||
'company' => 'Workcation' | ||
] | ||
]; | ||
|
||
$links = [ | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
], | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
], | ||
[ | ||
'href' => "#", | ||
'label' => "Titlu Articol", | ||
'source' => "sursa.ro" | ||
] | ||
]; | ||
|
||
$editions = [ | ||
[ | ||
'href' => '1', | ||
'name' => 'Campionatul de bine 2020' | ||
], | ||
[ | ||
'href' => '2', | ||
'name' => 'Campionatul de bine 2019' | ||
], | ||
[ | ||
'href' => '3', | ||
'name' => 'Campionatul de bine 2018' | ||
], | ||
]; | ||
|
||
$articles = [ | ||
[ | ||
'id' => 1, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
[ | ||
'id' => 2, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
[ | ||
'id' => 3, | ||
'img' => '/images/project_img.png', | ||
'author' => 'Ion Popescu', | ||
'name' => 'Importanța educației remediare în România în timpul pandemiei', | ||
'team' => 'Echipa BCR', | ||
'content' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto accusantium praesentium eius, ut atque fuga culpa, similique sequi cum eos quis dolorum.', | ||
'date' => '15.02.2022' | ||
], | ||
]; | ||
|
||
$statistics = [ | ||
[ | ||
'month' => 'Decembrie 2016', | ||
'donations' => '2210', | ||
'amount' => '188873,00' | ||
], | ||
[ | ||
'month' => 'Decembrie 2016', | ||
'donations' => '2210', | ||
'amount' => '188873,00' | ||
], | ||
[ | ||
'month' => 'Decembrie 2016', | ||
'donations' => '2210', | ||
'amount' => '188873,00' | ||
], | ||
[ | ||
'month' => 'Decembrie 2016', | ||
'donations' => '2210', | ||
'amount' => '188873,00' | ||
] | ||
]; | ||
|
||
$projects = Project::publish()->paginate(9)->withQueryString(); | ||
$counties = County::whereHas('projects')->get(['name', 'id']); | ||
return Inertia::render('Public/Regional/LastEdition', [ | ||
'query' => $projects, | ||
'counties' => $counties, | ||
'testimonials' => $testimonials, | ||
'links' => $links, | ||
'editions' => $editions, | ||
'articles' => $articles, | ||
'statistics' => $statistics | ||
]); | ||
} | ||
|
||
public function project(Project $project) | ||
{ | ||
\Log::info(print_r($project,true)); | ||
return Inertia::render('Public/Regional/Project', [ | ||
'project' => $project, | ||
]); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<template> | ||
<li | ||
class="flex flex-col col-span-1 bg-white divide-y divide-gray-200 rounded-lg shadow" | ||
> | ||
<div class="flex flex-col flex-1"> | ||
<Link | ||
:href="route('regionalproject', data.slug)" | ||
class="relative bg-gray-200 group-hover:opacity-75 sm:h-52" | ||
> | ||
|
||
<img | ||
:src="data.cover_image!=='' ?data.cover_image: 'https://images.unsplash.com/photo-1508779544523-dd1b27685be3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80'" | ||
alt="imagine proiect" | ||
class="object-cover object-center w-full h-full rounded-t-lg sm:h-full sm:w-full" | ||
/> | ||
|
||
<div class="absolute z-10 flex flex-wrap gap-2 bottom-3 left-3"> | ||
<div | ||
class="inline-flex items-center px-3 py-1 text-base font-bold text-white bg-red-500 rounded-full gap-x-2" | ||
> | ||
<SvgLoader class="shrink-0 fill-white" name="location" /> | ||
4 | ||
</div> | ||
</div> | ||
</Link> | ||
|
||
<div class="p-6"> | ||
<div class="pb-4 text-base font-medium text-gray-700">{{ data.organization.name }}</div> | ||
|
||
<Link | ||
:href="route('regionalproject', data.slug)" | ||
class="mt-4 text-2xl font-bold text-gray-700" | ||
> | ||
{{ data.name }} | ||
</Link> | ||
|
||
<div class="flex items-center gap-5 mt-1 text-base font-medium text-gray-700"> | ||
<div v-if="data.county" class="flex items-center gap-1"> | ||
<SvgLoader class="shrink-0" name="location" /> | ||
{{ data.county.name }} | ||
</div> | ||
|
||
<div v-if="data.activity_domains" class="flex items-center gap-1"> | ||
<SvgLoader class="shrink-0" name="activity" /> | ||
<span class="w-20 truncate lg:w-40">{{ data.activity_domains.join(',') }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="w-full p-6"> | ||
<Link | ||
:href="route('regionalproject', data.slug)" | ||
class="block text-center w-full mt-auto bg-turqoise-500 hover:bg-turqoise-400 text-white focus-visible:outline-turqoise-500 rounded-md px-3.5 py-2.5 text-sm font-semibold shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2" | ||
> | ||
{{ $t('see') }} | ||
</Link> | ||
</div> | ||
</div> | ||
</li> | ||
</template> | ||
|
||
<script setup> | ||
/** Import from inertia. */ | ||
import { Link } from "@inertiajs/vue3"; | ||
/** Import components. */ | ||
import SvgLoader from "@/Components/SvgLoader.vue"; | ||
/** Component props. */ | ||
const props = defineProps({ | ||
data: Object, | ||
cardType: String, | ||
}); | ||
</script> |
Oops, something went wrong.