Better form styles. Implemented new design for post preview.
This commit is contained in:
parent
9e7b889e3d
commit
fb24365d9a
3 changed files with 34 additions and 25 deletions
43
forms.tmpl
43
forms.tmpl
|
|
@ -68,30 +68,30 @@
|
|||
#end proc
|
||||
#
|
||||
#
|
||||
#proc genPostPreview(c: var TForumData,
|
||||
#proc genPostPreview(c: var TForumData,
|
||||
# title, content, author, date: string): string =
|
||||
# result = ""
|
||||
<a name="preview"></a>
|
||||
<table class="post">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<span>${xmlEncode(title)}</span>
|
||||
<span style="float:right;">${xmlEncode(date)}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">
|
||||
<span>${xmlEncode(author)}</span>
|
||||
</td>
|
||||
<td class="content">
|
||||
#try:
|
||||
${content.rstToHtml}
|
||||
#except EParseError:
|
||||
# c.errorMsg = getCurrentExceptionMsg()
|
||||
#end
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="talk-thread">
|
||||
<div>
|
||||
<div class="author">
|
||||
<div>
|
||||
#let profileUrl = c.req.makeUri("profile/", false) & xmlEncode(author)
|
||||
<a class="name" href="$profileUrl">${xmlEncode(author)}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div>
|
||||
#try:
|
||||
${content.rstToHtml}
|
||||
#except EParseError:
|
||||
# c.errorMsg = getCurrentExceptionMsg()
|
||||
#end
|
||||
<span class="date">${xmlEncode(date)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#end proc
|
||||
#
|
||||
#
|
||||
|
|
@ -157,6 +157,7 @@
|
|||
<div id="talk-head">
|
||||
<div class="info-post">
|
||||
<div>
|
||||
<a href="${c.req.makeUri("/")}"><b>forum index</b></a> >
|
||||
$topText
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -464,6 +464,7 @@ proc login(c: var TForumData, name, pass: string): bool =
|
|||
|
||||
proc hasReplyBtn(c: var TForumData): bool =
|
||||
result = c.req.pathInfo != "/donewthread" and c.req.pathInfo != "/doreply"
|
||||
result = result and c.req.params["action"] != "reply"
|
||||
return c.threadId >= 0 and result
|
||||
|
||||
proc genActionMenu(c: var TForumData): string =
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ pre .end { background:url("/images/tabEnd.png") no-repeat left bottom; }
|
|||
#talk-threads > div > .detail > div:first-child > div { background:url("/images/forum-views.png") no-repeat left; cursor: help; }
|
||||
#talk-threads > div > .detail > div:last-child > div { background:url("/images/forum-posts.png") no-repeat left; cursor: help; }
|
||||
|
||||
#talk-thread > div { margin:20px 0; min-height:150px; box-shadow:1px 3px 12px rgba(0,0,0,.4) }
|
||||
#talk-thread > div { margin:20px 0; min-height:150px; box-shadow:1px 3px 12px rgba(0,0,0,.4); padding-bottom: 10pt; }
|
||||
#talk-thread > div > .author > div > .avatar { margin-top:20px; }
|
||||
#talk-thread > div > .author > div > .name { }
|
||||
#talk-thread > div > .author > div > .date { font-size: 8pt; color: white; }
|
||||
|
|
@ -475,13 +475,20 @@ div#sidebar .content span.error
|
|||
|
||||
article#content form
|
||||
{
|
||||
|
||||
border-right: 8px solid rgba(0, 0, 0, 0.2);
|
||||
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
|
||||
padding: 10pt 20pt;
|
||||
}
|
||||
|
||||
article#content form > input, article#content form > textarea
|
||||
{
|
||||
border: 1px solid #6D6D6D;
|
||||
}
|
||||
|
||||
article#content form > input:focus, article#content form > textarea:focus
|
||||
{
|
||||
border: 1px solid #1cb3ec;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue