Changeset 854


Ignore:
Timestamp:
Jan 19, 2016, 5:25:11 PM (8 years ago)
Author:
chronos
Message:
  • Added: Responsive web layout. Two column layout is switched for single column for devices with smaller display.
  • Modified: All four boxes at front page made as oveflowing defined height.
Location:
trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r852 r854  
    66// and system will need database update.
    77
     8$Version = '1.0-alfa';
    89$Revision = 852; // Subversion revision
    910$DatabaseRevision = 849; // Database structure revision
  • trunk/Modules/Forum/Forum.php

    r852 r854  
    4444    $Count = 20;
    4545    $Output = '<strong><a href="'.$this->System->Link('/forum/').'">'.T('Last forum posts').':</a></strong>';
     46    $Output .= '<div class="box">';
    4647
    4748    $Query = 'SELECT `ForumText`.`Text`, `ForumText`.`Date`, `User`.`Name` AS `UserName`, '.
     
    6061        '</tr>';
    6162    }
    62     $Output .= '</table>';
     63    $Output .= '</table></div>';
    6364    return($Output);
    6465  }
  • trunk/Modules/FrontPage/FrontPage.php

    r850 r854  
    8181
    8282    $Output .= ''.
    83       '<table class="Home"><tr><td colspan="2">'.$this->ShowWelcome().
    84       '</td></tr>';
    85     $Output .= '<tr><td colspan="3"><h3><a href="'.$this->System->Link('/download/').'">'.T('Download files').'</a></h3></td></tr>';
     83      '<div class="Home">'.$this->ShowWelcome().
     84      '</div>';
     85    $Output .= '<div><h3><a href="'.$this->System->Link('/download/').'">'.T('Download files').'</a></h3></div>';
    8686
    87     $Output .= '<tr>'.
    88       '<td class="news-box">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</td>'.
    89       '<td class="SideBox">'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</td>'.
    90       '</tr></table>'.
    91       '<table class="Home"><tr>'.
    92       '<td class="news-box">'.$this->System->ModuleManager->Modules['Forum']->ShowBox().'</td>'.
    93       '<td class="SideBox">'.$this->System->ModuleManager->Modules['Translation']->ShowBox().'</td>'.
    94       '</tr></table>';
     87    $Output .=
     88      '<div class="box-left">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</div>'.
     89      '<div class="box-right">'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</div>'.
     90      '<div class="box-left">'.$this->System->ModuleManager->Modules['Forum']->ShowBox().'</div>'.
     91      '<div class="box-right">'.$this->System->ModuleManager->Modules['Translation']->ShowBox().'</div>';
    9592     return($Output);
    9693  }
  • trunk/Modules/News/News.php

    r850 r854  
    2929  function ShowBox()
    3030  {
    31     $Count = 6;
     31    $Count = 10;
    3232    $Output = '<strong><a href="'.$this->System->Link('/news/').'">'.T('News').':</a></strong>'.
    33     '<div class="NewsBox">';
     33    '<div class="box"><div class="NewsBox">';
    3434    $DbResult = $this->Database->query('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text`,`News`.`Title`, `News`.`Id` '.
    3535      ' FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT '.$Count);
     
    3737    {
    3838      $Output .= '<h4><a href="'.$this->System->Link('/news/?a=item&amp;i='.$DbRow['Id']).'">'.$DbRow['Title'].'</a> ('.HumanDate($DbRow['Time']).')</h4>'.
    39         ' <div>'.$DbRow['Text'].' ('.$DbRow['Name'].')</div>';
     39        '<div>'.$DbRow['Text'].' ('.$DbRow['Name'].')</div>';
    4040    }
    41     $Output .= '</div>';
     41    $Output .= '</div></div>';
    4242    return($Output);
    4343  }
  • trunk/Modules/ShoutBox/ShoutBox.php

    r851 r854  
    3030
    3131    if($this->System->User->Licence(LICENCE_USER))
    32       $Output .= ' <a href="'.$this->System->Link('/shoutbox/?a=add').'">'.T('Add').'</a>';
    33     $Output .= '<div class="box"><table>';
     32      $Output .= '<a href="'.$this->System->Link('/shoutbox/?a=add').'">'.T('Add').'</a>';
     33    $Output .= '<div class="box"><div class="shoutbox"><table>';
    3434    $DbResult = $this->Database->query('SELECT * FROM `ShoutBox` ORDER BY `ID` DESC LIMIT 30');
    3535    while($Line = $DbResult->fetch_assoc())
    3636      $Output .= '<tr><td><strong>'.$Line['UserName'].'</strong>: '.MakeActiveLinks($Line['Text']).'</td></tr>';
    37     $Output .= '</table></div>';
     37    $Output .= '</table></div></div>';
    3838    return($Output);
    3939  }
  • trunk/Modules/Translation/Translation.php

    r850 r854  
    9999    $Count = 40;
    100100    $Output = '<strong>'.T('Last translated').':</strong>';
     101    $Output .= '<div class="box">';
    101102
    102103    $GroupListQuery = 'SELECT `Group`.* FROM `Group`';
     
    131132      $Output .= '</table>';
    132133    }
     134    $Output .= '</div>';
    133135    return($Output);
    134136  }
  • trunk/includes/Global.php

    r848 r854  
    77if(file_exists(dirname(__FILE__).'/../Config/Config.php'))
    88  include_once(dirname(__FILE__).'/../Config/Config.php');
     9  else die('Config file Config/Config.php not found');
    910include_once(dirname(__FILE__).'/../Application/Version.php');
    1011include_once(dirname(__FILE__).'/Locale.php');
  • trunk/includes/System.php

    r853 r854  
    493493    if($this->Title != '') $Title = $this->Title.' - '.$Title;
    494494    $Output .= '<title>'.$Title.'</title>'.
     495    '<script src="'.$this->System->Link('/style/respond.js').'"></script>'.
    495496    '</head><body>';
    496497
     
    508509  function ShowFooter()
    509510  {
    510     global $ScriptStartTime, $Revision, $ReleaseTime;
     511    global $ScriptStartTime, $Revision, $ReleaseTime, $Version;
    511512
    512513    $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2);
     
    517518    $Output .= '</td>'.
    518519      '</tr><tr>'.
    519       '<td colspan="4" class="page-bottom">'.T('Version').': '.$Revision.' ('.HumanDate($ReleaseTime).')'.
     520      '<td colspan="4" class="page-bottom">'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('.HumanDate($ReleaseTime).')'.
    520521      ' &nbsp; <a href="http://svn.zdechov.net/trac/wowpreklad/browser/trunk">'.T('Source code').'</a> &nbsp; '.
    521522      '<a href="http://svn.zdechov.net/trac/wowpreklad/log/trunk?verbose=on">'.T('Changelog').'</a> &nbsp; '.
  • trunk/locale/cs.php

    r851 r854  
    499499        'Post' => 'Příspěvek',
    500500        'Export %s of translator %s' => 'Export %s překladatele %s',
     501        'Revision' => 'Revize',
    501502      ),
    502503      'URL' => array(
  • trunk/style/style.css

    r850 r854  
    257257.box
    258258{
    259   overflow: auto;
     259  overflow: auto;
     260  height: 400px;
     261}
     262
     263.shoutbox
     264{
    260265  width: 100%;
    261   height: 500px;
    262266  font-size: 80%;
    263267  border-width: 1px;
     
    595599  font-weight: normal;
    596600}
     601
     602/* Mobile Layout: 480px and below. */
     603
     604.box-left {
     605  clear: both;
     606  float: left;
     607  margin-left: 0;
     608  width: 100%
     609  display: block;
     610  margin-bottom: 10px;
     611}
     612 
     613.box-right {
     614  clear: none;
     615  float: left;
     616  margin-left: 0;
     617  width: 100%;
     618  display: block;
     619  margin-bottom: 10px;
     620}
     621
     622/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
     623@media screen and (min-width: 480px) {
     624
     625.box-left {
     626  clear: both;
     627  float: left;
     628  margin-left: 0;
     629  width: 100%
     630  display: block;
     631  margin-bottom: 10px;
     632}
     633 
     634.box-right {
     635  clear: none;
     636  float: left;
     637  margin-left: 0;
     638  width: 100%;
     639  display: block;
     640  margin-bottom: 10px;
     641}
     642 
     643}
     644
     645/* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
     646@media only screen and (min-width: 769px) {
     647 
     648.box-left {
     649  clear: both;
     650  float: left;
     651  margin-left: 0;
     652  width: 49%;
     653  display: block;
     654  margin-bottom: 10px;
     655}
     656 
     657.box-right {
     658  clear: none;
     659  float: left;
     660  margin-left: 1%;
     661  width: 49%;
     662  display: block;
     663  margin-bottom: 10px;
     664}
     665
     666}
Note: See TracChangeset for help on using the changeset viewer.