namespace App\Providers;
use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\Blade;
class AppServiceProvider extends ServiceProvider
{
*/
public function boot()
{
- //
+ // Blade Component Aliases
+ Blade::component('components.button', 'button'); // @button / @endbutton
}
}
width: 100%
// Overlapping content
+$overlap-amount = 10vw
+
.overlap
&-left
//+above($breakpoint-columns)
position: relative
- constrain(left, -10vw)
+ constrain(left, - $overlap-amount)
+
+ width: calc(100% + $overlap-amount)
+ max-width: 672px
- // Todo: decide if width should be increased by default or if this should be in an extra class? eg. .overlap-left-stretch?
- //width: calc(100% + 10vw)
- //
- //+above($base-width)
- // width: s('calc(100% + %s)', $base-width * 0.1)
+ +above($base-width)
+ width: s('calc(100% + %s)', $base-width * 0.1)
// Headings
h1, h2, h3, h4
line-height: 1.2
+ margin-bottom: 1em
@apply text-navy font-display font-semibold
-.h1
- @apply text-6xl leading-tight relative
+.h1, .h2
+ @apply leading-tight relative
- &:after
+ &:not(.simple):after
content: ''
display: block
+ background-color: theme('colors.blue')
+
+.h1
+ @apply text-6xl
+
+ &:after
constrain(margin-top, 1vw)
constrain(margin-bottom, 2.5vw)
constrain(width, 10vw)
height: 8px
- background-color: theme('colors.blue')
+below(1420px)
@apply text-5xl
+below(1000px)
@apply text-4xl
+.h2
+ @apply text-4xl
+ &:after
+ constrain(margin-top, 1vw)
+ constrain(margin-bottom, 1vw)
+ constrain(width, 2.5vw)
+ height: 4px
&:hover
&:before
transform: scaleX(1)
+
+
+ // Partial underline hover effect
+ &.partial-underline
+ overflow: hidden
+
+ &:before
+ constrain(width, 2.5vw)
+
+ &:hover > *
+ color: currentColor
// Lost Grid setup
@lost gutter 5%
-//@lost flexbox no-flex // Use flexbox (set to no-flex to disable)
+@lost flexbox no-flex // Use flexbox (set to no-flex to disable)
y: vertical, // special case for both top & bottom padding
}
-for sideAbbreviation, side in $sides
- for counter, vwAmount in $vw-spacing
+// Generate classes
+for counter, vwAmount in $vw-spacing
+
+ // First, generate classes for all sides...
+
+ // Padding (p-1v, p-2v etc)
+ .p-{counter}v
+ constrain(padding, vwAmount)
+
+ // Margins (m-1v, m-2v etc)
+ .m-{counter}v
+ constrain(margin, vwAmount)
+
+ // Negative margins (-m-1v, -m-2v etc)
+ .-m{counter}v
+ constrain(margin, - vwAmount)
+
+
+ // Next, generate classes for individual sides
+ for sideAbbreviation, side in $sides
// Padding utilities (pt, pr, pb, pl, px, py)
.p{sideAbbreviation}-{counter}v
// Buttons
.btn
- @apply bg-blue text-white px-10 py-4 relative
+ @apply bg-blue text-white px-10 py-4 relative inline-block overflow-hidden
+
+ &-text
+ @apply z-10 relative
+
+ &:hover:before
+ transform: scale(1.1) translateY(-50%)
+ opacity: 1
+
+ &:before
+ content: ''
+ position: absolute
+ top: 50%
+ left: 0
+ z-index: 1
+ background-color: rgba(#fff, 0.2)
+ width: 100%
+ padding-bottom: 100%
+ border-radius: 50%
+ transform: scale(0) translateY(-50%)
+ transform-origin: top center
+ transition: all 0.2s ease-out
+ opacity: 0
+
--- /dev/null
+.grid
+ @supports (display: grid) // Modern browsers get the native grid
+ display: grid
+
+ &-cols-2
+
+ // For IE11 and older browsers, use lost grid...
+ > *
+ lost-column: 1/2 2 1.25vw
+ margin-bottom: 1.25vw
+
+ @supports (display: grid)
+ grid-template-columns: repeat(auto-fill, minmax(225px, 1fr))
+ constrain(grid-gap, 1.25vw)
+
+ //Reset the lost-grid so it doesn't interfere
+ > *
+ lost-column: none
+ margin: 0 !important
+ flex-basis: auto
+ max-width: none
+
+ //// Internal block alignment - make sure text label sits at bottom
+ //display: flex
+ //flex-direction: column
+ //justify-content: space-between
--- /dev/null
+<a href="{{ $url ?? '#' }}" class="btn {{ $class ?? '' }}">
+ <span class="btn-text">{{ $slot }}</span>
+</a>
<div class="container flex -mb32">
<div class="w-1/2 pt-2v pr-1v pb-2v pl-2v">
<h1 class="h1 text-inherit">Wheel Force Transducer</h1>
- <p>
+ <p class="max-w-text">
Wheel Force Transducers (WFT) are used for measuring all wheel forces and moments. Field and laboratory test of passenger cars, light duty trucks, heavy duty trucks, vans, SUVs, class 8 trucks, heavy duty construction and farm equipment.
</p>
- <p><a href="#" class="btn">Découvrir</a></p>
+ <p>
+ @button(['url' => '#'])
+ Découvrir
+ @endbutton
+ </p>
<div class="pb-2v"></div>
</div>
</div>
+ {{-- Intro text --}}
<div class="container flex pt-5v pb-4v">
<div class="w-1/2">
<img src="{{ asset('images/home-wing.jpg') }}" alt="">
</div>
</div>
+ {{-- Our products --}}
+ <div class="bg-grey-100">
+ <div class="container pt-3v pb-4v">
+ <h2 class="h1 pl-2v">Nos produits</h2>
+
+ <div class="flex">
+ <div class="w-1/2">
+ <h3 class="h2 simple pl-1v">Capteurs</h3>
+
+ <div class="grid grid-cols-2 pr-1v border-r border-grey-300">
+ @for ($i = 1; $i <= 6; $i++)
+ <div class="bg-white px-1v py-6 flex">
+ <a class="partial-underline flex flex-col justify-between" href="#">
+ <div class="flex items-center justify-center flex-grow">
+ <img class="mb-4" src="{{ asset("images/products/$i.png") }}">
+ </div>
+ <p class="text-lg text-navy font-display font-medium">Product title {{ $i }}</p>
+ </a>
+ </div>
+ @endfor
+ </div>
+
+ </div>
+ <div class="w-1/2 pl-1v">
+ <h3 class="h2 simple pl-1v">Systèmes de mesure</h3>
+
+ <div class="grid grid-cols-2">
+ @for ($i = 1; $i <= 6; $i++)
+ <div class="bg-white px-1v py-6 flex flex-col justify-between">
+ <div class="flex items-center justify-center flex-grow">
+ <img class="mb-4" src="{{ asset("images/products/$i.png") }}">
+ </div>
+ <p class="text-lg text-navy font-display font-medium">Product title {{ $i }}</p>
+ </div>
+ @endfor
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+
+ {{-- Solutions / Applications --}}
+ <div class="bg-navy text-white antialiased">
+ <div class="container pt-3v pb-4v">
+ <h2 class="h1 text-inherit">Solutions / Applications</h2>
+ </div>
+ </div>
+
+ {{-- Services & Support --}}
+ <div class="bg-grey-100">
+ <div class="container pt-3v pb-4v">
+ <h2 class="h1">Services & Support</h2>
+ </div>
+ </div>
+
+ {{-- News --}}
+ <div class="container pt-3v pb-4v">
+ <h2 class="h1">Actualités</h2>
+ </div>
+
+ {{-- Our Clients --}}
+ <div class="bg-grey-100">
+ <div class="container pt-3v pb-4v">
+ <h2 class="h1">Nos clients</h2>
+ </div>
+ </div>
+
@endsection
'grey': {
'100': '#F7F8FC',
'200': '#EEF1F8',
+ '300': '#D1D4DF',
'dark': '#6B7287',
}
},
'display': ['Barlow', 'sans-serif'], // Headings, labels, menus etc
'body': ['Muli', 'sans-serif'], // Main blocks of text
},
+ maxWidth: {
+ 'text': '480px' // Or 30rem?
+ }
},
},
variants: {},
postCss: [
tailwindcss('tailwind.config.js'),
require('lost'),
- ]
+ ],
+ // autoprefixer: {
+ // options: {
+ // grid: true, // Enable CSS grid prefixes for IE
+ // }
+ // }
})
.purgeCss();