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
title: Contact
preset: page
icon: 📮
status:
draft: Draft
listed: Published
fields:
to:
@starckio
starckio / controller-send.php
Last active January 18, 2018 10:07
Create a page with send image[s] from the frontend.
<?php
return function($site, $pages, $page) {
$alert = null;
$messages = null;
if(r::is('post') && get('submit')) {
if(!empty(get('subject'))) {
// lets tell the bot that everything is ok
@starckio
starckio / blueprints--contact.yml
Last active February 8, 2019 21:56 — forked from bastianallgeier/controllers--contact.php
Plain contactform example for Kirby 2
title: Contact
pages: false
fields:
title:
label: Page
type: text
width: 1/4
subtitle:
label: Title
type: text
@starckio
starckio / cart.php
Last active August 20, 2017 17:44
The Params :)
<?php snippet('header') ?>
<?php if($count > 0): ?>
<main id="cart" class="main cf" role="main">
<?php if(param('checkout') == 'cheque'): ?>
<!-- Formulaire -->
@starckio
starckio / header.php
Created May 4, 2017 23:13
Minimisation des fichiers CSS et affichage direct dans la balise <style></style>.
<!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 / menu.php
Last active March 18, 2017 19:26
Correct - Theme Roon
<nav role="navigation">
<ul class="menu cf">
<?php foreach($pages->visible() as $p): ?>
<li>
<a <?php e($p->isOpen(), ' class="active"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a>
</li>
<?php endforeach ?>
<?php foreach($site->languages() as $language): ?>
<meta name="description" content="<?php echo $page->description()->or($site->description()) ?>">
@starckio
starckio / donate.js
Created October 20, 2016 10:20
Systeme de donation PayPal - For GetKirby-Themes.com
function getEventTarget(e) {
e = e || window.event;
return e.target || e.srcElement;
}
function removeClass (argument) {
for (var i = argument.length - 1; i >= 0; i--) {
argument[i].className = ""
}
}
git submodule add https://github.com/getkirby/kirby.git
git submodule add https://github.com/getkirby/panel.git
git submodule update --init --recursive
@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.
?>