Add new style and fix up HTML to avoid boilerplate
[hcoop/portal.git] / link.mlt
index e2943a9..adfd266 100644 (file)
--- a/link.mlt
+++ b/link.mlt
@@ -7,24 +7,24 @@ ref showNormal = true;
 
 if $"cmd" = "add" then
        val id = Link.addLink (you, $"title", $"url", $"descr") %>
-       <h3><b>Link added</b></h3>
+       <h3>Link added</h3>
 
 <% elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't modify somebody else's link.</b></h3><%
+               %><h3>You can't modify somebody else's link.</h3><%
        else
                showNormal := false %>
 
-<h3><b>Modify link</b></h3>
+<h3>Modify link</h3>
 
 <form action="link" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </t>
 </table>
 </form>
@@ -34,20 +34,20 @@ elseif $"save" <> "" then
        val id = Web.stoi ($"save");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't modify somebody else's link.</b></h3><%
+               %><h3>You can't modify somebody else's link.</h3><%
        else
                Link.modLink {link with title = $"title", url = $"url", descr = $"descr"}
-               %><h3><b>Link modified</b></h3><%
+               %><h3>Link modified</h3><%
        end
 
 elseif $"del" <> "" then
        val id = Web.stoi ($"del");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't delete somebody else's link.</b></h3><%
+               %><h3>You can't delete somebody else's link.</h3><%
        else
                showNormal := false %>
-               <h3><b>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</b></h3>
+               <h3>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</h3>
                <a href="link?del2=<% id %>">Yes, delete "<% Web.html (#title link) %>"!</a><%
        end
 
@@ -55,10 +55,10 @@ elseif $"del2" <> "" then
        val id = Web.stoi ($"del2");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't delete somebody else's link.</b></h3><%
+               %><h3>You can't delete somebody else's link.</h3><%
        else
                Link.deleteLink id;
-               %><h3><b>Link "<% Web.html (#title link) %>" deleted</b></h3><%
+               %><h3>Link "<% Web.html (#title link) %>" deleted</h3><%
        end
 end;
 
@@ -76,14 +76,14 @@ if showNormal then %>
 <% end %>
 </table>
 
-<h3><b>Add a link to a site you host with Hcoop</b></h3>
+<h3>Add a link to a site you host with Hcoop</h3>
 
 <form action="link" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="http://"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="http://"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </t>
 </table>
 </form>