0

This is app is merely a training exercise but could come in great use later on.

I'd like to create a one-page website with an animated running code background. I have the code ready in 3 files. HTML, JS and CSS. I want the entire background page to show the running code then later add on the nav-bar with sections on Likes About and Contact.

When trying to do this for some reason once the navbar and other features are added the background returns to white and the content boxes turn black but the running code doesn't show.

What would be the best way to do this?

So far I placed the CSS in app/assets/stylesheets and the js in app/assets/javascript. This didn't work the first time and nothing changed or showed up. giving me this error

Asset was not declared to be precompiled in production. Add Rails.application.config.assets.precompile += %w( matrix.css ) to config/initializers/assets.rb and restart your server

I followed the error message going to config/initializers/assets.rb and entered this code Rails.application.config.assets.precompile += %w( matrix.css ). Once that was done, the background went back to white and content boxes to black with no running code.

FYI I did not write the code from scratch. The is based on Matrix rain animation using HTML5 canvas and javascript. I took apart the code putting both js and css code to external files. Could this be where I went wrong????

PS.1: I am new to ruby on rails so some detailed info or tutorials would be great thanks in advance, now for the question. PS.2: if possible I want to keep the Chinese characters as they look kinda cool :p

Athafoud
  • 2,898
  • 3
  • 40
  • 58
scope
  • 61
  • 1
  • 8

0 Answers0