Skip to content

Instantly share code, notes, and snippets.

View rudyrigot's full-sized avatar

Rudy Rigot rudyrigot

View GitHub Profile
@rudyrigot
rudyrigot / client.json
Created March 28, 2014 22:15
JSON mask for the "client" content type in the front-end-only example
{
"Main" : {
"name" : {
"fieldset" : "Name",
"type" : "StructuredText",
"config" : {
"single" : "heading1"
}
},
"logo" : {
@rudyrigot
rudyrigot / about.json
Created March 28, 2014 22:14
JSON mask for the "about" content type in the front-end-only example
{
"Main" : {
"title" : {
"fieldset" : "Slide's title",
"type" : "StructuredText",
"config" : {
"single" : "heading1"
}
},
"lede" : {
@rudyrigot
rudyrigot / view.php
Created March 19, 2014 19:28
Bootstrap prismic.io blog post - Looping in a view
<?php foreach($skills as $skill) { ?>
<div class="col-sm-6 col-md-3 text-center">
<span class="chart" data-percent="<?php echo $skill->getText('skills.amount') ?>">
<span class="percent"><?php echo $skill->getText('skills.amount') ?></span>
</span>
<h2 class="text-center"><?php echo $skill->getStructuredText('skills.title')->asText() ?></h2>
</div>
<?php } ?>
@rudyrigot
rudyrigot / index.php
Created March 19, 2014 19:26
Bootstrap prismic.io blogpost - minimal controller in index.php
<?php
/* Initializations */
require_once '../resources/config.php'; // this loads our specific configuration
require_once(LIBRARIES_PATH . "/Prismic.php"); // this loads our Prismic helpers, which include the prismic.io PHP kit
$ctx = Prismic::context(); // getting the context built from our configuration (including the Api object it initializes)
global $linkResolver; // getting the linkResolver object (more on this later)
/* Controller */
try {
// API calls will go here
@rudyrigot
rudyrigot / stuff-i-do.json
Created March 19, 2014 19:25
Bootstrap prismic.io blogpost - "stuff-i-do" JSON mask
{
"Main" : {
"title" : {
"type" : "StructuredText",
"fieldset" : "Title",
"config" : {
"single" : "heading1"
}
},
"lede" : {
@rudyrigot
rudyrigot / index.php
Created March 13, 2014 02:37
The controller of the page in prismic.io's Bootstrap example
<?php
/* Initializations */
require_once '../resources/config.php'; // this loads our specific configuration
require_once(LIBRARIES_PATH . "/Prismic.php"); // this loads our Prismic helpers, which include the prismic.io PHP kit
$ctx = Prismic::context(); // getting the context built from our configuration (like the Api object it initializes)
global $linkResolver; // getting the linkResolver object (more on this later)
/* Controller */
try {
// API calls