Show gravatar avatar
This commit is contained in:
parent
cfab0475f3
commit
c1eed7136c
3 changed files with 7 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
:author "Tom Willemse"
|
||||
:license "AGPLv3"
|
||||
:depends-on (:restas :sexml :postmodern :cl-json :drakma
|
||||
:closure-template)
|
||||
:closure-template :md5)
|
||||
:defsystem-depends-on (:closure-template)
|
||||
:components ((:closure-template "templates/scrumli")
|
||||
(:file "defmodule")
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
(<:a :class "brand" "scrumli")
|
||||
,@body))))
|
||||
|
||||
(defun md5-hash (str)
|
||||
(string-downcase (format nil "~{~2,'0x~}"
|
||||
(coerce (md5:md5sum-string str) 'list))))
|
||||
|
||||
(define-route main ("")
|
||||
(if (logged-in-p)
|
||||
(scrumli-templates:main
|
||||
|
@ -64,6 +68,7 @@
|
|||
*scrumli-react-js-location*
|
||||
*scrumli-jsxtransformer-js-location*)
|
||||
:username ,(hunchentoot:session-value :username)
|
||||
:usermd5 ,(md5-hash (hunchentoot:session-value :username))
|
||||
:ulogout ,(genurl 'logout-page)
|
||||
:umainjs ,(genurl 'main-js)))
|
||||
(redirect 'login-page)))
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<a class="brand">scrumli</a>
|
||||
<div class="pull-right">
|
||||
<span class="navbar-text">
|
||||
<img src="https://secure.gravatar.com/avatar/{$usermd5}?s=16" />
|
||||
{$username}
|
||||
</span>
|
||||
<ul class="nav pull-right">
|
||||
|
|
Loading…
Reference in a new issue