<!doctype html>  
<head>
    <base href="<?PHP echo $this->base; ?>" /> 

    <meta charset="utf-8">

    <title>selfoss</title>
    
    <meta name="description" content="selfoss" />
    <meta name="author" content="Tobias Zeising" />
    <meta name="version" content="<?PHP echo \F3::get('version'); ?>" />

    <!--  Mobile viewport optimized: j.mp/bplateviewport -->
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" />
    
    <!--  Add support for fullscreen Webapp on iPhone 5 -->
    <meta name="viewport" content="initial-scale=1, user-scalable=no, maximum-scale=1" media="(device-height: 568px)" />
    
    <!-- app 'behaviour' when adding link to iDevice springboard -->
    <meta name="apple-mobile-web-app-capable" content="yes" />

    <!--  RSS Feed -->
    <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="feed" />
    
    <link rel="shortcut icon" href="favicon.ico" />
    <link rel="apple-touch-icon" href="apple-touch-icon.png" />

    <!-- all css definitions -->
    <?PHP if(\F3::get('use_system_font')!=true) : ?>
        <link rel="stylesheet" href="css/fonts.css" />
    <?PHP endif; ?>
    <link rel="stylesheet" href="all.css" />

</head>
<body class="
    <?PHP echo $this->publicMode===true ? "publicmode" : ""; ?>
    <?PHP echo $this->loggedin===true ? "loggedin" : "notloggedin"; ?> 
    <?PHP echo \F3::get('auto_mark_as_read')==1 ? "auto_mark_as_read" : ""; ?>
">
    
    <div id="error">error message</div>
    
    <!-- language settings for jQuery -->
    <span id="lang"
        data-mark="<?PHP echo \F3::get('lang_mark'); ?>"
        data-unmark="<?PHP echo \F3::get('lang_unmark'); ?>"
        data-star="<?PHP echo \F3::get('lang_star'); ?>"
        data-unstar="<?PHP echo \F3::get('lang_unstar'); ?>"
        data-source_warn="<?PHP echo \F3::get('lang_source_warn'); ?>"
        data-source_saved="<?PHP echo \F3::get('lang_source_saved'); ?>"
        data-source_edit="<?PHP echo \F3::get('lang_source_edit'); ?>">

    <!-- other settings -->
    <span id="config"
        data-anonymizer="<?PHP echo trim(\F3::get('anonymizer')); ?>"
        data-auto_mark_as_read="<?PHP echo \F3::get('auto_mark_as_read'); ?>">

    <!-- menue open for smartphone -->
    <div id="nav-mobile">
        <div id="nav-mobile-logo"></div>
        <div id="nav-mobile-settings"></div>
    </div>
    
    <!-- navigation -->
    <div id="nav">
        <div id="nav-logo"></div>
        <div id="nav-mark"><?PHP echo \F3::get('lang_markread')?></div>
        
        <?PHP $active = (\F3::get('homepage')) ? \F3::get('homepage') : 'newest' ?>
        <ul id="nav-filter">
            <li id="nav-filter-newest" class="nav-filter-newest<?PHP if($active=='newest') : ?> active<?PHP endif; ?>"><?PHP echo \F3::get('lang_newest')?> <span><?PHP echo $this->statsAll; ?></span></li>
            <li id="nav-filter-unread" class="nav-filter-unread<?PHP if($active=='unread') : ?> active<?PHP endif; ?>"><?PHP echo \F3::get('lang_unread')?> <span <?PHP echo $this->statsUnread>0 ? 'class="unread"' : ''; ?>><?PHP echo $this->statsUnread; ?></span></li>
            <li id="nav-filter-starred" class="nav-filter-starred<?PHP if($active=='starred') : ?> active<?PHP endif; ?>"><?PHP echo \F3::get('lang_starred') ?> <span><?PHP echo $this->statsStarred; ?></span></li>
        </ul>
        
        <hr>

        <div id="nav-tags-wrapper">
        <h2 id="nav-tags-title" class="nav-tags-expanded"><?PHP echo \F3::get('lang_tags') ?></h2>
        <ul id="nav-tags">
            <li class="active nav-tags-all"><?PHP echo \F3::get('lang_alltags')?></li>
            <?PHP echo $this->tags; ?>
        </ul>
        <h2 id="nav-sources-title" class="nav-sources-collapsed"><?PHP echo \F3::get('lang_sources') ?></h2>
        <ul id="nav-sources">
            <?PHP echo $this->sources; ?>
        </div>
        
        <hr>
        
        <!-- navigation search input just for smartphone version -->
        <div id="nav-search">
            <input type="text" id="nav-search-term"></input> <input type="button" id="nav-search-button" value="<?PHP echo \F3::get('lang_searchbutton')?>" />
            <hr>
        </div>
        
        <?PHP if($this->loggedin===true) : ?>
        <div id="nav-settings" <?PHP if(\F3::get('auth')->enabled()===false) : ?>class="nologin"<?PHP endif; ?>></div>
        <?PHP endif; ?>
        
        <?PHP if($this->loggedin===true && \F3::get('auth')->enabled()===true) : ?>
        <div id="nav-logout"></div>
        <?PHP endif; ?>
        
        <?PHP if($this->loggedin===false) : ?>
        <div id="nav-login"></div>
        <?PHP endif; ?>
        
        <a id="nav-copyright" href="http://selfoss.aditu.de" target="_blank">selfoss <?PHP echo \F3::get('version'); ?></a>
    </div>
    
    <!-- search -->
    <div id="search">
        <input type="text" id="search-term"></input>
        <div id="search-remove"></div>
        <div id="search-button"></div>
        <div id="search-shownav"></div>
    </div>
    
    <ul id="search-list">
    </ul>
    
    <!-- content -->
    <div id="content">
        <?PHP echo $this->content; ?>
    </div>
    
    <!-- fullscreen popup -->
    <div id="fullscreen-entry"></div>
    
    <script src="all.js"></script>
</body>
</html>
