Version 21.70.6: Dec 20, 2021 Working on design of dark theme.

This commit is contained in:
acanas 2021-12-20 09:34:13 +01:00
parent 88fdeb096d
commit 1512f002cb
4 changed files with 65 additions and 41 deletions

View File

@ -1850,10 +1850,17 @@ a:hover img.CENTER_PHOTO_SHOW
box-sizing:border-box; box-sizing:border-box;
margin:8px auto; margin:8px auto;
padding:12px; padding:12px;
background-color:#fff8e5;
border-radius:2px; border-radius:2px;
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 2px 1px -2px rgba(0,0,0,0.2), 0 1px 5px 0 rgba(0,0,0,0.12); box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 2px 1px -2px rgba(0,0,0,0.2), 0 1px 5px 0 rgba(0,0,0,0.12);
} }
.ALERT_BG_WHITE {background-color:#fff8e5;}
.ALERT_BG_GREY {background-color:#fff8e5;}
.ALERT_BG_PURPLE {background-color:#fff8e5;}
.ALERT_BG_BLUE {background-color:#fff8e5;}
.ALERT_BG_YELLOW {background-color:#fff8e5;}
.ALERT_BG_PINK {background-color:#fff8e5;}
.ALERT_BG_DARK {background-color:#a0a0a0;}
.ALERT_CLOSE .ALERT_CLOSE
{ {
float:right; float:right;

View File

@ -359,6 +359,7 @@ void Ale_ShowAlertAndButton1 (Ale_AlertType_t AlertType,const char *fmt,...)
static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Txt) static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Txt)
{ {
extern const char *The_ClassAlertBackground[The_NUM_THEMES];
extern const char *Txt_Close; extern const char *Txt_Close;
char IdAlert[Frm_MAX_BYTES_ID + 1]; char IdAlert[Frm_MAX_BYTES_ID + 1];
static const bool AlertClosable[Ale_NUM_ALERT_TYPES] = static const bool AlertClosable[Ale_NUM_ALERT_TYPES] =
@ -386,7 +387,7 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx
if (!Gbl.Layout.HTMLStartWritten) if (!Gbl.Layout.HTMLStartWritten)
Lay_WriteStartOfPage (); Lay_WriteStartOfPage ();
/***** Begin box *****/ /***** Begin container *****/
if (AlertClosable[AlertType]) if (AlertClosable[AlertType])
{ {
/* Create unique id for alert */ /* Create unique id for alert */
@ -395,27 +396,30 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx
} }
else else
HTM_DIV_Begin ("class=\"CM\""); HTM_DIV_Begin ("class=\"CM\"");
HTM_DIV_Begin ("class=\"ALERT\"");
/***** Icon to close the alert *****/ /***** Begin box *****/
if (AlertClosable[AlertType]) HTM_DIV_Begin ("class=\"ALERT %s\"",
{ The_ClassAlertBackground[Gbl.Prefs.Theme]);
HTM_DIV_Begin ("class=\"ALERT_CLOSE\"");
HTM_A_Begin ("href=\"\" onclick=\"toggleDisplay('%s');return false;\" /", /***** Icon to close the alert *****/
IdAlert); if (AlertClosable[AlertType])
Ico_PutIcon ("times.svg",Txt_Close,"ICO16x16"); {
HTM_A_End (); HTM_DIV_Begin ("class=\"ALERT_CLOSE\"");
HTM_A_Begin ("href=\"\" onclick=\"toggleDisplay('%s');return false;\" /",
IdAlert);
Ico_PutIcon ("times.svg",Txt_Close,"ICO16x16");
HTM_A_End ();
HTM_DIV_End ();
}
/***** Write message *****/
if (AlertType == Ale_NONE)
HTM_DIV_Begin ("class=\"ALERT_TXT\"");
else
HTM_DIV_Begin ("class=\"ALERT_TXT\" style=\"background-image:url('%s/%s');\"",
Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]);
HTM_Txt (Txt);
HTM_DIV_End (); HTM_DIV_End ();
}
/***** Write message *****/
if (AlertType == Ale_NONE)
HTM_DIV_Begin ("class=\"ALERT_TXT\"");
else
HTM_DIV_Begin ("class=\"ALERT_TXT\" style=\"background-image:url('%s/%s');\"",
Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]);
HTM_Txt (Txt);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -426,28 +430,30 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
void (*FuncParams) (void *Args),void *Args, void (*FuncParams) (void *Args),void *Args,
Btn_Button_t Button,const char *TxtButton) Btn_Button_t Button,const char *TxtButton)
{ {
/***** Optional button *****/ /***** Optional button *****/
if (NextAction != ActUnk && if (NextAction != ActUnk &&
Button != Btn_NO_BUTTON && Button != Btn_NO_BUTTON &&
TxtButton) TxtButton)
if (TxtButton[0]) if (TxtButton[0])
{ {
/* Begin form */ /* Begin form */
Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,OnSubmit); Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,OnSubmit);
if (FuncParams) if (FuncParams)
{ {
FuncParams (Args); FuncParams (Args);
} }
/* Put button */ /* Put button */
Btn_PutButton (Button,TxtButton); Btn_PutButton (Button,TxtButton);
/* End form */ /* End form */
Frm_EndForm (); Frm_EndForm ();
} }
/***** End box *****/ /***** End box *****/
HTM_DIV_End (); HTM_DIV_End ();
/***** End container *****/
HTM_DIV_End (); HTM_DIV_End ();
} }

View File

@ -602,7 +602,7 @@ TODO: FIX BUG, URGENT! En las fechas como par
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.70.4 (2021-12-18)" #define Log_PLATFORM_VERSION "SWAD 21.70.6 (2021-12-20)"
#define CSS_FILE "swad21.70.1.css" #define CSS_FILE "swad21.70.1.css"
#define JS_FILE "swad21.67.4.js" #define JS_FILE "swad21.67.4.js"
/* /*

View File

@ -393,6 +393,17 @@ const char *The_ClassFrameTitleColor[The_NUM_THEMES] =
[The_THEME_DARK ] = "FRAME_TITLE_DARK", [The_THEME_DARK ] = "FRAME_TITLE_DARK",
}; };
const char *The_ClassAlertBackground[The_NUM_THEMES] =
{
[The_THEME_WHITE ] = "ALERT_BG_WHITE",
[The_THEME_GREY ] = "ALERT_BG_GREY",
[The_THEME_PURPLE] = "ALERT_BG_PURPLE",
[The_THEME_BLUE ] = "ALERT_BG_BLUE",
[The_THEME_YELLOW] = "ALERT_BG_YELLOW",
[The_THEME_PINK ] = "ALERT_BG_PINK",
[The_THEME_DARK ] = "ALERT_BG_DARK",
};
/*****************************************************************************/ /*****************************************************************************/
/****************************** Private prototypes ***************************/ /****************************** Private prototypes ***************************/
/*****************************************************************************/ /*****************************************************************************/