Skip to content

Commit 8bc6f12

Browse files
authored
Merge pull request oskariorg#38 from ZakarFin/nav-bar-from-theme
Use navbar styling from theme instead of base HTML
2 parents ff931c1 + 7f499fc commit 8bc6f12

File tree

6 files changed

+67
-74
lines changed

6 files changed

+67
-74
lines changed

app-resources/src/main/java/flyway/example/V1_1_3__test_appsetup.java app-resources/src/main/java/flyway/example/V1_1_3__add_stylized_appsetup.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.flywaydb.core.api.migration.Context;
55
import org.oskari.helpers.AppSetupHelper;
66

7-
public class V1_1_3__test_appsetup extends BaseJavaMigration {
7+
public class V1_1_3__add_stylized_appsetup extends BaseJavaMigration {
88

99
public void migrate(Context context) throws Exception {
1010
// add applications based on json under /src/main/resources/json/apps/

app-resources/src/main/resources/json/apps/geoportal-3067.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"accent": "#00BFFF",
2121
"text": "#000000"
2222
},
23+
"navigation": {
24+
"color": {
25+
"primary": "#FFFFFF"
26+
}
27+
},
2328
"map": {
2429
"font": "verdana",
2530
"color": {

app-resources/src/main/resources/json/apps/geoportal-3067_stylized.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"accent": "#f55172",
2121
"text": "#FFFFFF"
2222
},
23+
"navigation": {
24+
"color": {
25+
"primary": "#42000d"
26+
}
27+
},
2328
"map": {
2429
"font": "fantasy",
2530
"color": {

webapp-map/src/main/webapp/WEB-INF/jsp/geoportal.jsp

+3-6
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
height: 100%;
3131
width: 100%;
3232
}
33-
#maptools {
34-
/* for application to set */
35-
background-color: #333438;
36-
}
3733
3834
#login {
3935
margin-left: 5px;
@@ -86,7 +82,8 @@
8682

8783
<div id="oskari">
8884
<!--
89-
Container to render Oskari in. Consider creating nav element and div#contentMap in JS-code
85+
By default Oskari renders to container with id "oskari" or if one is not found to body element directly.
86+
Nav element needs to be in base-HTML for now. We should consider creating nav element in JS-code like div#contentMap etc currently is-
9087
TODO: frontend should generate this as well. An empty element with id="oskari" or similar should be enough.
9188
-->
9289
<nav id="maptools">
@@ -178,7 +175,7 @@ function changeAppsetup(parUuid) {
178175
Oskari.on("app.start", function () {
179176
var container = jQuery('#demolink');
180177
container.empty();
181-
container.append('<select>')
178+
container.append('<select title="Select application">')
182179
var select = container.find("select");
183180
184181
select.on("change", function() {

webapp-map/src/main/webapp/WEB-INF/jsp/geoportal_stylized.jsp

+19-2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@
8383
margin: 8px;
8484
}
8585
86+
.oskari-tile {
87+
background: #3b000b !important;
88+
border-bottom: 1px solid rgb(60, 60, 60, 0.8) !important;
89+
}
90+
91+
.oskari-tile-attached {
92+
background-color: #c6b2b6 !important;
93+
}
94+
95+
.oskari-tile-attached .oskari-tile-title {
96+
color: black !important;
97+
}
98+
99+
.oskari-tile-closed .oskari-tile-title {
100+
color: white !important;
101+
}
102+
86103
#login input[type="text"], #login input[type="password"] {
87104
display: inline-block;
88105
margin-bottom: 5px;
@@ -128,7 +145,7 @@
128145
</head>
129146
<body>
130147
<header class="serviceheader">
131-
<h1>Palvelu X</h1>
148+
<h1>Stylized service example</h1>
132149

133150
<div id="login">
134151
<c:choose>
@@ -225,7 +242,7 @@ function changeAppsetup(parUuid) {
225242
Oskari.on("app.start", function () {
226243
var container = jQuery('#demolink');
227244
container.empty();
228-
container.append('<select>')
245+
container.append('<select title="Select application">')
229246
var select = container.find("select");
230247
231248
select.on("change", function() {

webapp-map/src/main/webapp/WEB-INF/jsp/geoportal_white.jsp

+34-65
Original file line numberDiff line numberDiff line change
@@ -18,79 +18,48 @@
1818
href="${clientDomain}/Oskari${path}/oskari.min.css"/>
1919
<style type="text/css">
2020
@media screen {
21-
body {
22-
margin: 0;
23-
padding: 0;
21+
.oskari-tile {
22+
background: #9e9e9e !important;
23+
border-bottom: 1px solid #c8c9ca !important;
2424
}
25-
26-
#maptools {
27-
background-color: #FFFFFF;
28-
width: 170px;
25+
.oskari-tile-closed {
26+
background-color: white !important;
27+
border-top-width: 0px !important;
2928
}
3029
31-
.oskari-tile {
32-
background: #9e9e9e !important;
33-
}
34-
.oskari-tile-closed {
35-
background-color: white !important;
36-
border-top-width: 0px !important;
37-
border-bottom: 1px solid #c8c9ca !important;
38-
}
39-
40-
.oskari-tile-attached {
41-
background-color: #2d2d2d !important;
42-
border-bottom: 1px solid white !important;
43-
border-top: 1px solid #c8c9ca !important;
44-
}
45-
46-
.oskari-tile-attached .oskari-tile-title {
47-
color: white !important;
48-
}
49-
50-
.oskari-tile-closed .oskari-tile-title {
51-
color: black !important;
52-
}
53-
54-
.oskari-flyout-title {
55-
color: white !important;
56-
}
30+
.oskari-tile-attached {
31+
background-color: #2d2d2d !important;
32+
border-bottom: 1px solid white !important;
33+
border-top: 1px solid #c8c9ca !important;
34+
}
5735
58-
.oskari-flyouttoolbar {
59-
background-color: #c8c9ca !important;
60-
background-position: -170px -23px !important;
61-
background-repeat: no-repeat;
62-
}
36+
.oskari-tile-attached .oskari-tile-title {
37+
color: white !important;
38+
}
6339
64-
.oskari-flyoutheading {
65-
background-color: #9e9e9e !important;
66-
border-top: 0px !important;
67-
border-bottom: 0px !important;
68-
}
69-
70-
#toolbar {
71-
margin: 30px 5px 30px 5px !important;
72-
width: auto !important;
73-
border: 1px black solid;
74-
border-radius: 5px;
75-
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.75);
76-
}
40+
.oskari-tile-closed .oskari-tile-title {
41+
color: black !important;
42+
}
7743
78-
#toolbar div.toolrow {
79-
border: 0px;
80-
}
44+
#toolbar {
45+
margin: 30px 5px 30px 5px !important;
46+
width: auto !important;
47+
border: 1px black solid;
48+
border-radius: 5px;
49+
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.75);
50+
}
8151
82-
.divmanazerpopup h3.popupHeader {
83-
background-color: #9e9e9e !important;
84-
color: white;
85-
}
52+
#toolbar div.toolrow {
53+
border: 0px;
54+
}
8655
87-
#logobar {
88-
background-image: url('${clientDomain}/Oskari${path}/oskari_rgb_72.png') !important;
89-
}
56+
#logobar {
57+
background-image: url('${clientDomain}/Oskari${path}/oskari_rgb_72.png') !important;
58+
}
9059
91-
.oskari-tile.statsgrid .statsgrid-functionality .text {
92-
color: white;
93-
}
60+
.oskari-tile.statsgrid .statsgrid-functionality .text {
61+
color: white;
62+
}
9463
#login {
9564
margin-left: 5px;
9665
}
@@ -231,7 +200,7 @@ function changeAppsetup(parUuid) {
231200
Oskari.on("app.start", function () {
232201
var container = jQuery('#demolink');
233202
container.empty();
234-
container.append('<select>')
203+
container.append('<select title="Select application">')
235204
var select = container.find("select");
236205
237206
select.on("change", function() {

0 commit comments

Comments
 (0)