2020-08-29 16:06:14 +00:00
|
|
|
# ODIT.Services - MailyMaily
|
2020-08-30 13:40:00 +00:00
|
|
|
A better mailto based on [mailtoui](https://github.com/mariordev/mailtoui).
|
|
|
|
|
2020-08-29 16:06:14 +00:00
|
|
|
|
|
|
|
## 🛠 Building
|
2020-08-30 13:40:00 +00:00
|
|
|
```bash
|
2020-08-29 16:06:14 +00:00
|
|
|
yarn && yarn build
|
|
|
|
```
|
|
|
|
|
|
|
|
## Use
|
|
|
|
|
|
|
|
[Example](index.html)
|
|
|
|
|
2020-08-30 13:40:00 +00:00
|
|
|
### Install
|
|
|
|
|
|
|
|
Via yarn/npm:
|
|
|
|
```bash
|
|
|
|
yarn add @odit/mailymaily
|
|
|
|
# Or
|
|
|
|
npm i @odit/mailymaily
|
|
|
|
```
|
|
|
|
|
|
|
|
Or just copy the file `dist/mailymaily.js` to your prefered folder.
|
|
|
|
|
|
|
|
### Link
|
|
|
|
|
2020-08-29 16:42:14 +00:00
|
|
|
Basic: Link the dist file `mailymaily.min.js` at the bottom of your footer.
|
2020-08-29 16:06:14 +00:00
|
|
|
```html
|
2020-08-30 13:40:00 +00:00
|
|
|
<script src="node_modules/@odit/mailymaily/dist/mailymaily.min.js"></script>
|
2020-08-29 16:06:14 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively: Add defer or async=false when linking in the header
|
|
|
|
```html
|
2020-08-30 13:40:00 +00:00
|
|
|
<script src="node_modules/@odit/mailymaily/dist/mailymaily.min.js" defer></script>
|
2020-08-29 16:06:14 +00:00
|
|
|
<!-- or -->
|
2020-08-30 13:40:00 +00:00
|
|
|
<script src="node_modules/@odit/mailymaily/dist/mailymaily.min.js" async=false></script>
|
2020-08-29 16:06:14 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### VueJS & NuxtJs
|
|
|
|
|
2020-08-29 16:42:14 +00:00
|
|
|
Place the dist file "mailymaily.min.js" in the static folder.
|
2020-08-29 16:06:14 +00:00
|
|
|
Link the dist file at the bottom of your layout, for example:
|
|
|
|
```html
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<Header />
|
|
|
|
<Nuxt />
|
|
|
|
<Footer />
|
2020-08-29 16:42:14 +00:00
|
|
|
<script src="/libs/mailymaily.min.js"></script>
|
2020-08-29 16:06:14 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
```
|