44# ##
55# ## Contact: Nik Lilovski (nik.lilovski@outlook.com)
66# ##
7- # ## Last updated: 04 March 2018
7+ # ## Last updated: 15 February 2019
88# ##
99# ' dashboardthemes: a package for custom themes in shinydashboard applications
1010# '
@@ -340,6 +340,10 @@ shinyDashboardLogo <- function(theme){
340340# '
341341# ' @param appFontFamily String. Application font.
342342# ' @param appFontColor String. Application font colour.
343+ # ' @param primaryFontColor String. Primary status highlight font colour.
344+ # ' @param successFontColor String. Success status highlight font colour.
345+ # ' @param warningFontColor String. Warning status highlight font colour.
346+ # ' @param dangerFontColor String. Danger status highlight font colour.
343347# ' @param bodyBackColor String. Main page background colour.
344348# ' @param logoBackColor String. Logo background colour.
345349# ' @param headerButtonBackColor String. Sidebar toggle button background colour.
@@ -419,6 +423,10 @@ shinyDashboardLogo <- function(theme){
419423# ' ### general
420424# ' appFontFamily = "Arial"
421425# ' ,appFontColor = "rgb(0,0,0)"
426+ # ' ,primaryFontColor = "rgb(0,0,0)"
427+ # ' ,successFontColor = "rgb(0,0,0)"
428+ # ' ,warningFontColor = "rgb(0,0,0)"
429+ # ' ,dangerFontColor = "rgb(0,0,0)"
422430# ' ,bodyBackColor = "rgb(248,248,248)"
423431# '
424432# ' ### header
@@ -536,22 +544,24 @@ shinyDashboardLogo <- function(theme){
536544# ' )
537545# ' @seealso \code{\link{shinyDashboardThemes}, \link{shinyDashboardLogoDIY}, \link{cssGradientThreeColors}}
538546# ' @export
539- shinyDashboardThemeDIY <- function (appFontFamily , appFontColor , logoBackColor , bodyBackColor , headerButtonBackColor , headerButtonIconColor ,
540- headerButtonBackColorHover , headerButtonIconColorHover , headerBackColor , headerBoxShadowColor ,
541- headerBoxShadowSize , sidebarBackColor , sidebarPadding , sidebarShadowRadius , sidebarShadowColor ,
542- sidebarMenuBackColor , sidebarMenuPadding , sidebarMenuBorderRadius , sidebarUserTextColor , sidebarSearchBackColor ,
543- sidebarSearchIconColor , sidebarSearchBorderColor , sidebarTabTextColor , sidebarTabTextSize , sidebarTabBorderStyle ,
544- sidebarTabBorderColor , sidebarTabBorderWidth , sidebarTabBackColorSelected , sidebarTabTextColorSelected ,
545- sidebarTabRadiusSelected , sidebarTabTextColorHover , sidebarTabBackColorHover , sidebarTabBorderStyleHover ,
546- sidebarTabBorderColorHover , sidebarTabBorderWidthHover , sidebarTabRadiusHover , boxBackColor , boxBorderRadius ,
547- boxShadowSize , boxShadowColor , boxTitleSize , boxDefaultColor , boxPrimaryColor , boxSuccessColor , boxWarningColor ,
548- boxDangerColor , tabBoxTabColor , tabBoxTabTextSize , tabBoxTabTextColor , tabBoxTabTextColorSelected , tabBoxBackColor ,
549- tabBoxHighlightColor , tabBoxBorderRadius , buttonBackColor , buttonTextColor , buttonBorderColor , buttonBorderRadius ,
550- buttonBackColorHover , buttonTextColorHover , buttonBorderColorHover , buttonHeight = 34 , buttonPadding = " 6px 12px" ,
551- textboxBackColor , textboxBorderColor , textboxBorderRadius , textboxBackColorSelect , textboxBorderColorSelect ,
552- textboxHeight = 34 , textboxPadding = " 6px 12px" , tableBackColor , tableBorderColor ,
553- tableBorderTopSize , tableBorderRowSize ) {
554-
547+ shinyDashboardThemeDIY <- function (
548+ appFontFamily , appFontColor , logoBackColor , bodyBackColor , headerButtonBackColor , headerButtonIconColor ,
549+ headerButtonBackColorHover , headerButtonIconColorHover , headerBackColor , headerBoxShadowColor ,
550+ headerBoxShadowSize , sidebarBackColor , sidebarPadding , sidebarShadowRadius , sidebarShadowColor ,
551+ sidebarMenuBackColor , sidebarMenuPadding , sidebarMenuBorderRadius , sidebarUserTextColor , sidebarSearchBackColor ,
552+ sidebarSearchIconColor , sidebarSearchBorderColor , sidebarTabTextColor , sidebarTabTextSize , sidebarTabBorderStyle ,
553+ sidebarTabBorderColor , sidebarTabBorderWidth , sidebarTabBackColorSelected , sidebarTabTextColorSelected ,
554+ sidebarTabRadiusSelected , sidebarTabTextColorHover , sidebarTabBackColorHover , sidebarTabBorderStyleHover ,
555+ sidebarTabBorderColorHover , sidebarTabBorderWidthHover , sidebarTabRadiusHover , boxBackColor , boxBorderRadius ,
556+ boxShadowSize , boxShadowColor , boxTitleSize , boxDefaultColor , boxPrimaryColor , boxSuccessColor , boxWarningColor ,
557+ boxDangerColor , tabBoxTabColor , tabBoxTabTextSize , tabBoxTabTextColor , tabBoxTabTextColorSelected , tabBoxBackColor ,
558+ tabBoxHighlightColor , tabBoxBorderRadius , buttonBackColor , buttonTextColor , buttonBorderColor , buttonBorderRadius ,
559+ buttonBackColorHover , buttonTextColorHover , buttonBorderColorHover , buttonHeight = 34 , buttonPadding = " 6px 12px" ,
560+ textboxBackColor , textboxBorderColor , textboxBorderRadius , textboxBackColorSelect , textboxBorderColorSelect ,
561+ textboxHeight = 34 , textboxPadding = " 6px 12px" , tableBackColor , tableBorderColor ,
562+ tableBorderTopSize , tableBorderRowSize , primaryFontColor = " auto" , successFontColor = " auto" ,
563+ warningFontColor = " auto" , dangerFontColor = " auto"
564+ ) {
555565
556566 htmltools :: tags $ head(
557567
@@ -810,8 +820,8 @@ shinyDashboardThemeDIY <- function(appFontFamily, appFontColor, logoBackColor, b
810820 }
811821
812822 /* box: primary color */
813- .box.box-solid.box-primary>.box-header, .box.box-primary>.box-header {
814- color: ' , appFontColor , ' ;
823+ .box.box-solid.box-primary>.box-header h3 , .box.box-primary>.box-header h3 {
824+ color: ' , primaryFontColor , ' ;
815825 }
816826 .box.box-solid.box-primary>.box-header {
817827 background: ' , boxPrimaryColor , ' ;
@@ -826,8 +836,8 @@ shinyDashboardThemeDIY <- function(appFontFamily, appFontColor, logoBackColor, b
826836 }
827837
828838 /* box: success color */
829- .box.box-solid.box-success>.box-header, .box.box-success>.box-header {
830- color: ' , appFontColor , ' ;
839+ .box.box-solid.box-success>.box-header h3 , .box.box-success>.box-header h3 {
840+ color: ' , successFontColor , ' ;
831841 }
832842 .box.box-solid.box-success>.box-header {
833843 background: ' , boxSuccessColor , ' ;
@@ -842,8 +852,8 @@ shinyDashboardThemeDIY <- function(appFontFamily, appFontColor, logoBackColor, b
842852 }
843853
844854 /* box: warning color */
845- .box.box-solid.box-warning>.box-header, .box.box-warning>.box-header {
846- color: ' , appFontColor , ' ;
855+ .box.box-solid.box-warning>.box-header h3 , .box.box-warning>.box-header h3 {
856+ color: ' , warningFontColor , ' ;
847857 }
848858 .box.box-solid.box-warning>.box-header {
849859 background: ' , boxWarningColor , ' ;
@@ -858,8 +868,8 @@ shinyDashboardThemeDIY <- function(appFontFamily, appFontColor, logoBackColor, b
858868 }
859869
860870 /* box: danger color */
861- .box.box-solid.box-danger>.box-header, .box.box-danger>.box-header {
862- color: ' , appFontColor , ' ;
871+ .box.box-solid.box-danger>.box-header h3 , .box.box-danger>.box-header h3 {
872+ color: ' , dangerFontColor , ' ;
863873 }
864874 .box.box-solid.box-danger>.box-header {
865875 background: ' , boxDangerColor , ' ;
@@ -1276,6 +1286,10 @@ theme_blue_gradient <- shinyDashboardThemeDIY(
12761286 # ## general
12771287 appFontFamily = " Arial"
12781288 ,appFontColor = " rgb(0,0,0)"
1289+ ,primaryFontColor = " rgb(0,0,0)"
1290+ ,successFontColor = " rgb(0,0,0)"
1291+ ,warningFontColor = " rgb(0,0,0)"
1292+ ,dangerFontColor = " rgb(0,0,0)"
12791293 ,bodyBackColor = " rgb(248,248,248)"
12801294
12811295 # ## header
@@ -1400,6 +1414,10 @@ theme_boe_website <- shinyDashboardThemeDIY(
14001414 # ## general
14011415 appFontFamily = " Arial"
14021416 ,appFontColor = " rgb(42,102,98)"
1417+ ,primaryFontColor = " rgb(0,0,0)"
1418+ ,successFontColor = " rgb(0,0,0)"
1419+ ,warningFontColor = " rgb(0,0,0)"
1420+ ,dangerFontColor = " rgb(0,0,0)"
14031421 ,bodyBackColor = " rgb(255,255,254)"
14041422
14051423 # ## header
@@ -1500,6 +1518,10 @@ theme_grey_light <- shinyDashboardThemeDIY(
15001518 # ## general
15011519 appFontFamily = " Arial"
15021520 ,appFontColor = " rgb(45,45,45)"
1521+ ,primaryFontColor = " rgb(15,15,15)"
1522+ ,successFontColor = " rgb(15,15,15)"
1523+ ,warningFontColor = " rgb(15,15,15)"
1524+ ,dangerFontColor = " rgb(15,15,15)"
15031525 ,bodyBackColor = " rgb(240,240,240)"
15041526
15051527 # ## header
@@ -1599,6 +1621,10 @@ theme_grey_dark <- shinyDashboardThemeDIY(
15991621 # ## general
16001622 appFontFamily = " Arial"
16011623 ,appFontColor = " rgb(205,205,205)"
1624+ ,primaryFontColor = " rgb(255,255,255)"
1625+ ,successFontColor = " rgb(255,255,255)"
1626+ ,warningFontColor = " rgb(255,255,255)"
1627+ ,dangerFontColor = " rgb(255,255,255)"
16021628 ,bodyBackColor = " rgb(45,55,65)"
16031629
16041630 # ## header
@@ -1699,6 +1725,10 @@ theme_onenote <- shinyDashboardThemeDIY(
16991725 # ## general
17001726 appFontFamily = " Arial"
17011727 ,appFontColor = " rgb(0,0,0)"
1728+ ,primaryFontColor = " rgb(0,0,0)"
1729+ ,successFontColor = " rgb(0,0,0)"
1730+ ,warningFontColor = " rgb(0,0,0)"
1731+ ,dangerFontColor = " rgb(0,0,0)"
17021732 ,bodyBackColor = " rgb(255,255,255)"
17031733
17041734 # ## header
@@ -1823,6 +1853,10 @@ theme_poor_mans_flatly <- shinyDashboardThemeDIY(
18231853 # ## general
18241854 appFontFamily = " Arial"
18251855 ,appFontColor = " rgb(33,37,41)"
1856+ ,primaryFontColor = " rgb(245,245,245)"
1857+ ,successFontColor = " rgb(33,37,41)"
1858+ ,warningFontColor = " rgb(33,37,41)"
1859+ ,dangerFontColor = " rgb(33,37,41)"
18261860 ,bodyBackColor = " rgb(255,255,255)"
18271861
18281862 # ## header
@@ -1923,6 +1957,10 @@ theme_purple_gradient <- shinyDashboardThemeDIY(
19231957 # ## general
19241958 appFontFamily = " Arial"
19251959 ,appFontColor = " rgb(128,177,221)"
1960+ ,primaryFontColor = " rgb(255,255,255)"
1961+ ,successFontColor = " rgb(255,255,255)"
1962+ ,warningFontColor = " rgb(255,255,255)"
1963+ ,dangerFontColor = " rgb(255,255,255)"
19261964 ,bodyBackColor = cssGradientThreeColors(
19271965 direction = " down"
19281966 ,colorStart = " rgb(49,56,107)"
0 commit comments