Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** SCRIPTS SE FOR USAR ICONS DO FEATHER!
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script src="https://unpkg.com/feather-icons"></script>
- (essa parte é bom colocar no final do theme, antes do </html>)
- <script>
- feather.replace();
- </script>
- *** CSS PARA O LIKE (se for texto)
- .like-b {
- position:relative;
- display:inline-block;
- height:1em;
- line-height:1.5em;
- padding: 0 1px;
- }
- .like-b .like_button iframe {
- position:absolute;
- top:0;
- left:0;
- bottom:0;
- right:0;
- z-index:2;
- opacity:0;
- }
- /* cor e estilo do texto depois do like */
- .like-b .liked + .b {
- color: #ed2715;
- font-weight:bold;
- }
- /* muda o texto de like pra liked quando clicado */
- .like-b .liked + .b:after {
- content:'d';
- }
- .like-b a:hover {
- color:#eaeaea;
- }
- *** CSS DO LIKE (se for usar icon)
- mesmo de cima, mas não tem: .like-b .liked + .b:after e o: .like-b .liked + .b tem que ser igual o de baixo
- .like-b .liked + .b {
- color: #ed2715;
- stroke: #ed2715;
- }
- /* estilo e tamanho do icon */
- .like-b .feather {
- width: 10px;
- height: 10px;
- stroke: #000;
- }
- *** ADICIONAR id="{PostID}" NA DIV QUE ENVOLVE OS POSTS (pode estar como div, section, article, depende do theme)
- <div class="post" id="{PostID}">
- *** ADICIONAR O LIKE ICON/TEXTO NO HTML ONDE TU QUER QUE APAREÇA
- (se for icon)
- <a class="like-b" href="#" title="Like">
- {LikeButton}
- <i data-feather="heart" class="b feather"></i>
- </a>
- (se for texto)
- <a class="like-b" href="#" title="Like">
- {LikeButton}
- <span class="b">like</span>
- </a>
Add Comment
Please, Sign In to add comment