Home >Web Front-end >HTML Tutorial >openstack horizon CSS offline modify_html/css_WEB-ITnose
Openstack horizon's CSS is mainly stored in several directories, namely horizon/static/dashboard/scss; horizon/openstack_dashboard/static/dashboard/css; and horizon/openstack_dashboard/static/dashboard/scss.
Horzion will compress and store the css in these directories and then use them. Therefore, if you directly modify the css files in these folders or modify the css of horzion as written on the official website (as shown below), you will encounter problems when displaying the page offline. The solution is given below.
The method of modifying openstack horizon’s page css as written on the official website is as follows:
Customize a css file, such as custom.css, as follows, and save it Go to openstack_dashboard/static/dashboard/css
Then modify the openstack_dashboard/templates/_stylesheets.html file and add the following sentence
If you modify the content after starting apache or running manager.py, it will The following error was reported
This is because horzion will treat horizon/templates/horizon/_scripts.html;/openstack_dashboard/templates/_stylesheets.html and /horizon/templates/ The three files horizon/_conf.html are compressed and stored, so local access will cause detection errors after modification.
The solution is as follows:
After each modification is completed, execute the command manage.py compress once, let it re-compress and package, and then restart apache.