Skip to content

Commit

Permalink
Custom style and localization
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 21, 2020
1 parent bc516d1 commit 9d11bd1
Show file tree
Hide file tree
Showing 23 changed files with 133 additions and 173 deletions.
43 changes: 35 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ title: OneV's Den

tagline: 上善若水,人淡如菊
description: >-
我是王巍 (@onevcat),一名 iOS 开发者。
王巍现在是一名专注于 iOS 的职业开发者。他拥有对于 Swift,Objective-C 以及网络程序设计方面的深厚知识及多年实践经验。
他将这些技术运用于创建应用程序和通用框架等解决方案,其中很多都被用户喜爱,并被开发者社区广泛使用来构建其他软件。同时,
他是 ObjC 中国组织的发起人和领导者,为将最佳 iOS 实践和进阶技术引入中国而不断努力。
这里是王巍 (onevcat) 的博客,用来记录一些想法。
url: 'https://onevcat.com'
author: onevcat
author: 王巍 (onevcat)
avatar: /assets/images/avatar.jpg

github:
Expand Down Expand Up @@ -106,7 +109,7 @@ defaults:
location: Post
breadcrumb:
-
label: Posts
label: 主页
url: /
-
scope:
Expand All @@ -121,10 +124,10 @@ defaults:
location: Tag
breadcrumb:
-
label: Home
label: 主页
url: /
-
label: Tags
label: 标签
url: /tabs/tags/
-
scope:
Expand All @@ -134,10 +137,10 @@ defaults:
location: Category
breadcrumb:
-
label: Home
label: 主页
url: /
-
label: Categories
label: 分类
url: /tabs/categories/
-
scope:
Expand All @@ -147,7 +150,7 @@ defaults:
dynamic_title: true # Hide title in mobile screens.
breadcrumb:
-
label: Home
label: 主页
url: /


Expand Down Expand Up @@ -182,8 +185,32 @@ sitemap_exclude: # Sitemap will exclude the following items.
- /categories/
- /tags/
- /posts/
- /2011/
- /2012/
- /2013/
- /2014/
- /2015/
- /2016/
- /2017/
- /2018/
- /2019/
- /2020/
- /2021/
- /2022/
- /2023/
- /2024/
- /2025/
- /2026/
- /2027/
- /2028/
- /2029/
- /2030/
- 404.html
- feed.xml
- sitemap.xml
- robots.txt
- redirects.json
- Brewfile
- Brewfile.lock.json
- build.sh
- config.codekit3
6 changes: 3 additions & 3 deletions _data/contact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
-
type: twitter
icon: 'fab fa-twitter'
-
icon: 'fab fa-weibo'
url: 'https://www.weibo.com/onevcat'
-
type: email
icon: 'fas fa-envelope'
Expand All @@ -21,9 +24,6 @@

# Uncomment and complete the url below to enable more contact options
# -
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
# url: '' # Fill with your mastodon account page
# -
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
# url: '' # Fill with your Linkedin homepage
# -
Expand Down
14 changes: 7 additions & 7 deletions _data/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@


panel:
lastmod: "Recent Update"
trending_tags: "Trending Tags"
toc: "Contents"
lastmod: "最近更新"
trending_tags: "热门标签"
toc: "文章目录"

post:
relate_posts: "Further Reading"
relate_posts: "接下来阅读"
button:
next: Newer
previous: Older
next: 较新文章
previous: 较早文章

search_hint: "Search" # text show on search bar
search_hint: "搜索" # text show on search bar
5 changes: 2 additions & 3 deletions _data/rights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ license:
name: CC BY 4.0
link: "https://creativecommons.org/licenses/by/4.0/"

brief: Some rights reserved.
brief: 保留部分权利。

verbose: >-
Except where otherwise noted, the blog posts on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
除非另有说明,否则本网站上的博客文章均由作者根据知识共享署名国际 4.0(CC BY 4.0)进行授权许可。
10 changes: 5 additions & 5 deletions _data/share.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# © 2020 Cotes Chung
# MIT Licensed

label: "Share"
label: "分享"

platforms:
-
Expand All @@ -28,7 +28,7 @@ platforms:
# icon: "fab fa-linkedin"
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
#
# -
# type: Weibo
# icon: "fab fa-weibo"
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
-
type: Weibo
icon: "fab fa-weibo"
link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
10 changes: 5 additions & 5 deletions _data/tabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@


-
name: Home
name: 主页
icon: "fas fa-home"
-
name: Categories
name: 分类
icon: "fas fa-stream"
path: tabs
url: categories
-
name: "Tags"
name: 标签
icon: "fas fa-tags"
path: tabs
url: tags
-
name: "Archives"
name: 归档
path: tabs
url: archives
icon: "fas fa-archive"
-
name: "About"
name: 关于
icon: "fas fa-info"
path: tabs
url: about
69 changes: 0 additions & 69 deletions _data/updates.yml

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 data-toc-skip>
<ul class="post-content pl-0 pb-1 ml-1 mt-2">

{% for item in update_list %}
{% assign post_url = item | split: "::" | last | url_encode | prepend: "/posts/" | append: "/" %}
{% assign post_url = item | split: "::" | last | prepend: "/" | append: "/" %}
{% assign post = site.posts | where: "url", post_url | first %}

{% if post %}
Expand Down
24 changes: 12 additions & 12 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ <h1 data-toc-skip>{{ page.title }}</h1>
<div class="post-meta text-muted d-flex flex-column">
<!-- Published date and author -->
<div>
Posted
{% include timeago.html date=page.date tooltip=true %}
by
 由
<span class="author">
{% if page.author %}
{{ page.author }}
{% else %}
{{ site.author }}
{% endif %}
{% if page.author %}
{{ page.author }}
{% else %}
{{ site.author }}
{% endif %}
</span>
发布于
{% include timeago.html date=page.date tooltip=true %}
</div>

<!-- lastmod -->
Expand All @@ -36,7 +36,7 @@ <h1 data-toc-skip>{{ page.title }}</h1>
{%- endcapture -%}

{% for item in site.data.updates %}
{% assign encode_filename = item.filename | url_encode %}
{% assign encode_filename = item.filename | split: "/" | last | url_encode %}
{% if filename == encode_filename %}
{% assign lastmod = item.lastmod %}
{% break %}
Expand All @@ -45,7 +45,7 @@ <h1 data-toc-skip>{{ page.title }}</h1>

{% if lastmod %}
<div>
Updated
最后更新:
{% include timeago.html date=lastmod class="lastmod" tooltip=true %}
</div>
{% endif %}
Expand Down Expand Up @@ -109,9 +109,9 @@ <h1 data-toc-skip>{{ page.title }}</h1>
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
{% if site.data.rights.license %}
<div class="license-wrapper">
This post is licensed under
该博客文章由作者通过
<a href="{{ site.data.rights.license.link }}">{{ site.data.rights.license.name }}</a>
by the author.
进行授权。
</div>
{% endif %}

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions assets/css/_addon/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ footer {
padding: .3rem .5rem;
margin: 0 .35rem .5rem 0;
&:hover {
background-color: #2a408e;
border-color: #2a408e;
background-color: #c0363f;
border-color: #c0363f;
color: #fff;
transition: none;
}
Expand All @@ -571,7 +571,7 @@ footer {
list-style: none;
}
a {
color: #6c757d;
color: #7d6c6c;
}
}

Expand Down Expand Up @@ -893,7 +893,7 @@ div.post-content .table-wrapper {
@extend %tag-hover;
border-bottom: none;
text-decoration: none;
color: #d2603a;
color: #be3f48;
}
}

Expand Down
4 changes: 2 additions & 2 deletions assets/css/_addon/module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
}

%link-hover {
color: #d2603a !important;
border-bottom: 1px solid #d2603a;
color: #be3f48 !important;
border-bottom: 1px solid #be3f48;
text-decoration: none;
}

Expand Down
Loading

0 comments on commit 9d11bd1

Please sign in to comment.