-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
503 additions
and
2,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 2, | ||
"name": "carkeek-blocks/custom-archive", | ||
"title": "Custom Post Type Archive", | ||
"category": "carkeek-category", | ||
"description": "Block showing the latest items by post type.", | ||
"keywords": [ | ||
"archive", | ||
"posts", | ||
"list" | ||
], | ||
"version": "1.0.0", | ||
"textdomain": "carkeek-blocks", | ||
"attributes": { | ||
"numberOfPosts": { | ||
"type": "number", | ||
"default": 3 | ||
}, | ||
"honorStickyPosts": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"postTypeSelected": { | ||
"type": "string", | ||
"default": "post" | ||
}, | ||
"displayPostExcerpt": { | ||
"type": "boolean", | ||
"default": true | ||
}, | ||
"displayFeaturedImage": { | ||
"type": "boolean", | ||
"default": true | ||
}, | ||
"imageOrientation": { | ||
"type": "string", | ||
"default": "landscape" | ||
}, | ||
"openAsModal": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"postLayout": { | ||
"type": "string", | ||
"default": "grid" | ||
}, | ||
"columns": { | ||
"type": "number", | ||
"default": 3 | ||
}, | ||
"columnsMobile": { | ||
"type": "number", | ||
"default": 1 | ||
}, | ||
"columnsTablet": { | ||
"type": "number", | ||
"default": 3 | ||
}, | ||
"limitItemsMobile": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"itemsMobile": { | ||
"type": "number", | ||
"default": 1 | ||
}, | ||
"itemsTablet": { | ||
"type": "number", | ||
"default": 3 | ||
}, | ||
"sortBy": { | ||
"type": "string", | ||
"default": "date" | ||
}, | ||
"sortByMeta": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"order": { | ||
"type": "string", | ||
"default": "ASC" | ||
}, | ||
"excerptLength": { | ||
"type": "number", | ||
"default": 25 | ||
}, | ||
"filterByTaxonomy": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"groupListings": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"groupTaxSelected": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"groupHideParents": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"groupHideEmpty": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"taxonomySelected": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"taxTermsSelected": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"taxQueryType": { | ||
"type": "string", | ||
"default": "AND" | ||
}, | ||
"hideIfEmpty": { | ||
"type": "boolean", | ||
"default": true | ||
}, | ||
"emptyMessage": { | ||
"type": "string", | ||
"default": "No posts found." | ||
}, | ||
"useHeadingTitle": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"headlineLevel": { | ||
"type": "number", | ||
"default": 2 | ||
}, | ||
"showPublishDate": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"showPagination": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"showTerms": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"publishDateLocation": { | ||
"type": "string", | ||
"default": "below" | ||
}, | ||
"publishDatePrefix": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"showLearnMoreLink": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"learnMoreLinkTitle": { | ||
"type": "string", | ||
"default": "Learn More" | ||
}, | ||
"imageSize": { | ||
"type": "string", | ||
"default": "default" | ||
}, | ||
"newWindow": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"addlContentBefore": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"addlContentAfter": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"blockId": { | ||
"type": "string" | ||
}, | ||
"align": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"className": { | ||
"type": "string", | ||
"default": "" | ||
} | ||
}, | ||
"supports": { | ||
"align": [ | ||
"wide", | ||
"full", | ||
"left", | ||
"center", | ||
"right" | ||
], | ||
"anchor": false, | ||
"spacing": true | ||
}, | ||
"editorScript": "file:./index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n'), 'version' => '8e2d4f011e64d0a6e148'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
|
||
.ck-custom-archive-headline { | ||
text-align: center; | ||
} | ||
|
||
.wp-block-carkeek-blocks-custom-archive { | ||
|
||
|
||
& .ck-custom-archive-image-link { | ||
position: relative; | ||
display: block; | ||
margin-bottom: var(--ck-archive-image-text-gap); | ||
|
||
&.layout-square { | ||
--ck-archive-image-ratio: 100%; | ||
} | ||
|
||
&.layout-portrait { | ||
--ck-archive-image-ratio: 150%; | ||
} | ||
|
||
&.layout-portrait-43 { | ||
--ck-archive-image-ratio: 133%; | ||
} | ||
|
||
&.layout-landscape-34 { | ||
--ck-archive-image-ratio: 75%; | ||
} | ||
|
||
&::after { | ||
display: block; | ||
width: 100%; | ||
content: ""; | ||
padding-bottom: var(--ck-archive-image-ratio); | ||
} | ||
|
||
& img { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
object-position: 50% 50%; | ||
} | ||
|
||
} | ||
|
||
&.is-grid { | ||
|
||
& .ck-columns__wrap { | ||
flex-wrap: wrap; | ||
} | ||
|
||
& .archive-entry { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
&.is-list { | ||
|
||
& .ck-custom-archive-item { | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: var(--ck-column-gap-vert); | ||
} | ||
|
||
& .ck-custom-archive-image-link { | ||
width: 100%; | ||
} | ||
} | ||
|
||
& .ck-custom-archive-more-link { | ||
display: block; | ||
margin-top: 1rem; | ||
} | ||
|
||
&.group-hide-parents { | ||
|
||
& .ck-archive-tax-header.level-0 { | ||
display: none; | ||
} | ||
} | ||
} | ||
|
||
.ck_pagination { | ||
|
||
& ul { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
|
||
& li { | ||
|
||
& a { | ||
padding: 5px 10px; | ||
} | ||
|
||
& .current { | ||
padding: 5px 10px; | ||
background-color: var(--color-link); | ||
color: #fff; | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
||
@media (--tablet-up) { | ||
|
||
.wp-block-carkeek-blocks-custom-archive { | ||
|
||
&.is-list { | ||
|
||
& .ck-custom-archive-item { | ||
flex-direction: row; | ||
} | ||
|
||
& .ck-custom-archive-image-link { | ||
flex: 1 1 33%; | ||
margin-right: var(--ck-archive-image-text-gap); | ||
margin-bottom: 0; | ||
align-self: flex-start; | ||
} | ||
|
||
& .ck-custom-archive__content-wrap { | ||
flex: 1 1 67%; | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.