Changeset 13555


Ignore:
Timestamp:
Mar 14, 2012, 2:50:34 PM (9 years ago)
Author:
plg
Message:

import theme Simple version 2.5

  • use media queries to adapt layout for small screens
  • remove arbitrary limit on width: the picture will simply be partially hidden if too wide
  • update password.tpl
  • add MENUBAR on all pages
  • Spelling correction in README
  • update url
  • bugfix for the feature 'open external links in new window' for menubar links
Location:
extensions/simple_themes/simple
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • extensions/simple_themes/simple/README.md

    r13554 r13555  
    7474
    7575* if cl_conflit is used, don't add jQuery.noConflict
    76 * fix the possibility to toggle visibility of image informations
     76* fix the possibility to toggle visibility of image information 
    7777* show logout link when connected - thanks to gbo
    7878* update jquery to 1.4.4
  • extensions/simple_themes/simple/content.css

    r13554 r13555  
    3434#the_page {
    3535  width: 85%;
    36   min-width: 960px;
    3736  margin: 0 auto;
    3837  padding: 0;
     
    291290  float: right;
    292291  clear: right;
    293   width: 180px;
    294   margin: 0 10px;
     292  width: 25%;
    295293}
    296294
     
    309307
    310308#theImage {
     309  float: left;
     310  width: 75%;
    311311  text-align: center;
    312312  padding: 1em 0 2em;
    313313  margin: auto;
     314  overflow: hidden;
    314315}
    315316
     
    435436
    436437.personal_block { padding: 0 !important; }
     438
     439
     440/*  */
     441
     442@media only screen and (max-width: 957px) {
     443  #the_page {
     444    width: 100%;
     445    margin: 0;
     446  }
     447
     448  #thePicturePage #content {
     449    position: relative;
     450  }
     451
     452  #theHeader { margin: 0 1em; }
     453  .titrePage { margin: 1em; }
     454
     455  #theImage {
     456    width: 100%;
     457    float: none;
     458  }
     459
     460  #imageInfoBar {
     461    float: none;
     462    clear: both;
     463    width: 100%;
     464    margin: 0 10px;
     465  }
     466  #navThumbPrev, #navThumbNext {
     467    float: left;
     468    margin: 1em;
     469  }
     470}
     471
  • extensions/simple_themes/simple/template/about.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {$ABOUT_MESSAGE}
    910  {if isset($THEME_ABOUT) }
  • extensions/simple_themes/simple/template/comments.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  <form class="filter" action="{$F_ACTION}" method="get">
    910    <fieldset>
  • extensions/simple_themes/simple/template/header.tpl

    r13554 r13555  
    1818{/if}
    1919  <title>{$PAGE_TITLE} - {$GALLERY_TITLE}</title>
     20  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    2021  <link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
    2122  <link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
  • extensions/simple_themes/simple/template/identification.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($errors) }
    910  <div class="errors">
  • extensions/simple_themes/simple/template/index.tpl

    r13554 r13555  
    1616</div>
    1717<div id="content">
    18   {$MENUBAR}
     18  {if isset($MENUBAR)}{$MENUBAR}{/if}
    1919  <div class="subcontent">
    2020    {if isset($chronology.TITLE) }
  • extensions/simple_themes/simple/template/menubar_links.tpl

    r13546 r13555  
    22<ul>
    33  {foreach from=$block->data item=link}
    4   <li><a href="{$link.URL}">{$link.LABEL}</a></li>
     4  <li><a href="{$link.URL}" class="external"{if isset($link.new_window)} onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}>{$link.LABEL}</a></li>
    55  {/foreach}
    66</ul>
  • extensions/simple_themes/simple/template/nbm.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if not empty($errors)}
    910  <div class="errors">
  • extensions/simple_themes/simple/template/notification.tpl

    r13554 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  <p>{'The RSS notification feed provides notification on news from this website : new photos, updated categories, new comments. Use a RSS feed reader.'|@translate}</p>
    910  <ul>
  • extensions/simple_themes/simple/template/password.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if count($errors)}
    910  <div class="errors">
     
    1516  </div>
    1617  {/if}
     18
    1719  {if count($infos)}
    1820  <div class="infos">
     
    2426  </div>
    2527  {/if}
    26   <form action="{$F_ACTION}" method="post" class="properties">
    27     <fieldset>
    28       <legend>{'Retrieve password'|@translate}</legend>
    29       <ul>
    30         <li>
    31         <span class="property">
    32             <label for="mail_address">{'Email address'|@translate}</label>
    33         </span>
    34         <input class="login" type="text" name="mail_address" id="mail_address" size="40" maxlength="40" >
    35         </li>
    36         <li>
    37         <span class="property">
    38             <label for="no_mail_address">{'No email address'|@translate}</label>
    39         </span>
    40           <input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
    41         </li>
    42       </ul>
    43     </fieldset>
    44     <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
     28
     29{if $action ne 'none'}
     30<form id="lostPassword" action="{$form_action}?action={$action}{if isset($key)}&amp;key={$key}{/if}" method="post">
     31  <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
     32
     33  {if $action eq 'lost'}
     34  <div class="message">{'Please enter your username or email address.'|@translate} {'You will receive a link to create a new password via email.'|@translate}</div>
     35
     36  <p>
     37    <label>
     38      {'Username or email'|@translate}
     39      <br>
     40      <input type="text" id="username_or_email" name="username_or_email" size="40" maxlength="40"{if isset($username_or_email)} value="{$username_or_email}"{/if}>
     41    </label>
     42  </p>
     43
     44  <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Change my password'|@translate}"></p>
     45  {elseif $action eq 'reset'}
     46
     47  <div class="message">{'Hello'|@translate} <em>{$username}</em>. {'Enter your new password below.'|@translate}</div>
     48
     49  <p>
     50    <label>
     51      {'New password'|@translate}
     52      <br>
     53      <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
     54    </label>
     55  </p>
     56
     57  <p>
     58    <label>
     59      {'Confirm Password'|@translate}
     60      <br>
     61      <input type="password" name="passwordConf" id="passwordConf" value="">
     62    </label>
     63  </p>
     64
     65  <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
     66  {/if}
     67
    4568  </form>
     69{/if} {* $action ne 'none' *}
     70
     71<script type="text/javascript">
     72{if $action eq 'lost'}
     73{literal}try{document.getElementById('username_or_email').focus();}catch(e){}{/literal}
     74{elseif $action eq 'reset'}
     75{literal}try{document.getElementById('use_new_pwd').focus();}catch(e){}{/literal}
     76{/if}
     77</script>
     78
    4679</div> <!-- content -->
  • extensions/simple_themes/simple/template/picture.tpl

    r13554 r13555  
    66{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
    77<div id="content">
     8  {if isset($MENUBAR)}{$MENUBAR}{/if}
     9
    810  {if isset($errors)}
    911  <div class="errors">
     
    1517  </div>
    1618  {/if}
     19
    1720  {if isset($infos)}
    1821  <div class="infos">
     
    2427  </div>
    2528  {/if}
     29
     30  <div id="theImage">
     31    {$ELEMENT_CONTENT}
     32    {if isset($COMMENT_IMG)}
     33    <p>{$COMMENT_IMG}</p>
     34    {/if}
     35  </div> <!-- theImage -->
     36
    2637  <div id="imageInfoBar">
    2738    <div id="imageToolBar">
     
    113124        <dd>{$INFO_VISITS}</dd>
    114125        {/if}
    115         {if $display_info.average_rate}
    116         {if isset($rate_summary)}
    117         <dt>{'Average rate'|@translate}</dt>
    118         <dd id="ratingSummary">
    119           {if $rate_summary.count}
    120           {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
    121           {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
    122           {else}
    123           {'no rate'|@translate}
    124           {/if}
    125         </dd>
    126         {/if}
     126
     127                {if $display_info.rating_score and isset($rate_summary)}
     128                <dt id="Average">{'Rating score'|@translate}</dt>
     129                <dd id="ratingSummary">
     130                {if $rate_summary.count}
     131                        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
     132                {else}
     133                        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
     134                {/if}
     135                </dd>
     136                {/if}
     137
    127138        {if isset($rating)}
    128139        <dt><span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span></dt>
     
    131142            <div>&nbsp;
    132143              {foreach from=$rating.marks item=mark name=rate_loop}
    133               {if !$smarty.foreach.rate_loop.first} | {/if}
    134144              {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
    135145              <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
     
    138148              {/if}
    139149              {/foreach}
    140               <script type="text/javascript">
    141                 makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}',
    142                 image_id: {$current.id},
    143                 updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}",
    144                 updateRateElement: document.getElementById("updateRate"),
    145                 ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}",
    146                 ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
    147               </script>
     150              {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
     151              {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
     152              {footer_script}
     153              var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
     154              _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
     155              onSuccess : function(rating) {ldelim}
     156              var e = document.getElementById("updateRate");
     157              if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
     158              e = document.getElementById("ratingScore");
     159              if (e) e.innerHTML = rating.score;
     160              e = document.getElementById("ratingCount");
     161              if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
     162              {rdelim}{rdelim} );
     163              {/footer_script}
     164              {/strip}
    148165            </div>
    149166          </form>
    150167        </dd>
    151168        {/if}
    152         {/if}
    153169      </dl>
    154170    </div> <!-- imageInfos -->
    155171  </div>
    156   <div id="theImage">
    157     {$ELEMENT_CONTENT}
    158     {if isset($COMMENT_IMG)}
    159     <p>{$COMMENT_IMG}</p>
    160     {/if}
    161   </div> <!-- theImage -->
    162172  <div style="clear: both;"></div>
    163173
  • extensions/simple_themes/simple/template/profile.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($errors)}
    910  <div class="errors">
  • extensions/simple_themes/simple/template/register.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($errors)}
    910  <div class="errors">
  • extensions/simple_themes/simple/template/search.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($errors) }
    910  <div class="errors">
  • extensions/simple_themes/simple/template/search_rules.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($INTRODUCTION) }
    910  <p>{$INTRODUCTION}</p>
  • extensions/simple_themes/simple/template/tags.tpl

    r13551 r13555  
    1212</div>
    1313<div id="content">
     14{if isset($MENUBAR)}{$MENUBAR}{/if}
    1415{if isset($tags)}
    1516  {if $display_mode == 'cloud'}
  • extensions/simple_themes/simple/template/upload.tpl

    r13551 r13555  
    66</div>
    77<div id="content">
     8{if isset($MENUBAR)}{$MENUBAR}{/if}
    89  {if isset($errors) and count($errors)}
    910  <div class="errors">
  • extensions/simple_themes/simple/themeconf.inc.php

    r13554 r13555  
    22/*
    33Theme Name: Simple Grey
    4 Version: 2.4.3
     4Version: 2.5
    55Description: Simple Grey
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=308
     
    1919  'mime_icon_dir' => 'themes/default/icon/mimetypes/',
    2020  'local_head' => 'local_head.tpl',
    21   'url' => 'http://saimon.org/blog/pages/Theme-Simple-Grey-Piwigo'
     21  'url' => 'http://saimon.org/log/theme-simple-grey-pour-piwigo.html'
    2222);
    2323
    24 global $user;
    25 $user['maxwidth'] = 720;
     24// set this if you want to restrict the width of pictures to a specifc width
     25// global $user;
     26// $user['maxwidth'] = 800;
    2627
    2728load_language('theme.lang', PHPWG_THEMES_PATH.'simple/');
Note: See TracChangeset for help on using the changeset viewer.