diff --git a/src/lua/endpoints/index_get.lua b/src/lua/endpoints/index_get.lua index e80b84d..3b13a41 100644 --- a/src/lua/endpoints/index_get.lua +++ b/src/lua/endpoints/index_get.lua @@ -43,7 +43,7 @@ local function get_site_home(req, loggedin) loggedin = loggedin } end -local function get_author_home(req) +local function get_author_home(req, loggedin) --print("Looking at author home...") local host = http_request_get_host(req) local subdomain = host:match("([^\\.]+)") @@ -120,11 +120,11 @@ local function index_get(req) --author home page local cachepath = string.format("%s.%s",subdomain,config.domain) text = cache.render(cachepath, function() - return get_author_home(req) + return get_author_home(req, author ~= nil) end) elseif host ~= config.domain and author == subdomain then --author's home page for the author, don't cache, display unlisted - text = get_author_home(req) + text = get_author_home(req, author ~= nil) end assert(text) http_response(req,200,text) diff --git a/src/pages/author_index.etlua.in b/src/pages/author_index.etlua.in index 34c4b4c..927402f 100644 --- a/src/pages/author_index.etlua.in +++ b/src/pages/author_index.etlua.in @@ -5,7 +5,19 @@ <%= author %>.<%= domain %>
- New paste +
+ New paste + <% if not loggedin then %> + Log in + <% else %> + Log out + <% end %> + + +
<%= bio %> diff --git a/src/pages/index.etlua.in b/src/pages/index.etlua.in index 371c7e3..dee9959 100644 --- a/src/pages/index.etlua.in +++ b/src/pages/index.etlua.in @@ -8,12 +8,13 @@
New paste - <% if loggedin then %> + <% if not loggedin then %> Log in + Register <% else %> Log out + <% end %> - Register