Add a new cgit/base role

This will be needed to migrate Dist Git from puppet to ansible.
This commit is contained in:
Mathieu Bridon 2014-07-08 15:28:05 +02:00 committed by Kevin Fenzi
parent 360fb1fa33
commit be0f5446f0
10 changed files with 1483 additions and 0 deletions

View file

@ -0,0 +1,15 @@
local md5 = require("md5")
function filter_open(email, page)
buffer = ""
hexdigest = md5.sumhexa(email:sub(2, -2):lower())
end
function filter_close()
html("<span class='libravatar'><img class='inline' src='https://seccdn.libravatar.org/avatar/" .. hexdigest .. "?s=20&amp;d=retro' /><img class='onhover' src='https://seccdn.libravatar.org/avatar/" .. hexdigest .. "?s=128&amp;d=retro' /></span>" .. buffer)
return 0
end
function filter_write(str)
buffer = buffer .. str
end