From 1e0433c9df062ead21d0f46b15d088622b7d5c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= <john@ankarstrom.se> Date: Wed, 22 Sep 2021 02:11:50 +0200 Subject: Log in, log out --- t/front.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 't') diff --git a/t/front.t b/t/front.t index 4f94a9b..f8dc9e3 100644 --- a/t/front.t +++ b/t/front.t @@ -1,8 +1,15 @@ <% #include "head.tc" %> <h1><%= site.name %></h1> +<% if(curuser) { %> +Logged in as <%= curuser->name %>. +<% } %> <ul> + <% if(curuser){ %> + <li><a href="?delete=session">Log out</a></li> + <% }else{ %> <li><a href="?new=user">Sign up</a></li> <li><a href="?new=session">Log in</a></li> + <% } %> </ul> <h3>Latest posts</h3> <table border="1"> -- cgit v1.2.3