完成首页基本逻辑

This commit is contained in:
MeiK
2020-12-15 15:37:40 +08:00
parent d4027ae5ce
commit e197c2e086
11 changed files with 175 additions and 423 deletions

View File

@@ -5,7 +5,7 @@
<body>
{{ partial "header" . }}
{{ block "content" . }}{{ end }}
<!-- {{ partial "footer.html" . }} -->
{{ partial "footer.html" . }}
</body>
{{ partial "script.html" . }}

View File

@@ -1,27 +1,20 @@
<div class="footer container-lg width-full p-responsive" role="contentinfo">
<div class="footer container-xl width-full p-responsive">
<div
class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul
class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">{{ .Site.Copyright | safeHTML }}</a></li>
</ul>
<a aria-label="Homepage" title="{{ .Site.Title }}" class="footer-octicon d-none d-lg-block mx-lg-4"
href="{{ .Site.BaseURL }}">
class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between flex-sm-items-center pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<a aria-label="Homepage" title="GitHub" class="footer-octicon d-none d-lg-block mr-lg-4" href="{{ .Site.BaseURL }}">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
</path>
</svg>
</a>
<ul
class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<ul class="list-style-none d-flex flex-wrap col-12 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">{{ .Site.Copyright | safeHTML }}</li>
</ul>
</div>
<div class="d-flex flex-justify-center pb-6">
<span class="f6 text-gray-light"></span>
</div>
</div>
{{ if .Params.katex }}
{{ partial "katex.html" . }}
{{ end }}

View File

@@ -9,6 +9,7 @@
</svg>
</a>
</div>
<!-- TODO: fix theme -->
<div class="Header-item Header-item--full">
<div class="Header-search">
<form target="_blank" action="https://www.google.com/search" accept-charset="UTF-8" method="get"

View File

@@ -1,4 +0,0 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>

View File

@@ -19,7 +19,7 @@
</svg>
Overview
</a>
<a class="UnderlineNav-item {{ if .IsSection }} selected {{ end }}" href="/post/">
<a class="UnderlineNav-item {{ if .IsSection }} selected {{ end }}{{ if eq .Type "tags" }} selected {{ end }}" href="/post/">
<svg class="octicon octicon-repo UnderlineNav-octicon hide-sm" height="16" viewBox="0 0 16 16"
version="1.1" width="16">
<path fill-rule="evenodd"

View File

@@ -1,18 +1,24 @@
{{ define "overview" }}
{{ $pinned := where .Site.Pages "Params.pin" true }}
{{ $section := $pinned }}
{{ $section_title := "Pinned" }}
{{ if ne (len $pinned) 0}}
{{ else }}
{{ $section = where .Site.RegularPages "Section" "in" (slice "post") }}
{{ $section_title = "Popular posts" }}
{{ end }}
<!-- TODO: about me -->
<div class="flex-shrink-0 col-12 col-md-9 mb-4 mb-md-0">
<div>
<div class="position-relative">
<div class="mt-4">
{{ if ne (len $pinned) 0 }}
<div class="js-pinned-items-reorder-container">
<h2 class="f4 mb-2 text-normal">
Pinned
{{ $section_title }}
</h2>
<ol class="d-flex flex-wrap list-style-none gutter-condensed mb-4 js-pinned-items-reorder-list">
{{ range (first 6 $pinned) }}
{{ range (first 6 $section) }}
<li class="col-12 col-md-6 col-lg-6 mb-3 d-flex flex-content-stretch">
<div
class="Box pinned-item-list-item d-flex p-3 width-full js-pinned-item-list-item public source reorderable sortable-button-item">
@@ -34,17 +40,19 @@
{{ .Summary | safeHTML }}
</div>
<!-- TODO: 文章标签 -->
<p class="mb-0 f6 text-gray">
<a href="{{ .Permalink }}" class="pinned-item-meta muted-link ">
<svg aria-label="stars" class="octicon octicon-star" viewBox="0 0 16 16" version="1.1" width="16"
height="16" role="img">
{{ with .Params.tags }}
{{ range $tag := (first 5 .) }}
<a href="{{ relURL (print "/tags/" . | urlize) }}" class="pinned-item-meta muted-link ">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z">
d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z">
</path>
</svg>
999
{{ $tag }}
</a>
{{ end }}
{{ end }}
</p>
</div>
</div>
@@ -52,54 +60,6 @@
{{ end }}
</ol>
</div>
{{ else }}
<div class="js-pinned-items-reorder-container">
<h2 class="f4 mb-2 text-normal">
Popular posts
</h2>
<ol class="d-flex flex-wrap list-style-none gutter-condensed mb-4 js-pinned-items-reorder-list">
{{ range (first 6 (where .Site.RegularPages "Section" "in" (slice "post"))) }}
<li class="col-12 col-md-6 col-lg-6 mb-3 d-flex flex-content-stretch">
<div
class="Box pinned-item-list-item d-flex p-3 width-full js-pinned-item-list-item public source reorderable sortable-button-item">
<div class="pinned-item-list-item-content">
<div class="d-flex width-full flex-items-center position-relative">
<svg class="octicon octicon-repo mr-2 text-gray flex-shrink-0" viewBox="0 0 16 16" version="1.1"
width="16" height="16">
<path fill-rule="evenodd"
d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z">
</path>
</svg>
<a class="text-bold flex-auto min-width-0" href="{{ .Permalink }}">
<span class="repo" title="{{ .Title }}">{{ .Title }}</span>
</a>
</div>
<div name="summary" class="pinned-item-desc text-gray text-small d-block mt-2 mb-3">
{{ .Summary | safeHTML }}
</div>
<!-- TODO: 文章标签 -->
<p class="mb-0 f6 text-gray">
<a href="{{ .Permalink }}" class="pinned-item-meta muted-link ">
<svg aria-label="stars" class="octicon octicon-star" viewBox="0 0 16 16" version="1.1" width="16"
height="16" role="img">
<path fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z">
</path>
</svg>
999
</a>
</p>
</div>
</div>
</li>
{{ end }}
</ol>
</div>
{{ end }}
</div>
{{ $section := where .Site.RegularPages "Section" "in" (slice "post") }}
@@ -152,263 +112,11 @@
</div>
<h2 class="f4 text-normal mt-4 mb-3">
Contribution activity
Post activity
</h2>
<div class="contribution-activity-listing float-left col-12 col-lg-10" id="posts-activity">
<div class="width-full pb-4">
<h3 class="h6 pr-2 py-1 border-bottom mb-3" style="height: 14px;">
<span class="color-bg-canvas pl-2 pr-3">December <span class="text-gray">2020</span></span>
</h3>
<div class="TimelineItem ">
<div class="TimelineItem-badge ">
<svg class="octicon octicon-repo-push" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M1 2.5A2.5 2.5 0 013.5 0h8.75a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0V1.5h-8a1 1 0 00-1 1v6.708A2.492 2.492 0 013.5 9h3.25a.75.75 0 010 1.5H3.5a1 1 0 100 2h5.75a.75.75 0 010 1.5H3.5A2.5 2.5 0 011 11.5v-9zm13.23 7.79a.75.75 0 001.06-1.06l-2.505-2.505a.75.75 0 00-1.06 0L9.22 9.229a.75.75 0 001.06 1.061l1.225-1.224v6.184a.75.75 0 001.5 0V9.066l1.224 1.224z">
</path>
</svg>
</div>
<div class="TimelineItem-body ">
<details open="open" class="Details-element details-reset ">
<summary role="button" class="btn-link f4 muted-link no-underline lh-condensed width-full ">
<span class="color-text-primary ws-normal text-left">
Created 16
commits in
4
repositories
</span>
<span class="d-inline-block float-right color-icon-secondary">
<span class="Details-content--open float-right" aria_label="Collapse"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_CATEGORY_ROLLUP_COLLAPSE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="bdeed660aa78bbca7270cf764d76c37c70ecabd1c4cd251185d3d703e75452a0"><svg
class="octicon octicon-fold" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M10.896 2H8.75V.75a.75.75 0 00-1.5 0V2H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0l2.896-2.896A.25.25 0 0010.896 2zM8.75 15.25a.75.75 0 01-1.5 0V14H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25zm-6.5-6.5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg></span>
<span class="Details-content--closed float-right" aria_label="Expand"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_CATEGORY_ROLLUP_EXPAND&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="5ee3975c95842d71a57199562f0d16dee03eda921b302871c87e69ec3a74343f"><svg
class="octicon octicon-unfold" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg></span>
</span>
</summary>
<div>
<ul class="list-style-none mt-1" data-repository-hovercards-enabled="">
<li class="ml-0 py-1 d-flex">
<div
class="col-8 css-truncate css-truncate-target lh-condensed width-fit flex-auto min-width-0">
<a data-hovercard-type="repository" data-hovercard-url="/MeiK2333/StepByStep/hovercard"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_REPO_LINK&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="dcf816526950ba68b6598fc5956d41c491300d211ff6f51e9347a8b9c2fd1d66"
href="/MeiK2333/StepByStep">MeiK2333/StepByStep</a>
<a class="f6 muted-link ml-lg-1 mt-1 mt-lg-0 d-block d-lg-inline "
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_COMMIT_RANGE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="810ade5d5ebd2b2b770839e68dfa40a4ae39aa49323f1c07f7f37d419e4c679f"
href="/MeiK2333/StepByStep/commits?author=MeiK2333&amp;since=2020-11-30&amp;until=2020-12-14">
10 commits
</a> </div>
<div class="col-3 flex-shrink-0">
<div class="Progress mt-1 tooltipped tooltipped-n color-bg-primary"
aria-label="63% of commits in December were made to MeiK2333/StepByStep ">
<span class="Progress-item rounded-2" style="width: 63%;background-color: #30a14e"></span>
</div>
</div>
</li>
<li class="ml-0 py-1 d-flex">
<div
class="col-8 css-truncate css-truncate-target lh-condensed width-fit flex-auto min-width-0">
<a data-hovercard-type="repository" data-hovercard-url="/MeiK2333/river/hovercard"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_REPO_LINK&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="dcf816526950ba68b6598fc5956d41c491300d211ff6f51e9347a8b9c2fd1d66"
href="/MeiK2333/river">MeiK2333/river</a>
<a class="f6 muted-link ml-lg-1 mt-1 mt-lg-0 d-block d-lg-inline "
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_COMMIT_RANGE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="810ade5d5ebd2b2b770839e68dfa40a4ae39aa49323f1c07f7f37d419e4c679f"
href="/MeiK2333/river/commits?author=MeiK2333&amp;since=2020-11-30&amp;until=2020-12-14">
3 commits
</a> </div>
<div class="col-3 flex-shrink-0">
<div class="Progress mt-1 tooltipped tooltipped-n color-bg-primary"
aria-label="19% of commits in December were made to MeiK2333/river ">
<span class="Progress-item rounded-2" style="width: 19%;background-color: #9be9a8"></span>
</div>
</div>
</li>
<li class="ml-0 py-1 d-flex">
<div
class="col-8 css-truncate css-truncate-target lh-condensed width-fit flex-auto min-width-0">
<a data-hovercard-type="repository"
data-hovercard-url="/MeiK2333/headful-chrome-launch/hovercard"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_REPO_LINK&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="dcf816526950ba68b6598fc5956d41c491300d211ff6f51e9347a8b9c2fd1d66"
href="/MeiK2333/headful-chrome-launch">MeiK2333/headful-chrome-launch</a>
<a class="f6 muted-link ml-lg-1 mt-1 mt-lg-0 d-block d-lg-inline "
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_COMMIT_RANGE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="810ade5d5ebd2b2b770839e68dfa40a4ae39aa49323f1c07f7f37d419e4c679f"
href="/MeiK2333/headful-chrome-launch/commits?author=MeiK2333&amp;since=2020-11-30&amp;until=2020-12-14">
2 commits
</a> </div>
<div class="col-3 flex-shrink-0">
<div class="Progress mt-1 tooltipped tooltipped-n color-bg-primary"
aria-label="13% of commits in December were made to MeiK2333/headful-chrome-launch ">
<span class="Progress-item rounded-2" style="width: 13%;background-color: #9be9a8"></span>
</div>
</div>
</li>
<li class="ml-0 py-1 d-flex">
<div
class="col-8 css-truncate css-truncate-target lh-condensed width-fit flex-auto min-width-0">
<a data-hovercard-type="repository" data-hovercard-url="/MeiK2333/github-style/hovercard"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_REPO_LINK&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="dcf816526950ba68b6598fc5956d41c491300d211ff6f51e9347a8b9c2fd1d66"
href="/MeiK2333/github-style">MeiK2333/github-style</a>
<a class="f6 muted-link ml-lg-1 mt-1 mt-lg-0 d-block d-lg-inline "
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_COMMIT_RANGE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="810ade5d5ebd2b2b770839e68dfa40a4ae39aa49323f1c07f7f37d419e4c679f"
href="/MeiK2333/github-style/commits?author=MeiK2333&amp;since=2020-11-30&amp;until=2020-12-14">
1 commit
</a> </div>
<div class="col-3 flex-shrink-0">
<div class="Progress mt-1 tooltipped tooltipped-n color-bg-primary"
aria-label="7% of commits in December were made to MeiK2333/github-style ">
<span class="Progress-item rounded-2" style="width: 7%;background-color: #9be9a8"></span>
</div>
</div>
</li>
</ul>
</div>
</details>
</div>
</div>
<div class="TimelineItem ">
<div class="TimelineItem-badge ">
<svg class="octicon octicon-git-pull-request" viewBox="0 0 16 16" version="1.1" width="16"
height="16">
<path fill-rule="evenodd"
d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z">
</path>
</svg>
</div>
<div class="TimelineItem-body ">
<details class="Details-element details-reset " open="">
<summary role="button" class="btn-link f4 muted-link no-underline lh-condensed width-full ">
<span class="float-left ws-normal text-left color-text-primary">
Opened 1
pull request in
1
repository
</span>
<span class="d-inline-block float-right">
<span class="Details-content--open float-right" aria_label="Collapse"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_CATEGORY_ROLLUP_COLLAPSE&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="bdeed660aa78bbca7270cf764d76c37c70ecabd1c4cd251185d3d703e75452a0"><svg
class="octicon octicon-fold" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M10.896 2H8.75V.75a.75.75 0 00-1.5 0V2H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0l2.896-2.896A.25.25 0 0010.896 2zM8.75 15.25a.75.75 0 01-1.5 0V14H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25zm-6.5-6.5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg></span>
<span class="Details-content--closed float-right" aria_label="Expand"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_CATEGORY_ROLLUP_EXPAND&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="5ee3975c95842d71a57199562f0d16dee03eda921b302871c87e69ec3a74343f"><svg
class="octicon octicon-unfold" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg></span>
</span>
</summary>
<div>
<details open="open" data-repository-hovercards-enabled="true"
data-issue-and-pr-hovercards-enabled="true" class="Details-element details-reset my-1">
<summary data-octo-click="profile_timeline_toggle_rollup_created_pull_requests" role="button"
class="flex-items-baseline btn-link no-underline lh-condensed d-flex text-left">
<div class="col-7">
<span class="css-truncate css-truncate-target width-fit" data-hovercard-type="repository"
data-hovercard-url="/MeiK2333/headful-chrome-launch/hovercard">MeiK2333/headful-chrome-launch</span>
</div>
<span class="col-5 f6 color-text-secondary text-right">
<span class="State--purple State ml-2 px-1 py-0 lh-condensed-ultra f6">1</span>
merged
</span>
</summary>
<div>
<ul class="mt-1 list-style-none">
<li class="py-1 ml-0 d-flex">
<span class="flex-auto min-width-0">
<span class="css-truncate css-truncate-target width-fit">
<svg class="octicon octicon-git-merge text-purple" title="Merged" viewBox="0 0 16 16"
version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z">
</path>
</svg>
<a class="no-underline"
data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:20951666,&quot;target&quot;:&quot;TIMELINE_PR_LINK&quot;,&quot;user_id&quot;:20951666,&quot;originating_url&quot;:&quot;https://github.com/MeiK2333&quot;}}"
data-hydro-click-hmac="1a99e9f0dc5983133d88b8da217dcc90c864595d717fd084e481baf87728a4f6"
data-hovercard-type="pull_request"
data-hovercard-url="/MeiK2333/headful-chrome-launch/pull/1/hovercard"
href="/MeiK2333/headful-chrome-launch/pull/1">
<span class="link-gray-dark ">重构</span>
</a> </span>
</span>
<time title="This contribution was made on Dec 1"
class="float-right f6 text-gray-light pt-1 no-wrap flex-shrink-0">
Dec 1
</time>
</li>
</ul>
</div>
</details>
</div>
</details>
</div>
</div>
</div>
<!-- TODO: fix me, 点击时出现蓝色边框 -->
<div id="posts-activity">
</div>
</div>

View File

@@ -1,3 +1,4 @@
<!-- TODO -->
<div class="application-main " data-commit-hovercards-enabled="">
<div itemscope="" itemtype="http://schema.org/SoftwareSourceCode" class="">
<main>

View File

@@ -1,48 +1,85 @@
{{ define "posts" }}
<div class="col-lg-9 col-md-8 col-12 float-md-left pl-md-2">
<div class="UnderlineNav width-full user-profile-nav top-0 is-placeholder"
style="visibility: hidden; display: none; height: 56px;"></div>
<div class="position-relative">
<div id="user-repositories-list">
<ul data-filterable-for="your-repos-filter" data-filterable-type="substring">
{{ range .Paginator.Pages }}
<li class="col-12 d-flex width-full py-4 border-bottom public fork">
<div class="col-12 col-lg-12 d-inline-block">
<div class="d-inline-block mb-1">
<h3>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h3>
</div>
<div name="posts-post" class="text-gray mb-2 pr-4">
{{ .Summary | safeHTML }}
</div>
<div class="f6 text-gray mt-2">
Updated <time-ago datetime="{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}" class="no-wrap">
Mon, 02 Jan 2006 15:04:05 -0700</time-ago>
</div>
<div class="flex-shrink-0 col-12 col-md-9 mb-4 mb-md-0">
<div>
<div class="position-relative">
<div>
{{ if eq .Type "tags" }}
<div class="TableObject border-bottom border-gray-light py-3">
<div class="user-repo-search-results-summary TableObject-item TableObject-item--primary v-align-top">
<strong>{{ len .Pages }}</strong>
results
for <strong>{{ .Params.title }}</strong>
</div>
</li>
<div class="TableObject-item text-right v-align-top">
<a class="issues-reset-query text-normal d-inline-block ml-3" href="/post/">
<svg class="octicon octicon-x issues-reset-query-icon mt-1" viewBox="0 0 16 16" version="1.1" width="16"
height="16">
<path fill-rule="evenodd"
d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z">
</path>
</svg>
Clear filter
</a>
</div>
</div>
{{ end }}
</ul>
{{ if gt .Paginator.TotalPages 1}}
<div class="paginate-container">
<div class="BtnGroup" data-test-selector="pagination">
{{ if .Paginator.HasPrev }}
<a rel="nofollow" class="btn btn-outline BtnGroup-item" href="{{ .Paginator.Prev.URL }}">Previous</a>
{{ else }}
<button class="btn btn-outline BtnGroup-item" disabled="disabled">Previous</button>
{{ end }}
{{ if .Paginator.HasNext }}
<a rel="nofollow" class="btn btn-outline BtnGroup-item" href="{{ .Paginator.Next.URL }}">Next</a>
{{ else }}
<button class="btn btn-outline BtnGroup-item" disabled="disabled">Next</button>
<ul>
{{ range .Paginator.Pages }}
<li class="col-12 d-flex width-full py-4 border-bottom color-border-secondary public source">
<div class="col-10 col-lg-9 d-inline-block">
<div class="d-inline-block mb-1">
<h3 class="wb-break-all">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h3>
</div>
<div>
<div class="col-9 d-inline-block text-gray mb-2 pr-4">
{{ .Summary | safeHTML }}
</div>
</div>
<div class="f6 text-gray mt-2">
{{ with .Params.tags }}
{{ range $tag := (first 5 .) }}
<a class="muted-link mr-3" href="{{ relURL (print "/tags/" . | urlize) }}">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z">
</path>
</svg>
{{ $tag }}
</a>
{{ end }}
{{ end }}
<!-- TODO: format date -->
Updated
<relative-time datetime="{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}" class="no-wrap"
title="{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}">
{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
</relative-time>
</div>
</div>
</li>
{{ end }}
</ul>
<div class="paginate-container">
<div class="BtnGroup">
{{ if .Paginator.HasPrev }}
<a rel="nofollow" class="btn btn-outline BtnGroup-item" href="{{ .Paginator.Prev.URL }}">Previous</a>
{{ else }}
<button class="btn btn-outline BtnGroup-item" disabled="disabled">Previous</button>
{{ end }}
{{ if .Paginator.HasNext }}
<a rel="nofollow" class="btn btn-outline BtnGroup-item" href="{{ .Paginator.Next.URL }}">Next</a>
{{ else }}
<button class="btn btn-outline BtnGroup-item" disabled="disabled">Next</button>
{{ end }}
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>

View File

@@ -1 +1,10 @@
<script type="application/javascript" src="{{ "js/github-style.js" | absURL }}"></script>
{{ if or .Params.math .Site.Params.math }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css"
integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"
integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
{{ end }}

View File

@@ -5,6 +5,7 @@
<div class="h-card mt-md-n5">
<div class="clearfix d-flex d-md-block flex-items-center mb-4 mb-md-0">
<div class="position-relative d-inline-block col-2 col-md-12 mr-3 mr-md-0 flex-shrink-0" style="z-index:4;">
<!-- TODO: 页面上移后的样式变化 -->
{{ with $.Site.Params.avatar }}
<a href="{{ $.Site.Params.avatar }}">
<img style="height:auto;" alt="Avatar" width="260" height="260"
@@ -84,13 +85,13 @@
{{ end }}
{{ if .Site.Params.twitter}}
<a class="avatar-group-item" href="https://github.com/{{ .Site.Params.twitter }}">
<a class="avatar-group-item" href="https://twitter.com/{{ .Site.Params.twitter }}">
<img alt="@twitter" width="32" height="32" src="{{ "images/twitter.png" | absURL }}" class="avatar">
</a>
{{ end }}
{{ if .Site.Params.facebook}}
<a class="avatar-group-item" href="https://github.com/{{ .Site.Params.facebook }}">
<a class="avatar-group-item" href="https://facebook.com/{{ .Site.Params.facebook }}">
<img alt="@facebook" width="32" height="32" src="{{ "images/facebook.png" | absURL }}" class="avatar">
</a>
{{ end }}

View File

@@ -1,4 +1,5 @@
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const monthsFull = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
const now = new Date();
let contributions;
@@ -72,61 +73,65 @@ function monthly(year, month, posts) {
);
let liHtml = '';
for (const post of monthPosts) {
liHtml += `<li class="d-flex mt-1 py-1 flex-row flex-nowrap flex-justify-between"><span class="flex-auto css-truncate css-truncate-target">
<span class="profile-rollup-icon">
<svg class="octicon octicon-repo v-align-middle text-gray-light mr-1" viewBox="0 0 12 16" version="1.1"
width="12" height="16" aria-hidden="true">
<path fill-rule="evenodd"
d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z">
</path>
</svg>
</span>
<a class="mr-2 " href="${post.link}">${post.title}</a>
</span>
<time title="This post was made on ${months[post.date.getMonth()]} ${post.date.getDate()}" class="f6 text-gray-light pt-1">
${months[post.date.getMonth()]} ${post.date.getDate()}
</time></li>`;
liHtml += `<li class="ml-0 py-1 d-flex">
<div
class="col-8 css-truncate css-truncate-target lh-condensed width-fit flex-auto min-width-0">
<a href="${post.link}">${post.title}</a>
</div>
<time title="This post was made on ${months[post.date.getMonth()]} ${post.date.getDate()}"
class="col-2 text-right f6 text-gray-light pt-1">
${months[post.date.getMonth()]} ${post.date.getDate()}
</time>
</li>`;
}
let html = `
<div class="contribution-activity-listing float-left col-12 col-lg-10">
<div class="profile-timeline discussion-timeline width-full pb-4">
<h3 class="profile-timeline-month-heading bg-white d-inline-block h6 pr-2 py-1">
${months[month]} <span class="text-gray">${monthPosts.length > 0 ? monthPosts[0].date.getFullYear() : year}</span>
<div class="width-full pb-4">
<h3 class="h6 pr-2 py-1 border-bottom mb-3" style="height: 14px;">
<span class="color-bg-canvas pl-2 pr-3">${monthsFull[month]} <span
class="text-gray">${monthPosts.length > 0 ? monthPosts[0].date.getFullYear() : year}</span></span>
</h3>
<div class="profile-rollup-wrapper py-4 pl-4 position-relative ml-3 js-details-container Details open">
<span class="discussion-item-icon"><svg class="octicon octicon-repo" viewBox="0 0 12 16" version="1.1" width="12"
height="16" aria-hidden="true">
<div class="TimelineItem ">
<div class="TimelineItem-badge ">
<svg class="octicon octicon-repo-push" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z">
d="M1 2.5A2.5 2.5 0 013.5 0h8.75a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0V1.5h-8a1 1 0 00-1 1v6.708A2.492 2.492 0 013.5 9h3.25a.75.75 0 010 1.5H3.5a1 1 0 100 2h5.75a.75.75 0 010 1.5H3.5A2.5 2.5 0 011 11.5v-9zm13.23 7.79a.75.75 0 001.06-1.06l-2.505-2.505a.75.75 0 00-1.06 0L9.22 9.229a.75.75 0 001.06 1.061l1.225-1.224v6.184a.75.75 0 001.5 0V9.066l1.224 1.224z">
</path>
</svg></span>
<button type="button" class="btn-link f4 muted-link no-underline lh-condensed width-full js-details-target "
aria-expanded="false">
<span class="float-left ws-normal text-left">
Created ${monthPosts.length} post${monthPosts.length > 1 ? 's' : ''}
</span>
<span class="d-inline-block float-right">
<span class="profile-rollup-toggle-closed float-right" aria_label="Collapse"><svg class="octicon octicon-fold"
viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true">
<path fill-rule="evenodd"
d="M7 9l3 3H8v3H6v-3H4l3-3zm3-6H8V0H6v3H4l3 3 3-3zm4 2c0-.55-.45-1-1-1h-2.5l-1 1h3l-2 2h-7l-2-2h3l-1-1H1c-.55 0-1 .45-1 1l2.5 2.5L0 10c0 .55.45 1 1 1h2.5l1-1h-3l2-2h7l2 2h-3l1 1H13c.55 0 1-.45 1-1l-2.5-2.5L14 5z">
</path>
</svg></span>
<span class="profile-rollup-toggle-open float-right" aria_label="Expand"><svg class="octicon octicon-unfold"
viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true">
<path fill-rule="evenodd"
d="M11.5 7.5L14 10c0 .55-.45 1-1 1H9v-1h3.5l-2-2h-7l-2 2H5v1H1c-.55 0-1-.45-1-1l2.5-2.5L0 5c0-.55.45-1 1-1h4v1H1.5l2 2h7l2-2H9V4h4c.55 0 1 .45 1 1l-2.5 2.5zM6 6h2V3h2L7 0 4 3h2v3zm2 3H6v3H4l3 3 3-3H8V9z">
</path>
</svg></span>
</span>
</button>
<ul class="profile-rollup-content mt-1" data-repository-hovercards-enabled="" id="posts-activity-ul">
${liHtml}
</ul>
</svg>
</div>
<div class="TimelineItem-body ">
<details class="Details-element details-reset" open>
<summary role="button" class="btn-link f4 muted-link no-underline lh-condensed width-full">
<span class="color-text-primary ws-normal text-left">
Created ${monthPosts.length} post${monthPosts.length > 1 ? 's' : ''}
</span>
<span class="d-inline-block float-right color-icon-secondary">
<span class="Details-content--open float-right">
<svg class="octicon octicon-fold" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M10.896 2H8.75V.75a.75.75 0 00-1.5 0V2H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0l2.896-2.896A.25.25 0 0010.896 2zM8.75 15.25a.75.75 0 01-1.5 0V14H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25zm-6.5-6.5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg></span>
<span class="Details-content--closed float-right"><svg class="octicon octicon-unfold"
viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z">
</path>
</svg>
</span>
</span>
</summary>
<div>
<ul class="list-style-none mt-1">
${liHtml}
</ul>
</div>
</details>
</div>
</div>
</div>
</div>
`;
</div>`;
return html;
}
@@ -255,6 +260,7 @@ function svgTip(elem, count, dateStr) {
} else {
svgElem.innerHTML = `<strong>No posts</strong> on ${dateFmt}`;
}
// TODO: 计算位置
svgElem.style.top = `${rect.top - 50}px`;
svgElem.style.left = `${rect.left - 78}px`;
svgElem.style.display = 'block';