Skip to content

Commit

Permalink
Fixes (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
vilenbejenaru authored Aug 11, 2023
1 parent 7b3e424 commit 2c4f9bb
Show file tree
Hide file tree
Showing 20 changed files with 893 additions and 821 deletions.
1,212 changes: 656 additions & 556 deletions composer.lock

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions lang/en/txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@

'buttons' => [
'search' => 'Search',
'services_map' => 'Services map',
'services_list' => 'List of services',
'services_map' => 'See services map',
'services_list' => 'See list of services',
'see_more' => 'See more',
'see_story' => 'See story',
'see_story' => 'See the story of the organization',
'access_online' => 'Access online',
'access_site' => 'Access the website',
'ngos_map' => 'NGOs map',
Expand All @@ -54,7 +54,6 @@
'details' => 'Details',
'send' => 'Send',
'continue' => 'Continue',

],

'placeholders' => [
Expand All @@ -63,7 +62,7 @@
'find_address' => 'Search address',
'course_type' => 'Course type',
'date_start' => 'Start date',
'search_services' => 'Search services',
'search_services' => 'Search for services...',
'anywhere_country' => 'Anywhere in the country',
'any_domain' => 'Any intervention domain',
'any_beneficiary' => 'Any beneficiary',
Expand Down Expand Up @@ -111,9 +110,9 @@
'domains' => 'Intervention domains',
],
'search_ngo' => [
'search_title' => 'NGOs',
'search_text' => 'Look for an NGO that could help you',
'search_text_span' => ' Search for ngos...',
'search_title' => 'NGOs (organisations)',
'search_text' => 'Look for an NGO that could help you, depending on your needs',
'search_text_span' => ' Search for NGOs...',
],
'about' => [
'about_project' => 'About the project',
Expand Down
12 changes: 6 additions & 6 deletions lang/ro/txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

'buttons' => [
'search' => 'Caută',
'services_map' => 'Hartă servicii',
'services_list' => 'Listă servicii',
'services_map' => 'Vezi hartă servicii',
'services_list' => 'Vezi listă servicii',
'see_more' => 'Vezi mai mult',
'see_story' => 'Vezi povestea',
'see_story' => ' Vezi povestea organizației',
'access_online' => 'Accesează online',
'access_site' => 'Accesează website',

Expand Down Expand Up @@ -134,9 +134,9 @@
'text6' => 'Organizațiile și proiectele susținute prin CARE și implementate la nivel național de Fundația SERA România cu sprijinul CARE France și FONPC sunt: YouHub Association, Fundația FARA, Fundația ESTUAR, Asociația CARUSEL, Asociația ESPERANDO, Fundația Parada, Asociația de Ajutor AMURTEL România, Asoc Autism Baia Mare, Create Yourself Association, ECLER, The International Foundation for Child and Family, Asociația Q-ARTS, Asociația The Social Incubator, Asociația Buna Ziua Copii, Asociația ANAIS, Asociația Profesorii de Asistență Socială ASSOC, Asociația Civica Radauti, Asociația Hand across Romania, Fundația Inimă de Copil, Organizația Natională Cercetașii României, ALIAT, Society for Children and Parents, Federația Organizațiilor Neguvernamentale pentru Servicii Sociale, Federația Organizatiilor Neguvernamentale pentru Copii, Asociația Club Sportiv Olimpic Snagov, Fundația Serviciilor Sociale Bethany, Fundația de Ajutor Medical Profilaxis, Fundația Star of Hope Romania, Fundația ELIBERARE, DGASPC Sector 1, DGASMB, DGASPC Sector 3, DGASPC Tulcea, DGASPC Suceava, DGASPC Maramureș, DGASPC Brașov.',
],
'search_ngo' => [
'search_title' => 'ONG',
'search_text' => 'Caută un ONG care te poate ajuta',
'search_text_span' => 'Cauta un ONG',
'search_title' => 'ONG-uri (organizații)',
'search_text' => 'Caută o organizație care te poate ajuta cu un serviciu pentru nevoile tale',
'search_text_span' => 'Caută un ONG...',
],

'service_card' => [
Expand Down
15 changes: 7 additions & 8 deletions lang/uk/txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@

'buttons' => [
'search' => 'Пошук',
'services_map' => 'Карта послуг',
'services_list' => 'Перелік послуг',
'services_map' => 'Побачити карту послуг',
'services_list' => 'Побачити перелік послуг',
'see_more' => 'Побачити більше',
'see_story' => 'Побачити історію',
'see_story' => 'Дивіться історію організації',
'access_online' => 'Доступ онлайн',
'access_site' => 'Доступ до веб-сайту',
'ngos_map' => 'Карта НКО',
Expand All @@ -54,7 +54,6 @@
'continue' => 'Продовжувати',
'details' => 'Подробиці',
'send' => 'Надіслати',

],

'placeholders' => [
Expand Down Expand Up @@ -133,7 +132,7 @@
'access_email' => 'Електронною поштою',
'physical' => 'На місці',
'services' => 'Послуги',
'access_location' => 'Дивіться історію організації',
'see_story' => 'Дивіться історію організації',
'services_provided' => 'Послуги, які надає організація',
'services_project' => 'Послуги, які пропонуються в рамках проекту',
'share' => 'Поділіться',
Expand Down Expand Up @@ -168,9 +167,9 @@
'beneficiaries_nr' => 'Кількість бенефіціарів',
],
'search_ngo' => [
'search_title' => 'НКО',
'search_text' => 'Шукайте НКО, яке може вам допомогти',
'search_text_span' => 'Шукайте НКО',
'search_title' => 'НКО (організації)',
'search_text' => 'Шукайте НКО, яке може вам допомогти залежно від ваших потреб',
'search_text_span' => 'Шукайте НКО...',
],

'contact' => [
Expand Down
Binary file modified resources/images/design/care.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/cercetas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/cercetas1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/code4ro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/fonpc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/group2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/help-big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/design/sera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 20 additions & 16 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import.meta.glob([
'../fonts/**',
]);

window.showList = function ()
{
window.showList = function () {
let showListButton = document.getElementById('show-services-list');
let showMapButton = document.getElementById('show-services-map');
let mapEl = document.getElementById('services-map')
Expand All @@ -17,8 +16,8 @@ window.showList = function ()
showListButton.classList.remove('bg-white')
showListButton.classList.add('bg-orange1')
}
window.showMap = function ()
{

window.showMap = function () {
let showListButton = document.getElementById('show-services-list');
let showMapButton = document.getElementById('show-services-map');
let mapEl = document.getElementById('services-map')
Expand All @@ -29,22 +28,24 @@ window.showMap = function ()
showListButton.classList.add('bg-white')
showListButton.classList.remove('bg-orange1')
}
window.hideAllPoints=function (){

window.hideAllPoints = function () {
let pointElements = [...document.getElementsByClassName('point-services')]
pointElements.forEach(el=>{
pointElements.forEach(el => {
el.classList.add('hidden')
})
let mapEl = document.getElementById('map')
mapEl.scrollIntoView();
}
window.switchLang = value => {
let currentUrl = window.location.pathname;
let elements =currentUrl.split('/');

window.switchLang = (value) => {
let currentUrl = window.location.pathname;
let elements = currentUrl.split('/');
elements[1] = value;
window.location = elements.join('/') + window.location.search;
};
window.initMap = () => {

window.initMap = () => {
map = new google.maps.Map(document.getElementById("map"), {
zoom: 7,
center: myLatLng,
Expand All @@ -53,15 +54,15 @@ window.initMap = () => {

points.forEach((point) => {
let marker = new google.maps.Marker({
position: {lat: parseFloat(point.lat), lng: parseFloat(point.lng)},
position: { lat: parseFloat(point.lat), lng: parseFloat(point.lng) },
map,
title: point.title,
icon: (point.status === 'active') ? markActivePath : markDisabledPath,
});
marker.addListener("click", () => {
hideAllPoints()
console.log('point-id-'+point.id)
let elementToShow=document.getElementById('point-id-'+point.id)
console.log('point-id-' + point.id)
let elementToShow = document.getElementById('point-id-' + point.id)

elementToShow.classList.remove('hidden')
elementToShow.scrollIntoView()
Expand All @@ -72,10 +73,13 @@ window.initMap = () => {
const markerCluster = new markerClusterer.MarkerClusterer({ map, markers });
}
window.copyToClipboard = function (el) {
navigator.clipboard.writeText( el.dataset.url);
navigator.clipboard.writeText(el.dataset.url);
alert("Copied: " + el.dataset.url);
}
window.toggleMenu = function () {
let menu = document.getElementById('mobile-menu')
menu.classList.toggle('hidden')
document.getElementById('mobile-menu').classList.toggle('hidden')

document.querySelectorAll('.menu-button-icon').forEach(el => {
el.classList.toggle('hidden')
})
}
4 changes: 2 additions & 2 deletions resources/views/components/cards/service_point.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'point'
])

<div class="card mx-2 w-full md:w-1/2 point-services hidden" id="point-id-{{$point->id}}">
<x-heroicon-o-x class="h-10 w-10 end-0 text-gray1" onclick="hideAllPoints()"/>
<div class="card flex mx-2 w-full md:w-1/2 point-services hidden" id="point-id-{{$point->id}}">
<x-heroicon-o-x class="h-10 w-10 self-end text-gray1" onclick="hideAllPoints()"/>
<img class="w-64 mx-auto" src="{{$point->ngo->getFirstMediaUrl()? $point->ngo->getFirstMediaUrl(): Vite::asset('resources/images/design/placeholder.png') }}"
alt="{{$point->ngo->name}}">
<p class="my-2 flex">
Expand Down
132 changes: 58 additions & 74 deletions resources/views/components/header.blade.php
Original file line number Diff line number Diff line change
@@ -1,95 +1,79 @@
<header class="flex relative h-28 min-h-fit w-full items-center bg-header">
<div class="container mx-auto flex h-16 items-center justify-between px-2 md:h-24">
<div class="mr-5 w-16 md:w-24 lg:mr-10">
<a class="logo-box" href="https://helptohelpukraine.ro">
<img src="{{ Vite::asset('resources/images/design/help.png') }}" alt="Logo">
</a>
</div>
<div class="block w-24 md:hidden md:w-40">
<a class="logo-box" href="https://helptohelpukraine.ro">
<img src="{{ Vite::asset('resources/images/design/fonpc.png') }}" alt="Logo">
</a>
</div>

<div class="block cursor-pointer text-3xl md:hidden">
<svg class="burger-btn" id="menuTrigger" width="60" onclick="toggleMenu()" data-collapse-toggle="sideNav"
aria-controls="sideNav" aria-expanded="false" height="32" viewBox="0 0 40 26"
xmlns="http://www.w3.org/2000/svg" fill="#7CC1DF">
<rect class="burger-btn--1" width="40" height="6" rx="3" ry="3"/>
<rect class="burger-btn--2" width="40" height="6" y="10" rx="3"
ry="3"/>
<rect class="burger-btn--3" width="40" height="6" y="20" rx="3"
ry="3"/>
</svg>
<header class="relative flex items-center w-full h-28 min-h-fit bg-header">
<div class="container flex items-center justify-between h-16 gap-5 px-2 mx-auto md:h-24 lg:gap-6">
<a class="order-1 block w-16 logo-box md:w-24 shrink-0" href="https://helptohelpukraine.ro">
<img src="{{ Vite::asset('resources/images/design/help-big.png') }}" alt="HELP TO HELP UKRAINE">
</a>

<div class="order-3 block text-3xl cursor-pointer lg:hidden">
<button type="button" class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700" onclick="toggleMenu()">
<span class="sr-only">Toggle main menu</span>
<svg class="w-8 h-8 menu-button-icon" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
<svg class="hidden w-8 h-8 menu-button-icon" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>

<div class="hidden w-full flex-wrap items-center justify-center md:flex" id="sideNav">
<nav class=" w-11/12 items-center justify-between text-base font-bold md:flex lg:text-lg ">
<div class="flex-wrap items-center justify-center flex-1 order-2 hidden w-full lg:flex">
<nav class="flex items-center font-bold divide-x divide-y-0 divide-gray-300 md:flex whitespace-nowrap">
<a class="block px-3 text-center" href="{{ route('home', ['local' => app()->getLocale()]) }}">
{{ __('txt.header.home') }} </a>

<a class="mr-auto md:text-sm hover:border-b-transparent hover:text-inherit"
href="https://helptohelpukraine.ro/">
<span class="text-[#20ACEA]">HELP</span>
<span class="text-[#EFE900]">TO HELP</span>
<span class="font-light">UKRAINE</span>
<a class="block px-3 text-center"
href="{{ route('about', ['local' => app()->getLocale()]) }}">{{ __('txt.header.about_project') }}
</a>

<a class=" block py-2 pl-3 pr-4 border-r-2 px-1 lg:px-3 text-center "
href="{{ route('home',['local'=>app()->getLocale()]) }}"> {{ __('txt.header.home') }} </a>

<a class=" block py-2 pl-3 pr-4 border-r-2 px-1 lg:px-3 text-center"
href="{{ route('about', ['local'=>app()->getLocale()]) }}">{{ __('txt.header.about_project') }} </a>
<a class="block px-3 text-center"
href="{{ route('services', ['local' => app()->getLocale()]) }}">{{ __('txt.header.services_map') }}</a>

<a class="border-r-2 px-1 lg:px-3 text-center"
href="{{ route('services', ['local'=>app()->getLocale()]) }}">{{ __('txt.header.services_map') }}</a>
<a class="block px-3 text-center"
href="{{ route('ngos', ['local' => app()->getLocale()]) }}">{{ __('txt.header.ngos') }}</a>

<a class="border-r-2 px-1 lg:px-3 text-center"
href="{{ route('ngos',['local'=>app()->getLocale()]) }}">{{ __('txt.header.ngos') }}</a>

<a class="border-r-2 px-1 lg:px-3 text-center"
href="{{ route('contact', ['local'=>app()->getLocale()]) }}"> {{ __('txt.header.contact') }} </a>


</nav>
<a class="block px-3 text-center" href="{{ route('contact', ['local' => app()->getLocale()]) }}">
{{ __('txt.header.contact') }} </a>

<select class="ml-5 border-0 bg-header text-base font-bold lg:text-lg" id="langSwitcher"
<select class="py-0 pl-3 border-0 bg-header" id="langSwitcher"
onchange="switchLang(this.value)">
<option value="ro" lang="ro" @if(app()->getLocale() == 'ro') selected @endif>RO</option>
<option value="en" lang="en" @if(app()->getLocale() == 'en') selected @endif >EN</option>
<option value="uk" lang="uk" @if(app()->getLocale() == 'uk') selected @endif >UK</option>
</select>
<option value="ro" @selected(app()->getLocale() === 'ro')>Română</option>
<option value="en" @selected(app()->getLocale() === 'en')>English</option>
<option value="uk" @selected(app()->getLocale() === 'uk')>Українська</option>
</select>
</nav>
</div>

<div class="hidden bg-header absolute inset-x-0 z-50 transition origin-top transform shadow-lg top-full lg:hidden" id="mobile-menu">
<div class="space-y-1 px-2 pb-3 pt-2">
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
<a class=" flex flex-wrap border-r-2 px-1 lg:px-3 text-center "
href="{{ route('home',['local'=>app()->getLocale()]) }}"> {{ __('txt.header.home') }} </a>
<div class="absolute inset-x-0 z-50 order-9 hidden p-6 transition origin-top transform shadow-lg top-full bg-header lg:hidden"
id="mobile-menu">
<div class="container flex flex-col gap-2">
<a class="block px-3 py-2 -mx-3 text-base font-semibold leading-7 rounded-lg hover:bg-"
href="{{ route('home', ['local' => app()->getLocale()]) }}"> {{ __('txt.header.home') }} </a>

<a class="block px-3 py-2 -mx-3 text-base font-semibold leading-7 rounded-lg hover:bg-"
href="{{ route('about', ['local' => app()->getLocale()]) }}">{{ __('txt.header.about_project') }}
</a>

<a class=" flex flex-wrap border-r-2 px-1 lg:px-3 text-center"
href="{{ route('about', ['local'=>app()->getLocale()]) }}">{{ __('txt.header.about_project') }} </a>
<a class="block px-3 py-2 -mx-3 text-base font-semibold leading-7 rounded-lg hover:bg-"
href="{{ route('services', ['local' => app()->getLocale()]) }}">{{ __('txt.header.services_map') }}</a>

<a class="flex flex-wrap border-r-2 px-1 lg:px-3 text-center"
href="{{ route('services', ['local'=>app()->getLocale()]) }}">{{ __('txt.header.services_map') }}</a>
<a class="block px-3 py-2 -mx-3 text-base font-semibold leading-7 rounded-lg hover:bg-"
href="{{ route('ngos', ['local' => app()->getLocale()]) }}">{{ __('txt.header.ngos') }}</a>

<a class="flex flex-wrap border-r-2 px-1 lg:px-3 text-center"
href="{{ route('ngos',['local'=>app()->getLocale()]) }}">{{ __('txt.header.ngos') }}</a>
<a class="block px-3 py-2 -mx-3 text-base font-semibold leading-7 rounded-lg hover:bg-"
href="{{ route('contact', ['local' => app()->getLocale()]) }}"> {{ __('txt.header.contact') }}
</a>

<a class="flex flex-wrap border-r-2 px-1 lg:px-3 text-center"
href="{{ route('contact', ['local'=>app()->getLocale()]) }}"> {{ __('txt.header.contact') }} </a>
<select class="flex flex-wrap border-0 bg-header text-base font-bold lg:text-lg" id="langSwitcher"
onchange="switchLang(this.value)">
<option value="ro" lang="ro" @if(app()->getLocale() == 'ro') selected @endif>RO</option>
<option value="en" lang="en" @if(app()->getLocale() == 'en') selected @endif >EN</option>
<option value="uk" lang="uk" @if(app()->getLocale() == 'uk') selected @endif >UK</option>
<select class="flex flex-wrap pl-0 text-base font-bold border-0 bg-header lg:text-lg" id="langSwitcher"
onchange="switchLang(this.value)">
<option value="ro" @selected(app()->getLocale() === 'ro')>Română</option>
<option value="en" @selected(app()->getLocale() === 'en')>English</option>
<option value="uk" @selected(app()->getLocale() === 'uk')>Українська</option>
</select>
</div>
</div>

<div class="ml-5 hidden w-24 md:block md:w-40 lg:ml-10">
<a class="logo-box" href="{{ url('contact') }}">
<img src="{{ Vite::asset('resources/images/design/fonpc.png') }}" alt="Logo">
</a>
</div>
<a class="order-2 block w-24 logo-box md:w-32 lg:order-3 shrink-0" href="{{ url('contact') }}">
<img src="{{ Vite::asset('resources/images/design/fonpc.png') }}" alt="Logo">
</a>
</div>

</header>
Loading

0 comments on commit 2c4f9bb

Please sign in to comment.