bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.
GNU Lesser General Public License v3.0
794 stars 3.79k forks source link

Custom JS CSS #1643

Closed agustinmono closed 4 years ago

agustinmono commented 4 years ago

I want to make a change to my landing page , but i want to remove all of the current .html and change it to a different one. For that i need certain .js and .css for the carrousel

How can I add custom js / css to the front end? It can be done trough a CDN? where I edit the header, thanks!

farhatahmad commented 4 years ago

You can add links to your js and css by adding links to them in the <head> tag here: ~/greenlight/app/views/layouts/application.html.erb

Or you can just add the js files to ~/greenlight/app/assets/javascripts and css to ~/greenlight/app/assets/stylesheets

agustinmono commented 4 years ago

Great!, but if I add the js files to ~/greenlight/app/assets/javascripts do I need to declare the new files to the compiler or something? Thanks

farhatahmad commented 4 years ago

The javascript no. Rails should automatically pickup on the new file and include it. For the css, you'll need to add a reference to the file you added in ~/greenlight/app/assets/stylesheets/application.scss

agustinmono commented 4 years ago

I just dropped the js files into ~/greenlight/app/assets/javascripts but I dont see them being called anywhere, Rails its not compiling that , css works fine

Edit: Maybe they are beign called in a different order? how can I sort them?

Thanks!

agustinmono commented 4 years ago

Anyone knows why it's not bringing all the JS ? I see just pieces of it. How can I check that all the js is being compiled?

farhatahmad commented 4 years ago

Is there any errors in your browser console?

agustinmono commented 4 years ago

Yes, its says: http://prntscr.com/spkzwj

elaula.com.ar-1590688753283.log

farhatahmad commented 4 years ago

Sounds like an issue with the Javascipt that you loaded in. Did you confirm else where that the Javascript works correctly in a rails application?

agustinmono commented 4 years ago

I cant confirm that works on rails, but I can confirm that works on local in a plain HTML5 I will try with a different landing page and let you know, thanks a lot

agustinmono commented 4 years ago

where can i add the images?

agustinmono commented 4 years ago

it works if I add this?

<%= image_tag ('/greenlight/app/assets/google-logo.png') %>

SOLVED:

HERE IS HOW:

<img src="<%= image_path 'google-logo.png' %>" alt="">