YenYuHsuan / hexo-theme-beantech

:sparkles: Ported theme of Hux Blog by Kaijun, Modified by YuHsuan :sparkles:
http://beantech.org
Apache License 2.0
441 stars 105 forks source link

How to make title on the Top-left and on the Center show different string ? #18

Closed MilkZS closed 6 years ago

MilkZS commented 6 years ago

Hi,

In the index.html, The title on the Top-Left and on the Center shows same. I want to make them show different string, How should I do?

Thanks. Brs.

YenYuHsuan commented 6 years ago

@MilkZS Hi, you can find the Top-Left LOGO variable at layout/_partial/nav.ejs:

...
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<%= config.root %>"><%= config.title %></a>
        </div>
...

and . Center Title variable at layout/_partial/header.ejs:

...
        <% if (is_post()) { %>
                    <div class="post-heading">
                        <div class="tags">
                            <% page.tags.forEach(function(tag){ %>
                              <a class="tag" href="<%= config.root %>tags/#<%= tag.name %>" title="<%= tag.name %>"><%= tag.name %></a>
                            <% }) %>
                        </div>
                        <h1><%= page.title %></h1>
                        <h2 class="subheading"><%= page.subtitle || "" %></h2>
                        <span class="meta">
                            Posted by <%- page.author || config.author %> on
                            <%= page.date.format(config.date_format) %>
                        </span>
                    </div>
                <% } else { %>
                    <div class="site-heading">
                        <h1><%= page.title || config.title %></h1>
                        <!--<hr class="small">-->
                        <span class="subheading"><%= page.description || config.subtitle || "" %></span>
                    </div>
                <% } %>
...
MilkZS commented 6 years ago

@YenYuHsuan I got it . Thank you very much !