MarkEdmondson1234 / gentelellaShiny

http://code.markedmondson.me/gentelellaShiny/
Other
94 stars 29 forks source link

icon on side bar #9

Open uttam-1996 opened 5 years ago

uttam-1996 commented 5 years ago

the icons on the side bar aren't working even when every icon is working can you please look into it

DivadNojnarg commented 5 years ago

Could you please provide a reproducible example? Thanks

uttam-1996 commented 5 years ago

ui = gentelellaPageCustom( title = "CW Analytics",sidebar_collapsed = T,footer_fixed = F, navbar = gentelellaNavbar(), sidebar = gentelellaSidebar(site_title = shiny::HTML(paste(img(src='oc.png', align = "left",height = 55,width = 62), "hello world Screenshot from 2019-05-03 12-02-16 ")),url = "http://127.0.0.1:7862/",fixed = T,

sidebarMenu(

  sidebarItem(
    shiny::HTML(paste(img(src='stats.png', align = "center",height = 30,width = 45), "Sales")),
    tabName = "tab1"

  ),
  sidebarItem(
    title =   "Members-1",
    tabName = "tab2", 
    icon = icon("info")
  ),
  sidebarItem(
    "Members-2",
    tabName = "tab3", 
    icon = icon("info")
  ),
  sidebarItem(
    "Rewards",
    tabName = "tab4", 
    icon = icon("info")
  ),
  sidebarItem(
    "Sales",
    tabName = "tab5", 
    icon = icon("info")
  )
)

), body = gentelellaBody(

tags$style(type="text/css",

#            ".shiny-output-error { visibility: hidden; }",
#            ".shiny-output-error:before { visibility: hidden; }"
# ),
# tags$link(rel = "stylesheet", type = "text/css", href = "dashboard1.css"),
tabItems(
  source(file.path("uis", "dash1.R"),  local = TRUE)$value,
  source(file.path("uis", "dash2.R"),  local = TRUE)$value,
  source(file.path("uis", "dash3.R"),  local = TRUE)$value,
  source(file.path("uis", "dash4.R"),  local = TRUE)$value
  #source(file.path("uis", "dash5.R"),  local = TRUE)$value

)#tabitems

),#body gentelellaFooter(leftText = "hello", rightText = "2019") )#page

DivadNojnarg commented 5 years ago

The problem comes from this:

The icon function from shiny generates:

<i class="fa fa-info"></I>

However, gentellela needs:

<i class="fas fa-info"></I>

I will fix it asap

uttam-1996 commented 5 years ago

Thanks Divad

DivadNojnarg commented 5 years ago

Actually you can use:

tags$i(class = "fas fa-info")

instead of the classic shiny::icon function.