I hereby claim:
- I am texnixe on github.
- I am sonjabroda (https://keybase.io/sonjabroda) on keybase.
- I have a public key whose fingerprint is C827 C112 15AF AC65 CC19 2D8A 5078 A576 776F E582
To claim this, I am signing this object:
<h1>This is the title</h1> | |
Some text here |
<?php | |
Kirby::plugin('texnixe/imagetagtest', [ | |
'tags' => [ | |
'image' => [ | |
'attr' => [ | |
'alt', | |
'caption', | |
'class', | |
'height', |
# block content | |
location ~ ^/content/(.*).(txt|md|mdown)$ { | |
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
} | |
# block all files in the site folder from being accessed directly | |
location ~ ^/site/(.*)$ { | |
rewrite ^/site/(.*)$ /error redirect; | |
} |
input[type="text"], | |
textarea { | |
-webkit-appearance: none; | |
border: 0; | |
border-radius: 0; | |
font: inherit; | |
line-height: inherit; | |
resize: none; | |
width: 100%; | |
padding: 0; |
<?php | |
class Indexer { | |
static $fields; | |
static $methods; | |
static $site; | |
static function get($where = null, $num = 20, $hideDeleted = true) { | |
if (!static::$site) static::$site = site(); |
<?php | |
// page methods | |
// check if page has Parents | |
page::$methods['hasParents'] = function($page) { | |
return $page->parents()->count(); | |
}; | |
// get max nesting level of page |
<?php | |
/* Usage example: | |
* $filteredPages = $page('projects')->children()->visible()->filterByStructure('structureField', array( | |
* 'field1' => $value, | |
* 'field2' => $value | |
* )); | |
*/ | |
pages::$methods['filterByStructure'] = function($pages, $field, $options) { | |
$filteredPages = $pages->filter(function($p)use($field, $options) { | |
$structureField = $p->$field()->yaml(); |
I hereby claim:
To claim this, I am signing this object:
<?php | |
snippet('header'); | |
$tag = urldecode(param('tag')); | |
if(param('tag')) | |
$articles=$pages->visible()->filterBy('tags',$tag,',')->sortBy('date')->flip(); | |
?> | |
<main class="main"> | |
<section> | |
<h1><?php echo $page->title() . ' ' . $tag ?></h1> |
<?php | |
/** | |
* Move this file to /site/snippets/ and rename it video.php | |
*/ | |
// stop without videos | |
if(empty($videos)) return; | |
// set some defaults |