mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-07-21 11:42:02 +00:00
Update 4 files
- /search.html - /assets/css/style.scss - /assets/js/main_new.js - /_layouts/post.html
This commit is contained in:
parent
953811453e
commit
fe5faeac16
@ -75,7 +75,7 @@ layout: default
|
|||||||
|
|
||||||
{% include toc.html html=content sanitize=true h_max=3 %}
|
{% include toc.html html=content sanitize=true h_max=3 %}
|
||||||
|
|
||||||
{% if post.layout == "encrypt" %} {{content}} {% else %} <main class="post-content" role="main">{% include anchor_headings.html html=content beforeHeading=true anchorBody="<svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>" %}</main> {% endif %}
|
{% if post.layout == "encrypt" %} {{content}} {% else %} <main class="post-content" role="main">{% capture a_post_content %}{% include anchor_headings.html html=content beforeHeading=true anchorBody="<svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>" %}{% endcapture %}{{ a_post_content | replace: '<br/>', '</p><p>' }}</main> {% endif %}
|
||||||
|
|
||||||
{% if page.tags %}
|
{% if page.tags %}
|
||||||
<small style="display: block">tags: {% for tag in page.tags %}<a href="/search.html?keyword={{ tag | url_encode }}"><em>{{ tag }}</em></a>{% unless forloop.last %} - {% endunless %}{% endfor %} <span style="float: right;"><a href="{% if site.github %}{{ site.github.repository_url }}{% else %}https://gitlab.com/mayx/mayx.gitlab.io{% endif %}/tree/master/{{ page.path }}">查看原始文件</a></span></small>
|
<small style="display: block">tags: {% for tag in page.tags %}<a href="/search.html?keyword={{ tag | url_encode }}"><em>{{ tag }}</em></a>{% unless forloop.last %} - {% endunless %}{% endfor %} <span style="float: right;"><a href="{% if site.github %}{{ site.github.repository_url }}{% else %}https://gitlab.com/mayx/mayx.gitlab.io{% endif %}/tree/master/{{ page.path }}">查看原始文件</a></span></small>
|
||||||
|
@ -58,6 +58,11 @@ a:hover {
|
|||||||
text-indent: -2px;
|
text-indent: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-content p {
|
||||||
|
text-indent: 2em;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
h1 .octicon,
|
h1 .octicon,
|
||||||
h2 .octicon,
|
h2 .octicon,
|
||||||
h3 .octicon,
|
h3 .octicon,
|
||||||
@ -94,8 +99,8 @@ div.highlight:hover button {
|
|||||||
div.highlight button {
|
div.highlight button {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0.5rem;
|
top: 0.5em;
|
||||||
right: 1rem;
|
right: 1em;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
transition: all 0.2s ease-out
|
transition: all 0.2s ease-out
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,9 @@ $(function () {
|
|||||||
$('section').each(function () {
|
$('section').each(function () {
|
||||||
highlightTextNodes(this);
|
highlightTextNodes(this);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
var codeBlocks = document.querySelectorAll('div.highlight');
|
var codeBlocks = document.querySelectorAll('div.highlight');
|
||||||
|
|
||||||
codeBlocks.forEach(function (codeBlock) {
|
codeBlocks.forEach(function (codeBlock) {
|
||||||
|
@ -6,7 +6,7 @@ title: 搜索
|
|||||||
<h1>搜索</h1>
|
<h1>搜索</h1>
|
||||||
<form action="https://www.google.com/search">
|
<form action="https://www.google.com/search">
|
||||||
<input type="hidden" name="as_sitesearch" value="mabbs.github.io" />
|
<input type="hidden" name="as_sitesearch" value="mabbs.github.io" />
|
||||||
<p>Keyword: <input name="q" type="text" id="search-input" placeholder="Search blog posts.." /> <!--[if !IE]> --><img src="/images/loading.svg" alt="Loading..." id="search-loading" style="width:22px;vertical-align: bottom" /><!-- <![endif]--> <input type="submit" value="谷歌搜索" style="margin-left: 5px;" /></p>
|
<p><input name="q" type="text" id="search-input" placeholder="Search blog posts.." /> <!--[if !IE]> --><img src="/images/loading.svg" alt="Loading..." id="search-loading" style="width:22px;vertical-align: bottom" /><!-- <![endif]--> <input type="submit" value="谷歌搜索" style="margin-left: 5px;" /></p>
|
||||||
</form>
|
</form>
|
||||||
<ul id="results-container"></ul>
|
<ul id="results-container"></ul>
|
||||||
<!--[if !IE]> -->
|
<!--[if !IE]> -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user