Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (98 sloc) 3.64 KB
<!doctype html><html lang="en" class="no-js" itemscope itemtype="">
<script src="./index.js"></script>
<script src="./netlify-identity.js"></script>
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", function () {
APIUrl: ""
} else {
APIUrl: ""
<title>Content Manager</title>
<body id="style-3" class="body" auth-false" itemscope itemtype="">
<div class="page">
<script src="./netlify-cms.js"></script>
<script src="../admin/cms/cms.js"></script>
// Internal id of the component
id: "youtube",
// Visible label
label: "Youtube",
// Fields the user need to fill out when adding an instance of the component
fields: [{name: 'id', label: 'Youtube Video ID', widget: 'string'}],
// Pattern to identify a block as being an instance of this component
pattern: /^youtube (\S+)$/,
// Function to extract data elements from the regexp match
fromBlock: function(match) {
return {
id: match[1]
// Function to create a text block from an instance of this component
toBlock: function(obj) {
return 'youtube ' +;
// Preview output for this component. Can either be a string or a React component
// (component gives better render performance)
toPreview: function(obj) {
return (
'<img src="' + + '/maxresdefault.jpg" alt="Youtube Video"/>'
<script charset="utf-8" src="//"></script>
UPLOADCARE_TABS = "file url facebook gdrive gphotos dropbox instagram evernote flickr skydrive";
UPLOADCARE_PUBLIC_KEY = "a10993e96ebedcb0dd54";
<script src="../admin/cms/preview-templates/HomePagePreview.js"></script>
<script src="../admin/cms/preview-templates/AboutPagePreview.js"></script>
<script src="../admin/cms/preview-templates/ArticlePagePreview.js"></script>
<script src="../admin/cms/preview-templates/PricingPagePreview.js"></script>
<script src="../admin/cms/preview-templates/ContactPagePreview.js"></script>
<script src="../admin/cms/preview-templates/PrivacyPagePreview.js"></script>
var PostPreview = createClass({
render: function() {
var entry = this.props.entry;
var image = entry.getIn(['data', 'image']);
var bg = image && this.props.getMedia(image);
return h('div', {},
h('div', {className: "hero"},
h('h1', {}, entry.getIn(['data', 'title'])),
bg ? h('img', {src: bg.toString()}) : null
h('p', {},
h('small', {}, "Written " + entry.getIn(['data', 'date']))
h('div', {"className": "text"}, this.props.widgetFor('body'))
CMS.registerPreviewTemplate('home', HomePagePreview)
CMS.registerPreviewTemplate('about', AboutPagePreview)
CMS.registerPreviewTemplate('pricing', PricingPagePreview)
CMS.registerPreviewTemplate('contact', ContactPagePreview)
CMS.registerPreviewTemplate('privacy', PrivacyPagePreview)
CMS.registerPreviewTemplate('blog', ArticlePreview)
export default {
You can’t perform that action at this time.