Skip to content

Commit

Permalink
#27 Stub functionality for bookmarking system.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesgs committed Sep 17, 2015
1 parent fa8bc4c commit a34ee80
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/bookmark.js
Expand Up @@ -8,11 +8,13 @@
BookMark.init();
// KISS
$('#bookmark-comic').on('click', function (e) {
e.preventDefault();

// store date, page title, and URL
});

$('#show-comic-bookmark-history').on('click', function (e) {

// show a list of recently bookmarked comics, starting with most recent
});

});
Expand All @@ -36,4 +38,4 @@

}
};
}(jQuery));
}(jQuery));
Empty file modified includes/pages/options.php
100755 → 100644
Empty file.
22 changes: 22 additions & 0 deletions includes/template-functions.php
Expand Up @@ -10,6 +10,28 @@
* @author Jess Green <jgreen@psy-dreamer.com>
*/


/**
* Bookmark button template tag
* @param array $attrs Attributes
*/
function mangapress_bookmark_button($attrs)
{
echo "<a href=\"#\" id=\"bookmark-comic\">Bookmark!</a>";
}

/**
* Shortcode function for bookmark template tag
* @param array $atts
*/
function mangapress_bookmark_button_shortcode($atts)
{
// process $atts
mangapress_bookmark_button($atts);
}
add_shortcode('bookmark_comic', 'mangapress_bookmark_button_shortcode');


/**
* is_comic()
*
Expand Down
3 changes: 3 additions & 0 deletions templates/single-comic.php
Expand Up @@ -10,6 +10,9 @@
?>
<?php mangapress_comic_navigation(); ?>

<div class="bookmark">
<?php mangapress_bookmark_button(array()); ?>
</div>
<div class="mangapress-media-img">
<?php echo wp_get_attachment_image( get_post_thumbnail_id(), $thumbnail_size, false );?>
</div>

0 comments on commit a34ee80

Please sign in to comment.