-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnotes.txt
116 lines (94 loc) · 3.05 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Create logo.svg (797x228 pixels)
Create bg.png (2040x1450 pixels)
Create nav-bg.png (2040x118 pixels)
scp images to instance
cd /opt/stack/horizon/openstack_dashboard/
mkdir -p themes/ghc/static/img
mkdir -p themes/ghc/templates/auth
mkdir -p themes/ghc/templates/header
cp /home/stack/logo.svg /opt/stack/horizon/openstack_dashboard/themes/ghc/static/img/logo.svg
cp /home/stack/logo.svg /opt/stack/horizon/openstack_dashboard/themes/ghc/static/img/logo-splash.svg
cp /home/stack/bg.png /opt/stack/horizon/openstack_dashboard/themes/ghc/static/img/
cp /home/stack/nav-bg.png /opt/stack/horizon/openstack_dashboard/themes/ghc/static/img/
cd themes/ghc
Tell theme to load logo-splash for login screen
nano templates/auth/_splash.html
{% load themes %}
<div class="text-center">
<img class="splash-logo" src="{% themable_asset "img/logo-splash.svg" %}">
</div>
nano templates/header/_brand.html
{% load branding %}
{% load themes %}
<a class="navbar-brand" href="{% site_branding_link %}" target="_self">
<img class="openstack-logo" src="{% themable_asset 'img/logo.svg' %}"
alt="{% site_branding %}">
</a>
Tell theme too import the default variables and styles and then set override for navbar
nano static/_variables.scss
@import '/themes/default/variables';
@import '/themes/default/styles';
$navbar-height: 60px;
$navbar-default-toggle-hover-bg: rgba(0,0,0,0.1);
$navbar-default-toggle-icon-bar-bg: #4564E2;
$navbar-default-toggle-border-color: rgba(0,0,0,0.1);
Tell theme to use the following sass changes:
nano static/_styles.scss
#splash {
background: url("/dashboard/static/themes/ghc/img/bg.png");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
.login .splash-logo {
max-width: 100%;
max-height: 100%;
}
}
.navbar-default {
background: url("/dashboard/static/themes/ghc/img/nav-bg.png");
}
.navbar-brand {
/* height: 50px; */
padding-right: 0;
}
.navbar-brand img {
height: 100%;
}
.topbar .switcher_bar .btn.btn-topnav {
color: #4564E2;
margin-top: 1em;
}
.navbar-default .navbar-nav > li > a {
color: #4564E2;
line-height: 41px;
}
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > li > a:hover {
color: #4564E2;
background-color: rgba(0,0,0,0.1);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > .open > a:hover {
color: #4564E2;
background-color: rgba(0,0,0,0.1);
}
nano ../../local/local_settings.py
COMPRESS_OFFLINE = False
COMPRESS_ENABLED = False
SITE_BRANDING = "Dalmatians Furever"
SITE_BRANDING_LINK = "http://www.ghc-openstack.org"
AVAILABLE_THEMES = [
('default', 'Default', 'themes/default'),
('material', 'Material', 'themes/material'),
('ghc', 'ghc', 'themes/ghc'),
]
python /opt/stack/horizon/manage.py collectstatic
sudo service apache2 restart
tox -e manage -- collectstatic
python /opt/stack/horizon/manage.py compress
nano templates/auth/_splash.html
{% load themes %}
<div class="text-center">
<img class="splash-logo" src={% themable_asset "img/logo-splash.svg" %}>
</div>