i18n
xaoxuu 5 years ago
parent e65721bdaf
commit 3ae64da7d3
  1. 1
      layout/_cover/search.ejs
  2. 6
      layout/_meta/title.ejs
  3. 2
      layout/_partial/cover.ejs
  4. 4
      layout/_partial/header.ejs
  5. 7
      source/js/app.js
  6. 4
      source/less/_base.less

@ -3,7 +3,6 @@
<% } else { %>
<h1 class='title'><%- theme.cover.title ? theme.cover.title : config.title %></h1>
<% } %>
<br>
<% if (theme.search.enable === true) { %>
<div class="m_search">
<form name="searchform" class="form u-search-form">

@ -6,6 +6,10 @@
</h2>
<% } else { %>
<% if (post.title || page.title || config.title) { %>
<h1 class="title"><%- post.title ? post.title : date(post.date, theme.date_format) %></h1>
<h1 class="title">
<a href="<%- url_for(post.path) %>">
<%- post.title ? post.title : date(post.date, theme.date_format) %>
</a>
</h1>
<% } %>
<% } %>

@ -21,7 +21,7 @@ if (theme.cover) {
<% if (showCover == true) { %>
<div class="cover-wrapper">
<div class='cover <%- is_home() ? theme.cover.height : "half" %>'>
<div class='cover <%- page.layout %> <%- is_home() ? theme.cover.height : "half" %>'>
<% if (theme.cover.scheme == 'search') { %>
<%- partial('../_cover/search') %>
<% } %>

@ -53,7 +53,9 @@
<a class="logo flat-box"></a>
<ul class='switcher h-list'>
<li class='s-comment'><a class="flat-btn fas fa-comments fa-fw" href='javascript:void(0)'></a></li>
<li class='s-toc'><a class="flat-btn fas fa-list fa-fw" href='javascript:void(0)'></a></li>
<% if (page.sidebar == undefined || page.sidebar != false) { %>
<li class='s-toc'><a class="flat-btn fas fa-list fa-fw" href='javascript:void(0)'></a></li>
<% } %>
</ul>
</div>
</div>

@ -8,7 +8,7 @@ var customSearch;
if ($headerAnchor[0]) {
scrollCorrection = $headerAnchor[0].clientHeight + 16;
}
function scrolltoElement(elem, correction) {
correction = correction || scrollCorrection;
const $elem = elem.href ? $(elem.getAttribute('href')) : $(elem);
@ -19,12 +19,17 @@ var customSearch;
// button
const $postsBtn = $('.menu .active');
const $topBtn = $('.s-top');
const $titleBtn = $('h1.title', '#header-meta');
console.log($titleBtn);
// anchor
const $bodyAnchor = $('.l_body');
// action
if ($postsBtn.length && $bodyAnchor) {
$postsBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); });
}
if ($titleBtn.length && $bodyAnchor) {
$titleBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); });
}
if ($topBtn.length && $bodyAnchor) {
$topBtn.click(e => { e.preventDefault(); e.stopPropagation(); scrolltoElement($bodyAnchor); });
}

@ -81,7 +81,7 @@ fancybox{
.m_search{
@iconW: 32px;
@iconMargin: 4px;
margin-top: 2vh;
margin-top: ~"calc(2vh + 2*@{gap})";
position: relative;
max-width: ~"calc(100% - 1*@{gap})";
width: 1.1*@width_sidebar;
@ -150,7 +150,7 @@ fancybox{
margin-top: ~"calc(20vh - 2*@{gap})";
}
.m_search{
margin-top: 0;
margin-top: 2vh;
}
}
&, a{

Loading…
Cancel
Save