return email.md5.to_lower
end
- # Return a full-featured link to a person
- fun to_html: String
- do
- var res = ""
- var e = name.html_escape
- var page = self.page
- if page != null then
- res += "<a href=\"{page.html_escape}\">"
- end
- var gravatar = self.gravatar
- if gravatar != null then
- res += "<img src=\"https://secure.gravatar.com/avatar/{gravatar}?size=20&default=retro\"> "
- end
- res += e
- if page != null then res += "</a>"
- return res
- end
-
# The standard representation of a person.
#
# ~~~
import commands_parser
import commands_usage
-import templates::templates_html
+import templates::html_model
intrude import markdown::wikilinks
redef class DocCommand
import static_cards
import modelize
-intrude import markdown::wikilinks
-
# The model of a Nitdoc documentation
class DocModel
# Cards templates for the static documentation
module static_cards
-import doc::commands::commands_graph
-import doc::commands::commands_catalog
-import doc::commands::commands_docdown
-import templates_html
+import templates::html_commands
# A card that can be rendered to HTML
#
# limitations under the License.
# Translate mentities to html blocks.
-module templates_html
+module html_model
import model::model_collect
import catalog
# Link to this person `html_url`
fun html_link: Link do return new Link(html_url, name)
- redef fun to_html do
+ # Render `self` as HTML
+ fun to_html: String do
var tpl = new Template
tpl.addn "<span>"
var gravatar = self.gravatar
import json::serialization_write
import catalog
-import templates_html
+import html_model
redef class MEntity
serialize
import loader # Scan&load packages, groups and modules
import catalog
-import templates_html
+import doc::templates::html_model
# A HTML page in a catalog
#
var piwik_site_id: Int = 1
end
+redef class Person
+ redef fun to_html do
+ var res = ""
+ var e = name.html_escape
+ var page = self.page
+ if page != null then
+ res += "<a href=\"{page.html_escape}\">"
+ end
+ var gravatar = self.gravatar
+ if gravatar != null then
+ res += "<img src=\"https://secure.gravatar.com/avatar/{gravatar}?size=20&default=retro\"> "
+ end
+ res += e
+ if page != null then res += "</a>"
+ return res
+ end
+end
+
var model = new Model
var tc = new ToolContext