-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.html
More file actions
98 lines (97 loc) · 5.19 KB
/
header.html
File metadata and controls
98 lines (97 loc) · 5.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="zh-cmn-Hans" prefix="og: http://ogp.me/ns#" class="han-init">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>{% if page.title %}{{ page.title }} — {% endif %}{{ site.title }}</title>
<link rel="stylesheet" href="{{ site.url }}/assets/vendor/primer-css/css/primer.css">
<link rel="stylesheet" href="{{ site.url }}/assets/vendor/primer-markdown/dist/user-content.min.css">
<link rel="stylesheet" href="{{ site.url }}/assets/vendor/octicons/octicons/octicons.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/components/collection.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/components/repo-card.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/sections/repo-list.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/sections/mini-repo-list.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/components/boxed-group.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/globals/common.css">
<link rel="stylesheet" href="{{ site.url }}/assets/vendor/share.js/dist/css/share.min.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/globals/responsive.css">
<link rel="stylesheet" href="{{ site.url }}/assets/css/posts/index.css">
<!-- Latest compiled and minified CSS -->
{% for css in page.css %}
<link rel="stylesheet" href="{{ site.url }}/assets/css/{{css}}">
{% endfor %}
{% if site.ios_app_name %}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
{% endif %}
<link rel="canonical" href="{{ page.url | prepend: site.url }}">
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ site.url }}{{ site.subscribe_rss }}">
<link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
{% if page.title %}
<meta property="og:title" content="{{ page.title }}">
{% if page.keywords %}
{% assign keywords = page.keywords %}
{% else %}
{% assign keywords = site.keywords %}
{% endif %}
<meta name="keywords" content="{{ keywords | strip_html | strip_newlines}}">
<meta name="og:keywords" content="{{ keywords | strip_html | strip_newlines}}">
{% if page.excerpt %}
<meta name="description" content="{{ page.excerpt | strip_html | strip_newlines}}">
<meta name="og:description" content="{{ page.excerpt | strip_html | strip_newlines}}">
{% else if page.description %}
<meta name="description" content="{{ page.description | strip_html | strip_newlines}}">
<meta name="og:description" content="{{ page.description | strip_html | strip_newlines}}">
{% else if content %}
<meta name="description" content="{{ content | strip_html | strip_newlines | truncatewords: 100 }}">
<meta name="og:description" content="{{ content | strip_html | strip_newlines | truncatewords: 100 }}">
{% endif %}
{% else %}
<meta name="keywords" content="{{ site.keywords }}">
<meta name="description" content="{{ site.description }}">
{% endif %}
{% if page.og_image_url %}
<meta property="og:image" content="{{ page.og_image_url }}">
{% else %}
{% if page.photo_url %}
<meta property="og:image" content="{{ page.photo_url }}">
{% endif %}
{% endif %}
<meta property="og:url" content="{{ site.url }}{{ page.url | remove_first:'index.html' }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:type" content="article">
<meta property="og:locale" content="zh_CN" />
{% if page.date %}
<meta property="article:published_time" content="{{ page.date | date: '%Y-%m-%d' }}">
{% endif %}
<script src="{{ site.url }}/assets/vendor/jquery/dist/jquery.min.js"></script>
<script src="{{ site.url }}/assets/js/jquery-ui.js"></script>
<script type="text/javascript">
function toggleMenu() {
var nav = document.getElementsByClassName("site-header-nav")[0];
if (nav.style.display == "inline-flex") {
nav.style.display = "none";
} else {
nav.style.display = "inline-flex";
}
}
</script>
</head>
<body class="{{ page.class }}" data-mz="{{ page.class }}">
<header class="site-header">
<div class="container">
<h1><a href="{{ site.url }}/" title="{{ site.title }}"><span class="octicon octicon-mark-github"></span> {{ site.title }}</a></h1>
<button class="collapsed mobile-visible" type="button" onclick="toggleMenu();">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<nav class="site-header-nav" role="navigation">
{% for nav in site.navs %}
<a href="{{ site.url }}{{ nav.href }}" class="{% if page.menu == nav.label %} selected {% endif %} site-header-nav-item" target="{{ nav.target | default: _self }}" title="{{ nav.label }}">{{ nav.label }}</a>
{% endfor %}
</nav>
</div>
</header>
<!-- / header -->