Skip to content

Instantly share code, notes, and snippets.

@pawlek
Last active November 22, 2020 15:46
Show Gist options
  • Save pawlek/d1a1fe733e999d9fd0f3b4766353f47d to your computer and use it in GitHub Desktop.
Save pawlek/d1a1fe733e999d9fd0f3b4766353f47d to your computer and use it in GitHub Desktop.
qr generator with google api
<template>
<div class="qr">
<img :src=" 'http://chart.googleapis.com/chart?cht=qr&chs=150x150&chl=' + qr_text " alt="QR" />
</div>
</template>
<script>
export default {
name: "qrCode",
data(){
return {
qr_text: "https://intaxi.si/?discount=FRIENDS"
};
}
}
</script>
<style lang="scss" scoped>
@mixin border-radius($pixel...) {
border-radius: $pixel;
}
@mixin block($size) {
width: $size;
height: $size;
}
$qr-bg-color: #fff;
.qr{
@include block(150px);
@include border-radius(10px);
background: $qr-bg-color;
box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
margin: 5px;
img{
@include border-radius(10px);
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment