Skip to content

Commit 47b09b2

Browse files
author
Iaroslav Pereiaslovets
committed
conflict fix
2 parents 49eb049 + 72b2f49 commit 47b09b2

36 files changed

Lines changed: 842 additions & 2805 deletions

ckanext/datavic_odp_theme/config.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
CONFIG_BASE_MAP = "ckanext.datavicmain.dtv.base_map_id"
9-
DEFAULT_BASE_MAP = "basemap-vic-topographic"
9+
DEFAULT_BASE_MAP = "basemap-positron"
1010

1111
CONFIG_BASE_URL = "ckanext.datavicmain.odp.public_url"
1212

@@ -21,7 +21,9 @@
2121
"csv-geo-au",
2222
"aus-geo-csv",
2323
]
24+
CONFIG_DTV_MAX_SIZE_LIMIT = "ckanext.datavicmain.dtv.max_size_limit"
2425
CONFIG_DTV_URL = "ckanext.datavic_odp_theme.dtv.url"
26+
CONFIG_DTV_EXTERNAL_LINK = "ckanext.datavic_odp_theme.dtv.external_link"
2527

2628
CONFIG_PARENT_SITE_URL = "ckan.parent_site_url"
2729
DEFAULT_PARENT_SITE_URL = "https://www.data.vic.gov.au"
@@ -48,8 +50,16 @@ def get_dtv_supported_formats() -> set[str]:
4850
}
4951

5052

53+
def get_dtv_max_size_limit() -> str:
54+
return tk.config.get(CONFIG_DTV_MAX_SIZE_LIMIT, "157286400")
55+
56+
5157
def get_dtv_url() -> str:
52-
return tk.config.get("ckanext.datavic_odp_theme.dtv.url", "")
58+
return tk.config.get(CONFIG_DTV_URL, "")
59+
60+
61+
def get_dtv_external_link() -> str:
62+
return tk.config.get(CONFIG_DTV_EXTERNAL_LINK, "")
5363

5464

5565
def get_parent_site_url() -> str:
@@ -74,7 +84,3 @@ def get_hotjar_hjsv() -> Optional[str]:
7484

7585
def get_monsido_domain_token() -> Optional[str]:
7686
return tk.config.get(CONFIG_MONSIDO_DOMAIN_TOKEN)
77-
78-
79-
def get_google_optimize_id() -> Optional[str]:
80-
return tk.config.get(CONFIG_GOOGLE_OPTIMIZE_ID)

ckanext/datavic_odp_theme/grunt/sass/_ckan_reset.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ legend {
137137
.row {
138138
margin-left: 0;
139139
margin-right: 0;
140-
@include rpl_breakpoint(l) {
141-
flex-direction: row-reverse;
142-
}
143140

144141
.primary {
145142
&.span9 {

ckanext/datavic_odp_theme/grunt/sass/_da_form.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,25 @@
178178
}
179179
}
180180
}
181+
182+
.secondary {
183+
.module.context-info {
184+
img {
185+
max-width: 200px;
186+
width: -webkit-fill-available;
187+
}
188+
}
189+
}
190+
191+
@media (max-width: 767.98px) {
192+
.secondary {
193+
-webkit-order: -1;
194+
order: -1;
195+
196+
.module.context-info {
197+
img {
198+
max-height: 150px;
199+
}
200+
}
201+
}
202+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Dataset Additional info styles
2+
.additional-info {
3+
.dataset-details {
4+
ul {
5+
margin-bottom: 0;
6+
7+
li {
8+
&:only-child {
9+
list-style-type: none;
10+
margin-left: -31px;
11+
}
12+
}
13+
}
14+
}
15+
}

ckanext/datavic_odp_theme/grunt/sass/_form.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,18 @@ $rpl-form-textarea-height-m: rem(75px) !default;
122122
select.form-control {
123123
appearance: auto;
124124
}
125+
126+
.dataset-form {
127+
.form-label[for="field-update_frequency"] {
128+
margin-bottom: 0;
129+
}
130+
}
131+
132+
// hide URL button for upload widget
133+
.organization-edit {
134+
.image-upload {
135+
.btn[title*="Link to a URL"] {
136+
display: none !important;
137+
}
138+
}
139+
}

ckanext/datavic_odp_theme/grunt/sass/_menu.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ $rpl-menu-gutter: rpl_grid_get_gutter($rpl-grid) !default;
278278

279279
.rpl-menu--vertical,
280280
.rpl-menu--horizontal-floating-wrapper,
281-
.rpl-menu--horizontal .rpl-menu--subs, {
281+
.rpl-menu--horizontal .rpl-menu--subs {
282282
.rpl-menu__item {
283283
border-top: $rpl-menu-item-border;
284284

@@ -349,10 +349,20 @@ $rpl-menu-gutter: rpl_grid_get_gutter($rpl-grid) !default;
349349
display: inline-block;
350350
}
351351
}
352+
#btn-mobile-menu-open {
353+
.rpl-icon--color_white {
354+
fill: rpl-color("white");
355+
}
356+
}
352357
}
353358
#mobile-menu {
354359
z-index: 1040;
355360
.rpl-site-header__top {
356361
height: 3rem;
357362
}
363+
#btn-mobile-menu-close {
364+
.rpl-icon--color_white {
365+
fill: rpl-color("white");
366+
}
367+
}
358368
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// RESOURCE FORMAT ICONS
2+
3+
$icon-position: (
4+
"resourceIconX": 60px,
5+
"resourceIconY": 65px,
6+
"resourceIconOffsetX": -20px,
7+
"resourceIconOffsetY": -220px,
8+
);
9+
10+
@mixin ckan-resource-icon-bg-pos($offset, $size) {
11+
$w: map-get($icon-position, "#{$size}X");
12+
$h: map-get($icon-position, "#{$size}Y");
13+
$x: map-get($icon-position, "#{$size}OffsetX");
14+
$y: map-get($icon-position, "#{$size}OffsetY");
15+
width: $w;
16+
height: $h;
17+
background-position: ($x + -100 * $offset) $y;
18+
transform: scale(0.53);
19+
margin: -14px 0 0 -14px;
20+
}
21+
22+
.format-label {
23+
background: url("/datavic-sprite-resource-icons.png") no-repeat 0 0;
24+
// default "Data" icon
25+
@include ckan-resource-icon-bg-pos(17, "resourceIcon");
26+
}
27+
28+
.format-label[data-format="data tool"] {
29+
@include ckan-resource-icon-bg-pos(23, "resourceIcon");
30+
}

ckanext/datavic_odp_theme/grunt/sass/_resources.scss

Lines changed: 91 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ $primary-color: #0052C2;
1212
.resource-summary {
1313
flex-grow: 2;
1414
margin-right: rem(15px);
15-
word-break: break-all;
1615
}
1716

1817
.resource-icon {
@@ -27,6 +26,12 @@ $primary-color: #0052C2;
2726
height: 60px;
2827
}
2928
}
29+
30+
@media (min-width: 767px) {
31+
.resource-summary {
32+
width: 24%;
33+
}
34+
}
3035
}
3136

3237
.resource-list {
@@ -38,24 +43,39 @@ $primary-color: #0052C2;
3843
&:hover {
3944
background-color: transparent;
4045
}
41-
.btn-group {
42-
display: inline-block;
46+
47+
.buttons {
48+
display: flex;
49+
flex-wrap: wrap;
50+
justify-content: flex-end;
51+
gap: 0.5rem;
52+
}
53+
54+
.btn {
55+
border: 2px solid rpl_color('primary');
56+
padding: 0.75rem;
57+
}
58+
59+
.btn-outline {
60+
border-width: 2px;
61+
background-color: #FFFFFF;
62+
color: $primary-color;
63+
}
64+
65+
.btn-api {
66+
border-color: #3A833A;
67+
color: #3A833A;
4368
}
44-
}
45-
.btn-group {
46-
position: relative;
47-
top: auto;
48-
right: auto;
4969
}
5070

51-
@media (max-width:767px) {
71+
@media (max-width: 767px) {
5272
.resource-item {
5373
display: inline;
54-
.btn-group {
55-
display: block;
56-
}
5774
}
58-
}
75+
.buttons {
76+
flex-direction: column;
77+
}
78+
}
5979
}
6080

6181
.dropdown-menu {
@@ -71,6 +91,8 @@ $primary-color: #0052C2;
7191
}
7292

7393
.dataset-resources {
94+
display: inline;
95+
7496
.label {
7597
background: none;
7698
color: rpl_color('dark_neutral');
@@ -100,6 +122,51 @@ $primary-color: #0052C2;
100122
}
101123
}
102124

125+
.dataset-api {
126+
ul {
127+
padding-right: 50px;
128+
display: inline-flex;
129+
130+
i {
131+
margin-right: 3px;
132+
}
133+
}
134+
135+
li {
136+
display: inline;
137+
&:last-child {
138+
padding-right: 0;
139+
}
140+
}
141+
142+
i {
143+
padding-right: 3px;
144+
}
145+
146+
display: inline;
147+
float: right;
148+
color: rpl_color('dark_neutral');
149+
font-size: rem(14px);
150+
151+
.preview {
152+
color: #011A3C;
153+
}
154+
155+
.api a {
156+
color: #3A833A;
157+
}
158+
}
159+
160+
@media (max-width: 767px) {
161+
.dataset-api, .dataset-resources {
162+
display: block;
163+
}
164+
.dataset-api {
165+
margin-top: 0.75rem;
166+
float: unset;
167+
}
168+
}
169+
103170
.res_abstract_heading {
104171
font-family: "VIC-Bold", "Arial", "Helvetica", "sans-serif";
105172
font-size: 1.5rem;
@@ -148,4 +215,15 @@ $primary-color: #0052C2;
148215
margin-bottom: 0;
149216
}
150217
}
218+
.data-dictionary-table {
219+
thead {
220+
background-color: #f2f2f2;
221+
}
222+
}
223+
}
224+
225+
@media (min-width: 576px) {
226+
.api-modal {
227+
max-width: 80%;
228+
}
151229
}

ckanext/datavic_odp_theme/grunt/sass/_search_form.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ $rpl-search-form-search-text: $rpl-search-form-show-filters-ruleset !default;
106106
}
107107

108108
svg {
109+
fill: rpl-color('primary');
109110
width: $rpl-search-form-button-width;
110111
height: $rpl-search-form-button-width;
111112
}
@@ -209,6 +210,10 @@ $rpl-search-form-search-text: $rpl-search-form-show-filters-ruleset !default;
209210
padding-top: $rpl-space * 12;
210211
}
211212

213+
.rpl-icon--color_danger {
214+
fill: #af272f;
215+
}
216+
212217
}
213218

214219
.search-form-wrapper {

ckanext/datavic_odp_theme/grunt/sass/styles.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
@import 'menu';
4545
@import 'pagination';
4646
@import 'resources';
47+
@import 'resource-icons';
4748
@import 'search';
4849
@import 'da_search';
4950
@import 'form';
@@ -55,3 +56,4 @@
5556
@import 'search_form';
5657
@import 'activity';
5758
@import 'datatables';
59+
@import 'dataset';

0 commit comments

Comments
 (0)