mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-26 14:57:38 +00:00
Added support for Gravatar. Removed the seyedi.json file improperly placed in the project root.
This commit is contained in:
parent
4a02a4a522
commit
6d33a0463c
6 changed files with 28 additions and 8 deletions
|
|
@ -36,6 +36,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<article>
|
<article>
|
||||||
|
{{gravatar}}
|
||||||
<h1>The MIT License (MIT)</h1>
|
<h1>The MIT License (MIT)</h1>
|
||||||
<p>Copyright © {{info}}</p>
|
<p>Copyright © {{info}}</p>
|
||||||
|
|
||||||
|
|
|
||||||
20
README.md
20
README.md
|
|
@ -48,6 +48,7 @@ Available fields:
|
||||||
* url
|
* url
|
||||||
* email
|
* email
|
||||||
* format
|
* format
|
||||||
|
* gravatar
|
||||||
* version
|
* version
|
||||||
* theme
|
* theme
|
||||||
|
|
||||||
|
|
@ -97,6 +98,21 @@ And if you want your license to appear as plain text, just add the
|
||||||
"format": "txt"
|
"format": "txt"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### gravatar
|
||||||
|
|
||||||
|
And if you want to show your gravatar, just add the `gravatar`
|
||||||
|
property (allowed values are `on` or `off`):
|
||||||
|
|
||||||
|
{
|
||||||
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
|
"url": "http://remysharp.com",
|
||||||
|
"email": "me@mysite.com",
|
||||||
|
"gravatar": "on"
|
||||||
|
}
|
||||||
|
|
||||||
|
*Depends of email property. You need to check the compatibility of the
|
||||||
|
chosen theme. Currently, only the default theme supports Gravatar.*
|
||||||
|
|
||||||
### License version targeting
|
### License version targeting
|
||||||
|
|
||||||
License version targeting allows you to link your MIT license to a
|
License version targeting allows you to link your MIT license to a
|
||||||
|
|
@ -141,7 +157,8 @@ Current available themes:
|
||||||
|
|
||||||
* default - [preview](http://mit-license.org) (by
|
* default - [preview](http://mit-license.org) (by
|
||||||
[@remy](http://github.com/remy) &
|
[@remy](http://github.com/remy) &
|
||||||
[@raphaelbastide](http://github.com/raphaelbastide))
|
[@raphaelbastide](http://github.com/raphaelbastide) &
|
||||||
|
[@evertton](http://github.com/evertton))
|
||||||
* flesch - [preview](http://jsbin.com/ufefid/3) (by
|
* flesch - [preview](http://jsbin.com/ufefid/3) (by
|
||||||
[@flesch](http://github.com/flesch))
|
[@flesch](http://github.com/flesch))
|
||||||
* afterdark - [preview](http://jsbin.com/ivufon/4) (by [@rmartindotco](http://github.com/rmartindotco))
|
* afterdark - [preview](http://jsbin.com/ivufon/4) (by [@rmartindotco](http://github.com/rmartindotco))
|
||||||
|
|
@ -191,6 +208,7 @@ Development contributions from:
|
||||||
* [batuhanicoz](http://github.com/batuhanicoz)
|
* [batuhanicoz](http://github.com/batuhanicoz)
|
||||||
* [georgebashi](http://github.com/georgebashi)
|
* [georgebashi](http://github.com/georgebashi)
|
||||||
* [mathiasbynens](http://github.com/mathiasbynens)
|
* [mathiasbynens](http://github.com/mathiasbynens)
|
||||||
|
* [evertton](http://github.com/evertton)
|
||||||
|
|
||||||
### 1. Donate domain years
|
### 1. Donate domain years
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,11 @@
|
||||||
|
|
||||||
if (property_exists($user, 'email')) {
|
if (property_exists($user, 'email')) {
|
||||||
$holder = $holder . ' <<a href="mailto:' . $user->email . '">' . $user->email . '</a>>';
|
$holder = $holder . ' <<a href="mailto:' . $user->email . '">' . $user->email . '</a>>';
|
||||||
|
|
||||||
|
if(property_exists($user, 'gravatar') && $user->gravatar === "on"){
|
||||||
|
$gravatar = '<img id="gravatar" src="http://www.gravatar.com/avatar/'.md5(strtolower(trim($user->email))).'" />';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (property_exists($user, 'format')) {
|
if (property_exists($user, 'format')) {
|
||||||
|
|
@ -135,6 +140,7 @@
|
||||||
$info = $year . ' ' . $holder;
|
$info = $year . ' ' . $holder;
|
||||||
$license = str_replace('{{info}}', $info, $license);
|
$license = str_replace('{{info}}', $info, $license);
|
||||||
$license = str_replace('{{theme}}', $theme, $license);
|
$license = str_replace('{{theme}}', $theme, $license);
|
||||||
|
$license = str_replace('{{gravatar}}', $gravatar, $license);
|
||||||
|
|
||||||
// if we want text format, strip out the license from the article tag
|
// if we want text format, strip out the license from the article tag
|
||||||
// and then strip any other tags in the license.
|
// and then strip any other tags in the license.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
copyright : 'Seyed Mojtaba Seyedi, http://seyedi.github.com',
|
|
||||||
url : 'http://seyedi.github.com'
|
|
||||||
email : 'seyedmojtabaseyedi@gmail.com'
|
|
||||||
theme : 'default'
|
|
||||||
}
|
|
||||||
|
|
@ -17,4 +17,4 @@ a:active { color:#000; }
|
||||||
:-moz-any-link:focus {color:#000; border:0;}
|
:-moz-any-link:focus {color:#000; border:0;}
|
||||||
::selection {background:#ccc;}
|
::selection {background:#ccc;}
|
||||||
::-moz-selection {background:#ccc;}
|
::-moz-selection {background:#ccc;}
|
||||||
|
#gravatar{position:relative;float:right;}
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
"copyright": "Evertton de Lima",
|
"copyright": "Evertton de Lima",
|
||||||
"email": "e.everttonlima@gmail.com",
|
"email": "e.everttonlima@gmail.com",
|
||||||
"format": "html",
|
"format": "html",
|
||||||
|
"gravatar": "on",
|
||||||
"theme": "default"
|
"theme": "default"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue