Bootstrap and CSS won't work with WAMPSERVER? - wampserver

I tried to run my code with atom-live-server and it works beautifully.
with atom-live-server:
However, when I switch to WAMPSERVER my code just doesn't work?
something went wrong with Wampserver:
I am using the latest version of Wampserver and latest version of bootstrap (4.)
And when I inspect the html code on browser it looks like this:
HTML code
I use alias directory that names "phuocsonwebsite" like this: alias directory which contains my project folder
It seems that my problem is Wamp Alias did not automatically change the Url path of Bootstrap so that there are some error that can be viewed with the Network Tab of my browser: Founded Errors
As you can see, other elements are automatically added in the path by "phuocsonwebsite" BUT the bootstrap does not! How can I fix this?

Related

Why won't my external css libraries be found in production with cssbundling-rails?

I have a few css libraries in my rails 7 app, like bootstrap & flatpicker. In development they both load fine, but in production only bootstrap is loading.
I get a "Failed to load resource: the server responded witha status of 404" error in reference to slimselect in the js console. When I look at resources, I can see the file in the path, but the file is empty.
In the Sources tab, I can see bootstrap in the generic css file assets/application-{long-hash}.css, where as slimselect is in assets/slim-select/dist/slimselect.min.css (but no code)
Here is some of my code
app/assets/stylesheets/application.sass.scss
#import 'bootstrap/scss/bootstrap';
#import "slim-select/dist/slimselect.min.css";
I tried removing the file extension from slim select, which fixed it.
But I am curious why and if there is some way to be able to import it the way I originally did but adjusting something else.
I was able to fix this by removing the file extension, which loaded slimselect the same way bootstrap was being loaded.
This was just a random problem and I'm happy to share my solution, but also curious for any other information of why this worked.
#import 'bootstrap/scss/bootstrap';
#import "slim-select/dist/slimselect";

How to install my own firefox extension

I am new to FF extensions development. I work on Windows OS. I am using web extensions. I started my first extension. I created a directory in My Documents which contains my extension files. The files are based on the example in: Your First WebExtension which are: manifest.json, icons/myicon.png, myextension.js. Like the example, all what the extension does is a border aroud mozilla page. This is the js code: document.body.style.border = "5px solid red";
When I come to installing the extension in my browser, I navigated to:about:debugging then I clicked in the Load Temprary Addon button and I selected the the .js file. I get this error: There was an error during installation: Extension is invalid. Can you point what the problem is?
Most likely an error in the manifest.json file. Double-check that code; if it all looks good, try temporarily removing optional things from it, then removing-and-reloading your addon in the debugger until it works. Then you can narrow down what's up (hard to say exactly, without seeing your code). The most minor error in the JSON will result in the addon failing to load (such as an out-of-place bracket, etc).
See also: Anatomy of a WebExtension
Problem with my setup was incorrect use of content_scripts.matches, correct solution for a "match-all" is
"matches": ["*://*/"],
Attribution : https://discourse.mozilla.org/t/web-extensions-noob-getting-there-was-an-error-during-installation-extension-is-invalid/12828/3
The problem was that extensions must be saved in specific directory. In winows, the directory is: C:\Users\"YourUser"\AppData\Roaming\Mozilla\Firefox\Profiles\"YourFireFoxProfile"\extensions
After that, try the steps I mentioned in the original post and you should find the extension added.

Github Pages and SASS - project page does not load images

I have now spent a lot of time to figure this out, but I just can't come up with a solution. Basically a relative link like this just won't work:
background-image: url(../../img/footer_lodyas.png);
I don't know why. In my other project such relative links are working just fine. The only difference is, that here I'm using SASS/SCSS, and I don't know what to do. I already tried to use direct links to the images in the repo, but that also didn't work.
It is also strange, that the SCSS is working, so all styles etc. are there, it is just the URLs which make a problem.
I don't have a _config.yml file, since it is not neccessary anymore for having relative links - well maybe not with a css preprocessor?
so for anyone who is having a similiar problem here is my solution:
I had the path of the URL set to the path of the SCSS-file and not to the main.css, so instead oof having
background-image: url(../../img/footer_lodyas.png);
which would be valid for the path of my SCSS-file I changed it to the path of my main.css. Now everything works fine on github, without even using an _config.yml file.
background-image: url(../img/footer_lodyas.png);
It has to be that way, because my main.css is in a folder called "css" which is in the same folder as my folder "img".

Highcharts, old look of exporting i 3.0

there is some code for changing back to the old look of export buttons even if you're running version 3.0.
It's here:
https://github.com/highslide-software/highcharts.com/blob/master/js/modules/exporting-old-look.src.js
My only question is, how do I include this code into my graph?
You can just copy that javascript into your own project between and tags,
or
you can include it from github in a script tag:
or
You can download it to your own project area and include it in a script tag from your own web server.
The script will load and run when the page loads, so make sure to include it after highcharts.

Redirecting to images path via routes.rb in Ruby

I'm writing a Ruby application and using a 3rd party script that loads images.
The images are located at "/images/modern_images/azure/" for example:
"/images/modern_images/azure/border.jpg"
The script runs in a page located in the "/events/" path and due to a bug, it tries to access the images in:
"/events/modern_images/azure/border.jpg"
The root path is wrong and I can not change the script as it is minified.
How can I do the redirection in routes.rb instead?
Thanks for the help!
modify script& replace 'events' with 'images'. You can make use of :%s/word/word_to_replace inside editor.

Resources