Skip to content

Instantly share code, notes, and snippets.

@cerw
Created June 26, 2013 01:32
Show Gist options
  • Save cerw/5864048 to your computer and use it in GitHub Desktop.
Save cerw/5864048 to your computer and use it in GitHub Desktop.
<h2 class="beachheader">{$beach.name}</h2>
{assign value=$weather.o[0] var=o}
<div class="bigbox weather border">
<!-- <div class="header">Weather</div> -->
<div class="body">
<div class="today" title="{$d.date|date_format:"%a"}">Weather</div>
{foreach from=$weather.w.days item=d name=forcast}
{if $smarty.foreach.forcast.first}
<div class="current">{$o->air_temp|@round}&deg;
<span>now</span>
</div>
<div class="micon" title="{$d.forecast}">
{if !empty($d.icon)}
<img class="noresize" src="{$mpath}weather/med/{$d.icon}"/>
{else}
<div class="spacer">&nbsp;</div>
{/if}
</div>
<div class="tempwrap">
<div class="max">{$d.amax}&deg;
<span>max</span></div>
<div class="min">{$d.amin}&deg;
<span>min</span>
</div>
</div>
<div class="windwrap">
<div class="lg">
wind </br>
direction
</div>
<div class="wind">{if !empty($o->wind_spd_kmh)}{$o->wind_spd_kmh} <span>km/h</span>{/if}</div>
<div class="wind">{$o->wind_dir}</div>
</div>
{/if}
{/foreach}
</div>
</div>
<div class="bigbox weather border">
<div class="body">
<div class="today" title="{$d.date|date_format:"%a"}">Swell</div>
<ul class="myswell">
{foreach from=$predswell key=k item=p name=swell}
{if $smarty.foreach.swell.index == 0}
<li>
<span>morning</span>
<div class="lg2">
height </br>
direction
</div>
<div class="colum">{$p.sig_ht_sw1|@round:1} m</div>
<div class="dir">{$p.direction}</div>
</li>
{/if}
{if $smarty.foreach.swell.index == 1}
<li>
<span>afternoon</span>
<div class="lg2">
height </br>
direction
</div>
<div class="colum">{$p.sig_ht_sw1|@round:1} m</div>
<div class="dir">{$p.direction}</div>
</li>
{/if}
{/foreach}
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment