git clone https://github.com/chapter-three/next-drupal
The database is not publicly available in the repo. You can ping @shadcn. I'll send you a copy.
// Creates a UIColor from a Hex string. | |
func colorWithHexString (hex:String) -> UIColor { | |
var cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString | |
if (cString.hasPrefix("#")) { | |
cString = cString.substringFromIndex(1) | |
} | |
if (countElements(cString) != 6) { | |
return UIColor.grayColor() |
git clone https://github.com/chapter-three/next-drupal
The database is not publicly available in the repo. You can ping @shadcn. I'll send you a copy.
<?php | |
use Drupal\field\Entity\FieldConfig; | |
$info = FieldConfig::loadByName($entity_type, $bundle, $field_name); | |
import { merge } from "theme-ui" | |
import base from "@reflexjs/preset-base" | |
export default merge(base, { | |
colors: { | |
text: "#000", | |
background: "#fff", | |
primary: "#2a9d8f", | |
secondary: "#e76f51", | |
}, |
<?php | |
// Place in `custom_module/src/Entity/ListBuilder/PurchasedPlanListBuilder.php` | |
namespace Drupal\custom_module\Entity\ListBuilder; | |
use Drupal\apigee_m10n\Entity\ListBuilder\PurchasedPlanListBuilder as ApigeePurchasedPlanListBuilder; | |
class PurchasedPlanListBuilder extends ApigeePurchasedPlanListBuilder { |
This recipe adds podcast support to your Gatsby site using @arshad/gatsby-theme-podcast-core.
Install NPM packages
<NPMPackage name="@arshad/gatsby-theme-podcast-core"
import React from "react" | |
import { Link } from "gatsby" | |
import Image from "gatsby-image" | |
import Layout from "../../../components/layout" | |
import SEO from "../../../components/seo" | |
export const formatDuration = seconds => { | |
const minutes = Math.floor(seconds / 60) | |
const hours = Math.floor(seconds / (60 * 60)) |
<?php | |
namespace Drupal\MODULE_NAME\Plugin\views\style; | |
use Drupal\rest\Plugin\views\style\Serializer; | |
/** | |
* The style plugin for serialized output formats with pager. | |
* | |
* @ingroup views_style_plugins |