From 2fc02ed33a741d84d208cb6790a6dfe632881aaf Mon Sep 17 00:00:00 2001 From: acanas Date: Tue, 28 Dec 2021 11:46:57 +0100 Subject: [PATCH] Version 21.76.3: Dec 28, 2021 Working on design of dark theme. --- css/{swad21.76.css => swad21.76.3.css} | 13 +++++++------ swad_changelog.h | 5 +++-- swad_follow.c | 20 +++++++++++++------- swad_profile.c | 8 ++++---- 4 files changed, 27 insertions(+), 19 deletions(-) rename css/{swad21.76.css => swad21.76.3.css} (99%) diff --git a/css/swad21.76.css b/css/swad21.76.3.css similarity index 99% rename from css/swad21.76.css rename to css/swad21.76.3.css index c3a00130..60592028 100644 --- a/css/swad21.76.css +++ b/css/swad21.76.3.css @@ -4070,14 +4070,12 @@ a.PAG:hover, .PAG_CUR /***************************** Calls for exams *******************************/ .EXAM_TIT { - /* font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; */ color:#202020; font-weight:bold; font-size:18pt; } .EXAM { - /* font-family:Garamond,"DejaVu LGC Serif","Bitstream Vera Serif",serif; */ color:#202020; font-size:13pt; } @@ -4130,12 +4128,15 @@ a.PAG:hover, .PAG_CUR } .PRF_FIG_LI { - padding:0 0 0 20px; - background-size:16px 16px; - background-repeat:no-repeat; - background-position:left center; opacity:0.7; } +.PRF_FIG_ICO + { + display:inline-block; + width:30px; + text-align:center; + vertical-align:middle; + } #following_side { diff --git a/swad_changelog.h b/swad_changelog.h index 881224fb..30bc3734 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -602,10 +602,11 @@ 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. */ -#define Log_PLATFORM_VERSION "SWAD 21.76.2 (2021-12-27)" -#define CSS_FILE "swad21.76.css" +#define Log_PLATFORM_VERSION "SWAD 21.76.3 (2021-12-28)" +#define CSS_FILE "swad21.76.3.css" #define JS_FILE "swad21.67.4.js" /* + Version 21.76.3: Dec 28, 2021 Working on design of dark theme. (322293 lines) Version 21.76.2: Dec 27, 2021 Working on design of dark theme. (322282 lines) Copy the following icons to icon public directory: sudo cp icon/first-day-of-week-0.png /var/www/html/swad/icon/ diff --git a/swad_follow.c b/swad_follow.c index e431dac0..aebc8792 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -25,7 +25,9 @@ /*********************************** Headers *********************************/ /*****************************************************************************/ +#define _GNU_SOURCE // For asprintf #include // For boolean type +#include // For asprintf #include // For string functions #include "swad_box.h" @@ -264,11 +266,10 @@ static void Fol_PutIconToUpdateWhoToFollow (void) { extern const char *Txt_Update; - Frm_BeginForm (ActSeeSocPrf); - HTM_BUTTON_Animated_Begin (Txt_Update,"BT_LINK",NULL); - Ico_PutCalculateIcon (Txt_Update); - HTM_BUTTON_End (); - Frm_EndForm (); + Lay_PutContextualLinkOnlyIcon (ActSeeSocPrf,NULL, + NULL,NULL, + "recycle.svg",Ico_BLACK, + Txt_Update); } /*****************************************************************************/ @@ -744,13 +745,18 @@ static void Fol_PutInactiveIconToFollowUnfollow (void) static void Fol_PutIconToFollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]) { + extern const char *Ico_ClassColor[Ico_NUM_COLORS][The_NUM_THEMES]; extern const char *Txt_Follow; + char *Class; /***** Form to unfollow *****/ Frm_BeginForm (ActFolUsr); Usr_PutParamUsrCodEncrypted (EncryptedUsrCod); - HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-plus.svg", - Txt_Follow,"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16"); + if (asprintf (&Class,"FOLLOW_USR_ICO %s ICO_HIGHLIGHT ICO16x16", + Ico_ClassColor[Ico_BLACK][Gbl.Prefs.Theme]) < 0) + Err_NotEnoughMemoryExit (); + HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-plus.svg",Txt_Follow,Class); + free (Class); Frm_EndForm (); } diff --git a/swad_profile.c b/swad_profile.c index 0c08fd4b..8936d676 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -756,10 +756,10 @@ static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat, static void Prf_BeginListItem (const char *Title,const char *Icon) { - HTM_LI_Begin ("title=\"%s\" class=\"PRF_FIG_LI\"" - " style=\"background-image:url('%s/%s');\"", - Title, - Cfg_URL_ICON_PUBLIC,Icon); + HTM_LI_Begin ("title=\"%s\" class=\"PRF_FIG_LI\"",Title); + HTM_DIV_Begin ("class=\"PRF_FIG_ICO\""); + Ico_PutIcon (Icon,Ico_BLACK,Title,"CONTEXT_ICO_x16"); + HTM_DIV_End (); } static void Prf_EndListItem (void)