Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI tweaks, script tweak and bug fixes #7

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Wave\Facades\Wave;

class DatabaseSeeder extends Seeder
{
Expand Down Expand Up @@ -36,5 +37,6 @@ public function run()
$this->call(VoyagerThemesTableSeeder::class);
$this->call(VoyagerThemeOptionsTableSeeder::class);
$this->call(WaveKeyValuesTableSeeder::class);
fixPostgresSequence();
}
}
19 changes: 19 additions & 0 deletions database/seeders/VoyagerThemeOptionsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Database\Seeders;

use Carbon\Carbon;
use Illuminate\Database\Seeder;

class VoyagerThemeOptionsTableSeeder extends Seeder
Expand Down Expand Up @@ -90,6 +91,24 @@ public function run()
'value' => 'themes/August2018/TksmVWMqp5JXUQj8C6Ct.png',
'created_at' => '2018-08-28 23:12:11',
'updated_at' => '2018-08-28 23:12:11'
),
8 =>
array(
'id' => 25,
'theme_id' => 1,
'key' => 'home_hero_layout_switch',
'value' => 'ship',
'created_at' => Carbon::now()->toDateTimeString(),
'updated_at' => Carbon::now()->toDateTimeString()
),
9 =>
array(
'id' => 26,
'theme_id' => 1,
'key' => 'home_ship_image',
'value' => 'themes/May2021/azzTLh3BVghTNlCzWFGK.png',
'created_at' => Carbon::now()->toDateTimeString(),
'updated_at' => Carbon::now()->toDateTimeString()
)
));

Expand Down
4 changes: 3 additions & 1 deletion public/themes/tailwind/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/themes/tailwind/js/app.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions resources/views/themes/tailwind/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@ window.csrf = document.querySelector("meta[name='csrf-token']").getAttribute("co
document.addEventListener("DOMContentLoaded", function(){
var replacers = document.querySelectorAll('[data-replace]');
for(var i=0; i<replacers.length; i++){
let replaceClasses = JSON.parse(replacers[i].dataset.replace.replace(/'/g, '"'));
Object.keys(replaceClasses).forEach(function(key) {
let inputClasses = JSON.parse(replacers[i].dataset.replace.replace(/'/g, '"'));
//replace white-space seperated values in inputClasses with array of classes
var replacementClasses = new Array();
Object.keys(inputClasses).forEach(function(key, i) {
replacementClasses[i] = inputClasses[key].match(/(\s+)/)
? inputClasses[key].split(/(\s+)/).filter((e) => e.trim().length > 0)
: inputClasses[key];
inputClasses[key] = replacementClasses[i];
});

Object.keys(inputClasses).forEach(function(key) {
replacers[i].classList.remove(key);
replacers[i].classList.add(replaceClasses[key]);

if(typeof(inputClasses[key]) === 'string'){
replacers[i].classList.add(inputClasses[key]);
}else if(typeof(inputClasses[key]) === 'object'){
replacers[i].classList.add(...inputClasses[key]);
}
});
}
});
Expand Down
19 changes: 18 additions & 1 deletion resources/views/themes/tailwind/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ svg {
to {transform: translateX(-100%);}
}

.ship {
animation: ship 6s linear infinite;
}
@keyframes ship {
0% {
transform: rotate(0deg) translateY(0.75vh);
}

50%{
transform: rotate(0.25deg) translateY(0);
}

100% {
transform: rotate(0deg) translateY(0.75vh);
}
}

.form-control{
@apply form-input w-full;
}
Expand All @@ -65,4 +82,4 @@ svg {
background-size: 1.5em 1.5em;
padding:.5rem 2.5rem .5rem .75rem;
background-repeat: no-repeat;
}
}
55 changes: 5 additions & 50 deletions resources/views/themes/tailwind/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,11 @@

@section('content')


<div class="relative flex items-center w-full">
<div class="relative z-20 px-8 mx-auto xl:px-5 max-w-7xl">

<div class="flex flex-col items-center h-full pt-16 pb-56 lg:flex-row">

<div class="flex flex-col items-start w-full mb-16 md:items-center lg:pr-12 lg:items-start lg:w-1/2 lg:mb-0">

<h2 class="invisible text-sm font-semibold tracking-wide text-gray-700 uppercase transition-none duration-700 ease-out transform translate-y-12 opacity-0 sm:text-base lg:text-sm xl:text-base" data-replace='{ "transition-none": "transition-all", "invisible": "visible", "translate-y-12": "translate-y-0", "scale-110": "scale-100", "opacity-0": "opacity-100" }'>{{ theme('home_headline') }}</h2>
<h1 class="invisible pb-2 mt-3 text-4xl font-extrabold leading-10 tracking-tight text-transparent transition-none duration-700 ease-out delay-150 transform translate-y-12 opacity-0 bg-clip-text bg-gradient-to-r from-blue-600 via-blue-500 to-purple-600 scale-10 md:my-5 sm:leading-none lg:text-5xl xl:text-6xl" data-replace='{ "transition-none": "transition-all", "invisible": "visible", "translate-y-12": "translate-y-0", "scale-110": "scale-100", "opacity-0": "opacity-100" }'>{{ theme('home_subheadline') }}</h1>
<p class="invisible max-w-2xl mt-0 text-base text-left text-gray-600 transition-none duration-700 ease-out delay-300 transform translate-y-12 opacity-0 md:text-center lg:text-left sm:mt-2 md:mt-0 sm:text-base lg:text-lg xl:text-xl" data-replace='{ "transition-none": "transition-all", "invisible": "visible", "translate-y-12": "translate-y-0", "scale-110": "scale-100", "opacity-0": "opacity-100" }'>{{ theme('home_description') }}</p>
<div class="invisible w-full mt-5 transition-none duration-700 ease-out transform translate-y-12 opacity-0 delay-450 sm:mt-8 sm:flex sm:justify-center lg:justify-start sm:w-auto" data-replace='{ "transition-none": "transition-all", "invisible": "visible", "translate-y-12": "translate-y-0", "opacity-0": "opacity-100" }'>
<div class="rounded-md">
<a href="{{ theme('home_cta_url') }}" class="flex items-center justify-center w-full px-8 py-3 text-base font-medium leading-6 text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-500 hover:bg-wave-600 focus:outline-none focus:border-wave-600 focus:shadow-outline-indigo md:py-4 md:text-lg md:px-10">
{{ theme('home_cta') }}
</a>
</div>
<div class="mt-3 sm:mt-0 sm:ml-3">
<a href="#" class="flex items-center justify-center w-full px-8 py-3 text-base font-medium leading-6 text-indigo-700 transition duration-150 ease-in-out bg-indigo-100 border-2 border-transparent rounded-md hover:text-indigo-600 hover:bg-indigo-50 focus:outline-none focus:shadow-outline-indigo focus:border-indigo-300 md:py-4 md:text-lg md:px-10">
Learn More
</a>
</div>
</div>
</div>

<div class="flex w-full mb-16 lg:w-1/2 lg:mb-0">

<div class="relative invisible transition-none duration-1000 delay-100 transform translate-x-12 opacity-0" data-replace='{ "transition-none": "transition-all", "invisible": "visible", "translate-x-12": "translate-y-0", "opacity-0": "opacity-100" }'>
<img src="{{ Voyager::image(theme('home_promo_image')) }}" class="w-full max-w-3xl sm:w-auto">
</div>

</div>
</div>
</div>



</div>

<div class="relative z-40 -mt-64">

<svg viewBox="0 0 120 28" class="-mt-64">
<defs>
<path id="wave" d="M 0,10 C 30,10 30,15 60,15 90,15 90,10 120,10 150,10 150,15 180,15 210,15 210,10 240,10 v 28 h -240 z" />
</defs>
<use id="wave3" class="wave" xlink:href="#wave" x="0" y="-2"></use>
<use id="wave2" class="wave" xlink:href="#wave" x="0" y="0"></use>
<use id="wave1" class="wave" xlink:href="#wave" x="0" y="1" />
</svg>
</div>
@if (empty(theme('home_hero_layout_switch')) || theme('home_hero_layout_switch') === 'default')
@include('theme::partials.default-hero')
@elseif(theme('home_hero_layout_switch') === 'ship')
@include('theme::partials.ship-hero')
@endif

{{-- FEATURES SECTION --}}
<section class="relative z-40 w-full pt-10 pb-16 lg:pt-5 xl:-mt-24 bg-gradient-to-b from-wave-500 via-wave-600 to-wave-400">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
x-transition:leave="transition duration-100 ease-in scale-100"
x-transition:leave-start="opacity-100 scale-100"
x-transition:leave-end="opacity-0 scale-95"
class="absolute top-0 w-screen max-w-xs px-2 mt-20 transform -translate-x-1/2 left-1/2 sm:px-0" x-cloak>
class="absolute top-0 w-max max-w-xs px-2 mt-20 transform -translate-x-1/2 left-1/2 sm:px-0" x-cloak>
<div class="border border-gray-100 shadow-md rounded-xl">
<div class="overflow-hidden shadow-xs rounded-xl">
<div class="relative z-20 grid gap-6 px-5 py-6 bg-white sm:p-8 sm:gap-8">
Expand Down
Loading