This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
width: 500px; | |
border: 5px solid black; | |
display: flex; | |
item-align: stretch; | |
} | |
.item { | |
flex: 1 1 auto; | |
width: 100px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
width: 500px; | |
border: 5px solid black; | |
display: flex; | |
} | |
.item { | |
flex: 1 1 auto; | |
width: 100px; | |
height: 100px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="item one"> </div> | |
<div class="item two"></div> | |
<div class="item three"></div> | |
<div class="item four"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getOpenGraphImage( default_img ) { | |
var image_url = ''; | |
// Find out if there are any images added to this content, and use it for Open Graph | |
if ( me.content.data.image || me.content.data.images ) { | |
var og_images; | |
var og_images_arr; | |
// Choose the correct attribute | |
if ( me.content.data.image ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getMetaDescription() { | |
var moduleNamePropertyName = module.name.replace(/\./g,'-'); | |
var metaDescription = ''; | |
if (me.content.x[moduleNamePropertyName]) { | |
if (me.content.x[moduleNamePropertyName]['metadata']) { | |
if (me.content.x[moduleNamePropertyName]['metadata']['seo-preface']) { | |
metaDescription = me.content.x[moduleNamePropertyName]['metadata']['seo-preface']; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPageTitle() { | |
var moduleNamePropertyName = module.name.replace(/\./g,'-'); | |
var metaTitle = ''; | |
if (me.content.x[moduleNamePropertyName]) { | |
if (me.content.x[moduleNamePropertyName]['metadata']) { | |
if (me.content.x[moduleNamePropertyName]['metadata']['seo-title']) { | |
metaTitle = me.content.x[moduleNamePropertyName]['metadata']['seo-title']; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// INCLUDES | |
var UTIL = require('util/js/util'); // Default root path it looks in is "/cms/lib/" for all require-statements, also ".js" is the default file ending. | |
//var UTIL = require('/cms/lib/util/js/util.js'); // Same as above | |
// SETTINGS | |
var VIEW = 'default.html'; | |
// Handle GET request | |
exports.get = handleGet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// INCLUDES | |
var UTIL = require('util/js/util'); // Default root path it looks in is "/cms/lib/" for all require-statements, also ".js" is the default file ending. | |
//var UTIL = require('/cms/lib/util/js/util.js'); // Same as above | |
// SETTINGS | |
var VIEW = 'default.html'; | |
// Handle GET request | |
exports.get = handleGet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="no"> | |
<head> | |
<title data-th-text="${pageTitle}">Default Title</title> | |
<meta name="description" data-th-attr="content=${metaDescription}" content="Default Meta Description ..."/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<meta property="og:title" data-th-attr="content=${og.title}" /> | |
<meta property="og:description" data-th-attr="content=${og.description}" /> | |
<meta property="og:site_name" data-th-attr="content=${og.sitename}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module> | |
<display-name>Your module name</display-name> | |
<info>Short explanation</info> | |
<url>http://enonic.com</url> | |
<vendor> | |
<name>Enonic AS</name> | |
<url>http://www.enonic.com</url> | |
</vendor> | |
<dependencies system-min-version="5.0.0" system-max-version="6.0.0"/> |
NewerOlder