1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Move rack elevation CSS to project-static/rack_elevation.css

This commit is contained in:
Jeremy Stretch
2020-01-15 14:05:44 -05:00
parent fdf8211e9a
commit aefe2b4196
3 changed files with 60 additions and 62 deletions

View File

@@ -375,7 +375,8 @@ class RackElevationHelperMixin:
drawing = svgwrite.Drawing(size=(width, height))
# add the stylesheet
drawing.defs.add(drawing.style(RACK_ELEVATION_STYLE))
with open('{}/css/rack_elevation.css'.format(settings.STATICFILES_DIRS[0])) as css_file:
drawing.defs.add(drawing.style(css_file.read()))
# add gradients
RackElevationHelperMixin._add_gradient(drawing, 'reserved', '#c7c7ff')