tumblr の表側に日付表示のページへのリンクをつける (できるだけ地味に)

オレのtumblrの現状の日付表示のところ

                <div class="post hentry">
                    <div class="labels">
                        {block:NewDayDate}
                            <div class="date newdaydate">
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">{Month} {DayOfMonth}</abbr>
                               </a>
                            </div>
                        {/block:NewDayDate}
                    
                        {block:SameDayDate}
                            <div class="date samedaydate">
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                                </a>
                            </div>
                        {/block:SameDayDate}
                    </div>

手抜きで先頭のスペースを除いていないから見づらいねえ。


こんなふうにしよーかなー

                <div class="post hentry">
                    <div class="labels">
                        {block:NewDayDate}
                            <div class="date newdaydate">
                                <a class="daylink" href="/day/{Year}/{MonthNumberWithZero}/{DayOfMonthWithZero}">{ShortMonth} {DayOfMonth} </a>
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                               </a>
                            </div>
                        {/block:NewDayDate}
                    
                        {block:SameDayDate}
                            <div class="date samedaydate">
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                                </a>
                            </div>
                        {/block:SameDayDate}
                    </div>

こんなふうになりました。見たかんじは今までと変わりません。


手直ししようかなー

  • dayページ表示のときにnewdaydateのところにdayページのlinkをつけるのはムダ
  • だから普通のページ表示のときだけつけるようにする
  • {block:Pagination}と{block:DayPagination}を使えばいいんじゃまいか
                    <div class="labels">
                        {block:NewDayDate}
                        {block:PermalinkPagination} 
                            <div class="date newdaydate">
                                <a class="daylink" href="/day/{Year}/{MonthNumberWithZero}/{DayOfMonthWithZero}">{ShortMonth} {DayOfMonth} </a>
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                               </a>
                            </div>
                        {/block:PermalinkPagination}

                        {block:Pagination}
                            <div class="date newdaydate">
                                <a class="daylink" href="/day/{Year}/{MonthNumberWithZero}/{DayOfMonthWithZero}">{ShortMonth} {DayOfMonth} </a>
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                               </a>
                            </div>
                        {/block:Pagination}

                        {block:DayPagination}
                            <div class="date newdaydate">
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">{Month} {DayOfMonth}</abbr>
                               </a>
                            </div>
                        {/block:DayPagination}
                        {/block:NewDayDate}
                    
                        {block:SameDayDate}
                            <div class="date samedaydate">
                                <a class="permalink" rel="bookmark" href="{Permalink}">
                                    <abbr class="published" title="{Year}-{MonthNumberWithZero}-{DayOfMonthWithZero}T{24HourWithZero}:{Minutes}:{Seconds}Z">+</abbr>
                                </a>
                            </div>
                        {/block:SameDayDate}
                    </div>

だめだった。{block:Pagination}とかって一回しか使えないのかも。nextLinkが消えてしまった…


使うヤツ{block:hogehoge}が違ってたみたい。

  • {block:DayPage} {/block:DayPage}
    • Rendered on day pages.
Creating a custom HTML theme | Tumblr
  • {block:PermalinkPage} {/block:PermalinkPage}
    • Rendered on permalink pages. (Useful for embedding comment widgets)
Creating a custom HTML theme | Tumblr
  • {block:IndexPage} {/block:IndexPage}
    • Rendered on index (post) pages.
Creating a custom HTML theme | Tumblr

dayページのときにだけ、なにかを消したいときはコメントアウトを{block:DayPage}でレンダリングさせればいいのかな?