-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(hero): image max width * chore(lighthouse): use nuxt start * fix: spelling * fix(resume): href blank use rel noopener * fix(hero): up scale image to 4686 * refactor(hero): use image rather than parallax * refactor(hero): make gradient a prop * perf: import icons as needed * perf: extract css * fix(home): add missing hero component import * fix(lighthouse): unused javascript off Co-authored-by: Damien Robinson <damien.robinson@xcommedia.com.au>
- Loading branch information
1 parent
c08105f
commit 1133a33
Showing
19 changed files
with
570 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,67 @@ | ||
<template> | ||
<header> | ||
<v-parallax | ||
:lazy-src="require(`~/assets/img/header-bg.jpg?lqip`)" | ||
:src=" | ||
require('~/assets/img/header-bg.jpg?resize&size=1785&placeholder').src | ||
" | ||
:src-set=" | ||
require(`~/assets/img/header-bg.jpg?resize&max=1785&min=320&steps=6`) | ||
.srcSet | ||
" | ||
:style="{ | ||
backgroundColor: require('~/assets/img/header-bg.jpg?lqip-colors')[0], | ||
}" | ||
size="100vw" | ||
> | ||
<v-row align="center" justify="center"> | ||
<v-col class="text-center" cols="12"> | ||
<h1 v-if="heading" class="mb-4 text-light text-shadow"> | ||
{{ heading }} | ||
</h1> | ||
<h2 v-if="subheading" class="subheading text-light text-shadow"> | ||
{{ subheading }} | ||
</h2> | ||
</v-col> | ||
</v-row> | ||
</v-parallax> | ||
</header> | ||
<v-container class="pa-0" style="max-width: 1785px;"> | ||
<v-row no-gutters align="center" justify="center"> | ||
<v-col cols="12" align-self="center"> | ||
<v-card :color="color" flat dark tile> | ||
<v-img | ||
:lazy-src="lazySrc" | ||
:src="src" | ||
:src-set="srcSet" | ||
:height="height" | ||
width="1785" | ||
sizes="(max-width: 1785px) 100vw, 1785px" | ||
:gradient="gradient" | ||
alt="" | ||
> | ||
<v-container | ||
class="fill-height align-items-end justify-start" | ||
fluid | ||
> | ||
<v-row align="center" justify="center"> | ||
<v-col class="text-center" cols="12"> | ||
<h1 v-if="heading" class="mb-4 text-shadow"> | ||
{{ heading }} | ||
</h1> | ||
<h2 v-if="subheading" class="subheading text-shadow"> | ||
{{ subheading }} | ||
</h2> | ||
</v-col> | ||
</v-row> | ||
</v-container> | ||
</v-img> | ||
</v-card> | ||
</v-col> | ||
</v-row> | ||
</v-container> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
heading: { type: String, required: false, default: null }, | ||
subheading: { type: String, required: false, default: null }, | ||
heading: { type: String, default: null }, | ||
subheading: { type: String, default: null }, | ||
gradient: { | ||
type: String, | ||
default: 'rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)', | ||
}, | ||
height: { type: [Number, String], default: 500 }, | ||
color: { | ||
type: String, | ||
default: require(`~/assets/img/header-bg.jpg?lqip-colors`)[0], | ||
}, | ||
}, | ||
computed: { | ||
lazySrc() { | ||
return require(`~/assets/img/header-bg.jpg?lqip`); | ||
}, | ||
src() { | ||
return require(`~/assets/img/header-bg.jpg?resize&size=1785&placeholder`) | ||
.src; | ||
}, | ||
srcSet() { | ||
return require(`~/assets/img/header-bg.jpg?resize&sizes[]=320&sizes[]=600&sizes[]=900&sizes[]=1785&sizes[]=4686&format=webp`) | ||
.srcSet; | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const sharp = require('sharp'); | ||
|
||
const file = 'assets/img/header-bg.jpg'; | ||
sharp(file) | ||
.resize(4686) | ||
.toFile(`assets/img/header-bg-1.jpg`, (err, info) => { | ||
console.log(err, info); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1133a33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: