Skip to content

Commit

Permalink
Merge pull request #175 from jordythevulder/improve-frontend
Browse files Browse the repository at this point in the history
Improve frontend
  • Loading branch information
royduin authored Dec 13, 2022
2 parents 0016f38 + a2d85db commit 8549e95
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 30 deletions.
8 changes: 6 additions & 2 deletions resources/css/theme-variables.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
:root {
--primary: #15803d;
--secondary: #9ca3af;
--primary: #334155;
--secondary: #64748b;
--accent: #0ea5e9;
--enhanced: #f97316;
--highlight: #e2e8f0;
--border: #f1f5f9;
}
4 changes: 2 additions & 2 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

@stack('head')
</head>
<body class="bg-white antialiased">
<body class="text-primary antialiased">
<div id="app">
@include('rapidez::layouts.partials.header')
<main class="mx-5">
<main>
@yield('content')
</main>
@include('rapidez::layouts.partials.footer')
Expand Down
48 changes: 25 additions & 23 deletions resources/views/layouts/partials/header.blade.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
<header class="flex flex-wrap items-center mb-5 border-b shadow {{ Route::currentRouteName() == 'checkout' ? 'justify-between' : '' }}">
<div class="w-1/6 sm:w-3/12">
<div class="text-xl sm:text-3xl ml-3">
<a href="/" aria-label="@lang('Go to home')">
<span class="hidden sm:inline">
<img src="https://raw.githubusercontent.com/rapidez/art/master/logo.svg" height="48" width="152" alt="">
</span>
<span class="inline sm:hidden">🚀</span>
</a>
<header class="mb-5 border-b shadow {{ Route::currentRouteName() == 'checkout' ? 'justify-between' : '' }}">
<div class="container flex flex-wrap items-center">
<div class="w-1/6 sm:w-3/12">
<div class="text-xl sm:text-3xl ml-3">
<a href="/" aria-label="@lang('Go to home')">
<span class="hidden sm:inline">
<img src="https://raw.githubusercontent.com/rapidez/art/master/logo.svg" height="48" width="152" alt="">
</span>
<span class="inline sm:hidden">🚀</span>
</a>
</div>
</div>
</div>
@if(Route::currentRouteName() !== 'checkout')
<div class="w-6/12 h-12 flex items-center">
@include('rapidez::layouts.partials.header.autocomplete')
@if(Route::currentRouteName() !== 'checkout')
<div class="w-6/12 h-12 flex items-center">
@include('rapidez::layouts.partials.header.autocomplete')
</div>
@endif
<div class="w-1/3 sm:w-1/4 flex justify-end pr-3">
@include('rapidez::layouts.partials.header.account')
@if(Route::currentRouteName() !== 'checkout')
@include('rapidez::layouts.partials.header.minicart')
@endif
</div>
@endif
<div class="w-1/3 sm:w-1/4 flex justify-end pr-3">
@include('rapidez::layouts.partials.header.account')
@if(Route::currentRouteName() !== 'checkout')
@include('rapidez::layouts.partials.header.minicart')
<nav class="w-full">
{{-- Because the lack of an @includeIf or @includeWhen equivalent for Blade components we're using a placeholder --}}
<x-dynamic-component :component="App::providerIsLoaded('Rapidez\Menu\MenuServiceProvider') ? 'menu' : 'placeholder'" />
</nav>
@endif
</div>
@if(Route::currentRouteName() !== 'checkout')
<nav class="w-full">
{{-- Because the lack of an @includeIf or @includeWhen equivalent for Blade components we're using a placeholder --}}
<x-dynamic-component :component="App::providerIsLoaded('Rapidez\Menu\MenuServiceProvider') ? 'menu' : 'placeholder'" />
</nav>
@endif
</header>
19 changes: 16 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,22 @@ module.exports = {
theme: {
extend: {
colors: {
primary: 'var(--primary)',
secondary: 'var(--secondary)',
}
primary: 'var(--primary)', // Text color
secondary: 'var(--secondary)', // Text inactive color
accent: 'var(--accent)', // Theme color
enhanced: 'var(--enhanced)', // Checkout conversion color
highlight: 'var(--highlight)' // Background highlight color
},
borderColor: {
DEFAULT: 'var(--border)'
},
},
fontFamily: {
sans: ['Arial', 'sans-serif']
},
container: {
center: true,
padding: '1.25rem',
}
},
plugins: [
Expand Down

0 comments on commit 8549e95

Please sign in to comment.