Skip to content

Commit 15a21d4

Browse files
committed
Pull in remote dev
2 parents 71bf4a2 + ec8137e commit 15a21d4

24 files changed

Lines changed: 2185 additions & 156 deletions

themes/osi/assets/css/editor-style.css

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/assets/css/editor-style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/assets/scss/_4_elements.inputs.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ form {
77
max-width: $contentMax;
88
}
99

10+
.page-template-template-no-header-wide form {
11+
max-width: $boxedMax
12+
}
13+
1014
input[type="text"],
1115
input[type="date"],
1216
input[type="time"],

themes/osi/assets/scss/_5_objects.layout.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@
5252
}
5353
}
5454

55+
.page-template-template-no-header-wide .content.has_no_sidebar,
56+
.page-template-template-no-header-wide footer {
57+
.content--page article:not(.archive),
58+
.comments,
59+
.archive-press-mentions {
60+
max-width: inherit !important;
61+
margin-left: auto !important;
62+
margin-right: auto !important;
63+
}
64+
}
65+
5566
.content.has_no_sidebar,
5667
footer {
5768
.alignwide {
Lines changed: 40 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
body > .wrapper {
1+
body>.wrapper {
22
background: transparent;
33
font-size: $textFontSize;
44
min-height: 100%;
@@ -8,9 +8,8 @@ body > .wrapper {
88
position: relative;
99
@include multi-transition('margin-left .2s ease-out, margin-right .2s ease-out, left .2s ease-out');
1010
z-index: 1;
11-
1211
&:after {
13-
content: '';
12+
content: '';
1413
background-color: $Nlightest;
1514
position: absolute;
1615
width: 100vw;
@@ -23,106 +22,95 @@ body > .wrapper {
2322
mask-repeat: no-repeat;
2423
z-index: -1;
2524
}
26-
2725
}
2826

27+
@media print {
28+
// Esnure the background is not printed
29+
body>.wrapper::after {
30+
content: none !important;
31+
display: none !important;
32+
visibility: hidden !important;
33+
}
34+
}
2935

3036
.content {
3137
padding: 0;
3238
// padding: 0 $smallPadding; // for a boxed width background with sidebar only
3339
padding-top: $paddingTopMobile; // for fixed-position header, adjust to match header size
34-
35-
@media only screen and ( max-width: 1200px ) {
40+
@media only screen and ( max-width: 1200px) {
3641
padding-top: 0;
3742
}
38-
3943
&.inner-padding {
4044
padding: 0 $smallPadding;
4145
}
42-
4346
.content-full .content--page {
4447
max-width: $boxedMax; // for a boxed width background with no sidebar
4548
padding: 0 $smallPadding; // for a boxed width background with no sidebar
4649
}
47-
4850
.content--page.no-title {
49-
padding-bottom: 0 !important;
50-
padding-top: 0 !important;
51+
padding-bottom: 0 !important;
52+
padding-top: 0 !important;
5153
}
52-
5354
.content--inner {
54-
max-width: $boxedMax; // for a boxed width background with no sidebar
55+
max-width: $boxedMax; // for a boxed width background with no sidebar
5556
}
56-
5757
&.has_sidebar {
58-
max-width: $boxedMax; // for a boxed width background with sidebar only
59-
padding: $paddingTopMobile $smallPadding 0 $smallPadding; // for a boxed width background with sidebar only
60-
61-
.content--inner {
62-
max-width: none;
63-
}
58+
max-width: $boxedMax; // for a boxed width background with sidebar only
59+
padding: $paddingTopMobile $smallPadding 0 $smallPadding; // for a boxed width background with sidebar only
60+
.content--inner {
61+
max-width: none;
62+
}
6463
}
6564
}
6665

6766
@media only screen and (min-width: #{$break-small}) {
68-
.content {
69-
&.inner-padding {
70-
padding: 0 $midPadding;
71-
}
72-
73-
.content-full .content--page {
74-
padding: 0 $midPadding; // for a boxed width background with no sidebar
75-
margin: 0 auto;
76-
}
77-
78-
&.has_sidebar {
79-
padding: $paddingTopMobile $midPadding 0 $midPadding; // for a boxed width background with sidebar only
80-
}
81-
}
67+
.content {
68+
&.inner-padding {
69+
padding: 0 $midPadding;
70+
}
71+
.content-full .content--page {
72+
padding: 0 $midPadding; // for a boxed width background with no sidebar
73+
margin: 0 auto;
74+
}
75+
&.has_sidebar {
76+
padding: $paddingTopMobile $midPadding 0 $midPadding; // for a boxed width background with sidebar only
77+
}
78+
}
8279
}
8380

8481
@media only screen and (min-width: #{$break-nav}) {
85-
86-
.content{
82+
.content {
8783
//padding-bottom:100px; // to account for position absolute footer
8884
// padding-top: $paddingTop; // for fixed-position header, adjust to match header size
89-
90-
.content-full .content--page{
85+
.content-full .content--page {
9186
padding: 0 $maxPadding; // for a boxed width background with no sidebar
9287
}
93-
9488
.content--page.no-title {
95-
padding-top: 0;
89+
padding-top: 0;
9690
}
97-
9891
&.has_sidebar {
99-
padding: $paddingTop $maxPadding 0 $maxPadding; // for a boxed width background with sidebar only
92+
padding: $paddingTop $maxPadding 0 $maxPadding; // for a boxed width background with sidebar only
10093
}
101-
10294
}
10395
}
10496

10597
@media only screen and (min-width: #{$break-xlarge}) {
106-
10798
.content {
10899
//padding-bottom: 150px; // to account for position absolute footer
109100
}
110-
111101
.content-main {
112102
padding-right: 1em;
113-
@include pinkgrid($colspan:9, $padside:3%);
114-
@include pinkrow($rowitems:2)
103+
@include pinkgrid($colspan: 9, $padside: 3%);
104+
@include pinkrow($rowitems: 2)
115105
}
116106
}
117107

118108
@media only screen and (min-width: #{$break-wide}) {
119109
.content {
120110
margin: 0 auto;
121-
// padding-top: $paddingTop; // for fixed-position header, adjust to match header size
111+
// padding-top: $paddingTop; // for fixed-position header, adjust to match header size
122112
}
123-
124113
.content--inner {
125-
margin: 0 auto;
114+
margin: 0 auto;
126115
}
127-
128-
}
116+
}

themes/osi/assets/scss/_6_components.content.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ p, h1, h2, h3, h4, h5, h6, blockquote, ol, ul, dl, address {
1313
max-width: $contentMax;
1414
}
1515

16+
.page-template-template-no-header-wide .post--content > &, .page-template-template-no-header-wide .wp-block-group > & {
17+
max-width: $boxedMax;
18+
}
19+
1620
.footer & {
1721
max-width: none !important;
1822
}

themes/osi/assets/scss/_6_components.wp-content.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@
226226
}
227227
}
228228

229+
.page-template-template-no-header-wide .press-mentions-header.wp-block-cover .wp-block-cover__inner-container {
230+
max-width: $boxedMax;
231+
}
232+
229233
.press-mentions-header.wp-block-cover {
230234
align-items: flex-start;
231235
color: $Nwhite;

themes/osi/assets/scss/_7_vendor.plugin--sugar-calendar.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@
133133
}
134134
}
135135

136+
137+
.page-template-template-no-header-wide .post-type-archive-sc_event {
138+
#content-page {
139+
max-width: $boxedMax;
140+
}
141+
}
142+
136143
#sc-event-ticketing-buy-button,
137144
#sc-event-ticketing-purchase {
138145

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"apiVersion": 2,
3+
"name": "custom/about-area",
4+
"title": "About Area",
5+
"description": "A custom block for the about area with tabs.",
6+
"category": "layout",
7+
"icon": "admin-users",
8+
"supports": {
9+
"align": ["wide", "full"]
10+
},
11+
"attributes": {
12+
"title": {
13+
"type": "string",
14+
"default": "What's Open Source AI?"
15+
},
16+
"description": {
17+
"type": "string",
18+
"default": "Following the same idea behind Open Source Software, an Open Source AI is a system made available under terms that grant users the freedoms to:"
19+
},
20+
"tabs": {
21+
"type": "array",
22+
"default": [
23+
{ "label": "Use", "content": "Use the system for any purpose and without having to ask for permission." },
24+
{ "label": "Study", "content": "Study how the system works and understand how its results were created." },
25+
{ "label": "Modify", "content": "Modify the system for any purpose, including to change its output." },
26+
{ "label": "Share", "content": "Share the system for others to use with or without modifications, for any purpose." }
27+
]
28+
}
29+
},
30+
"editorScript": "file:./index.js"
31+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { registerBlockType } from '@wordpress/blocks';
2+
import { useBlockProps, RichText } from '@wordpress/block-editor';
3+
4+
registerBlockType('custom/about-area', {
5+
edit: ({ attributes, setAttributes }) => {
6+
const blockProps = useBlockProps();
7+
const { title, description, tabs } = attributes;
8+
9+
const updateTabContent = (index, content) => {
10+
const updatedTabs = [...tabs];
11+
updatedTabs[index].content = content;
12+
setAttributes({ tabs: updatedTabs });
13+
};
14+
15+
return (
16+
<div {...blockProps} className="rts-about-area rts-section-gap">
17+
<div className="container">
18+
<div className="title-area-left">
19+
<RichText
20+
tagName="h2"
21+
className="title skew-up"
22+
value={title}
23+
onChange={(newTitle) => setAttributes({ title: newTitle })}
24+
/>
25+
<RichText
26+
tagName="p"
27+
value={description}
28+
onChange={(newDesc) => setAttributes({ description: newDesc })}
29+
/>
30+
</div>
31+
<ul className="nav custom-nav-soalr-about nav-pills" id="pills-tab" role="tablist">
32+
{tabs.map((tab, index) => (
33+
<li key={index} className="nav-item" role="presentation">
34+
<button className={`nav-link ${index === 0 ? 'active' : ''}`} data-bs-toggle="pill">
35+
{tab.label}
36+
</button>
37+
</li>
38+
))}
39+
</ul>
40+
<div className="tab-content">
41+
{tabs.map((tab, index) => (
42+
<div key={index} className={`tab-pane fade ${index === 0 ? 'show active' : ''}`}>
43+
<RichText
44+
tagName="p"
45+
className="disc"
46+
value={tab.content}
47+
onChange={(newContent) => updateTabContent(index, newContent)}
48+
/>
49+
</div>
50+
))}
51+
</div>
52+
</div>
53+
</div>
54+
);
55+
},
56+
save: ({ attributes }) => {
57+
const { title, description, tabs } = attributes;
58+
59+
return (
60+
<div className="rts-about-area rts-section-gap">
61+
<div className="container">
62+
<div className="title-area-left">
63+
<h2 className="title skew-up">{title}</h2>
64+
<p>{description}</p>
65+
</div>
66+
<ul className="nav custom-nav-soalr-about nav-pills" id="pills-tab" role="tablist">
67+
{tabs.map((tab, index) => (
68+
<li key={index} className="nav-item" role="presentation">
69+
<button className={`nav-link ${index === 0 ? 'active' : ''}`} data-bs-toggle="pill">
70+
{tab.label}
71+
</button>
72+
</li>
73+
))}
74+
</ul>
75+
<div className="tab-content">
76+
{tabs.map((tab, index) => (
77+
<div key={index} className={`tab-pane fade ${index === 0 ? 'show active' : ''}`}>
78+
<p className="disc">{tab.content}</p>
79+
</div>
80+
))}
81+
</div>
82+
</div>
83+
</div>
84+
);
85+
}
86+
});

0 commit comments

Comments
 (0)