<?php

if (!defined('ABSPATH')) {
    header( 'Status: 403 Forbidden' );
    header( 'HTTP/1.1 403 Forbidden' );
    exit();
}

$fontlist_table = \Sumedia\GFont\Base\Registry::get('Sumedia\GFont\Admin\Table\Fontlist');

?>
<div class="suma-content">
    <h1 class="wp-heading-inline"><?php echo __('Font list', SUMEDIA_GFONT_PLUGIN_NAME); ?></h1>
    <a href="<?php echo admin_url('admin.php?page=' . SUMEDIA_GFONT_PLUGIN_NAME . '&action=NewFont'); ?>" class="page-title-action"><?php echo __('Add new font', SUMEDIA_GFONT_PLUGIN_NAME); ?></a>
    <form class="suma-form" name="suma-gfont-fontlist-form" action="<?php echo admin_url('admin.php?page=' . SUMEDIA_GFONT_PLUGIN_NAME . '&action=Fontlist'); ?>" method="post">
        <?php
            $fontlist_table->prepare_items();
            $fontlist_table->search_box(__('Search', SUMEDIA_GFONT_PLUGIN_NAME), 'search');
            $fontlist_table->display();
        ?>
    </form>
</div>

<div class="suma-content">
    <h1><?php echo __('Integrate in your theme', SUMEDIA_GFONT_PLUGIN_NAME); ?></h1>
    <p><?php echo __('If you want to use the new font have a look at the upper table where is defined HTML class: your-font-name.', SUMEDIA_GFONT_PLUGIN_NAME); ?></p>
    <p><?php echo __('You can add this class to your editor in order to display the text in this font.', SUMEDIA_GFONT_PLUGIN_NAME); ?></p>
    <img style="max-width:100%;" src="<?php echo SUMEDIA_GFONT_PLUGIN_URL . '/assets/images/css-class-howto.png'; ?>" alt="CSS Class Howto" />
</div>