Skip to content

Instantly share code, notes, and snippets.

View arnaudlewis's full-sized avatar

arnaudbrzh arnaudlewis

  • Prismic.io
  • Paris
View GitHub Profile
{
"results_size": 2,
"results": [{
"id": "mon_id",
"title": "mon titre",
"description" : "Ma description",
"image_url" : "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Tata_Group.svg/1200px-Tata_Group.svg.png",
"last_update" : 1509364426938,
"blob": {
"tata" : "toto",
@arnaudlewis
arnaudlewis / TableOfContent.scala
Created July 26, 2017 09:01
How to generate a dynamic table of content from a prismic content in slices
class EqWrap[T <: AnyRef](val value: T) {
override def hashCode() = if (value == null) 0 else value.hashCode
override def equals(a: Any) = a match {
case ref: EqWrap[_] => ref.value eq value
case _ => false
}
}
object EqWrap {
def apply[T <: AnyRef](t: T) = new EqWrap(t)
@arnaudlewis
arnaudlewis / slave.json
Last active May 30, 2017 15:27
slave.json
{
"Main": {
"myimage": {
"type": "Image",
"config": {
"constraint": {
"width": null,
"height": null
},
"thumbnails": [
@arnaudlewis
arnaudlewis / test.json
Created May 9, 2017 08:58
mask for api v2 tests
{
"Main" : {
"uid" : {
"type" : "UID",
"config" : {
"label" : "uid name",
"placeholder" : "uid placeholder"
}
},
"rich-text" : {
@arnaudlewis
arnaudlewis / post.json
Created April 14, 2017 21:05
Prismic.io - Blog post custom type
{
"Main" : {
"title" : {
"fieldset" : "Header",
"type" : "StructuredText",
"config" : {
"single" : "heading1"
}
},
"summary" : {
@arnaudlewis
arnaudlewis / allFragments.json
Created October 27, 2015 14:59
all fragments available in prismic.io document mask
{
"Basic Types" : {
"uid" : {
"type" : "UID",
"config" : {
"placeholder" : "Unique Document Identifier"
}
},
"text" : {
"type" : "Text",
"Social Cards" : {
"social_cards_enabled" : {
"type" : "Select",
"fieldset" : "Social Sharing",
"config" : {
"placeholder" : "Disable",
"label" : "Enable Social Buttons",
"options" : [ "Enabled" ]
}
},