Skip to content

Commit

Permalink
add beian info
Browse files Browse the repository at this point in the history
  • Loading branch information
criwits committed May 2, 2024
1 parent e20e5c7 commit 0472214
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 22 deletions.
1 change: 1 addition & 0 deletions resources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_gen
45 changes: 34 additions & 11 deletions themes/hugo-book/assets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,48 @@

// @import "plugins/numbered";

img[src$='#center']
{
img[src$='#center'] {
display: block;
margin: 0.7rem auto; /* you can replace the vertical '0.7rem' by
margin: 0.7rem auto;
/* you can replace the vertical '0.7rem' by
whatever floats your boat, but keep the
horizontal 'auto' for this to work */
/* whatever else styles you fancy here */
}

img[src$='#floatleft']
{
float:left;
margin: 0.7rem; /* this margin is totally up to you */
img[src$='#floatleft'] {
float: left;
margin: 0.7rem;
/* this margin is totally up to you */
/* whatever else styles you fancy here */
}

img[src$='#floatright']
{
float:right;
margin: 0.7rem; /* this margin is totally up to you */
img[src$='#floatright'] {
float: right;
margin: 0.7rem;
/* this margin is totally up to you */
/* whatever else styles you fancy here */
}

.footer {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset;
padding: 10px 0px;
width: 100%;
font-size: smaller;
line-height: 3.2ex;
color: #aaa;
text-decoration: none;
}

.footer a {
text-decoration: none;
color: #888;
}

.kerning {
padding: 0 2px;
}

.beian-mono {
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}
36 changes: 25 additions & 11 deletions themes/hugo-book/layouts/partials/docs/footer.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
<div class="flex flex-wrap justify-between">
{{ if .Site.IsMultiLingual }}
{{ if .Site.IsMultiLingual }}
{{ partial "docs/languages" . }}
{{ end }}
{{ end }}

{{ if and .GitInfo .Site.Params.BookRepo }}
{{ if and .GitInfo .Site.Params.BookRepo }}
<div>
{{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}}
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}}
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}"
title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
<img src="{{ " svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
<span>{{ $date }}</span>
</a>
</div>
{{ end }}
{{ end }}

{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
<div>
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
<a class="flex align-center"
href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default " content"
}}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
<img src="{{ " svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
<span>{{ i18n "Edit this page" }}</span>
</a>
</div>
{{ end }}
</div>
{{ end }}

<div class="footer">
计算机技术学习札记 — <a href="https://www.criwits.top/terms">使用条款</a><br>
<a href="https://beian.miit.gov.cn/" target="_blank"><span class="kerning">ICP</span><span
class="beian-mono kerning">2022104373</span><span class="kerning beian-mono">-</span><span
class="beian-mono">1</span></a><br>
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030502009325" target="_blank">粤公网安备<span
class="beian-mono kerning">44030502009325</span></a>

</div>

</div>

0 comments on commit 0472214

Please sign in to comment.