Giter Site home page Giter Site logo

magma-design-studio / vuemailsignatureconverter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

Convert your designed HTML into a beautiful Apple Mail signature.

Vue 96.36% TypeScript 3.64%
apple apple-mail mail mail-signature signature vue vuejs vuejs3

vuemailsignatureconverter's Introduction

Node version

Vue Mail Signature Converter

What is it?

The Vue Mail Signature Converter can be used to create .mailsignature files for Apple Mail signatures. The plugin comes with the <mailSignatureEditable /> Vue component, through which the signature can be filled with custom content.

Global or scoped styles are inserted into the signature as inline CSS. Responsive layouts and web fonts are taken into account.

Setup

npm i vuemailsignatureconverter

main.js

import { createApp } from 'vue'
import App from './App.vue'
import { mailSignatureConverter } from 'vueMailSignatureConverter'

createApp(App)
    .use(mailSignatureConverter) 
    .mount('#app')

App.vue

<script setup>
const $e = ref()
</script>

<template>
    <mailClientWindow>
        <div ref="$e">
            <mailSignatureEditable class="default" placeholder="Your name" /><br />
            <mailSignatureEditable class="default" placeholder="Your title" :list="['Dr.', 'Prof.', 'Prof. Dr.']" /><br />
            <br />
            Phone +49 123 456789-<mailSignatureEditable class="default" placeholder="Your Number" type="number" steps="1" /><br />
            <br />
            ABC Company<br />
            123 Main Street<br />
            Anytown, State<br />
            12345<br />
            United States
        </div>
    </mailClientWindow>
    <mailSignatureConverter :source="$e" />
</template>

Build-in components

<mailSignatureEditable>

This component allows for targeted editing of the signature. For example, your team has the opportunity to add their individual information to your signature.

Props

interface mailSignatureEditableProps {
    /**
     * Specify a placeholder in case no content has been entered.
     */
    placeholder?: String
    /**
     * HTML <input> type attribute
     * Default: text
     */    
    type?: String
    /**
     * Specify a datalist dropdown. 
     * e.g. ['Dr.', 'Prof.', 'Prof. Dr.']
     * Default: false
     */       
    list: Boolean | Array
}

Placeholder via slot

<mailSignatureEditable>Your name</mailSignatureEditable>

<mailSignatureConverter>

With this component, your signature can be converted into a .mailsignature file at the push of a button and downloaded, or inserted as HTML into the clipboard. By default, instructions for implementation are included.

Props

interface mailSignatureConverterProps {
    /**
     * Required. Specify source container
     */
    source: HTMLElement
    /**
     * .mailsignature Filename (without suffix)
     * Default: window.location.host (e.g. example.com)
     */    
    filename?: String
    /**
     * Disable installation instructions
     * Default: window.location.host (e.g. example.com)
     */        
    hideInstructions?: Boolean   
}

<mailClientWindow>

Use this component as a simple mail client visualization

vuemailsignatureconverter's People

Contributors

sebastiantiede avatar

Watchers

 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.