{extends "../@layout.xml"}

{block title}{$note->getName()}{/block}

{block header}
    {var author = $note->getOwner()}
    <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
    »
    <a href="/notes{$author->getId()}">{_notes}</a>
    »
    {$note->getName()}
{/block}

{block content}
    <style>
        #userContent img {
            max-width: 245pt;
            max-height: 200pt;
        }
        
        #userContent blockquote {
            background-color: #f3f3f3;
            border-bottom: 5px solid #969696;
            padding: 1;
        }
            
        #userContent cite {
            margin-top: 1em;
            display: block;
        }
            
        #userContent cite::before {
            content: "— ";
        }
    </style>
    
    <article id="userContent" style="min-height: 300pt;">
        {$note->getText()|noescape}
    </article>
    
    <div style="width: 100%; min-height: 100px;">
        <div style="float: left; min-height: 100px; width: 70%;">
        {include "../components/comments.xml",
                 comments => $comments,
                 count => $cCount,
                 page => $cPage,
                 model => "notes",
                 parent => $note}
        </div>
        <div style="float: right; min-height: 100px; width: 30%;">
            <h4>{_actions}</h4>
            <div n:if="isset($thisUser) && $thisUser->getId() === $note->getOwner()->getId()">
                <a id="_noteDelete" href="/note{$note->getOwner()->getId()}_{$note->getId()}/delete" class="profile_link" style="display:block;width:96%;">{_delete}</a>
            </div>
        </div>
    </div>
{/block}
