tidy up readme, and change gravatar prop to bool

This commit is contained in:
Remy Sharp 2013-04-09 16:50:13 -04:00
parent 6d33a0463c
commit f34d8a4cdb
4 changed files with 15 additions and 11 deletions

View file

@ -40,7 +40,8 @@ need to send a pull request on that `user.json` file via GitHub.
The `users` directory contains a list of files, each representing a host The `users` directory contains a list of files, each representing a host
on mit-license.org. The minimum requirement for the JSON is that is on mit-license.org. The minimum requirement for the JSON is that is
contains a `copyright` field - everything else is optional. contains a `copyright` field - everything else is optional. Remember to ensure
the `user.json` file is [valid JSON](http://jsonlint.com/).
Available fields: Available fields:
@ -101,17 +102,18 @@ And if you want your license to appear as plain text, just add the
### gravatar ### gravatar
And if you want to show your gravatar, just add the `gravatar` And if you want to show your gravatar, just add the `gravatar`
property (allowed values are `on` or `off`): boolean property:
{ {
"copyright": "Remy Sharp, http://remysharp.com", "copyright": "Remy Sharp, http://remysharp.com",
"url": "http://remysharp.com", "url": "http://remysharp.com",
"email": "me@mysite.com", "email": "me@mysite.com",
"gravatar": "on" "gravatar": true
} }
*Depends of email property. You need to check the compatibility of the Note that the gravatar requires the email property. You also need to check the
chosen theme. Currently, only the default theme supports Gravatar.* compatibility of the chosen theme. Currently, only the default theme supports
Gravatar.
### License version targeting ### License version targeting
@ -125,7 +127,9 @@ extra assurance for you.
Targeting requires the [sha from the license commit](https://github.com/remy/mit-license/commits/master/LICENSE.html). This can be Targeting requires the [sha from the license commit](https://github.com/remy/mit-license/commits/master/LICENSE.html). This can be
specified on the URL (in your permalink) or in the JSON file. specified on the URL (in your permalink) or in the JSON file.
For example: http://rem.mit-license.org/a526bf7ad1 (make sure to view-source) shows an older version of the LICENSE.html file (compared to the [latest version](http://rem.mit-license.org) - the older version didn't have the new themes). For example: http://rem.mit-license.org/a526bf7ad1 (make sure to view-source)
shows an older version of the LICENSE.html file (compared to the [latest version](http://rem.mit-license.org)
- the older version didn't have the new themes).
This can also be targeted in my JSON file: This can also be targeted in my JSON file:
@ -156,7 +160,7 @@ example:
Current available themes: 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)) [@evertton](http://github.com/evertton))
* flesch - [preview](http://jsbin.com/ufefid/3) (by * flesch - [preview](http://jsbin.com/ufefid/3) (by

View file

@ -57,8 +57,8 @@
if (property_exists($user, 'email')) { if (property_exists($user, 'email')) {
$holder = $holder . ' &lt;<a href="mailto:' . $user->email . '">' . $user->email . '</a>&gt;'; $holder = $holder . ' &lt;<a href="mailto:' . $user->email . '">' . $user->email . '</a>&gt;';
if(property_exists($user, 'gravatar') && $user->gravatar === "on"){ if(property_exists($user, 'gravatar') && $user->gravatar === true){
$gravatar = '<img id="gravatar" src="http://www.gravatar.com/avatar/'.md5(strtolower(trim($user->email))).'" />'; $gravatar = '<img id="gravatar" src="http://www.gravatar.com/avatar/' . md5(strtolower(trim($user->email))) . '" />';
} }
} }

View file

@ -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;} #gravatar{position:relative;float:right; margin-bottom: 1em; margin-left: 1em; border: 1px solid #ddd;}

View file

@ -2,6 +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", "gravatar": true,
"theme": "default" "theme": "default"
} }