This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced Font Awesome with a new icon font with a rather small footprint.
- Loading branch information
1 parent
576f1aa
commit 9a9f124
Showing
15 changed files
with
601 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* Post Like System */ | ||
@font-face { | ||
font-family: "like_font"; | ||
src: url("./fonts/like_font.eot"); | ||
src: url("./fonts/like_font.eot?#iefix") format("embedded-opentype"), | ||
url("./fonts/like_font.woff") format("woff"), | ||
url("./fonts/like_font.ttf") format("truetype"), | ||
url("./fonts/like_font.svg#like_font") format("svg"); | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
|
||
@media screen and (-webkit-min-device-pixel-ratio:0) { | ||
@font-face { | ||
font-family: "like_font"; | ||
src: url("./fonts/like_font.svg#like_font") format("svg"); | ||
} | ||
} | ||
|
||
[data-icon]:before { content: attr(data-icon); } | ||
|
||
[data-icon]:before, | ||
.icon-gear:before, | ||
.icon-like:before, | ||
.icon-unlike:before { | ||
display: inline-block; | ||
font-family: "like_font"; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
line-height: 1; | ||
text-decoration: inherit; | ||
text-rendering: optimizeLegibility; | ||
text-transform: none; | ||
-moz-osx-font-smoothing: grayscale; | ||
-webkit-font-smoothing: antialiased; | ||
font-smoothing: antialiased; | ||
} | ||
|
||
.icon-like:before { content: "\f105"; } | ||
.icon-unlike:before { content: "\f106"; } | ||
.icon-gear:before { | ||
content: "\f104"; | ||
-webkit-animation: spin 2s infinite linear; | ||
-moz-animation: spin 2s infinite linear; | ||
-o-animation: spin 2s infinite linear; | ||
animation: spin 2s infinite linear; | ||
} | ||
|
||
@-moz-keyframes spin { | ||
0% { -moz-transform: rotate(0deg); } | ||
100% { -moz-transform: rotate(359deg); } | ||
} | ||
|
||
@-webkit-keyframes spin { | ||
0% { -webkit-transform: rotate(0deg); } | ||
100% { -webkit-transform: rotate(359deg); } | ||
} | ||
|
||
@-o-keyframes spin { | ||
0% { -o-transform: rotate(0deg); } | ||
100% { -o-transform: rotate(359deg); } | ||
} | ||
|
||
@keyframes spin { | ||
0% { | ||
-webkit-transform: rotate(0deg); | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
-webkit-transform: rotate(359deg); | ||
transform: rotate(359deg); | ||
} | ||
} | ||
|
||
a.jm-post-like { | ||
font-weight: normal; | ||
display: inline-block; | ||
width: auto; | ||
-moz-transition: all 0.3s ease-out 0.2s; | ||
-webkit-transition: all 0.3s ease-out 0.2s; | ||
-o-transition: all 0.3s ease-out 0.2s; | ||
} | ||
|
||
a.jm-post-like.liked { color: #da1b1b; } | ||
|
||
a.jm-post-like:hover, | ||
a.jm-post-like:active, | ||
a.jm-post-like:focus, | ||
a.liked:hover, | ||
a.liked:active, | ||
a.liked:focus { | ||
color: #000; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
jQuery(document).ready(function() { | ||
jQuery('body').on('click','.jm-post-like',function(event){ | ||
event.preventDefault(); | ||
heart = jQuery(this); | ||
post_id = heart.data("post_id"); | ||
heart.html("<i id='icon-like' class='icon-like'></i><i id='icon-gear' class='icon-gear'></i>"); | ||
jQuery.ajax({ | ||
type: "post", | ||
url: ajax_var.url, | ||
data: "action=jm-post-like&nonce="+ajax_var.nonce+"&jm_post_like=&post_id="+post_id, | ||
success: function(count){ | ||
if( count.indexOf( "already" ) !== -1 ) | ||
{ | ||
var lecount = count.replace("already",""); | ||
if (lecount === "0") | ||
{ | ||
lecount = "Like"; | ||
} | ||
heart.prop('title', 'Like'); | ||
heart.removeClass("liked"); | ||
heart.html("<i id='icon-unlike' class='icon-unlike'></i> "+lecount); | ||
} | ||
else | ||
{ | ||
heart.prop('title', 'Unlike'); | ||
heart.addClass("liked"); | ||
heart.html("<i id='icon-like' class='icon-like'></i> "+count); | ||
} | ||
} | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
like-styles.css → vendor/fontawesome/css/like-styles.css
100644 → 100755
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.