Skip to content

Commit 1d520d4

Browse files
authored
Merge pull request #16 from Voog/014-two-cols-on-commonpage
Allow selecting 50-50 split columns on Common page
2 parents 4733058 + 2204073 commit 1d520d4

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

components/block.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
{%- if editmode or block_has_content %}
6868
<div
69-
class="block-wrapper{% if wrapper_class %} {{ wrapper_class }}{% endif %}"
69+
class="block-wrapper{% if layout_name == 'split_50_50_full' %} block-wrapper-split{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}"
7070
data-block-key="{{ id }}"
7171
>
7272
{%- if editmode %}

components/template-settings-json.tpl

+7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
"value": {
5151
"content_areas": "2"
5252
}
53+
},
54+
{
55+
"key": "split_50_50_full",
56+
"value": {
57+
"content_areas": "2",
58+
"separate_bg_pickers": true
59+
}
5360
}
5461
],
5562
"categories_page_block_layouts": [

sources/stylesheets/components/_block.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
.category-blocks {
33
position: relative;
44

5+
&.block-wrapper-split {
6+
display: grid;
7+
grid-template-columns: 1fr 1fr;
8+
}
9+
510
.block-edit-buttons {
611
width: 100%;
712
height: 100%;
@@ -77,11 +82,6 @@
7782
}
7883
}
7984

80-
.category-blocks .block-wrapper {
81-
display: grid;
82-
grid-template-columns: 1fr 1fr;
83-
}
84-
8585
.block {
8686
min-height: calc(100vh - 128px);
8787
padding: 64px;
@@ -403,7 +403,7 @@
403403
}
404404
}
405405

406-
.category-blocks .block-wrapper {
406+
.block-wrapper.block-wrapper-split {
407407
grid-template-columns: 1fr;
408408
}
409409
}

stylesheets/main.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
.category-blocks {
44
position: relative;
55
}
6+
.block-wrapper.block-wrapper-split,
7+
.category-blocks.block-wrapper-split {
8+
display: grid;
9+
grid-template-columns: 1fr 1fr;
10+
}
611
.block-wrapper .block-edit-buttons,
712
.category-blocks .block-edit-buttons {
813
width: 100%;
@@ -72,11 +77,6 @@
7277
display: none;
7378
}
7479

75-
.category-blocks .block-wrapper {
76-
display: grid;
77-
grid-template-columns: 1fr 1fr;
78-
}
79-
8080
.block {
8181
min-height: calc(100vh - 128px);
8282
padding: 64px;
@@ -322,7 +322,7 @@
322322
order: 1;
323323
height: unset;
324324
}
325-
.category-blocks .block-wrapper {
325+
.block-wrapper.block-wrapper-split {
326326
grid-template-columns: 1fr;
327327
}
328328
}

stylesheets/main.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)