Skip to content

Commit

Permalink
feat(home): add social links
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosirera committed Jul 5, 2020
1 parent 0b5b776 commit 9dea21d
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 11 deletions.
49 changes: 49 additions & 0 deletions components/ui/SocialIcons.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<template>
<div class="flex items-center">
<a
v-for="(social, index) in socials"
:key="index"
:href="social.href"
class="mr-3"
target="_blank"
:aria-label="social.ariaLabel"
>
<img class="w-8" :src="social.src" :alt="social.alt" />
</a>
</div>
</template>

<script>
export default {
name: 'SocialIcons',
data: () => ({
// TODO: translate this texts and add alt
socials: [
{
href: 'https://twitter.com/pablosirera',
src: '/images/icons/twitter.svg',
alt: '',
ariaLabel: 'Sígueme en twitter',
},
{
href: 'https://twitch.tv/pablosirera',
src: '/images/icons/twitch.svg',
alt: '',
ariaLabel: 'Sígueme en twitch',
},
{
href: 'https://instagram.com/pablodeveloper',
src: '/images/icons/instagram.svg',
alt: '',
ariaLabel: 'Sígueme en instagram',
},
{
href: 'https://youtube.com/user/psirera4',
src: '/images/icons/youtube.svg',
alt: '',
ariaLabel: 'Subscríbete a mi canal de youtube',
},
],
}),
}
</script>
39 changes: 29 additions & 10 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
</p>
<!-- TODO: add social links -->
<div class="mt-4">
aquí van las redes sociales
<SocialIcons />
</div>
</div>
<!-- TODO: translate this text -->
<img
class="image"
src="/images/desarrollador-web-setup.jpg"
alt="desarrollador web valencia"
/>
<div class="image-wrapper relative">
<img
class="image"
src="/images/desarrollador-web-setup.jpg"
alt="desarrollador web valencia"
/>
<div class="bg-image absolute" />
</div>
</section>
</template>

Expand All @@ -39,10 +42,26 @@ export default {
}
</script>

<style scoped>
.image {
width: 385px;
height: auto;
<style scoped lang="scss">
$widthImage: 385px;
$heigthImage: 510px;
.image-wrapper {
justify-self: center;
.bg-image {
width: $widthImage;
height: $heigthImage;
top: -20px;
right: -20px;
z-index: -1;
@apply bg-primary;
}
.image {
width: $widthImage;
height: $heigthImage;
}
}
</style>
1 change: 1 addition & 0 deletions static/images/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/images/icons/twitch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions static/images/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/images/icons/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
theme: {
extend: {
colors: {
primary: '#9bd681',
primary: '#81a78f',
'yellow-main': {
500: '#f1e05a',
},
Expand Down

0 comments on commit 9dea21d

Please sign in to comment.