You are here

function theme_yr_verdata_block in Yr Weatherdata 6.2

Same name and namespace in other branches
  1. 7 yr_verdata.module \theme_yr_verdata_block()

Theme function for the block display.

Parameters

$vars: An array with the processed forecast information for the first period of this location.

Return value

Returns a themed output for a block.

File

./yr_verdata.module, line 965
yr_verdata.module This file contains the code for getting the forecast from yr.no and displaying it on a Drupal site.

Code

function theme_yr_verdata_block($vars) {
  $output = '';
  if (isset($vars['name'])) {
    $output .= '<h4>' . l($vars['name'], 'forecast/' . $vars['yid']) . '</h4>';
  }
  $output .= '<div class="yr-forecast-block-box">';
  $output .= '<p class="yr-period-time">' . $vars[0]['time'] . '</p>';
  $output .= '<div class="yr-period-forecast">';
  $output .= '<p class="yr-symbols">';
  $output .= '<span class="yr-symbol">' . $vars[0]['symbol'] . '</span>';
  $output .= '<span class="yr-wind">' . $vars[0]['wind'] . '</span>';
  $output .= $vars[0]['temp'];
  $output .= '</p>';
  $output .= '<p class="yr-precip">' . $vars[0]['precip'] . '</p>';
  $output .= '<p class="yr-pressure">' . $vars[0]['pressure'] . '</p>';
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}