mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Added custom css and include directories which are ignored by git (#4871)
This commit is contained in:
committed by
Daniel Preussker
parent
1504c04fee
commit
b5be6e9271
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,8 +14,10 @@
|
||||
/composer.lock
|
||||
Thumbs.db
|
||||
config.php
|
||||
html/css/custom/*
|
||||
html/plugins/*
|
||||
!html/plugins/Test/
|
||||
includes/custom/*
|
||||
junk
|
||||
logs
|
||||
nbproject
|
||||
|
@@ -17,6 +17,8 @@ This is the API routing file which directs users to the correct API function bas
|
||||
This is the main file which all links within LibreNMS are parsed through. It loads the majority of the relevant includes needed for the control panel to function. CSS and JS files are also loaded here.
|
||||
### html/css
|
||||
All used css files are located here. Apart from legacy files, anything in here is now a symlink.
|
||||
### html/css/custom
|
||||
This is a folder you can put custom css files into that won't interfere with auto updates
|
||||
### html/forms
|
||||
This folder contains all of the files that are dynamically included from an ajax call to html/ajax_form.php.
|
||||
### html/includes
|
||||
|
@@ -83,5 +83,5 @@ It's also possible to write your own parser, the existing one is: includes/port-
|
||||
Once you've created your own then you can enable it with:
|
||||
|
||||
```php
|
||||
$config['port_descr_parser'] = "includes/my-port-descr-parser.inc.php";
|
||||
$config['port_descr_parser'] = "includes/custom/my-port-descr-parser.inc.php";
|
||||
```
|
||||
|
@@ -131,9 +131,11 @@ $config['site_style'] = "light";
|
||||
Currently we have a number of styles which can be set which will alter the navigation bar look. dark, light and mono with light being the default.
|
||||
|
||||
```php
|
||||
$config['stylesheet'] = "css/styles.css";
|
||||
$config['webui']['custom_css'][] = "css/custom/styles.css";
|
||||
```
|
||||
You can override a large number of visual elements by creating your own css stylesheet and referencing it here.
|
||||
You can override a large number of visual elements by creating your own css stylesheet and referencing it here, place any custom css files into
|
||||
`html/css/custom` so they will be ignored by auto updates. You can specify as many css files as you like, the order they are within your config
|
||||
will be the order they are loaded in the browser.
|
||||
|
||||
```php
|
||||
$config['page_refresh'] = "300";
|
||||
|
@@ -148,6 +148,13 @@ if (empty($config['favicon'])) {
|
||||
<link href="css/leaflet.awesome-markers.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo($config['stylesheet']); ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="css/<?php echo $config['site_style']; ?>.css" rel="stylesheet" type="text/css" />
|
||||
<?php
|
||||
|
||||
foreach ((array)$config['webui']['custom_css'] as $custom_css) {
|
||||
echo '<link href="' . $custom_css . '" rel="stylesheet" type="text/css" />';
|
||||
}
|
||||
|
||||
?>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
<script src="js/bootstrap-hover-dropdown.min.js"></script>
|
||||
|
Reference in New Issue
Block a user