diff --git a/css/swad.css b/css/swad.css index 71b133eda..323c1aea2 100644 --- a/css/swad.css +++ b/css/swad.css @@ -348,17 +348,10 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} /*********************** Layout (fourth row, main zone) **********************/ #main_zone { + box-sizing:border-box; display:table; width:100%; } -.LEFT_RIGHT_COL - { - display:table-cell; - width:160px; - text-align:center; - vertical-align:top; - position:absolute; - } .LEFT_RIGHT_CELL { padding:3px 6px; @@ -379,13 +372,11 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} } #left_col { - left:0; - visibility:hidden; + display:none; } #right_col { - right:0; - visibility:hidden; + display:none; } } @media only screen and (min-width: 1280px) { /* For desktop */ @@ -400,7 +391,6 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} display:table-cell; text-align:center; vertical-align:top; - padding-left:160px; } #main_zone_central_right /* Hide left column, show right column */ { @@ -414,23 +404,30 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} display:table-cell; text-align:center; vertical-align:top; - padding-left:160px; padding-right:160px; } #left_col { - left:0; + display:table-cell; + width:160px; + text-align:center; + vertical-align:top; } #right_col { + display:table-cell; + width:160px; + text-align:center; + vertical-align:top; + position:absolute; right:0; } } #main_zone_central_container { - min-width:925px; - min-height:925px; + min-width:900px; + min-height:900px; margin:-8px 0 0 0; padding:10px 0; border-radius:6px; @@ -1496,15 +1493,22 @@ a:hover img.CENTRE_PHOTO_SHOW } /********************************** Page foot ********************************/ +#foot_zone + { + box-sizing:border-box; + padding:20px; + } .FOOT_LIST_CONTAINER { position:relative; float:left; + text-align:left; + padding-bottom:20px; } .FOOT_LIST_TITLE { color:#666; - font-size:1em; + font-size:14pt; font-weight:bold; white-space:nowrap; } @@ -1514,7 +1518,7 @@ a:hover img.CENTRE_PHOTO_SHOW margin:0; padding:0; border-width:0; - font-size:0.9em; + font-size:12pt; white-space:nowrap; line-height:140%; } @@ -1525,5 +1529,5 @@ a:hover img.CENTRE_PHOTO_SHOW .FOOT { color:#A0A0A0; - font-size:10pt; + font-size:12pt; } diff --git a/html/foot.html b/html/foot.html index f673a99c3..42fbb402e 100644 --- a/html/foot.html +++ b/html/foot.html @@ -1,5 +1,5 @@ -
-
+
+ -
+ -
+ -
+ - -
+

Mobile

  • diff --git a/swad_banner.c b/swad_banner.c index d2103b5b5..fab5d9e1e 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -956,6 +956,6 @@ void Ban_ClickOnBanner (void) // See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm // http://elouai.com/force-download.php Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all } diff --git a/swad_changelog.h b/swad_changelog.h index 697c6c816..4b67a1327 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -115,12 +115,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.47.4 (2015/11/27)" +#define Log_PLATFORM_VERSION "SWAD 15.48 (2015/11/27)" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* - Version 15.47.4: Nov 27, 2015 Fixed CSS problem in layout. (? lines) + Version 15.48: Nov 27, 2015 Fixed problems in layout. (186384 lines) + Version 15.47.4: Nov 27, 2015 Fixed CSS problem in layout. (186374 lines) Version 15.47.3: Nov 27, 2015 Responsive design in notifications. (186365 lines) Version 15.47.2: Nov 27, 2015 Responsive design in current local date and time. (? lines) Version 15.47.1: Nov 27, 2015 swad_desktop.css is renamed to swad.css. diff --git a/swad_chat.c b/swad_chat.c index 2648420d1..ed6695897 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -543,5 +543,5 @@ void Cht_OpenChatWindow (void) /***** Close index.html file *****/ fclose (FileChat); - Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; } diff --git a/swad_file.c b/swad_file.c index 7bf51928f..5e5f7a438 100644 --- a/swad_file.c +++ b/swad_file.c @@ -149,7 +149,7 @@ bool Fil_ReadStdinIntoTmpFile (void) /* Don't write HTML at all */ Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; /* Start HTTP response */ diff --git a/swad_file_browser.c b/swad_file_browser.c index 5f4d29095..05ca820c8 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -8172,7 +8172,7 @@ void Brw_RcvFileInFileBrwDropzone (void) is a code status and a message for Dropzone.js *****/ /* Don't write HTML at all */ Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; /* Start HTTP response */ @@ -9273,7 +9273,7 @@ void Brw_DownloadFile (void) // See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm // http://elouai.com/force-download.php Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all } else // !ICanView diff --git a/swad_global.c b/swad_global.c index 1dcad20a8..b33a14899 100644 --- a/swad_global.c +++ b/swad_global.c @@ -118,7 +118,7 @@ void Gbl_InitializeGlobals (void) Gbl.Layout.WritingHTMLStart = Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = false; Gbl.DB.DatabaseIsOpen = false; diff --git a/swad_global.h b/swad_global.h index c6624f6e9..a3056a9cf 100644 --- a/swad_global.h +++ b/swad_global.h @@ -102,7 +102,7 @@ struct Globals { bool WritingHTMLStart; // Used to avoid writing the HTML head when aborting program on error bool HTMLStartWritten; // Used to avoid writing more than once the HTML head - bool TablEndWritten; // Used to avoid writing more than once the HTML end + bool DivsEndWritten; // Used to avoid writing more than once the HTML end bool HTMLEndWritten; // Used to avoid writing more than once the HTML end } Layout; struct diff --git a/swad_layout.c b/swad_layout.c index 23dc7d1e7..cccb775d6 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -132,7 +132,7 @@ void Lay_WriteStartOfPage (void) { fprintf (Gbl.F.Out,"Content-Type: text/html; charset=windows-1252\r\n\r\n"); Gbl.Layout.WritingHTMLStart = false; - Gbl.Layout.HTMLStartWritten = Gbl.Layout.TablEndWritten = true; + Gbl.Layout.HTMLStartWritten = Gbl.Layout.DivsEndWritten = true; return; } @@ -140,7 +140,7 @@ void Lay_WriteStartOfPage (void) if (Gbl.WebService.IsWebService) { Gbl.Layout.WritingHTMLStart = false; - Gbl.Layout.HTMLStartWritten = Gbl.Layout.TablEndWritten = true; + Gbl.Layout.HTMLStartWritten = Gbl.Layout.DivsEndWritten = true; return; } @@ -247,7 +247,7 @@ void Lay_WriteStartOfPage (void) fprintf (Gbl.F.Out,"\n"); Gbl.Layout.WritingHTMLStart = false; Gbl.Layout.HTMLStartWritten = - Gbl.Layout.TablEndWritten = true; + Gbl.Layout.DivsEndWritten = true; return; } @@ -263,20 +263,24 @@ void Lay_WriteStartOfPage (void) /* Left column */ if (Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) // Left column visible { - fprintf (Gbl.F.Out,"
    "); + fprintf (Gbl.F.Out,"
    "); Lay_ShowLeftColumn (); fprintf (Gbl.F.Out,"
    "); } /* Right column */ + // Right column is written before central column + // but it must be drawn at right using "position:absolute; right:0". + // The reason to write right column before central column + // is that central column may hold a lot of content drawn slowly. if (Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN) // Right column visible { - fprintf (Gbl.F.Out,"
    "); + fprintf (Gbl.F.Out,"
    "); Lay_ShowRightColumn (); fprintf (Gbl.F.Out,"
    "); } - /* Central (main) part */ + /* Central (main) column */ switch (Gbl.Prefs.SideCols) { case 0: @@ -349,15 +353,23 @@ void Lay_WriteStartOfPage (void) static void Lay_WriteEndOfPage (void) { - if (!Gbl.Layout.TablEndWritten) + if (!Gbl.Layout.DivsEndWritten) { + /***** End of central part of main zone *****/ fprintf (Gbl.F.Out,"
    " // main_zone_canvas "
    " // main_zone_central_content - "
" // main_zone_central_container - "
" // main_zone_central + "
"); // main_zone_central_container + + /***** Write page footer *****/ + if (Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW) + Lay_WritePageFooter (); + + /***** End of main zone and page *****/ + fprintf (Gbl.F.Out,"
" // main_zone_central "
" // main_zone "
\n"); // whole_page_* (box that contains the whole page except the foot) - Gbl.Layout.TablEndWritten = true; + + Gbl.Layout.DivsEndWritten = true; } } @@ -1218,10 +1230,6 @@ void Lay_ShowErrorAndExit (const char *Message) /***** Compute time to send page *****/ Sta_ComputeTimeToSendPage (); - /***** Write page footer *****/ - if (Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW) - Lay_WritePageFooter (); - /***** Log access *****/ Sta_LogAccess (Message); @@ -1318,7 +1326,7 @@ void Lay_RefreshNotifsAndConnected (void) fprintf (Gbl.F.Out,"%ld|",Gbl.Usrs.Connected.Lst[NumUsr].TimeDiff); /***** All the output is made, so don't write anymore *****/ - Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; } /*****************************************************************************/ @@ -1332,7 +1340,7 @@ void Lay_RefreshLastClicks (void) Con_GetAndShowLastClicks (); /***** All the output is made, so don't write anymore *****/ - Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; + Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; } /*****************************************************************************/ @@ -1344,10 +1352,9 @@ void Lay_WritePageFooter (void) extern const char *Txt_About_X; extern const char *Txt_Questions_and_problems; - Lay_WriteFootFromHTMLFile (); + fprintf (Gbl.F.Out,"