Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit e098256

Browse files
authored
Merge pull request #93 from creativecommons/image-size-blocks
Add license badge image size to gutenberg blocks
2 parents 05e7719 + 356eacc commit e098256

File tree

11 files changed

+58
-103
lines changed

11 files changed

+58
-103
lines changed

dist/blocks.build.js

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

dist/blocks.editor.build.css

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,7 @@
1-
.wp-block-cgb-cc-by {
2-
margin: 0 auto;
3-
max-width: 740px;
4-
padding: 1rem;
5-
}
6-
.cc-cgb-richtext-input {
7-
border-right: 2px solid #dedede;
8-
border-bottom: 3px solid #dedede;
9-
}
10-
.cc-cgb-richtext-input:hover {
11-
border-right: 3px solid #5e5e5e;
12-
border-bottom: 4px solid #5e5e5e;
13-
}
14-
.wp-block-cgb-cc-by-sa {
15-
margin: 0 auto;
16-
max-width: 740px;
17-
padding: 1rem;
18-
}
19-
.wp-block-cgb-cc-by-nd {
20-
margin: 0 auto;
21-
max-width: 740px;
22-
padding: 1rem;
23-
}
24-
.wp-block-cgb-cc-by-nc {
25-
margin: 0 auto;
26-
max-width: 740px;
27-
padding: 1rem;
28-
}
29-
.wp-block-cgb-cc-by-nc-nd {
30-
margin: 0 auto;
31-
max-width: 740px;
32-
padding: 1rem;
33-
}
34-
.wp-block-cgb-cc-by-nc-sa {
35-
margin: 0 auto;
36-
max-width: 740px;
37-
padding: 1rem;
38-
}
39-
.wp-block-cgb-cc0 {
40-
margin: 0 auto;
41-
max-width: 740px;
42-
padding: 1rem;
43-
}
1+
.wp-block-cgb-cc-by{margin:0 auto;max-width:740px;padding:1rem}.cc-cgb-richtext-input{border-right:2px solid #dedede;border-bottom:3px solid #dedede}.cc-cgb-richtext-input:hover{border-right:3px solid #5e5e5e;border-bottom:4px solid #5e5e5e}
2+
.wp-block-cgb-cc-by-sa{margin:0 auto;max-width:740px;padding:1rem}
3+
.wp-block-cgb-cc-by-nd{margin:0 auto;max-width:740px;padding:1rem}
4+
.wp-block-cgb-cc-by-nc{margin:0 auto;max-width:740px;padding:1rem}
5+
.wp-block-cgb-cc-by-nc-nd{margin:0 auto;max-width:740px;padding:1rem}
6+
.wp-block-cgb-cc-by-nc-sa{margin:0 auto;max-width:740px;padding:1rem}
7+
.wp-block-cgb-cc0{margin:0 auto;max-width:740px;padding:1rem}

dist/blocks.style.build.css

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
1-
.wp-block-cgb-cc-by {
2-
margin: 0 auto;
3-
max-width: 740px;
4-
padding: 1rem;
5-
}
6-
.wp-block-cgb-cc-by-sa {
7-
margin: 0 auto;
8-
max-width: 740px;
9-
padding: 1rem;
10-
}
11-
.wp-block-cgb-cc-by-nd {
12-
margin: 0 auto;
13-
max-width: 740px;
14-
padding: 1rem;
15-
}
16-
.wp-block-cgb-cc-by-nc {
17-
margin: 0 auto;
18-
max-width: 740px;
19-
padding: 1rem;
20-
}
21-
.wp-block-cgb-cc-by-nc-nd {
22-
margin: 0 auto;
23-
max-width: 740px;
24-
padding: 1rem;
25-
}
26-
.wp-block-cgb-cc-by-nc-sa {
27-
margin: 0 auto;
28-
max-width: 740px;
29-
padding: 1rem;
30-
}
31-
.wp-block-cgb-cc0 {
32-
margin: 0 auto;
33-
max-width: 740px;
34-
padding: 1rem;
35-
}
1+
.wp-block-cgb-cc-by{margin:0 auto;max-width:740px;padding:1rem}
2+
.wp-block-cgb-cc-by-sa{margin:0 auto;max-width:740px;padding:1rem}
3+
.wp-block-cgb-cc-by-nd{margin:0 auto;max-width:740px;padding:1rem}
4+
.wp-block-cgb-cc-by-nc{margin:0 auto;max-width:740px;padding:1rem}
5+
.wp-block-cgb-cc-by-nc-nd{margin:0 auto;max-width:740px;padding:1rem}
6+
.wp-block-cgb-cc-by-nc-sa{margin:0 auto;max-width:740px;padding:1rem}
7+
.wp-block-cgb-cc0{margin:0 auto;max-width:740px;padding:1rem}

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"dependencies": {
1111
"cgb-scripts": "1.20.0"
1212
}
13-
}
13+
}

src/CC-BY-NC-ND/block.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ registerBlockType('cgb/cc-by-nc-nd', {
8787
</InspectorControls>,
8888

8989
<div key="2" className={className} style={{ backgroundColor: bgColor, color: txtColor }}>
90-
<img src={`${globals.pluginDirUrl}includes/images/by-nc-nd.png`} alt="CC-BY-NC-ND" />
90+
<img src={`${globals.pluginDirUrl}includes/images/by-nc-nd.png`} alt="CC-BY-NC-ND" width="88" height="31" />
9191
<p>
9292
This content is licensed by{' '}
9393
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0">
@@ -145,7 +145,7 @@ registerBlockType('cgb/cc-by-nc-nd', {
145145
}
146146
return (
147147
<div className="message-body" style={{ backgroundColor: bgColor, color: txtColor }}>
148-
<img src={`${globals.pluginDirUrl}includes/images/by-nc-nd.png`} alt="CC-BY-NC-ND" />
148+
<img src={`${globals.pluginDirUrl}includes/images/by-nc-nd.png`} alt="CC-BY-NC-ND" width="88" height="31" />
149149
<p>
150150
<span className="cc-cgb-name">{contentName}</span> is licensed under a{' '}
151151
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0">

src/CC-BY-NC-SA/block.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ registerBlockType('cgb/cc-by-nc-sa', {
8787
</InspectorControls>,
8888

8989
<div key="2" className={className} style={{ backgroundColor: bgColor, color: txtColor }}>
90-
<img src={`${globals.pluginDirUrl}includes/images/by-nc-sa.png`} alt="CC-BY-NC-SA" />
90+
<img src={`${globals.pluginDirUrl}includes/images/by-nc-sa.png`} alt="CC-BY-NC-SA" width="88" height="31" />
9191
<p>
9292
This content is licensed by{' '}
9393
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0">
@@ -145,7 +145,7 @@ registerBlockType('cgb/cc-by-nc-sa', {
145145
}
146146
return (
147147
<div className="message-body" style={{ backgroundColor: bgColor, color: txtColor }}>
148-
<img src={`${globals.pluginDirUrl}includes/images/by-nc-sa.png`} alt="CC-BY-NC-SA" />
148+
<img src={`${globals.pluginDirUrl}includes/images/by-nc-sa.png`} alt="CC-BY-NC-SA" width="88" height="31" />
149149
<p>
150150
<span className="cc-cgb-name">{contentName}</span> is licensed under a{' '}
151151
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0">

src/CC-BY-NC/block.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ registerBlockType('cgb/cc-by-nc', {
8787
</InspectorControls>,
8888

8989
<div key="2" className={className} style={{ backgroundColor: bgColor, color: txtColor }}>
90-
<img src={`${globals.pluginDirUrl}includes/images/by-nc.png`} alt="CC-BY-NC" />
90+
<img src={`${globals.pluginDirUrl}includes/images/by-nc.png`} alt="CC-BY-NC" width="88" height="31" />
9191
<p>
9292
This content is licensed by{' '}
9393
<a href="https://creativecommons.org/licenses/by-nc/4.0">
@@ -145,7 +145,7 @@ registerBlockType('cgb/cc-by-nc', {
145145
}
146146
return (
147147
<div className="message-body" style={{ backgroundColor: bgColor, color: txtColor }}>
148-
<img src={`${globals.pluginDirUrl}includes/images/by-nc.png`} alt="CC-BY-NC" />
148+
<img src={`${globals.pluginDirUrl}includes/images/by-nc.png`} alt="CC-BY-NC" width="88" height="31" />
149149
<p>
150150
<span className="cc-cgb-name">{contentName}</span> is licensed under a{' '}
151151
<a href="https://creativecommons.org/licenses/by-nc/4.0">

src/CC-BY-ND/block.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ registerBlockType('cgb/cc-by-nd', {
8787
</InspectorControls>,
8888

8989
<div key="2" className={className} style={{ backgroundColor: bgColor, color: txtColor }}>
90-
<img src={`${globals.pluginDirUrl}includes/images/by-nd.png`} alt="CC-BY-ND" />
90+
<img src={`${globals.pluginDirUrl}includes/images/by-nd.png`} alt="CC-BY-ND" width="88" height="31" />
9191
<p>
9292
This content is licensed by{' '}
9393
<a href="https://creativecommons.org/licenses/by-nd/4.0/">
@@ -145,7 +145,7 @@ registerBlockType('cgb/cc-by-nd', {
145145
}
146146
return (
147147
<div className="message-body" style={{ backgroundColor: bgColor, color: txtColor }}>
148-
<img src={`${globals.pluginDirUrl}includes/images/by-nd.png`} alt="CC-BY-ND" />
148+
<img src={`${globals.pluginDirUrl}includes/images/by-nd.png`} alt="CC-BY-ND" width="88" height="31" />
149149
<p>
150150
<span className="cc-cgb-name">{contentName}</span> is licensed under a{' '}
151151
<a href="https://creativecommons.org/licenses/by-nd/4.0/">

src/CC-BY-SA/block.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ registerBlockType('cgb/cc-by-sa', {
8787
</InspectorControls>,
8888

8989
<div key="2" className={className} style={{ backgroundColor: bgColor, color: txtColor }}>
90-
<img src={`${globals.pluginDirUrl}includes/images/by-sa.png`} alt="CC-BY-SA" />
90+
<img src={`${globals.pluginDirUrl}includes/images/by-sa.png`} alt="CC-BY-SA" width="88" height="31" />
9191
<p>
9292
This content is licensed by{' '}
9393
<a href="https://creativecommons.org/licenses/by-sa/4.0">
@@ -145,7 +145,7 @@ registerBlockType('cgb/cc-by-sa', {
145145
}
146146
return (
147147
<div className="message-body" style={{ backgroundColor: bgColor, color: txtColor }}>
148-
<img src={`${globals.pluginDirUrl}includes/images/by-sa.png`} alt="CC BY-SA" />
148+
<img src={`${globals.pluginDirUrl}includes/images/by-sa.png`} alt="CC BY-SA" width="88" height="31" />
149149
<p>
150150
<span className="cc-cgb-name">{contentName}</span> is licensed under a{' '}
151151
<a href="https://creativecommons.org/licenses/by-sa/4.0">

0 commit comments

Comments
 (0)