first commit
This commit is contained in:
97
wp-includes/blocks/file/block.json
Normal file
97
wp-includes/blocks/file/block.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "core/file",
|
||||
"title": "File",
|
||||
"category": "media",
|
||||
"description": "Add a link to a downloadable file.",
|
||||
"keywords": [ "document", "pdf", "download" ],
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"blob": {
|
||||
"type": "string",
|
||||
"role": "local"
|
||||
},
|
||||
"href": {
|
||||
"type": "string",
|
||||
"role": "content"
|
||||
},
|
||||
"fileId": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a:not([download])",
|
||||
"attribute": "id"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a:not([download])",
|
||||
"role": "content"
|
||||
},
|
||||
"textLinkHref": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a:not([download])",
|
||||
"attribute": "href",
|
||||
"role": "content"
|
||||
},
|
||||
"textLinkTarget": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "a:not([download])",
|
||||
"attribute": "target"
|
||||
},
|
||||
"showDownloadButton": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"downloadButtonText": {
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a[download]",
|
||||
"role": "content"
|
||||
},
|
||||
"displayPreview": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"previewHeight": {
|
||||
"type": "number",
|
||||
"default": 600
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": true,
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true
|
||||
},
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"text": false,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
"radius": true,
|
||||
"color": true,
|
||||
"width": true,
|
||||
"style": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"radius": true,
|
||||
"color": true,
|
||||
"width": true,
|
||||
"style": true
|
||||
}
|
||||
},
|
||||
"interactivity": true
|
||||
},
|
||||
"editorStyle": "wp-block-file-editor",
|
||||
"style": "wp-block-file"
|
||||
}
|
||||
41
wp-includes/blocks/file/editor-rtl.css
Normal file
41
wp-includes/blocks/file/editor-rtl.css
Normal file
@@ -0,0 +1,41 @@
|
||||
.wp-block[data-align=left] > .wp-block-file, .wp-block[data-align=right] > .wp-block-file {
|
||||
height: auto;
|
||||
}
|
||||
.wp-block[data-align=center] > .wp-block-file {
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-file {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.wp-block-file .components-resizable-box__container {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.wp-block-file .wp-block-file__preview {
|
||||
margin-bottom: 1em;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.wp-block-file .wp-block-file__preview-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
.wp-block-file .wp-block-file__content-wrapper {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.wp-block-file a {
|
||||
min-width: 1em;
|
||||
}
|
||||
.wp-block-file a:not(.wp-block-file__button) {
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-file .wp-block-file__button-richtext-wrapper {
|
||||
display: inline-block;
|
||||
margin-right: 0.75em;
|
||||
}
|
||||
1
wp-includes/blocks/file/editor-rtl.min.css
vendored
Normal file
1
wp-includes/blocks/file/editor-rtl.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-right:.75em}
|
||||
41
wp-includes/blocks/file/editor.css
Normal file
41
wp-includes/blocks/file/editor.css
Normal file
@@ -0,0 +1,41 @@
|
||||
.wp-block[data-align=left] > .wp-block-file, .wp-block[data-align=right] > .wp-block-file {
|
||||
height: auto;
|
||||
}
|
||||
.wp-block[data-align=center] > .wp-block-file {
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-file {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.wp-block-file .components-resizable-box__container {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.wp-block-file .wp-block-file__preview {
|
||||
margin-bottom: 1em;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.wp-block-file .wp-block-file__preview-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.wp-block-file .wp-block-file__content-wrapper {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.wp-block-file a {
|
||||
min-width: 1em;
|
||||
}
|
||||
.wp-block-file a:not(.wp-block-file__button) {
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-file .wp-block-file__button-richtext-wrapper {
|
||||
display: inline-block;
|
||||
margin-left: 0.75em;
|
||||
}
|
||||
1
wp-includes/blocks/file/editor.min.css
vendored
Normal file
1
wp-includes/blocks/file/editor.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-left:.75em}
|
||||
38
wp-includes/blocks/file/style-rtl.css
Normal file
38
wp-includes/blocks/file/style-rtl.css
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
.wp-block-file {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wp-block-file:not(.wp-element-button) {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.wp-block-file.aligncenter {
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-file.alignright {
|
||||
text-align: right;
|
||||
}
|
||||
.wp-block-file * + .wp-block-file__button {
|
||||
margin-right: 0.75em;
|
||||
}
|
||||
|
||||
:where(.wp-block-file) {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.wp-block-file__embed {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
:where(.wp-block-file__button) {
|
||||
border-radius: 2em;
|
||||
padding: 0.5em 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
:where(.wp-block-file__button):where(a):hover, :where(.wp-block-file__button):where(a):visited, :where(.wp-block-file__button):where(a):focus, :where(.wp-block-file__button):where(a):active {
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
opacity: 0.85;
|
||||
text-decoration: none;
|
||||
}
|
||||
1
wp-includes/blocks/file/style-rtl.min.css
vendored
Normal file
1
wp-includes/blocks/file/style-rtl.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}
|
||||
39
wp-includes/blocks/file/style.css
Normal file
39
wp-includes/blocks/file/style.css
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
.wp-block-file {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wp-block-file:not(.wp-element-button) {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.wp-block-file.aligncenter {
|
||||
text-align: center;
|
||||
}
|
||||
.wp-block-file.alignright {
|
||||
/*rtl:ignore*/
|
||||
text-align: right;
|
||||
}
|
||||
.wp-block-file * + .wp-block-file__button {
|
||||
margin-left: 0.75em;
|
||||
}
|
||||
|
||||
:where(.wp-block-file) {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.wp-block-file__embed {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
:where(.wp-block-file__button) {
|
||||
border-radius: 2em;
|
||||
padding: 0.5em 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
:where(.wp-block-file__button):where(a):hover, :where(.wp-block-file__button):where(a):visited, :where(.wp-block-file__button):where(a):focus, :where(.wp-block-file__button):where(a):active {
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
opacity: 0.85;
|
||||
text-decoration: none;
|
||||
}
|
||||
1
wp-includes/blocks/file/style.min.css
vendored
Normal file
1
wp-includes/blocks/file/style.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}
|
||||
Reference in New Issue
Block a user