Compare commits

..

2 commits

5 changed files with 18 additions and 16 deletions

View file

@ -231,6 +231,7 @@ pub const Response = struct {
writer, writer,
.{ .{
._page = templ, ._page = templ,
.@"mini-user" = @embedFile("./controllers/web/_components/mini-user.tmpl.html"),
}, },
@embedFile("./controllers/web/_format.tmpl.html"), @embedFile("./controllers/web/_format.tmpl.html"),
data, data,

View file

@ -0,0 +1,13 @@
<div class="user-mini">
<img class="avatar" src="{.avatar_url}" />
<div class="details">
<div class="display_name">
{=#if .display_name |$name|=}
{$name}
{= #else =}
{.username}
{= /if =}
</div>
<div class="handle">@{.username}@{.host}</div>
</div>
</div>

View file

@ -1,7 +1,7 @@
<header> <header>
<h2>{ %community.name }</h2> <h2>{ %community.name }</h2>
</header> </header>
<form action="/login" method="post"> <form action="/login" method="post" enctype="multipart/form-data">
<h3>Login</h3> <h3>Login</h3>
<label> <label>
<div>Username</div> <div>Username</div>

View file

@ -1,4 +1,4 @@
<form action="/cluster/communities/create" method="post"> <form action="/cluster/communities/create" method="post" enctype="multipart/form-data">
<h2>Create Local Community</h2> <h2>Create Local Community</h2>
<label> <label>
<div>Origin</div> <div>Origin</div>

View file

@ -1,7 +1,7 @@
<header> <header>
<h2>{ %community.name }</h2> <h2>{ %community.name }</h2>
</header> </header>
<form action="/signup" method="post"> <form action="/signup" method="post" enctype="multipart/form-data">
<h3>Sign Up</h3> <h3>Sign Up</h3>
{#if .error_msg |$msg| =} {#if .error_msg |$msg| =}
<div class="error">Error: {$msg}</div> <div class="error">Error: {$msg}</div>
@ -9,19 +9,7 @@
{#if .invite |$invite| =} {#if .invite |$invite| =}
<div> <div>
<div>You are about to accept an invite from:</div> <div>You are about to accept an invite from:</div>
<div class="user-mini"> {#template mini-user $invite.creator}
<img class="avatar" src="{$invite.creator.avatar_url}" />
<div class="details">
<div class="display_name">
{=#if $invite.creator.display_name |$name|=}
{$name}
{= #else =}
{$invite.creator.username}
{= /if =}
</div>
<div class="handle">@{$invite.creator.username}@{$invite.creator.host}</div>
</div>
</div>
{#if @isTag($invite.kind, community_owner) =} {#if @isTag($invite.kind, community_owner) =}
<div>This act will make your new account the owner of { %community.name }.</div> <div>This act will make your new account the owner of { %community.name }.</div>
{/if =} {/if =}