Skip to content

Instantly share code, notes, and snippets.

View JoseSoteloCohen's full-sized avatar

Jose Sotelo Cohen JoseSoteloCohen

View GitHub Profile
@maheshwaghmare
maheshwaghmare / styling.css
Last active August 8, 2022 04:57
Astra Portfolio: Styling - Screenshot - http://tinyurl.com/yc9kbzkh
/**
* Styling the WP Portfolio grid.
*
* 1. Filters - Category & Other Category
* 2. Single Portfolio Item
* 3. Quick View
* 4. Portfolio Title
*/
/**
import _ from 'lodash'
import qs from 'qs'
// @see https://www.contentful.com/developers/docs/references/images-api/#/reference/resizing-&-cropping/specify-width-&-height
const CONTENTFUL_IMAGE_MAX_SIZE = 4000
const isImage = image =>
_.includes(
[`image/jpeg`, `image/jpg`, `image/png`, `image/webp`, `image/gif`],
_.get(image, `file.contentType`)
)