内容简介:AThis package is available on NPM, and you can install it with
svelte-copyright
© A Svelte component to format and display a copyright notice.
A Svelte component to format and display a copyright notice.
Installation
This package is available on NPM, and you can install it with npm
or yarn
:
npm install svelte-copyright yarn add svelte-copyright
Usage
Import the Copyright
component and use it in your Svelte project.
<script> import Copyright from 'svelte-copyright'; </script> <footer> <Copyright> Dave Lunny </Copyright> </footer>
This will output HTML which looks something like this:
<footer> <span>© Copyright 2020 Dave Lunny</span> </footer>
Props
All props are optional (as they all have default values).
Prop | Possible Values | Default Value | Description |
---|---|---|---|
date |
RFC2822/ISO8601 date string | Date.now() |
Date for the copyright year. |
format |
'numeric' | '2-digit' |
'numeric' |
Format for the copyright year. |
position |
'pre' | 'post' |
'pre' |
Position of the Copyright relative to the contents you provide. |
Additional Props
Note that any additonal props will be spread onto the component. This allows you to do things like provide a custom class
name to your component.
<Copyright> Dave Lunny </Copyright> <style> :global(.custom-copyright) { color: lime; } </style>
Contributing
Feel free to file an issue or open a pull request. Ensure that you add tests for any new functionality.
Inspiration
This was inspired by react-copyright
by Jason Bellamy .
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
免费:商业的未来
Chris Anderson / 中信出版集团 / 2015-10-1 / 35.40
《免费》,这是一个商业模式不断被颠覆、被改写的时代。一种商业模式既可以统摄未来市场,也可以挤垮当前市场——在我们这个现代经济社会里,这并不是一件不可能的事情。“免费”就是这样的一种商业模式,它代表了互联网时代的商业未来。 “免费”商业模式是一种建立在以电脑字节为基础上的经济学,而非过去建立在物理原子基础上的经济学。在原子经济中,随着时间的推移,我们周围的物品都在逐渐升值。但是在字节经济的网络......一起来看看 《免费:商业的未来》 这本书的介绍吧!