<main class='container main settings-main'>
    <h1>Settings</h1>
    <form action='<?php 
echo HOME_URL;
?>
' method='POST'>
        <fieldset>
            <legend>Theme</legend>
            <?php 
$themes = HNewsSettingsPageController::getThemeList();
foreach ($themes as $theme) {
    $theme_id = HNewsSettingsPageController::$themeIdPrefix . $theme;
    ?>
                <div class='form-group'>
                    <input type="radio" name="<?php 
    echo HNewsSettingsPageController::$userThemeFormName;
    ?>
" value="<?php 
    echo $theme;
    ?>
" id="<?php 
    echo $theme_id;
    ?>
" />
                    <label for="<?php 
    echo $theme_id;
    ?>
"><?php 
    echo ucwords($theme);
    ?>
</label>
Example #2
0
include VIEWS_PATH . 'footer_controls.php';
?>
                 </div>
                <p class='small'>Not affiliated with Hacker News or Y Combinator.</p>
                <p class='small'>Designed and created by <a href='http://www.allengarvey.com'>Allen Garvey</a> using the Hacker News API.</p>
                <p class='small'>Released under the MIT License. <a href='https://github.com/allen-garvey/h-news'>Source on github</a></p>
            </div>
        </footer>
        <script type="text/javascript">
        var HN={};HN.settings = {};
        HN.settings.commentsUrl='<?php 
echo COMMENTS_QUERY_URL;
?>
';
        HN.settings.themeNames=<?php 
echo json_encode(HNewsSettingsPageController::getThemeList());
?>
;
        HN.pages = {
            'home' : {
                storiesUrl: 'https://hacker-news.firebaseio.com/v0/topstories.json',
                shouldDisplayStory: function(story){if(story.type()==="job"){return false;} return true;},
                commentsUrl: '<?php 
echo COMMENTS_QUERY_URL;
?>
',
                pageTitle: '<?php 
echo PAGE_TITLE_DEFAULT;
?>
',
                bodyTags: ['page_home']