텀블러 테마 치환자 메뉴얼

Like and Reblog buttons

Like Button

변수 설명
{LikeButton} 디폴트 "Like"버튼
{LikeButton color="grey"} "Like"버튼 색상 지정
Grey, White, or Black. Like button will always be red if visitor has liked the post.
{LikeButton size="20"} "Like"버튼 크기 지정
Maximum: 100

Reblog Button

변수 설명
{ReblogButton} 디폴트 "Reblog"버튼
{ReblogButton color="grey"} "Reblog"버튼 컬러 지정
Grey, White, or Black.
{ReblogButton size="20"} "Reblog"버튼 크기 지정
Maximum: 100

Example

<html>
    <head>
        <style type="text/css">
            .like_and_reblog_buttons {
                border: 1px solid #e8e8e8;
                border-radius: 3px;
                list-style: none;
            }

            .like_and_reblog_buttons li {
                float: left;
                margin: 0;
                padding: 7px 15px;
                height: 20px;
            }

            .like_and_reblog_buttons li:first-child {
                border-right: 1px solid #e8e8e8;
            }
        </style>
    </head>
    <body>
        ...

        {block:Posts}
          ...
          <ul class="like_and_reblog_buttons">
              <li>{ReblogButton}</li>
              <li>{LikeButton}</li>
          </ul>
        {/block:Posts}

        ...
    </body>
</html>

If your theme uses infinite scrolling or some other form of AJAX pagination, you must request the like status of the new posts once the page is loaded or inserted:

함수 설명
Tumblr.LikeButton.get_status_by_page(n) Call this function after requesting a new page of Posts. Takes the page number that was just loaded as an integer.
Tumblr.LikeButton.get_status_by_post_ids([n,n,n]) Request Like status for individual posts. Takes an array of post IDs.

댓글

댓글 본문
작성자
비밀번호
버전 관리
리체:leezche
현재 버전
선택 버전
graphittie 자세히 보기