Skip to content

Instantly share code, notes, and snippets.

View starckio's full-sized avatar
🍼
Baby boy !

Christopher Boutillé starckio

🍼
Baby boy !
View GitHub Profile
<?php snippet('header') ?>
<section class="content cf">
<?php if(param('tag')) {
$articles = $pages->find('blog')
->children()
->visible()
->filterBy('tags', param('tag'), ',')
@starckio
starckio / blog.php
Last active August 29, 2015 14:24 — forked from bastianallgeier/blog.php
<?php
$blogs = $pages->findByUID('blog1', 'blog2');
$articles = $blogs->children()->sortBy('date', 'desc');
// if you want you can add a limit or pagination to that set of articles
// afterwards just use a regular foreach loop to go through them all.
?>
@starckio
starckio / index.php
Last active August 29, 2015 14:23
Reducing codes css in php for Kirby CMS.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?php echo $site->title()->html() ?> | <?php echo $page->title()->html() ?></title>
<meta name="description" content="<?php echo $site->description()->html() ?>">
<meta name="keywords" content="<?php echo $site->keywords()->html() ?>">
@starckio
starckio / Reset Launchpad
Last active August 29, 2015 14:07
Reset Launchpad on OS X 10.10 - Yosemite
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
<?php $n=0; foreach($page->children()->visible()->flip() as $article): $n++; ?>
<?php if($n==1): ?>
<!-- html for your first article -->
<?php else: ?>
<!-- html for all the other articles -->
<?php endif ?>
<?php endforeach ?>