Giter VIP home page Giter VIP logo

vue-addtohomescreen's Introduction

vue-addtohomescreen

Vue-addtohomescreen is a plugin allowing you to trigger a box asking the user if he wants to install the PWA version of your website at the place you want. You can for example display it after a connection process or when reading an article.

Installation

Install it with npm

npm install @owliehq/vue-addtohomescreen

Usage

First, you'll need to initialize the plugin and ask Vue to use it:

import VueAddtohomescreen from "@owliehq/vue-addtohomescreen";
Vue.use(VueAddtohomescreen);

Then add the component where you want

<add-to-homescreen />

with props

<add-to-homescreen lang="fr_FR" />

Or initialize it in Vue script area

this.$addToHomescreen.mount();

with parameters

this.$addToHomescreen.mount({
  lang: "fr_FR",
  iconColor: "#1B2334",
  buttonColor: "#27E9B8",
});

##Parameters list (hope parameters name are explicit enough; for lang, only en_GB & fr_FR available for now, feel free to translate & MR :))

title: {
  type: String,
  default: ''
},
content: {
  type: String,
},
titleColor: {
  type: String,
  default: '#000'
},
contentColor: {
  type: String,
  default: '#000'
},
iconPath: {
  type: String,
  default: ''
},
iconColor: {
  type: String,
  default: '#000'
},
iconTextColor: {
  type: String,
  default: '#fff'
},
buttonColor: {
  type: String,
  default: '#000'
},
buttonTextColor: {
  type: String,
  default: '#fff'
},
background: {
  type: String,
  default: '#fff'
},
lang: {
  type: String,
  default: 'en_GB'
},
expires: {
  type: Number,
  default: 8
}

Credits

Made with <3 in Metz, a small town in France by Owlie. Feel free to patch / edit / optimize / add features. MR are Welcome.

vue-addtohomescreen's People

Contributors

matejicekme avatar koalax3 avatar steakdeniche avatar manon29 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.