Skip to content

Commit

Permalink
Added Creative writting flyer
Browse files Browse the repository at this point in the history
  • Loading branch information
if3chi committed Jan 13, 2023
1 parent 212aaa1 commit 5dde0ed
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
8 changes: 8 additions & 0 deletions app/Utilities/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ function setFlyer()
}
}

if (!function_exists('setCreativeWritingFlyer')) {

function setCreativeWritingFlyer()
{
return asset('images/creativeWriting.jpeg');
}
}

if (!function_exists('setKids2ActionImage')) {

function setKids2ActionImage()
Expand Down
Binary file added public/images/creativeWriting.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 21 additions & 15 deletions resources/views/front/creative-writing.blade.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
<x-front-layout>
<section class="relative block bg-blue-black fade-in">
<div class="container mx-auto px-4 py-16">
<div class="flex flex-wrap text-center justify-center">
<div class="w-full lg:w-6/12 px-4">
<div class="container px-4 py-16 mx-auto">
<div class="flex flex-wrap justify-center text-center">
<div class="w-full px-4 lg:w-6/12">
<h2 class="text-4xl font-semibold text-white">Essay Writing</h2>
<p class="text-lg leading-relaxed mt-4 mb-4 text-gray-50">
<p class="mt-4 mb-4 text-lg leading-relaxed text-gray-50">
Complete the form below to enter the competition.
</p>
</div>
</div>
<div class="flex flex-wrap mt-12 justify-center">
<div class="w-full lg:w-3/12 px-4 text-center space-y-3">
<div class="flex flex-wrap justify-center mt-12">
<div class="w-full px-4 space-y-3 text-center lg:w-3/12">

<x-paypal-btn href="{{ paypalLink('bmccn') }}"
class="justify-center shadow-xl" />
<x-paypal-btn href="{{ paypalLink('bmccn') }}" class="justify-center shadow-xl" />

{{-- <h6 class="text-xl mt-5 font-semibold text-white">
{{-- <h6 class="mt-5 text-xl font-semibold text-white">
Support the change
</h6> --}}

<p class="mt-2 mb-4 text-gray-50">
Click the button to support our creative writing competition.
Click the button to support our creative writing competition.
</p>
</div>
</div>
</section>

<section class="block py-24 lg:pt-0 bg-white fade-in"
<section class="block py-24 bg-white lg:pt-0 fade-in"
style="background-image: url(https://static.intercomassets.com/ember/assets/images/messenger-backgrounds/background-1-99a36524645be823aabcd0e673cb47f8.png)">

<div class="relative">
<div class="container mx-auto px-4 mt-16 lg:mt-0">
<livewire:front.creative-writing-form />
<div class="container px-4 mx-auto">
<div class="flex flex-wrap items-center">
<div class="w-full ml-auto mr-auto md:w-5/12">
<div class="flex flex-col w-full min-w-0 my-6 break-words rounded-lg shadow-lg bg-blue-black">
<img alt="..." src="{{ setCreativeWritingFlyer() }}"
class="w-full align-middle rounded-lg">
</div>
</div>
<div class="w-full ml-auto mr-auto md:w-5/12">
<livewire:front.creative-writing-form />
</div>
</div>
</div>
</section>
Expand Down
20 changes: 10 additions & 10 deletions resources/views/livewire/front/creative-writing-form.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex flex-wrap justify-center">
<form class="w-full lg:w-6/12 px-4" wire:submit.prevent="submitEntry">
<form class="w-full lg:w-10/12" wire:submit.prevent="submitEntry">
@csrf
<div class="flex flex-col min-w-0 break-words w-full mb-6 shadow-lg rounded-lg bg-blue-black mt-10">
<div class="flex flex-col w-full min-w-0 mt-10 mb-6 break-words rounded-lg shadow-lg bg-blue-black">
<div class="flex-auto p-5 lg:p-10">
<h4 class="text-2xl font-semibold text-white">Submit Your Entry</h4>

Expand All @@ -16,12 +16,12 @@
placeholder="0201234567" :error="$errors->first('editing.phone')">
Phone</x-input.text>

<x-input.text name="email" wire:model.delay="editing.email" type="email" id="email" placeholder="Email"
:error="$errors->first('editing.email')">Email
<x-input.text name="email" wire:model.delay="editing.email" type="email" id="email"
placeholder="Email" :error="$errors->first('editing.email')">Email
</x-input.text>

<x-input.text name="age" wire:model.delay="editing.age" type="number" id="age" placeholder="Age" min="6"
max="10" :error="$errors->first('editing.age')">Age</x-input.text>
<x-input.text name="age" wire:model.delay="editing.age" type="number" id="age"
placeholder="Age" min="6" max="10" :error="$errors->first('editing.age')">Age</x-input.text>

<x-input.text name="title" wire:model.delay="editing.title" type="text" id="title"
placeholder="Essay Title" :error="$errors->first('editing.title')">
Expand All @@ -31,17 +31,17 @@
placeholder="Type your Essay..." :error="$errors->first('editing.essay')">Essay
</x-input.textarea>

<div class="text-center mt-6">
<div class="mt-6 text-center">
<button
class="bg-white text-blue-black active:bg-gray-700 text-sm font-bold uppercase px-6 py-3 rounded-md shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1"
class="px-6 py-3 mb-1 mr-1 text-sm font-bold uppercase bg-white rounded-md shadow outline-none text-blue-black active:bg-gray-700 hover:shadow-lg focus:outline-none"
type="submit" style="transition: all 0.15s ease 0s;">
Submit Essay
</button>

</div>
@if ($errors->any())
<div class="w-full text-center text-sm transition duration-500 ease-in-out">
<p class="text-white bg-red-500 rounded-md p-2 -mb-6 mt-4">
<div class="w-full text-sm text-center transition duration-500 ease-in-out">
<p class="p-2 mt-4 -mb-6 text-white bg-red-500 rounded-md">
There are error(s) on the form, kindly check and fix them!!
</p>
</div>
Expand Down

0 comments on commit 5dde0ed

Please sign in to comment.