this.chaptersMenuHTML = this.makeChapterLists(this.fluidbook.datas.chapters);
}
}
+
+ // Sharing icons - this may contain many different icons
} else if (icon == 'friend') {
- if (this.fluidbook.datas.share) {
- this.addLink('nav-friend', '#/share', 'share', 'share');
- $("#share").click(function () {
- if ($this.fluidbook.datas.phonegap != 'android') {
- return true;
- }
- $this.fluidbook.intentShare();
- return false;
- });
+ // if (this.fluidbook.datas.share) {
+ // this.addLink('nav-friend', '#/share', 'share', 'share');
+ // $("#share").click(function () {
+ // if ($this.fluidbook.datas.phonegap != 'android') {
+ // return true;
+ // }
+ // $this.fluidbook.intentShare();
+ // return false;
+ // });
+ // }
+
+ var shareLinks = {},
+ shareHTML = '';
+
+ if (this.fluidbook.datas.friend) {
+ shareLinks['email'] = 'E-mail';
+ }
+ if (this.fluidbook.datas.facebook) {
+ shareLinks['facebook'] = 'Facebook';
+ }
+ if (this.fluidbook.datas.twitter) {
+ shareLinks['twitter'] = 'Twitter';
+ }
+ if (this.fluidbook.datas.googleplus) {
+ shareLinks['googleplus'] = 'Google Plus';
+ }
+ if (this.fluidbook.datas.linkedin) {
+ shareLinks['linkedin'] = 'LinkedIn';
}
+ if (this.fluidbook.datas.viadeo) {
+ shareLinks['viadeo'] = 'Viadeo';
+ }
+
+ // Generate links
+ for (var shareType in shareLinks) {
+ if (shareLinks.hasOwnProperty(shareType)) { // Ensure we don't get inherited properties
+ shareHTML += '<a href="#" data-service="'+ shareType +'" class="share" title="'+ shareLinks[shareType] +'">';
+ shareHTML += '<img src="data/images/share-'+ shareType +'.svg" />';
+ shareHTML += '</a>';
+ }
+ }
+
+ // Append to menu
+ this.menu.find('ul').append('<li id="shareLinks"><div class="mm-nopanel share-icons">'+ shareHTML +'</div></li>');
+
+
} else if (icon == 'bookmark') {
if (this.fluidbook.datas.bookmark) {
this.addLink('interface-bookmarks', '#/bookmark', 'bookmarks', 'bookmarks');
#menuOpener {
position: absolute;
- right: 10px;
- top: 10px;
+ right: 20px;
+ top: 50%;
+ margin-top: -10px; // Half height of opening icon for centering
+ font-size: 16px;
+ line-height: 1;
color: @icon-color;
.svg-icon {
width: 20px;
vertical-align: middle;
- margin-left: 15px;
+ margin-left: 18px;
}
}
height: 60px;
padding: 22px !important; // Controls size of icon and position within the element
color: @menu-text;
- background-color: overlay(@menu-background, #c0c0c0);
+ background-color: @menu-button-background;
}
overflow-y: auto;
padding-top: 20px;
+ a {
+ padding: 0;
+ }
+
.doubleThumb {
display: block !important;
margin: 10px auto 40px auto !important;
.no-results {
padding: 5px 25px;
}
+}
+
+
+#shareLinks {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ background-color: @menu-button-background;
+ line-height: 1;
+ padding: 20px 0;
+
+ .share-icons {
+ display: flex;
+ justify-content: space-around;
+ }
+ a {
+ padding: 0;
+
+ img {
+ margin: 0;
+ }
+ }
+
}
\ No newline at end of file