Skip to content

Commit

Permalink
#367 - change apartment number (#371)
Browse files Browse the repository at this point in the history
* - wip

* Update lang/en/content.php

Co-authored-by: Jakub Wójcik <92044526+vojcc@users.noreply.github.com>

* - wip

* - wip

* - wip

---------

Co-authored-by: Jakub Wójcik <92044526+vojcc@users.noreply.github.com>
  • Loading branch information
EwelinaSkrzypacz and vojcc authored Oct 11, 2024
1 parent a48883a commit e947b7d
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 25 deletions.
8 changes: 3 additions & 5 deletions app/Http/Controllers/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Blumilk\Website\Http\Controllers;

use Blumilk\Website\Http\Resources\NewsResource;
use Blumilk\Website\Http\Resources\TagResource;
use Blumilk\Website\Models\News;
use Blumilk\Website\Models\Tag;
use Illuminate\Contracts\View\Factory;
Expand All @@ -30,8 +29,7 @@ public function index(Request $request, Factory $factory): View
->where("published", true)
->when($tag, fn($query, $tag) => $query->whereJsonContains("tags", $tag->id))
->latest("published_at")
->paginate(7)
->appends(["tag" => $tagFromQuery]);
->paginate(7);
$tags = Tag::query()
->where("is_primary", true)
->get();
Expand Down Expand Up @@ -81,9 +79,9 @@ public function get(Request $request, Factory $factory, string $slug): View

return $factory->make("single-news")
->with("news", $news->resolve())
->with("tags", TagResource::collection($newsTags->where("as_person", false))->resolve())
->with("tags", $newsTags->where("as_person", false)->pluck("title"))
->with("tagsNewsCount", $tagsNewsCount)
->with("peopleTags", TagResource::collection($newsTags->where("as_person", true))->resolve())
->with("peopleTags", $newsTags->where("as_person", true)->pluck("title"))
->with("recommendedNews", NewsResource::collection($recommendedNews)->resolve())
->with("articleUrl", $articleUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion database/seeders/LocalEnvironmentSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function run(): void
$this->call(ProjectsSeeder::class);

Tag::factory()->count(12)->create();
News::factory()->count(12)->create();
News::factory()->count(70)->create();
ContactForm::factory()->count(12)->create();
Reference::factory()->count(12)->create();
}
Expand Down
6 changes: 3 additions & 3 deletions lang/en/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"message" => "Message",
],
"location" => [
"address" => "ul. Najświętszej Marii Panny 5F/5",
"address" => "ul. Najświętszej Marii Panny 5F/3",
"PostalCode" => "59-220 Legnica",
],
"phone" => "+48 579 710 703",
Expand All @@ -256,7 +256,7 @@
"text_2" => "Blumilk sp. z o.o.,",
"text_3" => "with its registered office in Legnica, entered by the District Court for Wrocław-Fabryczna in Wrocław, 9th Commercial Division, into the register of entrepreneurs of the National Court Register under the number 0000866755.",
"text_4" => "Official address: Blumilk Sp. z o. o., ul. rtm. Witolda Pilecki 14, 59-220 Legnica, Poland.",
"text_5" => "Office address: Blumilk Sp. z o. o., ul. Najściej Marii Panny 5F/5, 59-220 Legnica, Poland.",
"text_5" => "Office address: Blumilk Sp. z o. o., ul. Najświętszej Marii Panny 5F/3, 59-220 Legnica, Poland.",
],
"point_2" => "How can you contact us?",
"text_2" => [
Expand Down Expand Up @@ -336,7 +336,7 @@
],
"office_address" => [
"title" => "Office address",
"street" => "ul. Najświętszej Marii Panny 5F/5",
"street" => "ul. Najświętszej Marii Panny 5F/3",
],
"phone" => "+48 579 710 703",
"email" => "office@blumilk.pl",
Expand Down
6 changes: 3 additions & 3 deletions lang/pl/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"message" => "Wiadomość",
],
"location" => [
"address" => "ul. Najświętszej Marii Panny 5F/5",
"address" => "ul. Najświętszej Marii Panny 5F/3",
"PostalCode" => "59-220 Legnica",
],
"phone" => "+48 579 710 703",
Expand All @@ -253,7 +253,7 @@
"text_2" => "Blumilk Spółka z ograniczoną odpowiedzialnością,",
"text_3" => "z siedzibą w Legnicy, wpisana przez Sąd Rejonowy dla Wrocławia-Fabrycznej we Wrocławiu IX Wydział Gospodarczy do rejestru przedsiębiorców KRS pod numerem 0000866755.",
"text_4" => "Adres urzędowy: Blumilk Sp. z o.o., ul. rtm. Witolda Pileckiego 14, 59-220 Legnica, Polska.",
"text_5" => "Adres biura: Blumilk Sp. z o.o., ul. Najświętszej Marii Panny 5F/5, 59-220 Legnica, Polska.",
"text_5" => "Adres biura: Blumilk Sp. z o.o., ul. Najświętszej Marii Panny 5F/3, 59-220 Legnica, Polska.",
],
"point_2" => "Jak możesz się z nami skontaktować?",
"text_2" => [
Expand Down Expand Up @@ -333,7 +333,7 @@
],
"office_address" => [
"title" => "Adres biura",
"street" => "ul. Najświętszej Marii Panny 5F/5",
"street" => "ul. Najświętszej Marii Panny 5F/3",
],
"phone" => "+48 579 710 703",
"email" => "office@blumilk.pl",
Expand Down
2 changes: 1 addition & 1 deletion resources/views/about.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
alt="{{ __('alt.about') }}"/>
</div>
</section>
<section class="bg-white py-12 sm:py-16 mx-[10%] lg:mx-[15%] 2xl:max-w-7xl 2xl:mx-auto">
<section class="bg-white py-12 sm:pt-16 sm:pb-24 mx-[10%] lg:mx-[15%] 2xl:max-w-7xl 2xl:mx-auto">
<div class="mt-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:flex xl:justify-between overflow-hidden text-center text-[#0E0B3D] gap-16 md:gap-8">
<div class="flex flex-col gap-4">
<dt class="text-md font-normal leading-6">{{ __("content.about.section_2.stat_1") }}</dt>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/small-primary-button.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a type="button"
class="block w-full shadow-sm text-base h-12 3xl:text-lg text-center transform transition hover:scale-110 rounded-lg bg-website-normal px-6 3xl:px-5 py-3 font-normal leading-7.5 text-white"
class="block shadow-sm text-base h-12 3xl:text-lg text-center transform transition hover:scale-110 rounded-lg bg-website-normal px-6 3xl:px-5 py-3 font-normal leading-7.5 text-white"
@isset($href) href="{{ $href }}" @endisset>
{{$slot}}
</a>
4 changes: 2 additions & 2 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class="client-icon h-auto w-44 m-auto grayscale hover:grayscale-0 transform tran
</section>

<section class="relative">
<div class="mx-[10%] lg:mx-[15%] 2xl:max-w-7xl 2xl:mx-auto space-y-10 pt-8 sm:pt-20 lg:pt-40 lg:pb-28">
<div class="mx-[10%] 2xl:max-w-[1400px] 2xl:mx-auto space-y-10 pt-8 sm:pt-20 lg:pt-40 lg:pb-28">
<div class="pb-6 lg:pb-14 text-center">
<h2 class="text-3xl md:text-4xl lg:text-5xl font-semibold pb-8">{{ __("content.home.section_3.title_1") }}</h2>
<span class="font-light leading-7.5 text-sm sm:text-md lg:text-lg relative">{{ __("content.home.section_3.subtitle_1") }}</span>
Expand Down Expand Up @@ -105,7 +105,7 @@ class="client-icon h-auto w-44 m-auto grayscale hover:grayscale-0 transform tran
</div>
</div>
<div class="flex md:gap-2 justify-center flex-col sm:flex-row">
<x-secondary-button href="{{ route('projects') }}" class="px-10 justify-center">{{ __("buttons.see_more_projects") }}</x-secondary-button>
<x-small-primary-button href="{{ route('projects') }}" class="px-10 justify-center">{{ __("buttons.see_more_projects") }}</x-small-primary-button>
</div>
</div>
</section>
Expand Down
7 changes: 1 addition & 6 deletions resources/views/news.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ class="flex flex-wrap gap-y-2 pt-2">
])>{{ $tag }}</x-tag>
@endforeach
@if($selectedTag && $tags->contains($selectedTag) === false)
<x-tag href="{{ route('news') }}"
@class([
'px-4 py-1 md:px-3 md:py-2 xl:px-4 xl:py-2 2xl:px-6 2xl:py-3',
'text-black border-website-normal' => $selectedTag && $tag === $selectedTag,
'text-gray-400' => !($selectedTag && $tag === $selectedTag),
])>
<x-tag href="{{ route('news') }}" class="px-4 py-1 md:px-3 md:py-2 xl:px-4 xl:py-2 2xl:px-6 2xl:py-3 text-black border-website-normal">
{{ $selectedTag }}</x-tag>
@endif
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/single-news.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class="w-full h-auto xl:h-[343px] object-cover aspect-square xl:aspect-auto">
<a href="{{ route('news', ['tag' => $tag]) }}"
class="flex justify-between py-3 font-light hover:text-website-normal hover:font-normal">
<span>
{{ $tag['title'] }}
{{ $tag }}
</span>
<span>
{{ $tagsNewsCount[$tag['title']] }}
{{ $tagsNewsCount[$tag] }}
</span>
</a>
@endforeach
Expand All @@ -92,7 +92,7 @@ class="flex justify-between py-3 font-light hover:text-website-normal hover:font
@foreach($peopleTags as $tag)
<a href="{{ route('news', ['tag' => $tag]) }}">
<span class="capitalize justify-between font-light text-sm text-gray-500 border border-gray-300 w-fit px-3 py-2 rounded-md">
{{ $tag['title'] }}
{{ $tag }}
</span>
</a>
@endforeach
Expand Down

0 comments on commit e947b7d

Please sign in to comment.