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
<?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 ?> |
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
<?php $zeiten = page('oeffnungszeiten') ?> | |
<?php if($zeiten->status() == 'normal'): ?> | |
<!-- hier werden die öffnungszeiten abhängig vom tag angezeigt --> | |
<?php else if($zeiten->status() == 'open'): ?> | |
<!-- hier wird einfach nur angezeigt dass geöffnet ist --> | |
<?php else: ?> | |
<!-- hier wird angezeigt dass geschlossen ist --> | |
<?php endif ?> |
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
<?php echo $page->image('someimage.jpg')->dataURI() ?> |
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
<?php snippet('header') ?> | |
<h2>English Version</h2> | |
<h3><?php echo $page->content('en')->title()->html() ?></h3> | |
<?php echo $page->content('en')->text()->kirbytext() ?> | |
<h2>German Version</h2> | |
<h3><?php echo $page->content('de')->title()->html() ?></h3> |
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
<img src="<?php $page->image()->crop(300, 200)->url() ?>" alt="Cropped by width and height"> | |
<img src="<?php $page->image()->crop(300)->url() ?>" alt="Cropped box"> | |
<img src="<?php $page->image()->resize(300, 200)->url() ?>" alt="Resized by width and height"> | |
<img src="<?php $page->image()->resize(300)->url() ?>" alt="Resized by width only"> | |
<img src="<?php $page->image()->resize(false, 200)->url() ?>" alt="Resized by height only"> |
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
<?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. | |
?> |
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($) { | |
$.fn.smoothScroll = function() { | |
return this.on('click', function() { | |
var hash = $(this).attr('href'); | |
var dest = $(hash).offset(); | |
$('html:not(:animated),body:not(:animated)').animate({scrollTop: dest.top, scrollLeft: dest.left}, 500, function() { | |
window.location.hash = hash; |
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
<?php $article = $pages->find('blog')->children()->last() ?> | |
<div class="footer"> | |
<div class="container"> | |
<div class="grid full"> | |
// Displays the latest blog article | |
<h3><?php echo html($article->title()) ?></h3> | |
<small><?php echo html($article->Published()) ?></small> | |
<p><?php echo excerpt($article->text(), 250) ?>... <a href="<?php echo html($article->url()) ?>">Continue reading</a></p> | |
</div> | |
<div class="cf"></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
git submodule add https://github.com/getkirby/kirby.git | |
git submodule add https://github.com/getkirby/panel.git | |
git submodule update --init --recursive |
OlderNewer