Source codes of this website

This site is powered by Nette Framework and uses templating engine Latte. See how you can use Nette as a micro-framework. View source codes on Github.

index.php

<?php

declare(strict_types=1);

require __DIR__ . '/../vendor/autoload.php';


$configurator = new Nette\Bootstrap\Configurator;

// Enable Nette Debugger for error visualisation & logging
$configurator->enableTracy(__DIR__ . '/app/log');

// Configure libraries
Twitter::$cacheDir = Feed::$cacheDir = __DIR__ . '/app/temp/cache';
$configurator->setTempDirectory(__DIR__ . '/app/temp');

// Create Dependency Injection container from config.neon file
$configurator->addConfig(__DIR__ . '/app/config.neon');
$container = $configurator->createContainer();


// Setup routes
// https://davidgrudl.com/[cs|en]
$router = $container->getService('router');
$router->addRoute('[index.php][<lang (?-i)cs|en>]', function ($presenter, $lang) use ($container) {
    if (!$lang) {
        $lang = $container->getByType(Nette\Http\Request::class)->detectLanguage(['en', 'cs']) ?: 'cs';
        return $presenter->redirectUrl($lang);
    }

    // create template
    $template = $presenter->createTemplate()
        ->setFile(__DIR__ . '/app/' . $lang . '.latte');

    // register template helpers like {$foo|date}
    $template->addFilter('date', function ($date) use ($lang) {
        if ($lang === 'en') {
            return date('F j, Y', (int) $date);
        } else {
            static $months = [1 => 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'];
            $date = getdate((int) $date);
            return "$date[mday]. {$months[$date['mon']]} $date[year]";
        }
    });

    $template->addFilter('tweet', fn($s) => Twitter::clickable($s));

    $template->twitter = function ($name) use ($container) {
        try {
            return $container->getService($name)->load(Twitter::ME);
        } catch (TwitterException $e) {
            return [];
        }
    };

    $template->rss = function ($path) {
        try {
            return Feed::loadRss($path)->item;
        } catch (FeedException $e) {
            return [];
        }
    };

    $template->addFilter('texy', fn(Latte\Runtime\FilterInfo $info, $s) => (new Texy)->process($s));

    return $template;
});


// https://davidgrudl.com/sources
$router->addRoute('sources', function ($presenter) use ($container) {
    $template = $presenter->createTemplate()
        ->setFile(__DIR__ . '/app/sources.latte');

    $template->source = fn($file, $lang = null) => new Latte\Runtime\Html(preg_replace('#<br ?/?>#', '', highlight_file($file, true)));
    return $template;
});


// Run the application!
$container->getByType(Nette\Application\Application::class)->run();

app/config.neon

php:
    date.timezone: Europe/Prague

application:
    scanDirs: no

services:
    twitterDavidGrudl: DG\Twitter\Twitter(...secret keys...)

    twitterGeekovo: DG\Twitter\Twitter(...secret keys...)

app/@layout.latte

<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="David Grudl; https://davidgrudl.com">

    <title>{block title|striphtml|trim}David Grudl.com{/block}</title>

    <link rel="stylesheet" href="{$basePath}/css/screen.css">
    <link rel="shortcut icon" href="{$basePath}/favicon.ico">
    <link href="https://fonts.googleapis.com/css?family=Bree+Serif&amp;subset=latin,latin-ext" rel="stylesheet">
</head>

<body>
    {include content}

    <script src="{$basePath}/js/jquery.js"></script>
    <script src="{$basePath}/js/jquery-ui-custom.js"></script>
    <script src="{$basePath}/js/jquery.ui.touch-punch.js"></script>
    <script src="{$basePath}/js/turn.js"></script>
    <script src="{$basePath}/js/main.js"></script>
</body>
</html>

app/cs.latte

{layout "@layout.latte"}
{block content}

<nav id="menu">
    <ul>
        <li><a href="#about">KDO JSEM</a></li>
        <li><a href="#projects">PROJEKTY</a></li>
        <li><a href="#trainings">ŠKOLENÍ</a></li>
        <li><a href="#twitter">TWITTER</a></li>
        <li><a href="#blog">BLOG</a></li>
        <li><a href="#interviews">ROZHOVORY</a></li>
        <li><a href="#talks">PŘEDNÁŠKY</a></li>
        <li><a href="#contact">KONTAKT</a></li>
        <li><a href="en">english</a></li>
    </ul>
</nav>

<div id="content">
    <section id="about">
        <h1 id="logo" n:block="title">David Grudl</h1>

        <p class="lead">Vymýšlím software co pohání spoustu webů, které dnes a denně používáte. Přednáším, školím, píšu.</p>

        <div id="photo"></div>
        {block|texy|indent:2}
Jsem spisovatel programů, bloger a kdovíco ještě.
Vytvořil jsem populární open source projekty "Nette Framework":https://nette.org, Latte, Tracy, databázovou vrstvu "dibi":https://dibiphp.com, Texy a mnoho dalších.
Začal jsem s programováním v éře DOSu, chvíli se věnoval grafice a sázel třeba noviny, nyní se zaměřuji výhradně na webové aplikace v PHP.

A když zrovna neprogramuji, tak píši blog "La Trine":www.latrine.cz, který byl nominovaný na cenu Magnesia Litera, odborný blog "phpFashion":https://phpfashion.com,
"školím vývoj webových aplikací":www.skoleniphp.cz nebo běhám závody Spartan Race či maratony.

Najdete mě taky na "Facebooku":https://www.facebook.com/davidgrudl a Twitteru jako "@davidgrudl":https://twitter.com/DavidGrudl a "@geekovo":https://twitter.com/geekovo.

 "chci vědět mnohem víc » .[lead]":#more{/block}

        <div id="more">{block|texy|indent:3}
Opravdu chcete vědět více? Dobrá. Narodil jsem se v Břeclavi ještě za dob socialismu. První programátorskou
zkušenost jsem získal s "počítači TNS":https://www.youtube.com/watch?v=pleK0PI0elg. Vystudoval gymnázium, kde jsem dosáhl takové
popularity, že učitelé můj odchod oslavili velkolepým večírkem. Poté jsem odešel za studii do velkoměsta. Do Brna.
Příležitostně jsem se živil jako grafik v reklamní agentuře a sázel noviny Břeclavsko.

V roce 1999 jsem založil firmu prodávající bezdrátové modemy a začal se také zajímat o webdesign, neboť jsem byl lakomý zaplatit
15 tisíc studentovi za vytvoření e-shopu. Tvorba webů a webových aplikací se postupně stala mým hlavním zájmem.

Roku 2004 spatřil světlo světa "La Trine":www.latrine.cz, ryze odborný blog s drtivou převahou neodborných článků. Původně
na doméně dgx.cz, kterou jsem však i s blogem prodal roku 2008 za nehoráznou sumu novému majiteli. Blogování mě mělo naučit
lépe psát, což se nestalo, kupodivu i tak patřilo La Trine mezi nejčtenější české blogy, a dokonce si vysloužilo nominaci na cenu Magnesia Litera.
Naučilo mě snášet kritické a urážlivé komentáře od kolemjdoucích anonymů.

Začátkem roku 2005 jsem vydal první počin na poli open-source, tedy bezplatných volně šiřitelných programů. Šlo o knihovnu "Texy!":https://texy.info
usnadňující psaní a formátování textů pro web. Knihovna se stala populární, používá ji hojné množství webů, počínaje blogy až po komplexní
e-shopy, jako například Mall.cz. O rok později jsem zveřejnil databázovou vrstvu "Dibi":https://dibiphp.com, která se taktéž
setkala s přízní programátorů. O další rok později přichází na řadu zatím největší projekt "Nette Framework":https://nette.org.

Na rozdíl od předchozích knihoven se Nette Framework stal oblíbený ještě dřív, než ho kdokoliv viděl. Oficiálně byl
představen na konferenci *PHP frameworky podzim 2007*, o několik měsíců později i zveřejněn. Dnes se řadí mezi
nejpoužívanější PHP frameworky u nás, mezi referencemi najdeme i řadu nadnárodních společností. Vypisuji
veřejná "školení Nette Framework":https://www.skoleniphp.cz/skoleni-nette-vyvoj-webovych-aplikaci.
Kolem frameworku vznikla silná komunita programátorů, kteří se pravidelně scházejí každý měsíc na tzv. "Posobotě":www.posobota.cz.

V roce 2008 jsem pochopil, jak funguje Twitter, omezil blogování a začal twítovat jako
"@DavidGrudl":https://twitter.com/DavidGrudl, během Microsoftí konference BUILD 2011 jsem si ještě založil zvlášť účet
"@geekovo":https://twitter.com/geekovo pro počítačové záležitosti, abych jimi neotravoval slušné lidi.

Roku 2010 jsem se přestěhoval do Prahy a vytvořil web prezidenta republiky "Václava Klause":https://www.klaus.cz, který běží na Nette
Framework. Po celou dobu své existence funguje bez jakékoliv zaškobrtnutí, padl pod nečekanou tíhou zájmu jen 1. ledna, když prezident v televizi
ohlásil amnestii, aniž by se před tím poradil se svým webdesignerem.

V roce 2013 na afterpárty konference WebExpo jsem si poprvé vyzkoušel stand-up, tedy stoupnout si s mikrofonem před lidi a bavit je.
Ukázalo se, že je to řádově snadnější než si připravovat odborné přednášky, neboť stačí kecat kraviny a nemusíte si ani připravovat slajdy.
I přes toto zjištění ke stand-up komikům chovám stále něco jako respekt.

Roku 2016 jsem z nějakého důvodu pojal jako dobrý nápad se zúčastnit šílených běžeckých závodů Spartan Race, kde se lidé brodí bahnem,
zdolávají překážky a dělají nespočet angličáků, a začal s tréninkem. O rok později na 27kilometrovém Spartan Race Beast na sjezdovkách
v okolí Ještědu jsem měl spoustu času tento nápad revidovat.

Obrovskou výzvou a radostí byla spolupráce na crowdfundingové sbírce "Naděje pro Ninu":www.nadejeproninu.cz, která sháněla peníze na léčbu
holčičky postižené spinální svalovou atrofií. "Povedlo se!":https://www.latrine.cz/3-624-265-kc.

Říká se, že u mužů je čtyřicátý rok života ve znamení 3M (motorka, marathon, milenka). Říká se to správně.

Aby crowdfundingových sbírek nebylo málo, spustil jsem v roce 2018 jednu takovou pro podporu vývoje "Nette Framework":https://nette.org/cs/donate.
{/block}
        </div>

        <hr>

        <p><a href="files/david-grudl.jpg">Foto ke stažení</a></p>
    </section>


    <section id="projects">
        <h1>Projekty</h1>

        <div class="boxes">
        <div class="box">
            <div><a href="https://nette.org" class="img"><img src="{$basePath}/images/nette.jpg" alt="Nette Framework"></a></div>
        </div>

        <div class="box">
            <h2><a href="https://nette.org">Nette Framework</a></h2>

            <p>Populární nástroj pro vytváření webových aplikací v PHP. Je srozumitelný, při programování vám vychází
            vstříc a nepřidělává vrásky. Eliminuje bezpečnostní rizika, ctí AJAX, DRY, KISS, MVC a znovupoužitelnost.</p>
        </div>
        </div>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://dibiphp.com">dibi</a></h2>
            <div>
                <a href="https://dibiphp.com" class="img"><img src="{$basePath}/images/dibi.jpg" alt="dibi"></a>
                <p>Dibi je chytrý a malý databázový layer pro PHP 5 s velmi šikovným API.</p>
            </div>
        </div>

        <div class="box">
            <h2><a href="https://texy.info">Texy</a></h2>
            <div>
                <a href="https://texy.info" class="img"><img src="{$basePath}/images/texy.jpg" alt="Texy!"></a>
                <p>Texy je program, díky kterému můžete snadno psát texty na webové stránky.</p>
            </div>
        </div>
        </div>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://www.umeligence.cz">Uměligence</a></h2>
            <div>
                <a href="https://www.umeligence.cz" class="img"><img src="{$basePath}/images/umeligence.png" alt="Uměligence"></a>
                <p>Vše podstatné, co potřebuješ vědět o umělé inteligenci. Průvodce ve světě AI.</p>
            </div>
        </div>

        <div class="box">
            <h2><a href="https://ne-on.org">NEON</a></h2>
            <div>
                <a href="https://ne-on.org" class="img"><img src="{$basePath}/images/neon.png" alt="NEON"></a>
                <p>NEON je formát pro serializaci strukturovaných dat do lidsky srozumitelné podoby.</p>
            </div>
        </div>
        </div>
    </section>


    <section id="trainings">
        <h1><a href="https://www.skoleniphp.cz"><span>Školení a kurzy</span> www.skoleniphp.cz</a>
            <a href="https://www.skoleniphp.cz/feed.xml" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h1>

        <div class="box">
            <div>
                <ul>
                {foreach $rss('https://www.skoleniphp.cz/feed.xml') as $item}
                    <li><span class="date">{$item->description}</span><br><a href={$item->link}>Školení {$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>
    </section>


    <section id="twitter">
        <h1><a href="https://twitter.com/DavidGrudl"><span>Twitter</span> @DavidGrudl</a></h1>

        <div class="box">
            <div>
                <ul>
                {foreach $twitter('twitterDavidGrudl') as $status}
                {skipIf (string) $status->in_reply_to_status_id}
                {breakIf $iterator->counter > 3}
                    <li>{$status|tweet|noescape}</li>
                {/foreach}
                </ul>

                <p><a href="https://twitter.com/DavidGrudl">…more on Twitter</a></p>
            </div>
        </div>

        <h1><a href="https://twitter.com/geekovo"><span>Twitter</span> @geekovo</a></h1>

        <div class="box">
            <div>
                <ul>
                {foreach $twitter('twitterGeekovo') as $status}
                {skipIf (string) $status->in_reply_to_status_id}
                {breakIf $iterator->counter > 3}
                    <li>{$status|tweet|noescape}</li>
                {/foreach}
                </ul>
                <p><a href="https://twitter.com/geekovo">…more on Twitter</a></p>
            </div>
        </div>
    </section>


    <section id="blog">
        <h1>Blog</h1>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://www.latrine.cz">La Trine</a>
                <a href="https://www.latrine.cz/feed/rss" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h2>

            <div>
                <ul>
                {foreach $rss('https://www.latrine.cz/feed/rss') as $item}
                {breakIf $iterator->counter > 5}
                    <li><a href={$item->link}>{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>


        <div class="box">
            <h2><a href="https://phpfashion.com">phpFashion</a>
                <a href="https://phpfashion.com/feed/rss" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h2>

            <div>
                <ul>
                {foreach $rss('https://phpfashion.com/feed/rss') as $item}
                {breakIf $iterator->counter > 5}
                    <li><a href={$item->link}>{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>
        </div>
    </section>


    <section id="interviews">
        <h1>Rozhovory</h1>

        <div class="box">
            <div>
                <ul>
                {foreach $rss('https://davidgrudl.com/interviews.xml') as $item}
                    <li><span class="date right">{$item->timestamp|date}</span> <a href={$item->link} n:tag-if="$item->link">{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>
    </section>


    <section id="talks">
        <h1>Přednášky <a href="https://davidgrudl.com/talks.xml" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h1>

        <div class="box">
            <div>
                <ul>
                {foreach $rss('https://davidgrudl.com/talks.xml')->item as $item}
                    <li><span class="date right">{$item->timestamp|date}</span> <a href={$item->link} n:tag-if="$item->link">{$item->title}</a>
                    <div class="more">{$item->{'content:encoded'}|noescape}</div></li>
                {/foreach}
                </ul>
            </div>
        </div>
    </section>


    <section id="contact" class="h-card vcard">
        <h1>Kontakt</h1>

        <div class="box">
            <h2>Obchodní a fakturační údaje</h2>
            <div>
                <p><span class="p-name fn">David Grudl</span><br>
                <span class="p-adr adr"><span class="p-street-address street-address">Korunní 2569/108</span><br>
                <span class="p-postal-code postal-code">101 00</span> <span class="p-locality locality">Praha</span></span></p>

                <p>IČ: 69663963 (nejsem plátce DPH)</p>

                <p>E-mail <a href="mailto:david&#64;grudl.com" class="u-email email">david&#64;<!---->grudl.com</a></p>
            </div>
        </div>


        <div class="box">
            <h2>Bankovní spojení</h2>
            <div>
                <p>670100–2200142627 / 6210 (mBank)<br>
                <small>IBAN: CZ62 6210 6701 0022 0014 2627, BIC: BREXCZPP</small></p>
            </div>
        </div>


        <div class="box">
            <div>
                <p class="tiny">Zapsáno na živnostenském úřadě městské části Praha 7, č. j. MČ P7 011455/2017/OŽV/Pey, spisová značka SZ MČ P7 010973/2017.</p>
            </div>
        </div>
    </section>

    <footer>&copy; David Grudl</footer>
</div>

app/en.latte

{layout "@layout.latte"}
{block content}

<nav id="menu">
    <ul>
        <li><a href="#about">ABOUT ME</a></li>
        <li><a href="#projects">PROJECTS</a></li>
        <li><a href="#blog">BLOG</a></li>
        <li><a href="#interviews">INTERVIEWS</a></li>
        <li><a href="#talks">TALKS</a></li>
        <li><a href="#contact">CONTACT</a></li>
        <li><a href="cs">česky</a></li>
    </ul>
</nav>

<div id="content">
    <section id="about">
        <h1 id="logo" n:block="title">David Grudl</h1>

        <p class="lead">I invent software that runs a lot of websites you use everyday. I am speaker, trainer and writer.</p>

        <div id="photo"></div>

        {block|texy|indent:2}
I am a software developer (PHP since 1999) and publicist.
I created popular open source project "Nette Framework":https://nette.org,
database layer "dibi":https://dibiphp.com, human friendy markup to XHTML converter "Texy!":https://texy.info and many others.
I started programming in the DOS era, now I am focused solely on web-based applications in PHP.
And when I do not program, I write blogs, train web application development, or run Spartan Race.
 "more »":#more{/block}

        <div id="more">{block|texy|indent:3}
Do you really want to know more? All right. David Grudl was born in Břeclav, Czech Republic, even during the period of socialism.
The first programming experience gained with the "TNS computer":https://www.youtube.com/watch?v=o8IDMf_A6Lo. He graduated on grammar school,
then he attended high schools in Brno. Occasionally, he worked as a graphic designer for an advertising agency and newspaper typographer.

Are you sure you want to know more? Good. David Grudl was born in Břeclav in the days of socialism. The first programmer
experience gained with "TNS computers":https://www.youtube.com/watch?v=o8IDMf_A6Lo. He graduated from the grammar school where he did
popularity, that his teachers celebrated his departure with a grand party. He then went to study colleges in Brno.
Occasionally, he worked as a graphic designer in an advertising agency and he was a newspaper typesetter.

He founded a wireless modem company in 1999 and was also interested in webdesign because he was stingy to pay
students to create an e-shop. Website and web application development has gradually become its main concern.

In 2004 he launched blog "La Trine":www.latrine.cz, a purely professional blog with the overwhelming majority of unprofessional articles. Originally
on the dgx.cz domain, which he also sold with the blog in 2008 at a exorbitant price to the new owner. Blogging should teach him
better to write, which did not happen, but surprisingly, La Trine was one of the most widely read Czech blogs. The author has learned to tolerate critical
and offensive comments from anonymous.

In early 2005 he released his first open-source library "Texy!":https://texy.info for easy typing and formatting text for the web.
The library has become popular, it uses a lot of websites, from blogs to complex
e-shops, such as Mall.cz. A year later, he released the database layer "Dibi":https://dibiphp.com, which also
met with considerable favor among programmers. A year later comes the biggest project "Nette Framework":https://nette.org.

Unlike previous libraries, Nette Framework became popular even before anyone saw it. It was officially introduced at the
*PHP Framework Autumn 2007* conference, a few months later also released. Today is one of the most widely used PHP frameworks in Czechia,
we can find a number of multinational companies among the references. David Grudl offers a public "training Nette Framework":https://www.skoleniphp.cz/skoleni-nette-vyvoj-webovych-aplikaci,
and "JQuery & AJAX course":https://www.skoleniphp.cz/skoleni-jquery. Around framework was established strong community of programmers who
meet each month on the "Last Saturday":www.posobota.cz event.

In 2008, David Grudl understand how Twitter works and started to tweet as
"@DavidGrudl":https://twitter.com/DavidGrudl. During Microsoft's conference BUILD 2011 he founded separate account
"@Geekovo":https://twitter.com/geekovo for computer stuff.

In January 2010, he created the web site of President of the Czech Republic "Vaclav Klaus":https://www.klaus.cz that is Nette
Framework powered. A few months later, he, his girlfriend and dog moved to Prague.{/block}
        </div>

        <hr>

        <p><a href="files/david-grudl.jpg">Photo for download</a></p>
    </section>


    <section id="projects">
        <h1>Projects</h1>

        <div class="boxes">
        <div class="box">
            <div><a href="https://nette.org" class="img"><img src="{$basePath}/images/nette.jpg" alt="Nette Framework"></a></div>
        </div>

        <div class="box">
            <h2><a href="https://nette.org">Nette Framework</a></h2>

            <p>A popular tool for creating web applications in PHP. Powerful and understandable tool that satisfies
            the programmers. It eliminates security risks, honors for AJAX, DRY, KISS, MVC and code reuse.</p>
        </div>
        </div>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://dibiphp.com">dibi</a></h2>
            <div>
                <a href="https://dibiphp.com" class="img"><img src="{$basePath}/images/dibi.jpg" alt="dibi"></a>
                <p>Dibi is a smart and tiny database abstraction library for PHP 5 with very handy API.</p>
            </div>
        </div>

        <div class="box">
            <h2><a href="https://texy.info">Texy</a></h2>
            <div>
                <a href="https://texy.info" class="img"><img src="{$basePath}/images/texy.jpg" alt="Texy!"></a>
                <p>Texy is text-to-HTML formatter. It allows you to write
                structured documents using easy-to-read plain text.</p>
            </div>
        </div>
        </div>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://www.umeligence.cz">Umeligence</a></h2>
            <div>
                <a href="https://www.umeligence.cz" class="img"><img src="{$basePath}/images/umeligence.png" alt="Umeligence"></a>
                <p>Everything you need to know about artificial intelligence. A guide to the world of AI.</p>
            </div>
        </div>

        <div class="box">
            <h2><a href="https://ne-on.org">NEON</a></h2>
            <div>
                <a href="https://ne-on.org" class="img"><img src="{$basePath}/images/neon.png" alt="NEON"></a>
                <p>NEON is a human friendly data serialization format for programming languages, similar to YAML.</p>
            </div>
        </div>
        </div>
    </section>


    <section id="blog">
        <h1>Blog</h1>

        <div class="boxes">
        <div class="box">
            <h2><a href="https://www.latrine.cz">La Trine</a>
                <a href="https://www.latrine.cz/feed/rss" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h2>

            <div>
                <ul>
                {foreach $rss('https://www.latrine.cz/feed/rss') as $item}
                {breakIf $iterator->counter > 5}
                    <li><a href={$item->link}>{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>


        <div class="box">
            <h2><a href="https://phpfashion.com">phpFashion</a>
                <a href="https://phpfashion.com/feed/rss" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h2>

            <div>
                <ul>
                {foreach $rss('https://phpfashion.com/feed/rss') as $item}
                {breakIf $iterator->counter > 5}
                    <li><a href={$item->link}>{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>
        </div>
    </section>


    <section id="interviews">
        <h1>Interviews</h1>

        <div class="box">
            <div>
                <ul>
                {foreach $rss('https://davidgrudl.com/interviews.xml') as $item}
                    <li><span class="date right">{$item->timestamp|date}</span> <a href={$item->link} n:tag-if="$item->link">{$item->title}</a></li>
                {/foreach}
                </ul>
            </div>
        </div>
    </section>


    <section id="talks">
        <h1>Talks <a href="https://davidgrudl.com/talks.xml" class="img"><img src="{$basePath}/images/rss.png" alt="RSS FEED"></a></h1>

        <div class="box">
            <div>
                <ul>
                {foreach $rss('https://davidgrudl.com/talks.xml') as $item}
                    <li><span class="date right">{$item->timestamp|date}</span> <a href={$item->link} n:tag-if="$item->link">{$item->title}</a>
                    <div class="more">{$item->{'content:encoded'}|noescape}</div></li>
                {/foreach}
                </ul>
            </div>
        </div>
    </section>


    <section id="contact" class="h-card vcard">
        <h1>Contact</h1>

        <div class="box">
            <h2>Address</h2>

            <div>
                <p><span class="p-name fn">David Grudl</span><br>
                <span class="p-adr adr"><span class="p-street-address street-address">Korunní 2569/108</span><br>
                <span class="p-postal-code postal-code">101 00</span> <span class="p-locality locality">Praha</span></p>
                <span class="p-country-name country-name">The Czech Republic</span></span></p>

                <p>E-mail <a href="mailto:david&#64;grudl.com" class="u-email email">david&#64;<!---->grudl.com</a></p>
            </div>
        </div>
    </section>

    <footer>&copy; David Grudl</footer>
</div>

app/sources.latte

{layout "@layout.latte"}
{block content}

<nav id="menu">
    <ul>
        <li><a href="#index-php">index.php</a></li>
        <li><a href="#config-neon">app/config.neon</a></li>
        <li><a href="#layout-latte">app/@layout.latte</a></li>
        <li><a href="#cs-latte">app/cs.latte</a></li>
        <li><a href="#en-latte">app/en.latte</a></li>
        <li><a href="#sources-latte">app/sources.latte</a></li>
        <li><a href="en">back</a></li>
    </ul>
</nav>

<div id="content">
    <section id="soruces">
        <h1 id="logo" n:block="title">Source codes of this website</h1>

        <p>This site is powered by <a href="https://nette.org">Nette Framework</a> and uses
        templating engine <a href="https://latte.nette.org">Latte</a>. See how you can use Nette as a micro-framework.
        View source codes on <a href="https://github.com/dg/davidgrudl.com">Github</a>.</p>
    </section>

    <h2 id="index-php">index.php</h2>
    <pre>{$source('index.php', 'Php')}</pre>

    <h2 id="config-neon">app/config.neon</h2>
    <pre>{$source('app/config.neon', 'Javascript')}</pre>

    <h2 id="layout-latte">app/@layout.latte</h2>
    <pre>{$source('app/@layout.latte', 'LatteHtml')}</pre>

    <h2 id="cs-latte">app/cs.latte</h2>
    <pre>{$source('app/cs.latte', 'LatteHtml')}</pre>

    <h2 id="en-latte">app/en.latte</h2>
    <pre>{$source('app/en.latte', 'LatteHtml')}</pre>

    <h2 id="sources-latte">app/sources.latte</h2>
    <pre>{$source('app/sources.latte', 'LatteHtml')}</pre>

    <footer>&copy; David Grudl</footer>
</div>