Skip to content

Commit

Permalink
Improve misc markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurt Gawinowicz authored and themightychris committed Sep 25, 2016
1 parent 0845653 commit 5b828dd
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 106 deletions.
52 changes: 26 additions & 26 deletions html-templates/contact/contact.tpl
Expand Up @@ -11,39 +11,39 @@
{/block}

{block "content"}
<header class="page-header">
<h2>Contact Us</h2>
</header>
<div class="row">
<div class="col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">

<form action="/contact" method="POST" class="contact-form">
{if $validationErrors}
<div class="notify error">
<strong>Please double-check the fields highlighted below.</strong>
</div>
{/if}
<div class="page-header">
<h1>Contact Us</h1>
</div>

<fieldset class="shrink show-required left-labels">
<form action="/contact" method="POST" class="contact-form">
{if $validationErrors}
<div class="alert alert-danger">
Please double-check the fields highlighted below.
</div>
{/if}

{* field name label='' error='' type=text placeholder='' hint='' required=false attribs='' *}
{* field name label='' error='' type=text placeholder='' hint='' required=false attribs='' *}

{field inputName=Name label=Name error=$validationErrors.Name required=true attribs='autofocus autocapitalize="words"'}
{field inputName=Email label=Email error=$validationErrors.Email type=email required=true}
{field inputName=Phone label=Phone error=$validationErrors.Phone type=tel hint='Optional. Include your area code.'}
{field inputName=Name label=Name error=$validationErrors.Name required=true attribs='autofocus autocapitalize="words"'}
{field inputName=Email label=Email error=$validationErrors.Email type=email required=true}
{field inputName=Phone label=Phone error=$validationErrors.Phone type=tel hint='Optional. Include your area code.'}

{textarea inputName=Message label=Message error=$validationErrors.Message required=true}
{textarea inputName=Message label=Message error=$validationErrors.Message required=true}

{if RemoteSystems\ReCaptcha::$siteKey}
<div class="form-group g-recaptcha" data-sitekey="{RemoteSystems\ReCaptcha::$siteKey|escape}"></div>
{/if}
{if RemoteSystems\ReCaptcha::$siteKey}
<div class="form-group g-recaptcha" data-sitekey="{RemoteSystems\ReCaptcha::$siteKey|escape}"></div>
{/if}

{if $validationErrors.ReCaptcha}
<p class="error-text">{$validationErrors.ReCaptcha}</p>
{/if}
{if $validationErrors.ReCaptcha}
<p class="text-danger">{$validationErrors.ReCaptcha}</p>
{/if}

<div class="submit-area">
<input type="submit" class="btn btn-primary btn-block" value="Send">
</div>
<button type="submit" class="btn btn-primary">Send</button>
</form>

</fieldset>
</form>
</div>
</div>
{/block}
139 changes: 78 additions & 61 deletions html-templates/events/event.tpl
Expand Up @@ -5,86 +5,103 @@
{block content}
{$Event = $data}

<header class="page-header">
<div class="page-header">
{*
<ol class="breadcrumb">
<li><a href="/events">{_ "Events"}</a></li>
<li><a href="{$Event->getUrl()}">{$Event->Title|escape}</a></li>
</ol>
*}
<div class="btn-toolbar pull-right">
{if $.User}
<form action="{$Event->getUrl(edit)}">
<button class="btn btn-success" type="submit">{glyph "pencil"}&nbsp;{_ "Edit Event&hellip;"}</button>
</form>
{/if}
</div>
<h1><a href="/events">{_ "Events"}</a>&nbsp;&raquo; <a href="{$Event->getUrl()}">{$Event->Title|escape}</a></h1>
</header>

<article class="post panel panel-default">
<div class="panel-body">
<dl class="dl-horizontal">
<h1>{$Event->Title|escape}</h1>
</div>
<div class="row">
<div class="col-md-3">
<ul class="row list-unstyled">
{if $Event->Status != 'published'}
<dt>Status</dt>
<dd><strong>{$Event->Status}</strong></dd>
<li class="col-sm-3 col-md-12">
<p>
<b>Status</b><br/>
{$Event->Status}
</p>
</li>
{/if}

<dt>Start time</dt>
<dd>{timestamp $Event->StartTime time=yes}</dd>
<li class="col-sm-3 col-md-12">
<p>
<b>Start time</b><br/>
{timestamp $Event->StartTime time=yes}
</p>
</li>

{if $Event->EndTime}
<dt>End time</dt>
<dd>{timestamp $Event->EndTime time=yes}</dd>
<li class="col-sm-3 col-md-12">
<p>
<b>End time</b><br/>
{timestamp $Event->EndTime time=yes}
</p>
</li>
{/if}

{if $Event->Location}
<dt>Location</dt>
<dd><a href="https://www.google.com/maps?q={$Event->Location|escape:url}">{$Event->Location|escape}</a></dd>
<li class="col-sm-3 col-md-12">
<p>
<b>Location</b><br/>
<a href="https://www.google.com/maps?q={$Event->Location|escape:url}">{$Event->Location|escape}</a>
</p>
</li>
{/if}
</ul>
</div>

{if $Event->Description}
<dt>Description</dt>
<dd class="well">
<div class="markdown event-description">{$Event->Description|truncate:600|escape|markdown}</div>
</dd>
{/if}
<div class="col-md-9">
{if $Event->Description}
<div class="well">
<div class="markdown event-description">{$Event->Description|truncate:600|escape|markdown}</div>
</div>
{/if}

{if $Event->Segments}
<h2>Segments</h2>

{if $Event->Segments}
<dt>Segments</dt>
<dd>
{$lastDate = null}

{foreach item=Segment from=$Event->Segments}
{$thisDate = date("l, F jS", $Segment->StartTime)}

{if $lastDate != $thisDate}
{if $lastDate}
</dl>
{/if}
<h3>{$thisDate}</h3>
<dl class="dl-horizontal">
{$lastDate = null}
{foreach item=Segment from=$Event->Segments}
{$thisDate = date("l<\\b\\r>F jS", $Segment->StartTime)}
{if $lastDate != $thisDate}
{if $lastDate}
</dl>
</dd>
{/if}
<dt>{$thisDate}</dt>
<dd>
<dl class="dl-horizontal">
{$lastDate = $thisDate}
{$lastDate = $thisDate}
{/if}
<dt>{time_range $Segment->StartTime $Segment->EndTime}</dt>
<dd>
<a href="{$Event->getUrl("segments/$Segment->Handle")}">{$Segment->Title|escape}</a>
{if $Segment->LocationName || $Segment->LocationAddress}
<p>
<strong>Location</strong>
<a target="_blank" href="https://maps.google.com?q={implode(', ', array_filter(array($Segment->LocationName, $Segment->LocationAddress)))|escape:url}">
{if $Segment->LocationName && $Segment->LocationAddress}
{$Segment->LocationName|escape} ({$Segment->LocationAddress|escape})
{else}
{$Segment->LocationName|default:$Segment->LocationAddress|escape}
{/if}
</a>
</p>
{/if}
<dt>{time_range $Segment->StartTime $Segment->EndTime}</dt>
<dd>
<a href="{$Event->getUrl("segments/$Segment->Handle")}">{$Segment->Title|escape}</a>
{if $Segment->LocationName || $Segment->LocationAddress}
<p>
<strong>Location</strong>
<a target="_blank" href="https://maps.google.com?q={implode(', ', array_filter(array($Segment->LocationName, $Segment->LocationAddress)))|escape:url}">
{if $Segment->LocationName && $Segment->LocationAddress}
{$Segment->LocationName|escape} ({$Segment->LocationAddress|escape})
{else}
{$Segment->LocationName|default:$Segment->LocationAddress|escape}
{/if}
</a>
</p>
{/if}
{$Segment->Description|escape|markdown}
</dd>

{/foreach}
</dl></dd>
</dl>
</dd>
{/if}
</dl>
{$Segment->Description|escape|markdown}
</dd>
{/foreach}
{/if}
</div>
</article>
</div>
{/block}
50 changes: 32 additions & 18 deletions html-templates/events/events.tpl
Expand Up @@ -29,36 +29,50 @@
<h2 class="post-title">
<a name="{$Event->Handle}" href="{$Event->getUrl()}">{$Event->Title|escape}</a>
</h2>
<dl class="dl-horizontal">
<ul class="row list-unstyled">
{if $Event->Status != 'published'}
<dt>Status</dt>
<dd><strong>{$Event->Status}</strong></dd>
<li class="col-md-3">
<p>
<b>Status</b><br/>
{$Event->Status}
</p>
</li>
{/if}

<dt>Start time</dt>
<dd>{timestamp $Event->StartTime time=yes}</dd>
<li class="col-md-3">
<p>
<b>Start time</b><br/>
{timestamp $Event->StartTime time=yes}
</p>
</li>

{if $Event->EndTime}
<dt>End time</dt>
<dd>{timestamp $Event->EndTime time=yes}</dd>
<li class="col-md-3">
<p>
<b>End time</b><br/>
{timestamp $Event->EndTime time=yes}
</p>
</li>
{/if}

{if $Event->Location}
<dt>Location</dt>
<dd><a href="https://www.google.com/maps?q={$Event->Location|escape:url}">{$Event->Location|escape}</a></dd>
<li class="col-md-3">
<p>
<b>Location</b><br/>
<a href="https://www.google.com/maps?q={$Event->Location|escape:url}">{$Event->Location|escape}</a>
</p>
</li>
{/if}

{if $Event->Description}
<dt>Description</dt>
<dd class="well">
<div class="markdown event-description">{$Event->Description|truncate:600|escape|markdown}</div>
</dd>
{/if}
</dl>
</ul>
{if $Event->Description}
<div class="well">
<div class="markdown event-description">{$Event->Description|truncate:600|escape|markdown}</div>
</div>
{/if}
</div>
</article>
{foreachelse}
<em>No events were found, try creating one{if count($conditions)} or <a href="?">browse without any filters</a>{/if}.</em>
<p><em>No events were found, try creating one{if count($conditions)} or <a href="?">browse without any filters</a>{/if}.</em></p>
{/foreach}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion html-templates/people/people.tpl
Expand Up @@ -47,7 +47,7 @@
<div class="col-sm-8 col-md-9">
{foreach item=Person from=$data}
{if $.foreach.default.index % 6 == 0}<div class="row members-list">{/if}
<div class="col-sm-2">
<div class="col-sm-4 col-md-2">
{personLink $Person photo=yes photoSize=150 linkCls="thumbnail"}
</div>
{if $.foreach.default.index % 6 == 5 || $.foreach.default.last}</div>{/if}
Expand Down
6 changes: 6 additions & 0 deletions site-root/css/laddr/bootstrap-tweaks.css
Expand Up @@ -31,6 +31,12 @@ legend {
* + Components
*/

/* - Badges */

h1 .badge {
vertical-align: middle;
}

/* - Jumbotron */

.jumbotron {
Expand Down
4 changes: 4 additions & 0 deletions site-root/css/laddr/laddr.css
Expand Up @@ -128,6 +128,10 @@ body {
margin-top: 0;
}

.well > .event-description > *:first-child {
margin-top: 0;
}


/* - Person */

Expand Down

0 comments on commit 5b828dd

Please sign in to comment.