This commit is contained in:
parent
3b7a9aa498
commit
1e6d519fb7
50
404.md
50
404.md
|
@ -1,25 +1,25 @@
|
|||
---
|
||||
layout: page
|
||||
description: "你来到了没有知识的荒原 :("
|
||||
header-img: "images/404-bg.jpg"
|
||||
permalink: /404.html
|
||||
---
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="site-heading" id="tag-heading">
|
||||
<h1>404</h1>
|
||||
<span class="subheading">{{ page.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<script>
|
||||
document.body.classList.add('page-fullscreen');
|
||||
</script>
|
||||
---
|
||||
layout: page
|
||||
description: "你来到了没有知识的荒原 :("
|
||||
header-img: "images/404-bg.jpg"
|
||||
permalink: /404.html
|
||||
---
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="site-heading" id="tag-heading">
|
||||
<h1>404</h1>
|
||||
<span class="subheading">{{ page.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<script>
|
||||
document.body.classList.add('page-fullscreen');
|
||||
</script>
|
||||
|
|
14
Gemfile
14
Gemfile
|
@ -1,7 +1,7 @@
|
|||
source 'https://rubygems.org'
|
||||
gem 'jekyll'
|
||||
gem 'redcarpet'
|
||||
gem 'jekyll-paginate'
|
||||
gem 'jekyll-sitemap'
|
||||
|
||||
gem "webrick", "~> 1.7"
|
||||
source 'https://rubygems.org'
|
||||
gem 'jekyll'
|
||||
gem 'redcarpet'
|
||||
gem 'jekyll-paginate'
|
||||
gem 'jekyll-sitemap'
|
||||
|
||||
gem "webrick", "~> 1.7"
|
||||
|
|
166
Gemfile.lock
166
Gemfile.lock
|
@ -1,83 +1,83 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.10)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0)
|
||||
eventmachine (1.2.7)
|
||||
eventmachine (1.2.7-x64-mingw32)
|
||||
ffi (1.15.5)
|
||||
ffi (1.15.5-x64-mingw-ucrt)
|
||||
ffi (1.15.5-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.2.2)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (~> 2.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.3)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.4.0)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 3.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (~> 2.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-sass-converter (2.2.0)
|
||||
sassc (> 2.0.1, < 3.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
kramdown (2.3.2)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.7.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
rb-fsevent (0.11.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
rexml (3.2.5)
|
||||
rouge (3.28.0)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
sassc (2.4.0-x64-mingw32)
|
||||
ffi (~> 1.9)
|
||||
terminal-table (2.0.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
unicode-display_width (1.8.0)
|
||||
webrick (1.7.0)
|
||||
|
||||
PLATFORMS
|
||||
x64-mingw32
|
||||
x64-unknown
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll
|
||||
jekyll-paginate
|
||||
jekyll-sitemap
|
||||
redcarpet
|
||||
webrick (~> 1.7)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.6
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.10)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0)
|
||||
eventmachine (1.2.7)
|
||||
eventmachine (1.2.7-x64-mingw32)
|
||||
ffi (1.15.5)
|
||||
ffi (1.15.5-x64-mingw-ucrt)
|
||||
ffi (1.15.5-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.2.2)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (~> 2.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.3)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.4.0)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 3.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (~> 2.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-sass-converter (2.2.0)
|
||||
sassc (> 2.0.1, < 3.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
kramdown (2.3.2)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.7.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
rb-fsevent (0.11.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
rexml (3.2.5)
|
||||
rouge (3.28.0)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
sassc (2.4.0-x64-mingw32)
|
||||
ffi (~> 1.9)
|
||||
terminal-table (2.0.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
unicode-display_width (1.8.0)
|
||||
webrick (1.7.0)
|
||||
|
||||
PLATFORMS
|
||||
x64-mingw32
|
||||
x64-unknown
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll
|
||||
jekyll-paginate
|
||||
jekyll-sitemap
|
||||
redcarpet
|
||||
webrick (~> 1.7)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.6
|
||||
|
|
622
Rakefile
622
Rakefile
|
@ -1,311 +1,311 @@
|
|||
require "rubygems"
|
||||
require 'rake'
|
||||
require 'yaml'
|
||||
require 'time'
|
||||
|
||||
SOURCE = "."
|
||||
CONFIG = {
|
||||
'version' => "0.3.0",
|
||||
'themes' => File.join(SOURCE, "_includes", "themes"),
|
||||
'layouts' => File.join(SOURCE, "_layouts"),
|
||||
'posts' => File.join(SOURCE, "_posts"),
|
||||
'post_ext' => "md",
|
||||
'theme_package_version' => "0.1.0"
|
||||
}
|
||||
|
||||
# Path configuration helper
|
||||
module JB
|
||||
class Path
|
||||
SOURCE = "."
|
||||
Paths = {
|
||||
:layouts => "_layouts",
|
||||
:themes => "_includes/themes",
|
||||
:theme_assets => "assets/themes",
|
||||
:theme_packages => "_theme_packages",
|
||||
:posts => "_posts"
|
||||
}
|
||||
|
||||
def self.base
|
||||
SOURCE
|
||||
end
|
||||
|
||||
# build a path relative to configured path settings.
|
||||
def self.build(path, opts = {})
|
||||
opts[:root] ||= SOURCE
|
||||
path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/")
|
||||
path.compact!
|
||||
File.__send__ :join, path
|
||||
end
|
||||
|
||||
end #Path
|
||||
end #JB
|
||||
|
||||
# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1,tag2]] [category="category"]
|
||||
desc "Begin a new post in #{CONFIG['posts']}"
|
||||
task :post do
|
||||
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
|
||||
title = ENV["title"] || "new-post"
|
||||
tags = ENV["tags"] || "[]"
|
||||
category = ENV["category"] || ""
|
||||
category = "\"#{category.gsub(/-/,' ')}\"" if !category.empty?
|
||||
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
|
||||
begin
|
||||
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
|
||||
rescue => e
|
||||
puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!"
|
||||
exit -1
|
||||
end
|
||||
filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}")
|
||||
if File.exist?(filename)
|
||||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
end
|
||||
|
||||
puts "Creating new post: #{filename}"
|
||||
open(filename, 'w') do |post|
|
||||
post.puts "---"
|
||||
post.puts "layout: post"
|
||||
post.puts "title: \"#{title.gsub(/-/,' ')}\""
|
||||
post.puts 'description: ""'
|
||||
post.puts "category: #{category}"
|
||||
post.puts "tags: #{tags}"
|
||||
post.puts "---"
|
||||
post.puts "{% include JB/setup %}"
|
||||
end
|
||||
end # task :post
|
||||
|
||||
# Usage: rake page name="about.html"
|
||||
# You can also specify a sub-directory path.
|
||||
# If you don't specify a file extention we create an index.html at the path specified
|
||||
desc "Create a new page."
|
||||
task :page do
|
||||
name = ENV["name"] || "new-page.md"
|
||||
filename = File.join(SOURCE, "#{name}")
|
||||
filename = File.join(filename, "index.html") if File.extname(filename) == ""
|
||||
title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase}
|
||||
if File.exist?(filename)
|
||||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
end
|
||||
|
||||
mkdir_p File.dirname(filename)
|
||||
puts "Creating new page: #{filename}"
|
||||
open(filename, 'w') do |post|
|
||||
post.puts "---"
|
||||
post.puts "layout: page"
|
||||
post.puts "title: \"#{title}\""
|
||||
post.puts 'description: ""'
|
||||
post.puts "---"
|
||||
post.puts "{% include JB/setup %}"
|
||||
end
|
||||
end # task :page
|
||||
|
||||
desc "Launch preview environment"
|
||||
task :preview do
|
||||
system "jekyll serve -w"
|
||||
end # task :preview
|
||||
|
||||
# Public: Alias - Maintains backwards compatability for theme switching.
|
||||
task :switch_theme => "theme:switch"
|
||||
|
||||
namespace :theme do
|
||||
|
||||
# Public: Switch from one theme to another for your blog.
|
||||
#
|
||||
# name - String, Required. name of the theme you want to switch to.
|
||||
# The theme must be installed into your JB framework.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:switch name="the-program"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Switch between Jekyll-bootstrap themes."
|
||||
task :switch do
|
||||
theme_name = ENV["name"].to_s
|
||||
theme_path = File.join(CONFIG['themes'], theme_name)
|
||||
settings_file = File.join(theme_path, "settings.yml")
|
||||
non_layout_files = ["settings.yml"]
|
||||
|
||||
abort("rake aborted: name cannot be blank") if theme_name.empty?
|
||||
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
||||
abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts'])
|
||||
|
||||
Dir.glob("#{theme_path}/*") do |filename|
|
||||
next if non_layout_files.include?(File.basename(filename).downcase)
|
||||
puts "Generating '#{theme_name}' layout: #{File.basename(filename)}"
|
||||
|
||||
open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page|
|
||||
if File.basename(filename, ".html").downcase == "default"
|
||||
page.puts "---"
|
||||
page.puts File.read(settings_file) if File.exist?(settings_file)
|
||||
page.puts "---"
|
||||
else
|
||||
page.puts "---"
|
||||
page.puts "layout: default"
|
||||
page.puts "---"
|
||||
end
|
||||
page.puts "{% include JB/setup %}"
|
||||
page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
|
||||
end
|
||||
end
|
||||
|
||||
puts "=> Theme successfully switched!"
|
||||
puts "=> Reload your web-page to check it out =)"
|
||||
end # task :switch
|
||||
|
||||
# Public: Install a theme using the theme packager.
|
||||
# Version 0.1.0 simple 1:1 file matching.
|
||||
#
|
||||
# git - String, Optional path to the git repository of the theme to be installed.
|
||||
# name - String, Optional name of the theme you want to install.
|
||||
# Passing name requires that the theme package already exist.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git"
|
||||
# rake theme:install name="cool-theme"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Install theme"
|
||||
task :install do
|
||||
if ENV["git"]
|
||||
manifest = theme_from_git_url(ENV["git"])
|
||||
name = manifest["name"]
|
||||
else
|
||||
name = ENV["name"].to_s.downcase
|
||||
end
|
||||
|
||||
packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
|
||||
|
||||
abort("rake aborted!
|
||||
=> ERROR: 'name' cannot be blank") if name.empty?
|
||||
abort("rake aborted!
|
||||
=> ERROR: '#{packaged_theme_path}' directory not found.
|
||||
=> Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
|
||||
=> To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
|
||||
=> example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git'
|
||||
") unless FileTest.directory?(packaged_theme_path)
|
||||
|
||||
manifest = verify_manifest(packaged_theme_path)
|
||||
|
||||
# Get relative paths to packaged theme files
|
||||
# Exclude directories as they'll be recursively created. Exclude meta-data files.
|
||||
packaged_theme_files = []
|
||||
FileUtils.cd(packaged_theme_path) {
|
||||
Dir.glob("**/*.*") { |f|
|
||||
next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
|
||||
packaged_theme_files << f
|
||||
}
|
||||
}
|
||||
|
||||
# Mirror each file into the framework making sure to prompt if already exists.
|
||||
packaged_theme_files.each do |filename|
|
||||
file_install_path = File.join(JB::Path.base, filename)
|
||||
if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
next
|
||||
else
|
||||
mkdir_p File.dirname(file_install_path)
|
||||
cp_r File.join(packaged_theme_path, filename), file_install_path
|
||||
end
|
||||
end
|
||||
|
||||
puts "=> #{name} theme has been installed!"
|
||||
puts "=> ---"
|
||||
if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
|
||||
system("rake switch_theme name='#{name}'")
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Package a theme using the theme packager.
|
||||
# The theme must be structured using valid JB API.
|
||||
# In other words packaging is essentially the reverse of installing.
|
||||
#
|
||||
# name - String, Required name of the theme you want to package.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:package name="twitter"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Package theme"
|
||||
task :package do
|
||||
name = ENV["name"].to_s.downcase
|
||||
theme_path = JB::Path.build(:themes, :node => name)
|
||||
asset_path = JB::Path.build(:theme_assets, :node => name)
|
||||
|
||||
abort("rake aborted: name cannot be blank") if name.empty?
|
||||
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
||||
abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
|
||||
|
||||
## Mirror theme's template directory (_includes)
|
||||
packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
|
||||
mkdir_p packaged_theme_path
|
||||
cp_r theme_path, packaged_theme_path
|
||||
|
||||
## Mirror theme's asset directory
|
||||
packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
|
||||
mkdir_p packaged_theme_assets_path
|
||||
cp_r asset_path, packaged_theme_assets_path
|
||||
|
||||
## Log packager version
|
||||
packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } }
|
||||
open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
|
||||
page.puts packager.to_yaml
|
||||
end
|
||||
|
||||
puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
|
||||
end
|
||||
|
||||
end # end namespace :theme
|
||||
|
||||
# Internal: Download and process a theme from a git url.
|
||||
# Notice we don't know the name of the theme until we look it up in the manifest.
|
||||
# So we'll have to change the folder name once we get the name.
|
||||
#
|
||||
# url - String, Required url to git repository.
|
||||
#
|
||||
# Returns theme manifest hash
|
||||
def theme_from_git_url(url)
|
||||
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
|
||||
abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}")
|
||||
manifest = verify_manifest(tmp_path)
|
||||
new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
|
||||
if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
|
||||
remove_dir(tmp_path)
|
||||
abort("rake aborted: '#{manifest["name"]}' already exists as theme package.")
|
||||
end
|
||||
|
||||
remove_dir(new_path) if File.exist?(new_path)
|
||||
mv(tmp_path, new_path)
|
||||
manifest
|
||||
end
|
||||
|
||||
# Internal: Process theme package manifest file.
|
||||
#
|
||||
# theme_path - String, Required. File path to theme package.
|
||||
#
|
||||
# Returns theme manifest hash
|
||||
def verify_manifest(theme_path)
|
||||
manifest_path = File.join(theme_path, "manifest.yml")
|
||||
manifest_file = File.open( manifest_path )
|
||||
abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file
|
||||
manifest = YAML.load( manifest_file )
|
||||
manifest_file.close
|
||||
manifest
|
||||
end
|
||||
|
||||
def ask(message, valid_options)
|
||||
if valid_options
|
||||
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
|
||||
else
|
||||
answer = get_stdin(message)
|
||||
end
|
||||
answer
|
||||
end
|
||||
|
||||
def get_stdin(message)
|
||||
print message
|
||||
STDIN.gets.chomp
|
||||
end
|
||||
|
||||
#Load custom rake scripts
|
||||
Dir['_rake/*.rake'].each { |r| load r }
|
||||
require "rubygems"
|
||||
require 'rake'
|
||||
require 'yaml'
|
||||
require 'time'
|
||||
|
||||
SOURCE = "."
|
||||
CONFIG = {
|
||||
'version' => "0.3.0",
|
||||
'themes' => File.join(SOURCE, "_includes", "themes"),
|
||||
'layouts' => File.join(SOURCE, "_layouts"),
|
||||
'posts' => File.join(SOURCE, "_posts"),
|
||||
'post_ext' => "md",
|
||||
'theme_package_version' => "0.1.0"
|
||||
}
|
||||
|
||||
# Path configuration helper
|
||||
module JB
|
||||
class Path
|
||||
SOURCE = "."
|
||||
Paths = {
|
||||
:layouts => "_layouts",
|
||||
:themes => "_includes/themes",
|
||||
:theme_assets => "assets/themes",
|
||||
:theme_packages => "_theme_packages",
|
||||
:posts => "_posts"
|
||||
}
|
||||
|
||||
def self.base
|
||||
SOURCE
|
||||
end
|
||||
|
||||
# build a path relative to configured path settings.
|
||||
def self.build(path, opts = {})
|
||||
opts[:root] ||= SOURCE
|
||||
path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/")
|
||||
path.compact!
|
||||
File.__send__ :join, path
|
||||
end
|
||||
|
||||
end #Path
|
||||
end #JB
|
||||
|
||||
# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1,tag2]] [category="category"]
|
||||
desc "Begin a new post in #{CONFIG['posts']}"
|
||||
task :post do
|
||||
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
|
||||
title = ENV["title"] || "new-post"
|
||||
tags = ENV["tags"] || "[]"
|
||||
category = ENV["category"] || ""
|
||||
category = "\"#{category.gsub(/-/,' ')}\"" if !category.empty?
|
||||
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
|
||||
begin
|
||||
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
|
||||
rescue => e
|
||||
puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!"
|
||||
exit -1
|
||||
end
|
||||
filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}")
|
||||
if File.exist?(filename)
|
||||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
end
|
||||
|
||||
puts "Creating new post: #{filename}"
|
||||
open(filename, 'w') do |post|
|
||||
post.puts "---"
|
||||
post.puts "layout: post"
|
||||
post.puts "title: \"#{title.gsub(/-/,' ')}\""
|
||||
post.puts 'description: ""'
|
||||
post.puts "category: #{category}"
|
||||
post.puts "tags: #{tags}"
|
||||
post.puts "---"
|
||||
post.puts "{% include JB/setup %}"
|
||||
end
|
||||
end # task :post
|
||||
|
||||
# Usage: rake page name="about.html"
|
||||
# You can also specify a sub-directory path.
|
||||
# If you don't specify a file extention we create an index.html at the path specified
|
||||
desc "Create a new page."
|
||||
task :page do
|
||||
name = ENV["name"] || "new-page.md"
|
||||
filename = File.join(SOURCE, "#{name}")
|
||||
filename = File.join(filename, "index.html") if File.extname(filename) == ""
|
||||
title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase}
|
||||
if File.exist?(filename)
|
||||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
end
|
||||
|
||||
mkdir_p File.dirname(filename)
|
||||
puts "Creating new page: #{filename}"
|
||||
open(filename, 'w') do |post|
|
||||
post.puts "---"
|
||||
post.puts "layout: page"
|
||||
post.puts "title: \"#{title}\""
|
||||
post.puts 'description: ""'
|
||||
post.puts "---"
|
||||
post.puts "{% include JB/setup %}"
|
||||
end
|
||||
end # task :page
|
||||
|
||||
desc "Launch preview environment"
|
||||
task :preview do
|
||||
system "jekyll serve -w"
|
||||
end # task :preview
|
||||
|
||||
# Public: Alias - Maintains backwards compatability for theme switching.
|
||||
task :switch_theme => "theme:switch"
|
||||
|
||||
namespace :theme do
|
||||
|
||||
# Public: Switch from one theme to another for your blog.
|
||||
#
|
||||
# name - String, Required. name of the theme you want to switch to.
|
||||
# The theme must be installed into your JB framework.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:switch name="the-program"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Switch between Jekyll-bootstrap themes."
|
||||
task :switch do
|
||||
theme_name = ENV["name"].to_s
|
||||
theme_path = File.join(CONFIG['themes'], theme_name)
|
||||
settings_file = File.join(theme_path, "settings.yml")
|
||||
non_layout_files = ["settings.yml"]
|
||||
|
||||
abort("rake aborted: name cannot be blank") if theme_name.empty?
|
||||
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
||||
abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts'])
|
||||
|
||||
Dir.glob("#{theme_path}/*") do |filename|
|
||||
next if non_layout_files.include?(File.basename(filename).downcase)
|
||||
puts "Generating '#{theme_name}' layout: #{File.basename(filename)}"
|
||||
|
||||
open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page|
|
||||
if File.basename(filename, ".html").downcase == "default"
|
||||
page.puts "---"
|
||||
page.puts File.read(settings_file) if File.exist?(settings_file)
|
||||
page.puts "---"
|
||||
else
|
||||
page.puts "---"
|
||||
page.puts "layout: default"
|
||||
page.puts "---"
|
||||
end
|
||||
page.puts "{% include JB/setup %}"
|
||||
page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
|
||||
end
|
||||
end
|
||||
|
||||
puts "=> Theme successfully switched!"
|
||||
puts "=> Reload your web-page to check it out =)"
|
||||
end # task :switch
|
||||
|
||||
# Public: Install a theme using the theme packager.
|
||||
# Version 0.1.0 simple 1:1 file matching.
|
||||
#
|
||||
# git - String, Optional path to the git repository of the theme to be installed.
|
||||
# name - String, Optional name of the theme you want to install.
|
||||
# Passing name requires that the theme package already exist.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git"
|
||||
# rake theme:install name="cool-theme"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Install theme"
|
||||
task :install do
|
||||
if ENV["git"]
|
||||
manifest = theme_from_git_url(ENV["git"])
|
||||
name = manifest["name"]
|
||||
else
|
||||
name = ENV["name"].to_s.downcase
|
||||
end
|
||||
|
||||
packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
|
||||
|
||||
abort("rake aborted!
|
||||
=> ERROR: 'name' cannot be blank") if name.empty?
|
||||
abort("rake aborted!
|
||||
=> ERROR: '#{packaged_theme_path}' directory not found.
|
||||
=> Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
|
||||
=> To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
|
||||
=> example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git'
|
||||
") unless FileTest.directory?(packaged_theme_path)
|
||||
|
||||
manifest = verify_manifest(packaged_theme_path)
|
||||
|
||||
# Get relative paths to packaged theme files
|
||||
# Exclude directories as they'll be recursively created. Exclude meta-data files.
|
||||
packaged_theme_files = []
|
||||
FileUtils.cd(packaged_theme_path) {
|
||||
Dir.glob("**/*.*") { |f|
|
||||
next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
|
||||
packaged_theme_files << f
|
||||
}
|
||||
}
|
||||
|
||||
# Mirror each file into the framework making sure to prompt if already exists.
|
||||
packaged_theme_files.each do |filename|
|
||||
file_install_path = File.join(JB::Path.base, filename)
|
||||
if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
||||
next
|
||||
else
|
||||
mkdir_p File.dirname(file_install_path)
|
||||
cp_r File.join(packaged_theme_path, filename), file_install_path
|
||||
end
|
||||
end
|
||||
|
||||
puts "=> #{name} theme has been installed!"
|
||||
puts "=> ---"
|
||||
if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
|
||||
system("rake switch_theme name='#{name}'")
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Package a theme using the theme packager.
|
||||
# The theme must be structured using valid JB API.
|
||||
# In other words packaging is essentially the reverse of installing.
|
||||
#
|
||||
# name - String, Required name of the theme you want to package.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# rake theme:package name="twitter"
|
||||
#
|
||||
# Returns Success/failure messages.
|
||||
desc "Package theme"
|
||||
task :package do
|
||||
name = ENV["name"].to_s.downcase
|
||||
theme_path = JB::Path.build(:themes, :node => name)
|
||||
asset_path = JB::Path.build(:theme_assets, :node => name)
|
||||
|
||||
abort("rake aborted: name cannot be blank") if name.empty?
|
||||
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
||||
abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
|
||||
|
||||
## Mirror theme's template directory (_includes)
|
||||
packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
|
||||
mkdir_p packaged_theme_path
|
||||
cp_r theme_path, packaged_theme_path
|
||||
|
||||
## Mirror theme's asset directory
|
||||
packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
|
||||
mkdir_p packaged_theme_assets_path
|
||||
cp_r asset_path, packaged_theme_assets_path
|
||||
|
||||
## Log packager version
|
||||
packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } }
|
||||
open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
|
||||
page.puts packager.to_yaml
|
||||
end
|
||||
|
||||
puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
|
||||
end
|
||||
|
||||
end # end namespace :theme
|
||||
|
||||
# Internal: Download and process a theme from a git url.
|
||||
# Notice we don't know the name of the theme until we look it up in the manifest.
|
||||
# So we'll have to change the folder name once we get the name.
|
||||
#
|
||||
# url - String, Required url to git repository.
|
||||
#
|
||||
# Returns theme manifest hash
|
||||
def theme_from_git_url(url)
|
||||
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
|
||||
abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}")
|
||||
manifest = verify_manifest(tmp_path)
|
||||
new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
|
||||
if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
|
||||
remove_dir(tmp_path)
|
||||
abort("rake aborted: '#{manifest["name"]}' already exists as theme package.")
|
||||
end
|
||||
|
||||
remove_dir(new_path) if File.exist?(new_path)
|
||||
mv(tmp_path, new_path)
|
||||
manifest
|
||||
end
|
||||
|
||||
# Internal: Process theme package manifest file.
|
||||
#
|
||||
# theme_path - String, Required. File path to theme package.
|
||||
#
|
||||
# Returns theme manifest hash
|
||||
def verify_manifest(theme_path)
|
||||
manifest_path = File.join(theme_path, "manifest.yml")
|
||||
manifest_file = File.open( manifest_path )
|
||||
abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file
|
||||
manifest = YAML.load( manifest_file )
|
||||
manifest_file.close
|
||||
manifest
|
||||
end
|
||||
|
||||
def ask(message, valid_options)
|
||||
if valid_options
|
||||
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
|
||||
else
|
||||
answer = get_stdin(message)
|
||||
end
|
||||
answer
|
||||
end
|
||||
|
||||
def get_stdin(message)
|
||||
print message
|
||||
STDIN.gets.chomp
|
||||
end
|
||||
|
||||
#Load custom rake scripts
|
||||
Dir['_rake/*.rake'].each { |r| load r }
|
||||
|
|
180
_config.yml
180
_config.yml
|
@ -1,90 +1,90 @@
|
|||
# Basic
|
||||
title: 备考中
|
||||
subtitle: 个人站
|
||||
description: 欢迎来到备考中の破站~
|
||||
# 头像里面的标题
|
||||
avatarTitle: 点击
|
||||
# 头像里面的描述
|
||||
avatarDesc: 进入博客主页
|
||||
url: "https://blog.zknb-666.ml"
|
||||
|
||||
# 博客是否自动生成目录,false为不生成
|
||||
enableToc: true
|
||||
|
||||
#Background
|
||||
background: https://api.ixiaowai.cn/api/api.php
|
||||
|
||||
# Comment
|
||||
comment:
|
||||
livere: MTAyMC81MzcwNy8zMDE4MA== # https://www.livere.com
|
||||
#disqus: zknb
|
||||
#uyan: 2143225 # 有言id,登录有言官网申请
|
||||
#valine: # https://valine.js.org/
|
||||
# appid: Czbp5FiGs4gJVlfMk9wrHG7X-MdYXbMMI # Appid 详细见https://valine.js.org/quickstart.html
|
||||
# appkey: V7ErQOVNoh4rKvESvbso8lbh #Appkey
|
||||
|
||||
# Social
|
||||
social:
|
||||
QQ: 2865467965
|
||||
#weibo: 5366874726
|
||||
github: zknb-666
|
||||
# zhihu: panpanleopard
|
||||
# juejin: xxx
|
||||
#jianshu: 2ada30d8d0f7
|
||||
# twitter:
|
||||
mail: 2865467965@qq.com
|
||||
|
||||
#Music
|
||||
meting:
|
||||
autohide: ture
|
||||
server: tencent
|
||||
type: playlist
|
||||
id: 2139464986
|
||||
theme: ff0000
|
||||
|
||||
# 百度统计
|
||||
# 使用博客模板请去掉或者更换 id
|
||||
baidu:
|
||||
id: 78dabddbcdea439ca4959d5e2057b184
|
||||
|
||||
# Google Analytics
|
||||
# 使用博客模板请去掉或者更换 id
|
||||
#ga:
|
||||
# id: UA-84134159-3
|
||||
# host: auto
|
||||
|
||||
|
||||
# 《----------------- 上面的信息修改成你自己的 ---------------------------》
|
||||
#
|
||||
#
|
||||
# 《--------------- 下面的信息可以自行选择是否修改 ------------------------》
|
||||
|
||||
|
||||
permalink: /:year/:month/:title/
|
||||
# Format
|
||||
highlighter: rouge
|
||||
|
||||
textColor: #FF0000
|
||||
|
||||
# supported colors: blue, green, purple, red, orange or slate. If you need clear, leave it empty.
|
||||
cover_color: clear
|
||||
|
||||
# The blog button should not be removed.
|
||||
blog_button:
|
||||
title: 主页
|
||||
|
||||
|
||||
# Navigation buttons in the front page.s
|
||||
nav:
|
||||
- {title: 文章, description: 杂七杂八的东西, url: '/archive/'}
|
||||
- {title: 标签, description: 杂七杂八的分类, url: '/tags/'}
|
||||
- {title: 关于我, description: 一个废物, url: '/about/'}
|
||||
- {title: 下载站, description: 垃圾堆, url: 'https://pan.zknb-666.ml'}
|
||||
|
||||
|
||||
|
||||
# Pagination
|
||||
gems: [jekyll-paginate,jekyll-sitemap]
|
||||
paginate: 20
|
||||
paginate_path: "page/:num/"
|
||||
plugins: [jekyll-paginate]
|
||||
# Basic
|
||||
title: 备考中
|
||||
subtitle: 个人站
|
||||
description: 欢迎来到备考中の破站~
|
||||
# 头像里面的标题
|
||||
avatarTitle: 点击
|
||||
# 头像里面的描述
|
||||
avatarDesc: 进入博客主页
|
||||
url: "https://blog.zknb-666.ml"
|
||||
|
||||
# 博客是否自动生成目录,false为不生成
|
||||
enableToc: true
|
||||
|
||||
#Background
|
||||
background: https://api.ixiaowai.cn/api/api.php
|
||||
|
||||
# Comment
|
||||
comment:
|
||||
livere: MTAyMC81MzcwNy8zMDE4MA== # https://www.livere.com
|
||||
#disqus: zknb
|
||||
#uyan: 2143225 # 有言id,登录有言官网申请
|
||||
#valine: # https://valine.js.org/
|
||||
# appid: Czbp5FiGs4gJVlfMk9wrHG7X-MdYXbMMI # Appid 详细见https://valine.js.org/quickstart.html
|
||||
# appkey: V7ErQOVNoh4rKvESvbso8lbh #Appkey
|
||||
|
||||
# Social
|
||||
social:
|
||||
QQ: 2865467965
|
||||
#weibo: 5366874726
|
||||
github: zknb-666
|
||||
# zhihu: panpanleopard
|
||||
# juejin: xxx
|
||||
#jianshu: 2ada30d8d0f7
|
||||
# twitter:
|
||||
mail: 2865467965@qq.com
|
||||
|
||||
#Music
|
||||
meting:
|
||||
autohide: ture
|
||||
server: tencent
|
||||
type: playlist
|
||||
id: 2139464986
|
||||
theme: ff0000
|
||||
|
||||
# 百度统计
|
||||
# 使用博客模板请去掉或者更换 id
|
||||
baidu:
|
||||
id: 78dabddbcdea439ca4959d5e2057b184
|
||||
|
||||
# Google Analytics
|
||||
# 使用博客模板请去掉或者更换 id
|
||||
#ga:
|
||||
# id: UA-84134159-3
|
||||
# host: auto
|
||||
|
||||
|
||||
# 《----------------- 上面的信息修改成你自己的 ---------------------------》
|
||||
#
|
||||
#
|
||||
# 《--------------- 下面的信息可以自行选择是否修改 ------------------------》
|
||||
|
||||
|
||||
permalink: /:year/:month/:title/
|
||||
# Format
|
||||
highlighter: rouge
|
||||
|
||||
textColor: #FF0000
|
||||
|
||||
# supported colors: blue, green, purple, red, orange or slate. If you need clear, leave it empty.
|
||||
cover_color: clear
|
||||
|
||||
# The blog button should not be removed.
|
||||
blog_button:
|
||||
title: 主页
|
||||
|
||||
|
||||
# Navigation buttons in the front page.s
|
||||
nav:
|
||||
- {title: 文章, description: 杂七杂八的东西, url: '/archive/'}
|
||||
- {title: 标签, description: 杂七杂八的分类, url: '/tags/'}
|
||||
- {title: 关于我, description: 一个废物, url: '/about/'}
|
||||
- {title: 下载站, description: 垃圾堆, url: 'https://pan.zknb-666.ml'}
|
||||
|
||||
|
||||
|
||||
# Pagination
|
||||
gems: [jekyll-paginate,jekyll-sitemap]
|
||||
paginate: 20
|
||||
paginate_path: "page/:num/"
|
||||
plugins: [jekyll-paginate]
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
{% comment %}<!--
|
||||
The pages_list include is a listing helper.
|
||||
Usage:
|
||||
1) assign the 'pages_list' variable to a valid array of pages or posts.
|
||||
2) include JB/pages_list
|
||||
example:
|
||||
<ul>
|
||||
{% assign pages_list = site.pages %}
|
||||
{% include JB/pages_list %}
|
||||
</ul>
|
||||
|
||||
Grouping: (optional):
|
||||
assign the 'group' variable to constrain the list to only pages/posts
|
||||
in the given group. Note you must define the group manually in the page/post
|
||||
meta-data to use this feature.
|
||||
Grouping is mainly helpful for non-post pages.
|
||||
If you want to group posts, it's easier/better to tag them, then pass the tagged posts array.
|
||||
i.e. site.tags.cool_tag (this returns an array of posts tagged: cool_tag)
|
||||
|
||||
This helper can be seen in use at: ../_layouts/default.html
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.pages_list.provider == "custom" %}
|
||||
{% include custom/pages_list %}
|
||||
{% else %}
|
||||
{% for node in pages_list %}
|
||||
{% if node.title != null %}
|
||||
{% if group == null or group == node.group %}
|
||||
{% if page.url == node.url %}
|
||||
<li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% assign pages_list = nil %}
|
||||
{% comment %}<!--
|
||||
The pages_list include is a listing helper.
|
||||
Usage:
|
||||
1) assign the 'pages_list' variable to a valid array of pages or posts.
|
||||
2) include JB/pages_list
|
||||
example:
|
||||
<ul>
|
||||
{% assign pages_list = site.pages %}
|
||||
{% include JB/pages_list %}
|
||||
</ul>
|
||||
|
||||
Grouping: (optional):
|
||||
assign the 'group' variable to constrain the list to only pages/posts
|
||||
in the given group. Note you must define the group manually in the page/post
|
||||
meta-data to use this feature.
|
||||
Grouping is mainly helpful for non-post pages.
|
||||
If you want to group posts, it's easier/better to tag them, then pass the tagged posts array.
|
||||
i.e. site.tags.cool_tag (this returns an array of posts tagged: cool_tag)
|
||||
|
||||
This helper can be seen in use at: ../_layouts/default.html
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.pages_list.provider == "custom" %}
|
||||
{% include custom/pages_list %}
|
||||
{% else %}
|
||||
{% for node in pages_list %}
|
||||
{% if node.title != null %}
|
||||
{% if group == null or group == node.group %}
|
||||
{% if page.url == node.url %}
|
||||
<li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% assign pages_list = nil %}
|
||||
{% assign group = nil %}
|
|
@ -1,66 +1,66 @@
|
|||
{% comment %}<!--
|
||||
Collate_posts helper. Collated posts by year and month.
|
||||
Usage:
|
||||
1) assign the 'posts_collate' variable to a valid array of posts.
|
||||
2) include JB/posts_collate
|
||||
example:
|
||||
{% assign posts_collate = site.posts %}
|
||||
{% include JB/posts_collate %}
|
||||
|
||||
Ordering:
|
||||
Posts are displayed in reverse chronological order.
|
||||
For normal chronological order:
|
||||
1) Change the for loop to this:
|
||||
=> 'for post in site.posts reversed'
|
||||
2) Next make sure to change 'post.previous.date' to:
|
||||
=> 'post.next.date'
|
||||
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.posts_collate.provider == "custom" %}
|
||||
{% include custom/posts_collate %}
|
||||
{% else %}
|
||||
{% for post in posts_collate %}
|
||||
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
|
||||
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
||||
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
|
||||
|
||||
{% if forloop.first %}
|
||||
|
||||
|
||||
<div class="hat_title">
|
||||
<h3>{{this_year}}</h3>
|
||||
</div>
|
||||
<div class="post_list">
|
||||
<ul>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<span>
|
||||
{{ post.date | date: "%Y-%m-%e" }}
|
||||
</span>
|
||||
»
|
||||
<a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>
|
||||
</li>
|
||||
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
{% if this_year != next_year %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="hat_title">
|
||||
<h3> {{next_year}}</h3>
|
||||
</div>
|
||||
<div class="post_list">
|
||||
<ul>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% comment %}<!--
|
||||
Collate_posts helper. Collated posts by year and month.
|
||||
Usage:
|
||||
1) assign the 'posts_collate' variable to a valid array of posts.
|
||||
2) include JB/posts_collate
|
||||
example:
|
||||
{% assign posts_collate = site.posts %}
|
||||
{% include JB/posts_collate %}
|
||||
|
||||
Ordering:
|
||||
Posts are displayed in reverse chronological order.
|
||||
For normal chronological order:
|
||||
1) Change the for loop to this:
|
||||
=> 'for post in site.posts reversed'
|
||||
2) Next make sure to change 'post.previous.date' to:
|
||||
=> 'post.next.date'
|
||||
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.posts_collate.provider == "custom" %}
|
||||
{% include custom/posts_collate %}
|
||||
{% else %}
|
||||
{% for post in posts_collate %}
|
||||
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
|
||||
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
||||
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
|
||||
|
||||
{% if forloop.first %}
|
||||
|
||||
|
||||
<div class="hat_title">
|
||||
<h3>{{this_year}}</h3>
|
||||
</div>
|
||||
<div class="post_list">
|
||||
<ul>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<span>
|
||||
{{ post.date | date: "%Y-%m-%e" }}
|
||||
</span>
|
||||
»
|
||||
<a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>
|
||||
</li>
|
||||
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
{% if this_year != next_year %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="hat_title">
|
||||
<h3> {{next_year}}</h3>
|
||||
</div>
|
||||
<div class="post_list">
|
||||
<ul>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% assign posts_collate = nil %}</div>
|
|
@ -1,19 +1,19 @@
|
|||
{% capture jbcache %}
|
||||
{% if site.JB.setup.provider == "custom" %}
|
||||
{% include custom/setup %}
|
||||
{% else %}
|
||||
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
|
||||
{% assign BASE_PATH = site.JB.BASE_PATH %}
|
||||
{% assign HOME_PATH = site.JB.BASE_PATH %}
|
||||
{% else %}
|
||||
{% assign BASE_PATH = nil %}
|
||||
{% assign HOME_PATH = "/" %}
|
||||
{% endif %}
|
||||
|
||||
{% if site.JB.ASSET_PATH %}
|
||||
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
|
||||
{% else %}
|
||||
{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ layout.theme.name }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% capture jbcache %}
|
||||
{% if site.JB.setup.provider == "custom" %}
|
||||
{% include custom/setup %}
|
||||
{% else %}
|
||||
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
|
||||
{% assign BASE_PATH = site.JB.BASE_PATH %}
|
||||
{% assign HOME_PATH = site.JB.BASE_PATH %}
|
||||
{% else %}
|
||||
{% assign BASE_PATH = nil %}
|
||||
{% assign HOME_PATH = "/" %}
|
||||
{% endif %}
|
||||
|
||||
{% if site.JB.ASSET_PATH %}
|
||||
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
|
||||
{% else %}
|
||||
{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ layout.theme.name }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endcapture %}{% assign jbcache = nil %}
|
|
@ -1,33 +1,33 @@
|
|||
{% comment %}<!--
|
||||
The tags_list include is a listing helper for tags.
|
||||
Usage:
|
||||
1) assign the 'tags_list' variable to a valid array of tags.
|
||||
2) include JB/tags_list
|
||||
example:
|
||||
<ul>
|
||||
{% assign tags_list = site.tags %}
|
||||
{% include JB/tags_list %}
|
||||
</ul>
|
||||
|
||||
Notes:
|
||||
Tags can be either a Hash of tag objects (hashes) or an Array of tag-names (strings).
|
||||
The encapsulating 'if' statement checks whether tags_list is a Hash or Array.
|
||||
site.tags is a Hash while page.tags is an array.
|
||||
|
||||
This helper can be seen in use at: ../_layouts/default.html
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.tags_list.provider == "custom" %}
|
||||
{% include custom/tags_list %}
|
||||
{% else %}
|
||||
{% if tags_list.first[0] == null %}
|
||||
{% for tag in tags_list %}
|
||||
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for tag in tags_list %}
|
||||
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% assign tags_list = nil %}
|
||||
{% comment %}<!--
|
||||
The tags_list include is a listing helper for tags.
|
||||
Usage:
|
||||
1) assign the 'tags_list' variable to a valid array of tags.
|
||||
2) include JB/tags_list
|
||||
example:
|
||||
<ul>
|
||||
{% assign tags_list = site.tags %}
|
||||
{% include JB/tags_list %}
|
||||
</ul>
|
||||
|
||||
Notes:
|
||||
Tags can be either a Hash of tag objects (hashes) or an Array of tag-names (strings).
|
||||
The encapsulating 'if' statement checks whether tags_list is a Hash or Array.
|
||||
site.tags is a Hash while page.tags is an array.
|
||||
|
||||
This helper can be seen in use at: ../_layouts/default.html
|
||||
-->{% endcomment %}
|
||||
|
||||
{% if site.JB.tags_list.provider == "custom" %}
|
||||
{% include custom/tags_list %}
|
||||
{% else %}
|
||||
{% if tags_list.first[0] == null %}
|
||||
{% for tag in tags_list %}
|
||||
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for tag in tags_list %}
|
||||
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% assign tags_list = nil %}
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
<section class="post-comments">
|
||||
{% if site.comment.valine %}
|
||||
<div id="vcomments"></div>
|
||||
<script src="//code.bdstatic.com/npm/leancloud-storage@4.12.0/dist/av-min.js"></script>
|
||||
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: '#vcomments',
|
||||
appId: '{{site.comment.valine.appid}}',
|
||||
appKey: '{{site.comment.valine.appkey}}'
|
||||
});
|
||||
</script>
|
||||
<noscript>要查看<a href="https://valine.js.org"> Valine </a>评论,请启用 JavaScript</noscript>
|
||||
|
||||
{% elsif site.comment.livere %}
|
||||
|
||||
<div id="lv-container" data-id="city" data-uid="{{site.comment.livere}}">
|
||||
<script type="text/javascript">
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
|
||||
if (typeof LivereTower === 'function') { return; }
|
||||
j = d.createElement(s);
|
||||
j.src = '/js/embed.dist.js';
|
||||
j.async = true;
|
||||
e.parentNode.insertBefore(j, e);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
|
||||
</div>
|
||||
|
||||
{% elsif site.comment.disqus %}
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
|
||||
var disqus_config = function () {
|
||||
this.page.url = "{{ page.url | prepend: site.baseurl | prepend: site.url }}";
|
||||
this.page.identifier = "{{ page.url }}";
|
||||
};
|
||||
var disqus_shortname = '{{ site.comment.disqus }}';
|
||||
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>要查看<a href="http://disqus.com/?ref_noscript"> Disqus </a>评论,请启用 JavaScript</noscript>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<section class="post-comments">
|
||||
{% if site.comment.valine %}
|
||||
<div id="vcomments"></div>
|
||||
<script src="//code.bdstatic.com/npm/leancloud-storage@4.12.0/dist/av-min.js"></script>
|
||||
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
|
||||
<script>
|
||||
new Valine({
|
||||
el: '#vcomments',
|
||||
appId: '{{site.comment.valine.appid}}',
|
||||
appKey: '{{site.comment.valine.appkey}}'
|
||||
});
|
||||
</script>
|
||||
<noscript>要查看<a href="https://valine.js.org"> Valine </a>评论,请启用 JavaScript</noscript>
|
||||
|
||||
{% elsif site.comment.livere %}
|
||||
|
||||
<div id="lv-container" data-id="city" data-uid="{{site.comment.livere}}">
|
||||
<script type="text/javascript">
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
|
||||
if (typeof LivereTower === 'function') { return; }
|
||||
j = d.createElement(s);
|
||||
j.src = '/js/embed.dist.js';
|
||||
j.async = true;
|
||||
e.parentNode.insertBefore(j, e);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
|
||||
</div>
|
||||
|
||||
{% elsif site.comment.disqus %}
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
|
||||
var disqus_config = function () {
|
||||
this.page.url = "{{ page.url | prepend: site.baseurl | prepend: site.url }}";
|
||||
this.page.identifier = "{{ page.url }}";
|
||||
};
|
||||
var disqus_shortname = '{{ site.comment.disqus }}';
|
||||
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>要查看<a href="http://disqus.com/?ref_noscript"> Disqus </a>评论,请启用 JavaScript</noscript>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<script src="//gcore.jsdelivr.net/npm/jquery/dist/jquery.js"></script>
|
||||
<script type="text/javascript" src="/js/main.js"></script>
|
||||
|
||||
<!-- pjax -->
|
||||
<script src="//gcore.jsdelivr.net/npm/jquery-pjax/jquery.pjax.min.js"></script>
|
||||
<script>$(document).pjax('a[target!=_blank]', '#pageContent', {fragment: '#pageContent',timeout: 50000,cache: false});$(document).on('pjax:start', function() { NProgress.start(); });$(document).on('pjax:end', function() { NProgress.done(); });</script>
|
||||
|
||||
<!-- nprogress -->
|
||||
<script src="//gcore.jsdelivr.net/npm/nprogress/nprogress.min.js"></script>
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/nprogress/nprogress.min.css">
|
||||
|
||||
<!-- glidejs -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/glidejs/dist/css/glide.core.css">
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/glidejs/dist/css/glide.theme.css">
|
||||
<script src="//gcore.jsdelivr.net/npm/glidejs/dist/glide.min.js"></script>
|
||||
|
||||
<!-- Highlight -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/default.min.css">
|
||||
<script src="//gcore.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
|
||||
<!-- Hls -->
|
||||
<script src="//gcore.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
|
||||
|
||||
<!-- require APlayer -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
|
||||
<script src="//gcore.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
|
||||
|
||||
<!-- require MetingJS -->
|
||||
<script src="//gcore.jsdelivr.net/npm/meting/dist/Meting.min.js"></script>
|
||||
|
||||
<!-- 一言 -->
|
||||
<script src="//gcore.jsdelivr.net/npm/jquery/dist/jquery.js"></script>
|
||||
<script type="text/javascript" src="/js/main.js"></script>
|
||||
|
||||
<!-- pjax -->
|
||||
<script src="//gcore.jsdelivr.net/npm/jquery-pjax/jquery.pjax.min.js"></script>
|
||||
<script>$(document).pjax('a[target!=_blank]', '#pageContent', {fragment: '#pageContent',timeout: 50000,cache: false});$(document).on('pjax:start', function() { NProgress.start(); });$(document).on('pjax:end', function() { NProgress.done(); });</script>
|
||||
|
||||
<!-- nprogress -->
|
||||
<script src="//gcore.jsdelivr.net/npm/nprogress/nprogress.min.js"></script>
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/nprogress/nprogress.min.css">
|
||||
|
||||
<!-- glidejs -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/glidejs/dist/css/glide.core.css">
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/glidejs/dist/css/glide.theme.css">
|
||||
<script src="//gcore.jsdelivr.net/npm/glidejs/dist/glide.min.js"></script>
|
||||
|
||||
<!-- Highlight -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/default.min.css">
|
||||
<script src="//gcore.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
|
||||
<!-- Hls -->
|
||||
<script src="//gcore.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
|
||||
|
||||
<!-- require APlayer -->
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
|
||||
<script src="//gcore.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
|
||||
|
||||
<!-- require MetingJS -->
|
||||
<script src="//gcore.jsdelivr.net/npm/meting/dist/Meting.min.js"></script>
|
||||
|
||||
<!-- 一言 -->
|
||||
<script src="https://v1.hitokoto.cn/?c=a&encode=js&select=%23hitokoto" defer></script>
|
|
@ -1,111 +1,111 @@
|
|||
<section class="footer">
|
||||
<footer>
|
||||
<div class = "footer_div hidden loadhidden" align="center">
|
||||
<nav class="cover-navigation navigation--social">
|
||||
<ul class="navigation">
|
||||
|
||||
{% if site.social.QQ %}
|
||||
<!-- QQ -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://wpa.qq.com/msgrd?v=3&uin={{site.social.QQ}}&site=qq&menu=yes" title="@{{site.social.QQ}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/QQ.jpeg);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.github %}
|
||||
<!-- Github -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://github.com/{{site.social.github}}" title="@{{site.social.github}} 的 Github" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/github.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.zhihu %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://www.zhihu.com/people/{{site.social.zhihu}}" title="@{{site.social.zhihu}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/zhihu.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.juejin %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://juejin.im/user/{{site.social.juejin}}" title="@{{site.social.juejin}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/juejin.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.jianshu %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://www.jianshu.com/u/{{site.social.jianshu}}" title="@{{site.social.jianshu}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/jianshu.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.weibo %}
|
||||
<!-- Weibo -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://weibo.com/{{site.social.weibo}}" title="@{{site.social.weibo}} 的微博" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/weibo.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if site.social.twitter %}
|
||||
<!-- Twitter -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://twitter.com/{{site.social.twitter}}" title="@{{site.social.twitter}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/twitter.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if site.social.mail %}
|
||||
<!-- Email -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="mailto:{{site.social.mail}}" title="Contact me">
|
||||
<div class="footer-social-icon" style="background:url(/images/email.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<!-- RSS -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="/feed.xml" rel="author" title="RSS" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/rss.png);"></div>
|
||||
<span class="label">RSS</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<p>
|
||||
Copyright © {{ site.title }} {{ site.time | date: '%Y' }} Theme: <a href="https://github.com/leopardpan/leopardpan.github.io" target='_blank'>leopardpan</a>
|
||||
</p>
|
||||
<script src="//gcore.jsdelivr.net/npm/@fortawesome/fontawesome-free/js/fontawesome.min.js"></script>
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
|
||||
<!-- 访问统计 -->
|
||||
<span id="busuanzi_container_site_pv">
|
||||
本站总访问量
|
||||
<span id="busuanzi_value_site_pv"><i class="fa fa-spinner fa-spin"></i></span>次
|
||||
</span>
|
||||
<br><br>
|
||||
<a target="_blank" href="http://www.freecdn.pw/?zzwz" title="免费云加速(FreeCDN),为您免费提供网站加速和网站防御(DDOS、CC攻击)" alt="免费云加速(FreeCDN),为您免费提供网站加速和网站防御(DDOS、CC攻击)">本站由免费云加速(FreeCDN)提供网站加速和攻击防御服务</a>
|
||||
<br><br>
|
||||
<a href="https://icp.gov.moe/?keyword=20229111" target="_blank">萌ICP备20229111号</a>
|
||||
<br><br>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
<section class="footer">
|
||||
<footer>
|
||||
<div class = "footer_div hidden loadhidden" align="center">
|
||||
<nav class="cover-navigation navigation--social">
|
||||
<ul class="navigation">
|
||||
|
||||
{% if site.social.QQ %}
|
||||
<!-- QQ -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://wpa.qq.com/msgrd?v=3&uin={{site.social.QQ}}&site=qq&menu=yes" title="@{{site.social.QQ}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/QQ.jpeg);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.github %}
|
||||
<!-- Github -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://github.com/{{site.social.github}}" title="@{{site.social.github}} 的 Github" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/github.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.zhihu %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://www.zhihu.com/people/{{site.social.zhihu}}" title="@{{site.social.zhihu}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/zhihu.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.juejin %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://juejin.im/user/{{site.social.juejin}}" title="@{{site.social.juejin}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/juejin.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.jianshu %}
|
||||
<!-- Zhihu -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="https://www.jianshu.com/u/{{site.social.jianshu}}" title="@{{site.social.jianshu}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/jianshu.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.social.weibo %}
|
||||
<!-- Weibo -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://weibo.com/{{site.social.weibo}}" title="@{{site.social.weibo}} 的微博" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/weibo.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if site.social.twitter %}
|
||||
<!-- Twitter -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="http://twitter.com/{{site.social.twitter}}" title="@{{site.social.twitter}}" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/twitter.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if site.social.mail %}
|
||||
<!-- Email -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="mailto:{{site.social.mail}}" title="Contact me">
|
||||
<div class="footer-social-icon" style="background:url(/images/email.png);"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<!-- RSS -->
|
||||
<li class="navigation__item_social">
|
||||
<a href="/feed.xml" rel="author" title="RSS" target="_blank">
|
||||
<div class="footer-social-icon" style="background:url(/images/rss.png);"></div>
|
||||
<span class="label">RSS</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<p>
|
||||
Copyright © {{ site.title }} {{ site.time | date: '%Y' }} Theme: <a href="https://github.com/leopardpan/leopardpan.github.io" target='_blank'>leopardpan</a>
|
||||
</p>
|
||||
<script src="//gcore.jsdelivr.net/npm/@fortawesome/fontawesome-free/js/fontawesome.min.js"></script>
|
||||
<link rel="stylesheet" href="//gcore.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
|
||||
<!-- 访问统计 -->
|
||||
<span id="busuanzi_container_site_pv">
|
||||
本站总访问量
|
||||
<span id="busuanzi_value_site_pv"><i class="fa fa-spinner fa-spin"></i></span>次
|
||||
</span>
|
||||
<br><br>
|
||||
<a target="_blank" href="http://www.freecdn.pw/?zzwz" title="免费云加速(FreeCDN),为您免费提供网站加速和网站防御(DDOS、CC攻击)" alt="免费云加速(FreeCDN),为您免费提供网站加速和网站防御(DDOS、CC攻击)">本站由免费云加速(FreeCDN)提供网站加速和攻击防御服务</a>
|
||||
<br><br>
|
||||
<a href="https://icp.gov.moe/?keyword=20229111" target="_blank">萌ICP备20229111号</a>
|
||||
<br><br>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
<head>
|
||||
<!--个人网站代码可删除-->
|
||||
<script>
|
||||
host = window.location.host;
|
||||
if (host=="zknb-666.gitee.io")
|
||||
{
|
||||
window.location.href="https://blog.zknb-666.ml/";
|
||||
}
|
||||
</script>
|
||||
<!-- 个人网站代码结束 -->
|
||||
<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 | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
<meta name="author" content="leopardpan">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
|
||||
<meta name="twitter:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
|
||||
<meta property="og:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<link rel="icon" type="image/png" href="/images/favicon.png" />
|
||||
<link href="/images/favicon.png" rel="shortcut icon" type="image/png">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||
<link href="//gcore.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
|
||||
|
||||
<meta name="google-site-verification" content="1-1ZlHoRvM0T2FqPbW2S-qLgYXN6rsn52kErlMPd_gw" />
|
||||
|
||||
|
||||
<!-- 站点统计 -->
|
||||
<script
|
||||
async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
|
||||
$(document).on("pjax:complete",
|
||||
function() {
|
||||
$.getScript("https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
|
||||
$.getScript("/js/main.js");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 百度统计 -->
|
||||
{% if site.baidu.id %}
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?{{site.baidu.id}}";
|
||||
hm.onload = function() {
|
||||
// 清除百度统计的加载标识
|
||||
delete window["_bdhm_loaded_{{site.baidu.id}}"];
|
||||
};
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- google 统计 -->
|
||||
{% if site.ga.id %}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', '{{site.ga.id}}', '{{site.ga.host}}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
<head>
|
||||
<!--个人网站代码可删除-->
|
||||
<script>
|
||||
host = window.location.host;
|
||||
if (host=="zknb-666.gitee.io")
|
||||
{
|
||||
window.location.href="https://blog.zknb-666.ml/";
|
||||
}
|
||||
</script>
|
||||
<!-- 个人网站代码结束 -->
|
||||
<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 | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
<meta name="author" content="leopardpan">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
|
||||
<meta name="twitter:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
|
||||
<meta property="og:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<link rel="icon" type="image/png" href="/images/favicon.png" />
|
||||
<link href="/images/favicon.png" rel="shortcut icon" type="image/png">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||
<link href="//gcore.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
|
||||
|
||||
<meta name="google-site-verification" content="1-1ZlHoRvM0T2FqPbW2S-qLgYXN6rsn52kErlMPd_gw" />
|
||||
|
||||
|
||||
<!-- 站点统计 -->
|
||||
<script
|
||||
async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
|
||||
$(document).on("pjax:complete",
|
||||
function() {
|
||||
$.getScript("https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
|
||||
$.getScript("/js/main.js");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 百度统计 -->
|
||||
{% if site.baidu.id %}
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?{{site.baidu.id}}";
|
||||
hm.onload = function() {
|
||||
// 清除百度统计的加载标识
|
||||
delete window["_bdhm_loaded_{{site.baidu.id}}"];
|
||||
};
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- google 统计 -->
|
||||
{% if site.ga.id %}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', '{{site.ga.id}}', '{{site.ga.host}}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
|
|
@ -1,76 +1,76 @@
|
|||
<section>
|
||||
|
||||
<div class="content-play">
|
||||
<p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang" title="打赏,支持一下">打赏一个呗</a></p>
|
||||
<div class="hide_box-play"></div>
|
||||
<div class="shang_box-play">
|
||||
<a class="shang_close-play" href="javascript:void(0)" onclick="dashangToggle()" title="关闭"><img src="/images/payimg/close.jpg" alt="取消" /></a>
|
||||
<div class="shang_tit-play">
|
||||
<p>感谢您的支持,我会继续努力的!</p>
|
||||
</div>
|
||||
<div class="shang_payimg">
|
||||
<img src="/images/payimg/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
|
||||
</div>
|
||||
<div class="shang_payimg">
|
||||
<img src="/images/payimg/weipayimg.png" alt="扫码支持" title="扫一扫" />
|
||||
</div>
|
||||
<div class="pay_explain">扫码打赏,你说多少就多少(多给点也行)</div>
|
||||
<div class="shang_payselect">
|
||||
<div class="pay_item checked" data-id="alipay">
|
||||
<span class="pay_logo"><img src="/images/payimg/alipay.jpg" alt="支付宝" /></span>
|
||||
</div>
|
||||
<div class="pay_item" data-id="weipay">
|
||||
<span class="pay_logo"><img src="/images/payimg/wechat.jpg" alt="微信" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shang_info-play">
|
||||
<p>打开<span id="shang_pay_txt">支付宝</span>扫一扫,即可进行扫码打赏哦</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function dashangToggle(){
|
||||
$(".hide_box-play").fadeToggle();
|
||||
$(".shang_box-play").fadeToggle();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"></div>
|
||||
|
||||
<style type="text/css">
|
||||
.content-play{width:80%;margin-top: 20px;margin-bottom: 10px;height:40px;}
|
||||
.hide_box-play{z-index:999;filter:alpha(opacity=50);background:#666;opacity: 0.5;-moz-opacity: 0.5;left:0;top:0;height:99%;width:100%;position:fixed;display:none;}
|
||||
.shang_box-play{width:540px;height:540px;padding:10px;background-color:#fff;border-radius:10px;position:fixed;z-index:1000;left:50%;top:50%;margin-left:-280px;margin-top:-280px;border:1px dotted #dedede;display:none;}
|
||||
.shang_box-play img{border:none;border-width:0;}
|
||||
.dashang{display:block;width:100px;margin:5px auto;height:25px;line-height:25px;padding:10px;background-color:#E74851;color:#fff;text-align:center;text-decoration:none;border-radius:10px;font-weight:bold;font-size:16px;transition: all 0.3s;}
|
||||
.dashang:hover{opacity:0.8;padding:15px;font-size:18px;}
|
||||
.shang_close-play{float:right;display:inline-block;
|
||||
margin-right: 10px;margin-top: 20px;
|
||||
}
|
||||
.shang_logo{display:block;text-align:center;margin:20px auto;}
|
||||
.shang_tit-play{width: 100%;height: 75px;text-align: center;line-height: 66px;color: #a3a3a3;font-size: 16px;background: url('/images/payimg/cy-reward-title-bg.jpg');font-family: 'Microsoft YaHei';margin-top: 7px;margin-right:2px;}
|
||||
.shang_tit-play p{color:#a3a3a3;text-align:center;font-size:16px;}
|
||||
.shang_payimg{width:140px;padding:10px;padding-left: 80px; /*border:6px solid #EA5F00;**/margin:0 auto;border-radius:3px;height:140px;display:inline-block;}
|
||||
.shang_payimg img{display:inline-block;margin-right:10px;float:left;text-align:center;width:140px;height:140px; }
|
||||
.pay_explain{text-align:center;margin:10px auto;font-size:12px;color:#545454;}
|
||||
.shang_payselect{text-align:center;margin:0 auto;margin-top:40px;cursor:pointer;height:60px;width:500px;margin-left:110px;}
|
||||
.shang_payselect .pay_item{display:inline-block;margin-right:140px;float:left;}
|
||||
.shang_info-play{clear:both;}
|
||||
.shang_info-play p,.shang_info-play a{color:#C3C3C3;text-align:center;font-size:12px;text-decoration:none;line-height:2em;}
|
||||
</style>
|
||||
|
||||
<ul class="pager">
|
||||
{% if page.previous.url %}
|
||||
<li class="previous">
|
||||
<a href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">上一篇: <span>{{page.previous.title}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if page.next.url %}
|
||||
<li class="next">
|
||||
<a href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">下一篇: <span>{{page.next.title}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
|
||||
<div class="content-play">
|
||||
<p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang" title="打赏,支持一下">打赏一个呗</a></p>
|
||||
<div class="hide_box-play"></div>
|
||||
<div class="shang_box-play">
|
||||
<a class="shang_close-play" href="javascript:void(0)" onclick="dashangToggle()" title="关闭"><img src="/images/payimg/close.jpg" alt="取消" /></a>
|
||||
<div class="shang_tit-play">
|
||||
<p>感谢您的支持,我会继续努力的!</p>
|
||||
</div>
|
||||
<div class="shang_payimg">
|
||||
<img src="/images/payimg/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
|
||||
</div>
|
||||
<div class="shang_payimg">
|
||||
<img src="/images/payimg/weipayimg.png" alt="扫码支持" title="扫一扫" />
|
||||
</div>
|
||||
<div class="pay_explain">扫码打赏,你说多少就多少(多给点也行)</div>
|
||||
<div class="shang_payselect">
|
||||
<div class="pay_item checked" data-id="alipay">
|
||||
<span class="pay_logo"><img src="/images/payimg/alipay.jpg" alt="支付宝" /></span>
|
||||
</div>
|
||||
<div class="pay_item" data-id="weipay">
|
||||
<span class="pay_logo"><img src="/images/payimg/wechat.jpg" alt="微信" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shang_info-play">
|
||||
<p>打开<span id="shang_pay_txt">支付宝</span>扫一扫,即可进行扫码打赏哦</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function dashangToggle(){
|
||||
$(".hide_box-play").fadeToggle();
|
||||
$(".shang_box-play").fadeToggle();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"></div>
|
||||
|
||||
<style type="text/css">
|
||||
.content-play{width:80%;margin-top: 20px;margin-bottom: 10px;height:40px;}
|
||||
.hide_box-play{z-index:999;filter:alpha(opacity=50);background:#666;opacity: 0.5;-moz-opacity: 0.5;left:0;top:0;height:99%;width:100%;position:fixed;display:none;}
|
||||
.shang_box-play{width:540px;height:540px;padding:10px;background-color:#fff;border-radius:10px;position:fixed;z-index:1000;left:50%;top:50%;margin-left:-280px;margin-top:-280px;border:1px dotted #dedede;display:none;}
|
||||
.shang_box-play img{border:none;border-width:0;}
|
||||
.dashang{display:block;width:100px;margin:5px auto;height:25px;line-height:25px;padding:10px;background-color:#E74851;color:#fff;text-align:center;text-decoration:none;border-radius:10px;font-weight:bold;font-size:16px;transition: all 0.3s;}
|
||||
.dashang:hover{opacity:0.8;padding:15px;font-size:18px;}
|
||||
.shang_close-play{float:right;display:inline-block;
|
||||
margin-right: 10px;margin-top: 20px;
|
||||
}
|
||||
.shang_logo{display:block;text-align:center;margin:20px auto;}
|
||||
.shang_tit-play{width: 100%;height: 75px;text-align: center;line-height: 66px;color: #a3a3a3;font-size: 16px;background: url('/images/payimg/cy-reward-title-bg.jpg');font-family: 'Microsoft YaHei';margin-top: 7px;margin-right:2px;}
|
||||
.shang_tit-play p{color:#a3a3a3;text-align:center;font-size:16px;}
|
||||
.shang_payimg{width:140px;padding:10px;padding-left: 80px; /*border:6px solid #EA5F00;**/margin:0 auto;border-radius:3px;height:140px;display:inline-block;}
|
||||
.shang_payimg img{display:inline-block;margin-right:10px;float:left;text-align:center;width:140px;height:140px; }
|
||||
.pay_explain{text-align:center;margin:10px auto;font-size:12px;color:#545454;}
|
||||
.shang_payselect{text-align:center;margin:0 auto;margin-top:40px;cursor:pointer;height:60px;width:500px;margin-left:110px;}
|
||||
.shang_payselect .pay_item{display:inline-block;margin-right:140px;float:left;}
|
||||
.shang_info-play{clear:both;}
|
||||
.shang_info-play p,.shang_info-play a{color:#C3C3C3;text-align:center;font-size:12px;text-decoration:none;line-height:2em;}
|
||||
</style>
|
||||
|
||||
<ul class="pager">
|
||||
{% if page.previous.url %}
|
||||
<li class="previous">
|
||||
<a href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">上一篇: <span>{{page.previous.title}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if page.next.url %}
|
||||
<li class="next">
|
||||
<a href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">下一篇: <span>{{page.next.title}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<hr class="post-list__divider " />
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
{% if paginator.previous_page %}
|
||||
<a class="newer-posts pagination__newer btn btn-small btn-tertiary" href="{{ paginator.previous_page_path }}#blog">← 最近</a>
|
||||
{% endif %}
|
||||
<span class="pagination__page-number">{{ paginator.page }} / {{ paginator.total_pages }}</span>
|
||||
{% if paginator.next_page %}
|
||||
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="{{ paginator.next_page_path }}#blog">更早 →</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<hr class="post-list__divider " />
|
||||
|
||||
<nav class="pagination" role="navigation">
|
||||
{% if paginator.previous_page %}
|
||||
<a class="newer-posts pagination__newer btn btn-small btn-tertiary" href="{{ paginator.previous_page_path }}#blog">← 最近</a>
|
||||
{% endif %}
|
||||
<span class="pagination__page-number">{{ paginator.page }} / {{ paginator.total_pages }}</span>
|
||||
{% if paginator.next_page %}
|
||||
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="{{ paginator.next_page_path }}#blog">更早 →</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<section class="read-more">
|
||||
{% if page.next %}
|
||||
{% assign current = page.next %}
|
||||
<div class="read-more-item">
|
||||
<span class="read-more-item-dim">最近的文章</span>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ current.url }}" title="link to {{ current.title }}">{{ current.title }}</a></h2>
|
||||
<p class="excerpt">{{ current.content | markdownify | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta"><time datetime="{{current.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{current.date | date: "%F"}}</time> • <span class="post-list__meta--tags tags">{{current.tags}}</span><a class="btn-border-small" href={{current.url}}>继续阅读</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.previous %}
|
||||
{% assign current = page.previous %}
|
||||
<div class="read-more-item">
|
||||
<span class="read-more-item-dim">更早的文章</span>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ current.url }}" title="link to {{ current.title }}">{{ current.title }}</a></h2>
|
||||
<p class="excerpt">{{ current.content | markdownify | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta"><time datetime="{{current.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{current.date | date: "%F"}}</time> • <span class="post-list__meta--tags tags">{{current.tags}}</span><a class="btn-border-small" href={{current.url}}>继续阅读</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
<section class="read-more">
|
||||
{% if page.next %}
|
||||
{% assign current = page.next %}
|
||||
<div class="read-more-item">
|
||||
<span class="read-more-item-dim">最近的文章</span>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ current.url }}" title="link to {{ current.title }}">{{ current.title }}</a></h2>
|
||||
<p class="excerpt">{{ current.content | markdownify | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta"><time datetime="{{current.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{current.date | date: "%F"}}</time> • <span class="post-list__meta--tags tags">{{current.tags}}</span><a class="btn-border-small" href={{current.url}}>继续阅读</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.previous %}
|
||||
{% assign current = page.previous %}
|
||||
<div class="read-more-item">
|
||||
<span class="read-more-item-dim">更早的文章</span>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ current.url }}" title="link to {{ current.title }}">{{ current.title }}</a></h2>
|
||||
<p class="excerpt">{{ current.content | markdownify | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta"><time datetime="{{current.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{current.date | date: "%F"}}</time> • <span class="post-list__meta--tags tags">{{current.tags}}</span><a class="btn-border-small" href={{current.url}}>继续阅读</a></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
<header class="panel-cover {% if page.layout == 'post' or page.layout == 'page' %}panel-cover--collapsed{% endif %}" style="background-image: url('{{site.background}}')">
|
||||
<div class="panel-main">
|
||||
<div class="panel-main__inner">
|
||||
<div>
|
||||
<meting-js
|
||||
preload="ture"
|
||||
fixed="ture"
|
||||
server="{{site.meting.server}}"
|
||||
type="{{site.meting.type}}"
|
||||
id="{{site.meting.id}}"
|
||||
theme="#{{site.meting.theme}}"
|
||||
>
|
||||
</meting-js>
|
||||
{% if site.aplayer.autohide == ture %}
|
||||
<style type="text/css">
|
||||
|
||||
.aplayer.aplayer-narrow .aplayer-body {
|
||||
left: -66px !important;
|
||||
}
|
||||
.aplayer-body:hover {
|
||||
left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-main__content panel-inverted">
|
||||
<!-- 头像效果-start -->
|
||||
<div class="ih-item circle effect right_to_left">
|
||||
<a href="/#blog" title="前往 {{ site.title }} 的主页" class="blog-button">
|
||||
<div class="img"><img src="/images/avatar.jpg" alt="img"></div>
|
||||
<div class="info">
|
||||
<div class="info-back">
|
||||
<h2>
|
||||
{% if site.avatarTitle %}
|
||||
{{site.avatarTitle}}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<p>
|
||||
{% if site.avatarDesc %}
|
||||
{{site.avatarDesc}}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 头像效果-end -->
|
||||
<h1 class="panel-cover__title panel-title"><a href="/#blog" title="link to homepage for {{ site.title }}" class="blog-button">{{ site.title }}</a></h1>
|
||||
{% if site.subtitle %}
|
||||
<span class="panel-cover__subtitle panel-subtitle">{{site.subtitle}}</span>
|
||||
{% endif %}
|
||||
<hr class="panel-cover__divider" />
|
||||
<p class="panel-cover__description">{{ site.description }}</p>
|
||||
<br>
|
||||
<p id="hitokoto" class="panel-cover__hitokoto"><a href="#" id="hitokoto_text">废话加载中...</a></p>
|
||||
<hr class="panel-cover__divider panel-cover__divider--secondary" />
|
||||
|
||||
{% if site.welcome_message %}
|
||||
<p class="panel-cover__description">{{ site.welcome_message }}</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="navigation-wrapper">
|
||||
<div>
|
||||
<nav class="cover-navigation cover-navigation--primary">
|
||||
<ul class="navigation">
|
||||
<li class="navigation__item"><a href="/#blog" title="{{site.blog_button.description}}" class="blog-button">{{site.blog_button.title}}</a></li>
|
||||
{% for item in site.nav %}
|
||||
<li class="navigation__item"><a href="{{item.url}}" title="{{item.description}}" class="menu">{{item.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if site.cover_color %}
|
||||
<div class="cover-{{site.cover_color}}"></div>
|
||||
{% else %}
|
||||
<div class="cover-disabled"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
<header class="panel-cover {% if page.layout == 'post' or page.layout == 'page' %}panel-cover--collapsed{% endif %}" style="background-image: url('{{site.background}}')">
|
||||
<div class="panel-main">
|
||||
<div class="panel-main__inner">
|
||||
<div>
|
||||
<meting-js
|
||||
preload="ture"
|
||||
fixed="ture"
|
||||
server="{{site.meting.server}}"
|
||||
type="{{site.meting.type}}"
|
||||
id="{{site.meting.id}}"
|
||||
theme="#{{site.meting.theme}}"
|
||||
>
|
||||
</meting-js>
|
||||
{% if site.aplayer.autohide == ture %}
|
||||
<style type="text/css">
|
||||
|
||||
.aplayer.aplayer-narrow .aplayer-body {
|
||||
left: -66px !important;
|
||||
}
|
||||
.aplayer-body:hover {
|
||||
left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-main__content panel-inverted">
|
||||
<!-- 头像效果-start -->
|
||||
<div class="ih-item circle effect right_to_left">
|
||||
<a href="/#blog" title="前往 {{ site.title }} 的主页" class="blog-button">
|
||||
<div class="img"><img src="/images/avatar.jpg" alt="img"></div>
|
||||
<div class="info">
|
||||
<div class="info-back">
|
||||
<h2>
|
||||
{% if site.avatarTitle %}
|
||||
{{site.avatarTitle}}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<p>
|
||||
{% if site.avatarDesc %}
|
||||
{{site.avatarDesc}}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 头像效果-end -->
|
||||
<h1 class="panel-cover__title panel-title"><a href="/#blog" title="link to homepage for {{ site.title }}" class="blog-button">{{ site.title }}</a></h1>
|
||||
{% if site.subtitle %}
|
||||
<span class="panel-cover__subtitle panel-subtitle">{{site.subtitle}}</span>
|
||||
{% endif %}
|
||||
<hr class="panel-cover__divider" />
|
||||
<p class="panel-cover__description">{{ site.description }}</p>
|
||||
<br>
|
||||
<p id="hitokoto" class="panel-cover__hitokoto"><a href="#" id="hitokoto_text">废话加载中...</a></p>
|
||||
<hr class="panel-cover__divider panel-cover__divider--secondary" />
|
||||
|
||||
{% if site.welcome_message %}
|
||||
<p class="panel-cover__description">{{ site.welcome_message }}</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="navigation-wrapper">
|
||||
<div>
|
||||
<nav class="cover-navigation cover-navigation--primary">
|
||||
<ul class="navigation">
|
||||
<li class="navigation__item"><a href="/#blog" title="{{site.blog_button.description}}" class="blog-button">{{site.blog_button.title}}</a></li>
|
||||
{% for item in site.nav %}
|
||||
<li class="navigation__item"><a href="{{item.url}}" title="{{item.description}}" class="menu">{{item.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if site.cover_color %}
|
||||
<div class="cover-{{site.cover_color}}"></div>
|
||||
{% else %}
|
||||
<div class="cover-disabled"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -1,180 +1,180 @@
|
|||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.ih-item.circle.effect {
|
||||
margin-left: 400px;
|
||||
-webkit-perspective: 900px;
|
||||
-moz-perspective: 900px;
|
||||
perspective: 900px;
|
||||
}
|
||||
.ih-item.circle.effect .img {
|
||||
z-index: 11;
|
||||
-webkit-transition: all 0.5s ease-in-out;
|
||||
-moz-transition: all 0.5s ease-in-out;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-ms-transform-style: preserve-3d;
|
||||
-o-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info .info-back {
|
||||
opacity: 1;
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #333333;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info h3 {
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
letter-spacing: 2px;
|
||||
font-size: 22px;
|
||||
margin: 0 30px;
|
||||
padding: 55px 0 0 0;
|
||||
height: 110px;
|
||||
text-shadow: 0 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info p {
|
||||
color: #bbb;
|
||||
padding: 10px 5px;
|
||||
font-style: italic;
|
||||
margin: 0 30px;
|
||||
font-size: 12px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.bottom_to_top .img {
|
||||
-webkit-transform-origin: 50% 0;
|
||||
-moz-transform-origin: 50% 0;
|
||||
-ms-transform-origin: 50% 0;
|
||||
-o-transform-origin: 50% 0;
|
||||
transform-origin: 50% 0;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.bottom_to_top a:hover .img {
|
||||
-webkit-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-moz-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-ms-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-o-transform: rotate3d(1, 0, 0, 180deg);
|
||||
transform: rotate3d(1, 0, 0, 180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.top_to_bottom .img {
|
||||
-webkit-transform-origin: 50% 100%;
|
||||
-moz-transform-origin: 50% 100%;
|
||||
-ms-transform-origin: 50% 100%;
|
||||
-o-transform-origin: 50% 100%;
|
||||
transform-origin: 50% 100%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.top_to_bottom a:hover .img {
|
||||
-webkit-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-moz-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-ms-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-o-transform: rotate3d(1, 0, 0, -180deg);
|
||||
transform: rotate3d(1, 0, 0, -180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.left_to_right .img {
|
||||
-webkit-transform-origin: 100% 50%;
|
||||
-moz-transform-origin: 100% 50%;
|
||||
-ms-transform-origin: 100% 50%;
|
||||
-o-transform-origin: 100% 50%;
|
||||
transform-origin: 100% 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.left_to_right a:hover .img {
|
||||
-webkit-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-moz-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-ms-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-o-transform: rotate3d(0, 1, 0, 180deg);
|
||||
transform: rotate3d(0, 1, 0, 180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.right_to_left .img {
|
||||
-webkit-transform-origin: 0% 50%;
|
||||
-moz-transform-origin: 0% 50%;
|
||||
-ms-transform-origin: 0% 50%;
|
||||
-o-transform-origin: 0% 50%;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.right_to_left a:hover .img {
|
||||
-webkit-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-moz-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-ms-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-o-transform: rotate3d(0, 1, 0, -180deg);
|
||||
transform: rotate3d(0, 1, 0, -180deg);
|
||||
}
|
||||
|
||||
.ih-item a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ih-item a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ih-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ih-item.circle {
|
||||
position: relative;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .img {
|
||||
position: relative;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .img:before {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-webkit-transition: all 0.35s ease-in-out;
|
||||
-moz-transition: all 0.35s ease-in-out;
|
||||
transition: all 0.35s ease-in-out;
|
||||
}
|
||||
|
||||
.ih-item.circle .img img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .info {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.ih-item.circle.effect {
|
||||
margin-left: 400px;
|
||||
-webkit-perspective: 900px;
|
||||
-moz-perspective: 900px;
|
||||
perspective: 900px;
|
||||
}
|
||||
.ih-item.circle.effect .img {
|
||||
z-index: 11;
|
||||
-webkit-transition: all 0.5s ease-in-out;
|
||||
-moz-transition: all 0.5s ease-in-out;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-ms-transform-style: preserve-3d;
|
||||
-o-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info .info-back {
|
||||
opacity: 1;
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #333333;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info h3 {
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
letter-spacing: 2px;
|
||||
font-size: 22px;
|
||||
margin: 0 30px;
|
||||
padding: 55px 0 0 0;
|
||||
height: 110px;
|
||||
text-shadow: 0 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect .info p {
|
||||
color: #bbb;
|
||||
padding: 10px 5px;
|
||||
font-style: italic;
|
||||
margin: 0 30px;
|
||||
font-size: 12px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.bottom_to_top .img {
|
||||
-webkit-transform-origin: 50% 0;
|
||||
-moz-transform-origin: 50% 0;
|
||||
-ms-transform-origin: 50% 0;
|
||||
-o-transform-origin: 50% 0;
|
||||
transform-origin: 50% 0;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.bottom_to_top a:hover .img {
|
||||
-webkit-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-moz-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-ms-transform: rotate3d(1, 0, 0, 180deg);
|
||||
-o-transform: rotate3d(1, 0, 0, 180deg);
|
||||
transform: rotate3d(1, 0, 0, 180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.top_to_bottom .img {
|
||||
-webkit-transform-origin: 50% 100%;
|
||||
-moz-transform-origin: 50% 100%;
|
||||
-ms-transform-origin: 50% 100%;
|
||||
-o-transform-origin: 50% 100%;
|
||||
transform-origin: 50% 100%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.top_to_bottom a:hover .img {
|
||||
-webkit-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-moz-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-ms-transform: rotate3d(1, 0, 0, -180deg);
|
||||
-o-transform: rotate3d(1, 0, 0, -180deg);
|
||||
transform: rotate3d(1, 0, 0, -180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.left_to_right .img {
|
||||
-webkit-transform-origin: 100% 50%;
|
||||
-moz-transform-origin: 100% 50%;
|
||||
-ms-transform-origin: 100% 50%;
|
||||
-o-transform-origin: 100% 50%;
|
||||
transform-origin: 100% 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.left_to_right a:hover .img {
|
||||
-webkit-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-moz-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-ms-transform: rotate3d(0, 1, 0, 180deg);
|
||||
-o-transform: rotate3d(0, 1, 0, 180deg);
|
||||
transform: rotate3d(0, 1, 0, 180deg);
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.right_to_left .img {
|
||||
-webkit-transform-origin: 0% 50%;
|
||||
-moz-transform-origin: 0% 50%;
|
||||
-ms-transform-origin: 0% 50%;
|
||||
-o-transform-origin: 0% 50%;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle.effect.right_to_left a:hover .img {
|
||||
-webkit-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-moz-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-ms-transform: rotate3d(0, 1, 0, -180deg);
|
||||
-o-transform: rotate3d(0, 1, 0, -180deg);
|
||||
transform: rotate3d(0, 1, 0, -180deg);
|
||||
}
|
||||
|
||||
.ih-item a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ih-item a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ih-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ih-item.circle {
|
||||
position: relative;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .img {
|
||||
position: relative;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .img:before {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-webkit-transition: all 0.35s ease-in-out;
|
||||
-moz-transition: all 0.35s ease-in-out;
|
||||
transition: all 0.35s ease-in-out;
|
||||
}
|
||||
|
||||
.ih-item.circle .img img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.ih-item.circle .info {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -1,96 +1,96 @@
|
|||
{% capture tocWorkspace %}
|
||||
{% comment %}
|
||||
Version 1.0.8
|
||||
https://github.com/allejo/jekyll-toc
|
||||
|
||||
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
||||
|
||||
Usage:
|
||||
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
||||
|
||||
Parameters:
|
||||
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
||||
|
||||
Optional Parameters:
|
||||
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
||||
* class (string) : '' - a CSS class assigned to the TOC
|
||||
* id (string) : '' - an ID to assigned to the TOC
|
||||
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
||||
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
||||
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
|
||||
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
|
||||
* baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
|
||||
* anchor_class (string) : '' - add custom class(es) for each anchor element
|
||||
|
||||
Output:
|
||||
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
||||
generate the table of contents and will NOT output the markdown given to it
|
||||
{% endcomment %}
|
||||
|
||||
{% capture my_toc %}{% endcapture %}
|
||||
{% assign orderedList = include.ordered | default: false %}
|
||||
{% assign minHeader = include.h_min | default: 1 %}
|
||||
{% assign maxHeader = include.h_max | default: 6 %}
|
||||
{% assign nodes = include.html | split: '<h' %}
|
||||
{% assign firstHeader = true %}
|
||||
|
||||
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
|
||||
|
||||
{% for node in nodes %}
|
||||
{% if node == "" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
||||
|
||||
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% if firstHeader %}
|
||||
{% assign firstHeader = false %}
|
||||
{% assign minHeader = headerLevel %}
|
||||
{% endif %}
|
||||
|
||||
{% assign indentAmount = headerLevel | minus: minHeader %}
|
||||
{% assign _workspace = node | split: '</h' %}
|
||||
|
||||
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
||||
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
||||
{% assign html_id = _idWorkspace[0] %}
|
||||
|
||||
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
||||
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
||||
{% assign html_class = _classWorkspace[0] %}
|
||||
|
||||
{% if html_class contains "no_toc" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
||||
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
||||
|
||||
{% assign space = '' %}
|
||||
{% for i in (1..indentAmount) %}
|
||||
{% assign space = space | prepend: ' ' %}
|
||||
{% endfor %}
|
||||
|
||||
{% unless include.item_class == blank %}
|
||||
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
|
||||
{% endunless %}
|
||||
|
||||
{% capture heading_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
||||
{% capture my_toc %}{{ my_toc }}
|
||||
{{ space }}{{ listModifier }} {{ listItemClass }} [{{ heading_body | replace: "|", "\|" }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
|
||||
{% endfor %}
|
||||
|
||||
{% if include.class %}
|
||||
{% capture my_toc %}{:.{{ include.class }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.id %}
|
||||
{% capture my_toc %}{: #{{ include.id }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|
||||
{% capture tocWorkspace %}
|
||||
{% comment %}
|
||||
Version 1.0.8
|
||||
https://github.com/allejo/jekyll-toc
|
||||
|
||||
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
||||
|
||||
Usage:
|
||||
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
||||
|
||||
Parameters:
|
||||
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
||||
|
||||
Optional Parameters:
|
||||
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
||||
* class (string) : '' - a CSS class assigned to the TOC
|
||||
* id (string) : '' - an ID to assigned to the TOC
|
||||
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
||||
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
||||
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
|
||||
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
|
||||
* baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
|
||||
* anchor_class (string) : '' - add custom class(es) for each anchor element
|
||||
|
||||
Output:
|
||||
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
||||
generate the table of contents and will NOT output the markdown given to it
|
||||
{% endcomment %}
|
||||
|
||||
{% capture my_toc %}{% endcapture %}
|
||||
{% assign orderedList = include.ordered | default: false %}
|
||||
{% assign minHeader = include.h_min | default: 1 %}
|
||||
{% assign maxHeader = include.h_max | default: 6 %}
|
||||
{% assign nodes = include.html | split: '<h' %}
|
||||
{% assign firstHeader = true %}
|
||||
|
||||
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
|
||||
|
||||
{% for node in nodes %}
|
||||
{% if node == "" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
||||
|
||||
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% if firstHeader %}
|
||||
{% assign firstHeader = false %}
|
||||
{% assign minHeader = headerLevel %}
|
||||
{% endif %}
|
||||
|
||||
{% assign indentAmount = headerLevel | minus: minHeader %}
|
||||
{% assign _workspace = node | split: '</h' %}
|
||||
|
||||
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
||||
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
||||
{% assign html_id = _idWorkspace[0] %}
|
||||
|
||||
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
||||
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
||||
{% assign html_class = _classWorkspace[0] %}
|
||||
|
||||
{% if html_class contains "no_toc" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
||||
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
||||
|
||||
{% assign space = '' %}
|
||||
{% for i in (1..indentAmount) %}
|
||||
{% assign space = space | prepend: ' ' %}
|
||||
{% endfor %}
|
||||
|
||||
{% unless include.item_class == blank %}
|
||||
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
|
||||
{% endunless %}
|
||||
|
||||
{% capture heading_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
||||
{% capture my_toc %}{{ my_toc }}
|
||||
{{ space }}{{ listModifier }} {{ listItemClass }} [{{ heading_body | replace: "|", "\|" }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
|
||||
{% endfor %}
|
||||
|
||||
{% if include.class %}
|
||||
{% capture my_toc %}{:.{{ include.class }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.id %}
|
||||
{% capture my_toc %}{: #{{ include.id }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
<div class="loading-div">
|
||||
<i class="fa fa-spinner fa-spin fa-3x fa-fw "></i>
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
|
||||
<span class="mobile btn-mobile-menu">
|
||||
<div class="nav_container">
|
||||
<nav class="nav-menu-item" style = "float:right">
|
||||
<i class="nav-menu-item">
|
||||
<a href="/#blog" title="{{site.blog_button.description}}" class="blog-button"> {{site.blog_button.title}}
|
||||
</a>
|
||||
</i>
|
||||
{% for item in site.nav %}
|
||||
<i class="nav-menu-item">
|
||||
|
||||
<a href="{{item.url}}" title="{{item.description}}" class="menu">
|
||||
{{item.title}}
|
||||
</a>
|
||||
</i>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
{% include side-panel.html %}
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class=" content-wrapper__inner">
|
||||
<div id="pageContent" class="hidden loadhidden">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
{% include footer.html %}
|
||||
</div>
|
||||
|
||||
{% include external.html %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
<div class="loading-div">
|
||||
<i class="fa fa-spinner fa-spin fa-3x fa-fw "></i>
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
|
||||
<span class="mobile btn-mobile-menu">
|
||||
<div class="nav_container">
|
||||
<nav class="nav-menu-item" style = "float:right">
|
||||
<i class="nav-menu-item">
|
||||
<a href="/#blog" title="{{site.blog_button.description}}" class="blog-button"> {{site.blog_button.title}}
|
||||
</a>
|
||||
</i>
|
||||
{% for item in site.nav %}
|
||||
<i class="nav-menu-item">
|
||||
|
||||
<a href="{{item.url}}" title="{{item.description}}" class="menu">
|
||||
{{item.title}}
|
||||
</a>
|
||||
</i>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
{% include side-panel.html %}
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class=" content-wrapper__inner">
|
||||
<div id="pageContent" class="hidden loadhidden">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
{% include footer.html %}
|
||||
</div>
|
||||
|
||||
{% include external.html %}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<article class="post-container post-container--single" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="post-header">
|
||||
<div class="post-meta">
|
||||
<time datetime="{{page.date | date: date_to_xmlschema}}" itemprop="datePublished" class="post-meta__date date">{{page.date | date: "%F"}}</time>
|
||||
<span class="post-meta__tags tags"></span>
|
||||
</div>
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
</header>
|
||||
|
||||
<section class="post">
|
||||
{{ content }}
|
||||
</section>
|
||||
</article>
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<article class="post-container post-container--single" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="post-header">
|
||||
<div class="post-meta">
|
||||
<time datetime="{{page.date | date: date_to_xmlschema}}" itemprop="datePublished" class="post-meta__date date">{{page.date | date: "%F"}}</time>
|
||||
<span class="post-meta__tags tags"></span>
|
||||
</div>
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
</header>
|
||||
|
||||
<section class="post">
|
||||
{{ content }}
|
||||
</section>
|
||||
</article>
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="{{ "/css/post.css" | prepend: site.baseurl }}">
|
||||
<script>$.getScript("https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");</script>
|
||||
</head>
|
||||
|
||||
<article class="post-container post-container--single" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
<div class="post-meta">
|
||||
<img src="/images/calendar.png" width="20px"/>
|
||||
<time datetime="{{page.date | date: date_to_xmlschema}}" itemprop="datePublished" class="post-meta__date date">{{page.date | date: "%F"}}</time>
|
||||
|
||||
<span id="busuanzi_container_page_pv"> | 阅读:<span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin"></i></span>次</span>
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% if site.enableToc %}
|
||||
<h2 class="post-title">目录</h2>
|
||||
{% include toc.html html=content %}
|
||||
{% endif %}
|
||||
|
||||
<section class="post">
|
||||
{{ content }}
|
||||
</section>
|
||||
|
||||
</article>
|
||||
|
||||
{% include new-old.html %}
|
||||
{% include comments.html %}
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="{{ "/css/post.css" | prepend: site.baseurl }}">
|
||||
<script>$.getScript("https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");</script>
|
||||
</head>
|
||||
|
||||
<article class="post-container post-container--single" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
<div class="post-meta">
|
||||
<img src="/images/calendar.png" width="20px"/>
|
||||
<time datetime="{{page.date | date: date_to_xmlschema}}" itemprop="datePublished" class="post-meta__date date">{{page.date | date: "%F"}}</time>
|
||||
|
||||
<span id="busuanzi_container_page_pv"> | 阅读:<span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin"></i></span>次</span>
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% if site.enableToc %}
|
||||
<h2 class="post-title">目录</h2>
|
||||
{% include toc.html html=content %}
|
||||
{% endif %}
|
||||
|
||||
<section class="post">
|
||||
{{ content }}
|
||||
</section>
|
||||
|
||||
</article>
|
||||
|
||||
{% include new-old.html %}
|
||||
{% include comments.html %}
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
---
|
||||
layout: post
|
||||
title: "记录下Android源码修改遇到的问题和修改方法"
|
||||
description: "笔记"
|
||||
tag: 笔记
|
||||
---
|
||||
## 1.开机无法对时
|
||||
我在dotos编译完成刷入后发现时间不对,得手动修改,这我能忍??
|
||||
于是在百度的帮助下,我找到了要修改的地方
|
||||
|
||||
修改如下:
|
||||
|
||||
位置:/frameworks/base/core/res/res/values/config.xml
|
||||
|
||||
原来的样子:
|
||||
```xml
|
||||
<!-- Remote server that can provide NTP responses. -->
|
||||
<string translatable="false" name="config_ntpServer">time.android.com</string>
|
||||
```
|
||||
很明显,android.com在国内是无法访问的,所以对时肯定不成功,讲它更换成国内可用的源即可
|
||||
|
||||
修改它:
|
||||
```xml
|
||||
<!-- Remote server that can provide NTP responses. -->
|
||||
<string translatable="false" name="config_ntpServer">pool.ntp.org</string>
|
||||
<!-- pool.ntp.org 全球可用个人比较推荐 -->
|
||||
```
|
||||
## 2.网络不可用
|
||||
安卓手机网络状态有如下几种状态:
|
||||
1、 根本就没有返回,这种情况代表当前没有Internet访问;
|
||||
|
||||
2、返回状态码204,这种情况代表具备完整的Internet访问(特定的服务器专门返回204的状态码);
|
||||
|
||||
3、 除204以外的其他大于200而小于400的状态码,这种状态码一般代表需要进行Web登录的网络连接,比如机场、商场提供的需要短信登录的网络。这种情况下Android会构造一个可能需要登录的状态栏通知以通知用户可能需要进行登录。
|
||||
|
||||
安卓类原生ROM刷机包默认的204服务器是由谷歌提供,由于谷歌在我国大陆区不可访问。所以,自己动手修改源码!
|
||||
|
||||
(部分内容摘自极客盟@番茄小子<a href='https://www.jkmeng.cn/14008.html?ivk_sa=1024320u' target='_blank'>原文章</a>)
|
||||
|
||||
位置:packages/modules/NetworkStack/res/config.xml
|
||||
|
||||
原来的样子:
|
||||
```xml
|
||||
<!-- HTTP URL for network validation, to use for detecting captive portals. -->
|
||||
<string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
|
||||
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||
<string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
|
||||
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
<item>http://www.google.com/gen_204</item>
|
||||
<item>http://play.googleapis.com/generate_204</item>
|
||||
</string-array>
|
||||
```
|
||||
修改它
|
||||
```xml
|
||||
<!-- HTTP URL for network validation, to use for detecting captive portals. -->
|
||||
<string name="default_captive_portal_http_url" translatable="false">http://connect.rom.miui.com/generate_204</string>
|
||||
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||
<string name="default_captive_portal_https_url" translatable="false">https://connect.rom.miui.com/generate_204</string>
|
||||
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
<item>http://connect.rom.miui.com/generate_204</item>
|
||||
<item>http://connect.rom.miui.com/generate_204</item>
|
||||
</string-array>
|
||||
```
|
||||
---
|
||||
layout: post
|
||||
title: "记录下Android源码修改遇到的问题和修改方法"
|
||||
description: "笔记"
|
||||
tag: 笔记
|
||||
---
|
||||
## 1.开机无法对时
|
||||
我在dotos编译完成刷入后发现时间不对,得手动修改,这我能忍??
|
||||
于是在百度的帮助下,我找到了要修改的地方
|
||||
|
||||
修改如下:
|
||||
|
||||
位置:/frameworks/base/core/res/res/values/config.xml
|
||||
|
||||
原来的样子:
|
||||
```xml
|
||||
<!-- Remote server that can provide NTP responses. -->
|
||||
<string translatable="false" name="config_ntpServer">time.android.com</string>
|
||||
```
|
||||
很明显,android.com在国内是无法访问的,所以对时肯定不成功,讲它更换成国内可用的源即可
|
||||
|
||||
修改它:
|
||||
```xml
|
||||
<!-- Remote server that can provide NTP responses. -->
|
||||
<string translatable="false" name="config_ntpServer">pool.ntp.org</string>
|
||||
<!-- pool.ntp.org 全球可用个人比较推荐 -->
|
||||
```
|
||||
## 2.网络不可用
|
||||
安卓手机网络状态有如下几种状态:
|
||||
1、 根本就没有返回,这种情况代表当前没有Internet访问;
|
||||
|
||||
2、返回状态码204,这种情况代表具备完整的Internet访问(特定的服务器专门返回204的状态码);
|
||||
|
||||
3、 除204以外的其他大于200而小于400的状态码,这种状态码一般代表需要进行Web登录的网络连接,比如机场、商场提供的需要短信登录的网络。这种情况下Android会构造一个可能需要登录的状态栏通知以通知用户可能需要进行登录。
|
||||
|
||||
安卓类原生ROM刷机包默认的204服务器是由谷歌提供,由于谷歌在我国大陆区不可访问。所以,自己动手修改源码!
|
||||
|
||||
(部分内容摘自极客盟@番茄小子<a href='https://www.jkmeng.cn/14008.html?ivk_sa=1024320u' target='_blank'>原文章</a>)
|
||||
|
||||
位置:packages/modules/NetworkStack/res/config.xml
|
||||
|
||||
原来的样子:
|
||||
```xml
|
||||
<!-- HTTP URL for network validation, to use for detecting captive portals. -->
|
||||
<string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
|
||||
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||
<string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
|
||||
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
<item>http://www.google.com/gen_204</item>
|
||||
<item>http://play.googleapis.com/generate_204</item>
|
||||
</string-array>
|
||||
```
|
||||
修改它
|
||||
```xml
|
||||
<!-- HTTP URL for network validation, to use for detecting captive portals. -->
|
||||
<string name="default_captive_portal_http_url" translatable="false">http://connect.rom.miui.com/generate_204</string>
|
||||
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||
<string name="default_captive_portal_https_url" translatable="false">https://connect.rom.miui.com/generate_204</string>
|
||||
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
<item>http://connect.rom.miui.com/generate_204</item>
|
||||
<item>http://connect.rom.miui.com/generate_204</item>
|
||||
</string-array>
|
||||
```
|
||||
完事了
|
|
@ -1,83 +1,83 @@
|
|||
---
|
||||
layout: post
|
||||
title: "如何使用vercel在线部署网页"
|
||||
description: "神器vercel"
|
||||
tag: 教程
|
||||
---
|
||||
# 前言
|
||||
我们在github在线部署的博客,在国内速度缓慢甚至无法访问,而在gitee部署网站,速度是上去了,可是不稳+无法绑定域名,很不爽.于是又去寻找其他的在线托管服务,始终没有满意的
|
||||
|
||||
直到我找到了
|
||||
|
||||
<a href="https://vercel.com" target="_blank" alt="vercel"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcdn.sspai.com%2F2020%2F10%2F04%2Fdba588ae94bdfecbe1f85d16ccbc62a5.jpg%3FimageMogr2%2Fauto-orient%2Fquality%2F95%2Fthumbnail%2F%211420x708r%2Fgravity%2FCenter%2Fcrop%2F1420x708%2Finterlace%2F1&refer=http%3A%2F%2Fcdn.sspai.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1652689187&t=6492beeedcafa5abaa2dd288b5a7febb" hight="50%" width="50%"></a>
|
||||
|
||||
# Vercel特点
|
||||
1. vercel类似于github page,但远比github page强大,速度也快得多得多,而且将Github授权给vercel后,可以达到最优雅的发布体验,只需将代码轻轻一推,项目就自动更新部署了。
|
||||
|
||||
2. vercel还支持部署serverless接口。那代表着,其不仅仅可以部署静态网站,甚至可以部署动态网站,而这些功能,统统免费。
|
||||
|
||||
3. vercel还支持自动配置https,不用自己去FreeSSL申请证书,更是省去了一大堆证书的配置,简直是懒人利器!
|
||||
|
||||
![](/images/posts/20220416/2.jpeg)
|
||||
|
||||
# 过程
|
||||
|
||||
## 1.Vercel项目存储到github上
|
||||
|
||||
这里本博客是使用Jekyll作为框架,如果不出意外的话,你的文件目录大概是这样:
|
||||
|
||||
![](/images/posts/20220416/3.png)
|
||||
|
||||
## 2.部署
|
||||
|
||||
登录/注册vercel,个人推荐使用github登录
|
||||
|
||||
![](/images/posts/20220416/4.png)
|
||||
|
||||
单击New Project,在Import Git Repository栏选择import需要部署的项目
|
||||
|
||||
![](/images/posts/20220416/5.png)
|
||||
|
||||
在FRAMEWORK PRESET选择自己的框架,单击Deploy
|
||||
|
||||
![](/images/posts/20220416/6.png)
|
||||
|
||||
等待Vercel自动构建部署完成
|
||||
|
||||
![](/images/posts/20220416/7.png)
|
||||
|
||||
部署完成后会在Overview菜单下看见自己的项目,可以通过vercel自动分配的域名查看效果
|
||||
|
||||
![](/images/posts/20220416/8.png)
|
||||
|
||||
到这里,你已经完成了所有操作,可以选择使用vercel提供的子域名
|
||||
|
||||
点击你的网站,点击Settings,选择Domains,点击你现有域名旁的Edit,进行修改
|
||||
|
||||
![](/images/posts/20220416/9.png)
|
||||
|
||||
## 3.添加域名
|
||||
|
||||
vercel还可以自定义顶级域名,点击Domians,你可以看见以下选项
|
||||
|
||||
![](/images/posts/20220416/10.png)
|
||||
|
||||
你可以进行购买,添加和转入操作
|
||||
|
||||
点击Add,选取项目,点击CONTINUE
|
||||
|
||||
![](/images/posts/20220416/11.png)
|
||||
|
||||
输入你的域名,点击ADD
|
||||
|
||||
![](/images/posts/20220416/12.png)
|
||||
|
||||
根据提示进行配置,完成后,你大概可以看见这样
|
||||
|
||||
![](/images/posts/20220416/12.png)
|
||||
|
||||
至此,你的网站部署全部完成
|
||||
|
||||
# 后记
|
||||
|
||||
关于Vercel,还有许多进阶玩法,前面说过,Vercel还支持动态网站,并且免费,这个等我学会了再分享给大家
|
||||
---
|
||||
layout: post
|
||||
title: "如何使用vercel在线部署网页"
|
||||
description: "神器vercel"
|
||||
tag: 教程
|
||||
---
|
||||
# 前言
|
||||
我们在github在线部署的博客,在国内速度缓慢甚至无法访问,而在gitee部署网站,速度是上去了,可是不稳+无法绑定域名,很不爽.于是又去寻找其他的在线托管服务,始终没有满意的
|
||||
|
||||
直到我找到了
|
||||
|
||||
<a href="https://vercel.com" target="_blank" alt="vercel"><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcdn.sspai.com%2F2020%2F10%2F04%2Fdba588ae94bdfecbe1f85d16ccbc62a5.jpg%3FimageMogr2%2Fauto-orient%2Fquality%2F95%2Fthumbnail%2F%211420x708r%2Fgravity%2FCenter%2Fcrop%2F1420x708%2Finterlace%2F1&refer=http%3A%2F%2Fcdn.sspai.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1652689187&t=6492beeedcafa5abaa2dd288b5a7febb" hight="50%" width="50%"></a>
|
||||
|
||||
# Vercel特点
|
||||
1. vercel类似于github page,但远比github page强大,速度也快得多得多,而且将Github授权给vercel后,可以达到最优雅的发布体验,只需将代码轻轻一推,项目就自动更新部署了。
|
||||
|
||||
2. vercel还支持部署serverless接口。那代表着,其不仅仅可以部署静态网站,甚至可以部署动态网站,而这些功能,统统免费。
|
||||
|
||||
3. vercel还支持自动配置https,不用自己去FreeSSL申请证书,更是省去了一大堆证书的配置,简直是懒人利器!
|
||||
|
||||
![](/images/posts/20220416/2.jpeg)
|
||||
|
||||
# 过程
|
||||
|
||||
## 1.Vercel项目存储到github上
|
||||
|
||||
这里本博客是使用Jekyll作为框架,如果不出意外的话,你的文件目录大概是这样:
|
||||
|
||||
![](/images/posts/20220416/3.png)
|
||||
|
||||
## 2.部署
|
||||
|
||||
登录/注册vercel,个人推荐使用github登录
|
||||
|
||||
![](/images/posts/20220416/4.png)
|
||||
|
||||
单击New Project,在Import Git Repository栏选择import需要部署的项目
|
||||
|
||||
![](/images/posts/20220416/5.png)
|
||||
|
||||
在FRAMEWORK PRESET选择自己的框架,单击Deploy
|
||||
|
||||
![](/images/posts/20220416/6.png)
|
||||
|
||||
等待Vercel自动构建部署完成
|
||||
|
||||
![](/images/posts/20220416/7.png)
|
||||
|
||||
部署完成后会在Overview菜单下看见自己的项目,可以通过vercel自动分配的域名查看效果
|
||||
|
||||
![](/images/posts/20220416/8.png)
|
||||
|
||||
到这里,你已经完成了所有操作,可以选择使用vercel提供的子域名
|
||||
|
||||
点击你的网站,点击Settings,选择Domains,点击你现有域名旁的Edit,进行修改
|
||||
|
||||
![](/images/posts/20220416/9.png)
|
||||
|
||||
## 3.添加域名
|
||||
|
||||
vercel还可以自定义顶级域名,点击Domians,你可以看见以下选项
|
||||
|
||||
![](/images/posts/20220416/10.png)
|
||||
|
||||
你可以进行购买,添加和转入操作
|
||||
|
||||
点击Add,选取项目,点击CONTINUE
|
||||
|
||||
![](/images/posts/20220416/11.png)
|
||||
|
||||
输入你的域名,点击ADD
|
||||
|
||||
![](/images/posts/20220416/12.png)
|
||||
|
||||
根据提示进行配置,完成后,你大概可以看见这样
|
||||
|
||||
![](/images/posts/20220416/12.png)
|
||||
|
||||
至此,你的网站部署全部完成
|
||||
|
||||
# 后记
|
||||
|
||||
关于Vercel,还有许多进阶玩法,前面说过,Vercel还支持动态网站,并且免费,这个等我学会了再分享给大家
|
||||
|
|
36
about.md
36
about.md
|
@ -1,18 +1,18 @@
|
|||
---
|
||||
layout: page
|
||||
title: 关于我
|
||||
---
|
||||
# 废柴
|
||||
|
||||
一个连大学都没考上的废柴,C语言刚入门,懂一点点前端,会刷机,会做包(懂一点点).
|
||||
|
||||
目前在校复读,时间少,博客时刻都在可能停更的状态......
|
||||
|
||||
# 关于这个博客
|
||||
|
||||
这个博客是套用<a href='https://github.com/leopardpan/leopardpan.github.io' target='_blank'>leopardpan</a>的模板并小幅度改动,可以去支持他一下下,我的博客也开源在(<a href='https://gitee.com/zknb-666/zknb-666' target='_blank'>Gitee</a>)上,也欢迎大家使用
|
||||
|
||||
|
||||
|
||||
{% include comments.html %}
|
||||
|
||||
---
|
||||
layout: page
|
||||
title: 关于我
|
||||
---
|
||||
# 废柴
|
||||
|
||||
一个连大学都没考上的废柴,C语言刚入门,懂一点点前端,会刷机,会做包(懂一点点).
|
||||
|
||||
目前在校复读,时间少,博客时刻都在可能停更的状态......
|
||||
|
||||
# 关于这个博客
|
||||
|
||||
这个博客是套用<a href='https://github.com/leopardpan/leopardpan.github.io' target='_blank'>leopardpan</a>的模板并小幅度改动,可以去支持他一下下,我的博客也开源在(<a href='https://gitee.com/zknb-666/zknb-666' target='_blank'>Gitee</a>)上,也欢迎大家使用
|
||||
|
||||
|
||||
|
||||
{% include comments.html %}
|
||||
|
||||
|
|
22
archive.html
22
archive.html
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
layout: page
|
||||
title : 文章
|
||||
header : 所有文章
|
||||
group: navigation
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
{% assign posts_collate = site.posts %}
|
||||
<div class="page card">
|
||||
{% include JB/posts_collate %}
|
||||
---
|
||||
layout: page
|
||||
title : 文章
|
||||
header : 所有文章
|
||||
group: navigation
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
{% assign posts_collate = site.posts %}
|
||||
<div class="page card">
|
||||
{% include JB/posts_collate %}
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
2962
css/main.css
2962
css/main.css
File diff suppressed because it is too large
Load Diff
20
css/post.css
20
css/post.css
|
@ -1,10 +1,10 @@
|
|||
|
||||
.post h2 {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
/*background:#B9D3EE;*/
|
||||
/*text-align: center;*/
|
||||
padding-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-left: 3px solid #1874CD;
|
||||
}
|
||||
|
||||
.post h2 {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
/*background:#B9D3EE;*/
|
||||
/*text-align: center;*/
|
||||
padding-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-left: 3px solid #1874CD;
|
||||
}
|
||||
|
|
184
css/tomorrow.css
184
css/tomorrow.css
|
@ -1,92 +1,92 @@
|
|||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
||||
|
||||
/* Tomorrow Comment */
|
||||
.hljs-comment {
|
||||
color: #8e908c;
|
||||
}
|
||||
|
||||
/* Tomorrow Red */
|
||||
.hljs-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-regexp,
|
||||
.ruby .hljs-constant,
|
||||
.xml .hljs-tag .hljs-title,
|
||||
.xml .hljs-pi,
|
||||
.xml .hljs-doctype,
|
||||
.html .hljs-doctype,
|
||||
.css .hljs-id,
|
||||
.css .hljs-class,
|
||||
.css .hljs-pseudo {
|
||||
color: #c82829;
|
||||
}
|
||||
|
||||
/* Tomorrow Orange */
|
||||
.hljs-number,
|
||||
.hljs-preprocessor,
|
||||
.hljs-pragma,
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-params,
|
||||
.hljs-constant {
|
||||
color: #f5871f;
|
||||
}
|
||||
|
||||
/* Tomorrow Yellow */
|
||||
.ruby .hljs-class .hljs-title,
|
||||
.css .hljs-rules .hljs-attribute {
|
||||
color: #eab700;
|
||||
}
|
||||
|
||||
/* Tomorrow Green */
|
||||
.hljs-string,
|
||||
.hljs-value,
|
||||
.hljs-inheritance,
|
||||
.hljs-header,
|
||||
.ruby .hljs-symbol,
|
||||
.xml .hljs-cdata {
|
||||
color: #718c00;
|
||||
}
|
||||
|
||||
/* Tomorrow Aqua */
|
||||
.hljs-title,
|
||||
.css .hljs-hexcolor {
|
||||
color: #3e999f;
|
||||
}
|
||||
|
||||
/* Tomorrow Blue */
|
||||
.hljs-function,
|
||||
.python .hljs-decorator,
|
||||
.python .hljs-title,
|
||||
.ruby .hljs-function .hljs-title,
|
||||
.ruby .hljs-title .hljs-keyword,
|
||||
.perl .hljs-sub,
|
||||
.javascript .hljs-title,
|
||||
.coffeescript .hljs-title {
|
||||
color: #4271ae;
|
||||
}
|
||||
|
||||
/* Tomorrow Purple */
|
||||
.hljs-keyword,
|
||||
.javascript .hljs-function {
|
||||
color: #8959a8;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
/*background: white;*/
|
||||
color: #4d4d4c;
|
||||
padding: 0.5em;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.coffeescript .javascript,
|
||||
.javascript .xml,
|
||||
.tex .hljs-formula,
|
||||
.xml .javascript,
|
||||
.xml .vbscript,
|
||||
.xml .css,
|
||||
.xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
||||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
||||
|
||||
/* Tomorrow Comment */
|
||||
.hljs-comment {
|
||||
color: #8e908c;
|
||||
}
|
||||
|
||||
/* Tomorrow Red */
|
||||
.hljs-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-regexp,
|
||||
.ruby .hljs-constant,
|
||||
.xml .hljs-tag .hljs-title,
|
||||
.xml .hljs-pi,
|
||||
.xml .hljs-doctype,
|
||||
.html .hljs-doctype,
|
||||
.css .hljs-id,
|
||||
.css .hljs-class,
|
||||
.css .hljs-pseudo {
|
||||
color: #c82829;
|
||||
}
|
||||
|
||||
/* Tomorrow Orange */
|
||||
.hljs-number,
|
||||
.hljs-preprocessor,
|
||||
.hljs-pragma,
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-params,
|
||||
.hljs-constant {
|
||||
color: #f5871f;
|
||||
}
|
||||
|
||||
/* Tomorrow Yellow */
|
||||
.ruby .hljs-class .hljs-title,
|
||||
.css .hljs-rules .hljs-attribute {
|
||||
color: #eab700;
|
||||
}
|
||||
|
||||
/* Tomorrow Green */
|
||||
.hljs-string,
|
||||
.hljs-value,
|
||||
.hljs-inheritance,
|
||||
.hljs-header,
|
||||
.ruby .hljs-symbol,
|
||||
.xml .hljs-cdata {
|
||||
color: #718c00;
|
||||
}
|
||||
|
||||
/* Tomorrow Aqua */
|
||||
.hljs-title,
|
||||
.css .hljs-hexcolor {
|
||||
color: #3e999f;
|
||||
}
|
||||
|
||||
/* Tomorrow Blue */
|
||||
.hljs-function,
|
||||
.python .hljs-decorator,
|
||||
.python .hljs-title,
|
||||
.ruby .hljs-function .hljs-title,
|
||||
.ruby .hljs-title .hljs-keyword,
|
||||
.perl .hljs-sub,
|
||||
.javascript .hljs-title,
|
||||
.coffeescript .hljs-title {
|
||||
color: #4271ae;
|
||||
}
|
||||
|
||||
/* Tomorrow Purple */
|
||||
.hljs-keyword,
|
||||
.javascript .hljs-function {
|
||||
color: #8959a8;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
/*background: white;*/
|
||||
color: #4d4d4c;
|
||||
padding: 0.5em;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.coffeescript .javascript,
|
||||
.javascript .xml,
|
||||
.tex .hljs-formula,
|
||||
.xml .javascript,
|
||||
.xml .vbscript,
|
||||
.xml .css,
|
||||
.xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
58
feed.xml
58
feed.xml
|
@ -1,30 +1,30 @@
|
|||
---
|
||||
layout: null
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ site.title | xml_escape }}</title>
|
||||
<description>{{ site.description | xml_escape }}</description>
|
||||
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
||||
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
||||
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
||||
<generator>Jekyll v{{ jekyll.version }}</generator>
|
||||
{% for post in site.posts limit:10 %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
<description>{{ post.content | xml_escape }}</description>
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
||||
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
||||
{% for tag in post.tags %}
|
||||
<category>{{ tag | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
{% for cat in post.categories %}
|
||||
<category>{{ cat | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
---
|
||||
layout: null
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ site.title | xml_escape }}</title>
|
||||
<description>{{ site.description | xml_escape }}</description>
|
||||
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
||||
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
||||
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
||||
<generator>Jekyll v{{ jekyll.version }}</generator>
|
||||
{% for post in site.posts limit:10 %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
<description>{{ post.content | xml_escape }}</description>
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
||||
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
||||
{% for tag in post.tags %}
|
||||
<category>{{ tag | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
{% for cat in post.categories %}
|
||||
<category>{{ cat | xml_escape }}</category>
|
||||
{% endfor %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="32" height="32" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"><![CDATA[
|
||||
@font-face { font-family: ifont; src: url("//at.alicdn.com/t/font_1442373896_4754455.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_1442373896_4754455.woff") format("woff"), url("//at.alicdn.com/t/font_1442373896_4754455.ttf") format("truetype"), url("//at.alicdn.com/t/font_1442373896_4754455.svg#ifont") format("svg"); }
|
||||
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="32" height="32" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"><![CDATA[
|
||||
@font-face { font-family: ifont; src: url("//at.alicdn.com/t/font_1442373896_4754455.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_1442373896_4754455.woff") format("woff"), url("//at.alicdn.com/t/font_1442373896_4754455.ttf") format("truetype"), url("//at.alicdn.com/t/font_1442373896_4754455.svg#ifont") format("svg"); }
|
||||
|
||||
]]></style></defs><g class="transform-group"><g transform="scale(0.03125, 0.03125)"><path d="M752.769622 64.632019 615.120612 64.632019c-83.899852 0-114.356514 11.117199-172.063821 68.824505l-344.127641 344.127641c-40.605813 40.605813-50.279127 121.786741 0 172.063821l275.30416 275.30416c27.14729 27.152407 60.185754 34.415834 89.26607 34.415834 34.961256 0 64.246233-15.868409 82.797751-34.415834l344.127641-344.127641c59.944254-59.945277 68.824505-92.780103 68.824505-172.063821L959.249277 271.111674C959.249277 114.804722 909.075551 64.632019 752.769622 64.632019L752.769622 64.632019zM718.360951 408.759661c-56.921407 0-103.239316-46.318932-103.239316-103.239316 0-56.915267 46.318932-103.239316 103.239316-103.239316 56.914244 0 103.233176 46.324048 103.233176 103.239316C821.593104 362.440729 775.274172 408.759661 718.360951 408.759661L718.360951 408.759661zM718.360951 408.759661" fill="#9EABB3"></path></g></g></svg>
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
68
index.html
68
index.html
|
@ -1,34 +1,34 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<div class="main-post-list">
|
||||
|
||||
<ol class="post-list">
|
||||
{% for post in paginator.posts %}
|
||||
<li>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ post.url }}" title="访问 {{ post.title }}">{{ post.title }}</a></h2>
|
||||
<p class="excerpt">{{ post.content | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta">
|
||||
<time datetime="{{post.date | date: date_to_xmlschema}}" class="post-list__meta--date date">
|
||||
<img src="/images/calendar.png" width="20px" />
|
||||
{{ post.date | date: "%F"}}</time>
|
||||
<div class = "tag-img-icon">
|
||||
<img src="/images/tag-icon.svg" width="20px" />
|
||||
</div>
|
||||
<a href="/tags">
|
||||
<div class = "post-list-icon-mate">
|
||||
<span class="post-list__meta--tags-right">{{ post.tags }}</span>
|
||||
</div>
|
||||
<div class = "post-list-small-mate">
|
||||
<a class="btn-border-small" href="{{ post.url }}">阅读全文 » </a>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="post-list__divider" />
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
{% include pagination.html %}
|
||||
|
||||
</div>
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<div class="main-post-list">
|
||||
|
||||
<ol class="post-list">
|
||||
{% for post in paginator.posts %}
|
||||
<li>
|
||||
<h2 class="post-list__post-title post-title"><a href="{{ post.url }}" title="访问 {{ post.title }}">{{ post.title }}</a></h2>
|
||||
<p class="excerpt">{{ post.content | strip_html | strip_newlines | truncate: 250 }}…</p>
|
||||
<div class="post-list__meta">
|
||||
<time datetime="{{post.date | date: date_to_xmlschema}}" class="post-list__meta--date date">
|
||||
<img src="/images/calendar.png" width="20px" />
|
||||
{{ post.date | date: "%F"}}</time>
|
||||
<div class = "tag-img-icon">
|
||||
<img src="/images/tag-icon.svg" width="20px" />
|
||||
</div>
|
||||
<a href="/tags">
|
||||
<div class = "post-list-icon-mate">
|
||||
<span class="post-list__meta--tags-right">{{ post.tags }}</span>
|
||||
</div>
|
||||
<div class = "post-list-small-mate">
|
||||
<a class="btn-border-small" href="{{ post.url }}">阅读全文 » </a>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="post-list__divider" />
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
{% include pagination.html %}
|
||||
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
62
js/main.js
62
js/main.js
|
@ -1,32 +1,32 @@
|
|||
document.onreadystatechange = function () {
|
||||
if (document.readyState == "complete") {
|
||||
$(".loading-div").hide();
|
||||
$("#pageContent").removeClass("loadhidden");
|
||||
$('.footer_div').removeClass('loadhidden');
|
||||
}}
|
||||
$(document).on("pjax:complete",function(){
|
||||
hljs.initHighlighting();
|
||||
});
|
||||
$("a").click(function() {
|
||||
currentWidth = $(".panel-cover").width();
|
||||
if (currentWidth < 2000) {
|
||||
$(".panel-cover").addClass("panel-cover--collapsed")
|
||||
} else {
|
||||
$(".panel-cover").css("max-width", currentWidth);
|
||||
$(".panel-cover").animate({
|
||||
"max-width": "320px",
|
||||
"width": "22%"
|
||||
},
|
||||
400, swing = "swing");
|
||||
}
|
||||
$.getScript("/js/main.js");
|
||||
Prism.highlightAll();
|
||||
});
|
||||
if (window.location.hash && window.location.hash == "#blog") {
|
||||
$(".panel-cover").addClass("panel-cover--collapsed");
|
||||
}
|
||||
if ($('.panel-cover').hasClass('panel-cover--collapsed')) {
|
||||
$(".cover-clear").addClass("panel-cover--overlay");
|
||||
$("#pageContent").removeClass("hidden");
|
||||
$('.footer_div').removeClass('hidden');
|
||||
document.onreadystatechange = function () {
|
||||
if (document.readyState == "complete") {
|
||||
$(".loading-div").hide();
|
||||
$("#pageContent").removeClass("loadhidden");
|
||||
$('.footer_div').removeClass('loadhidden');
|
||||
}}
|
||||
$(document).on("pjax:complete",function(){
|
||||
hljs.initHighlighting();
|
||||
});
|
||||
$("a").click(function() {
|
||||
currentWidth = $(".panel-cover").width();
|
||||
if (currentWidth < 2000) {
|
||||
$(".panel-cover").addClass("panel-cover--collapsed")
|
||||
} else {
|
||||
$(".panel-cover").css("max-width", currentWidth);
|
||||
$(".panel-cover").animate({
|
||||
"max-width": "320px",
|
||||
"width": "22%"
|
||||
},
|
||||
400, swing = "swing");
|
||||
}
|
||||
$.getScript("/js/main.js");
|
||||
Prism.highlightAll();
|
||||
});
|
||||
if (window.location.hash && window.location.hash == "#blog") {
|
||||
$(".panel-cover").addClass("panel-cover--collapsed");
|
||||
}
|
||||
if ($('.panel-cover').hasClass('panel-cover--collapsed')) {
|
||||
$(".cover-clear").addClass("panel-cover--overlay");
|
||||
$("#pageContent").removeClass("hidden");
|
||||
$('.footer_div').removeClass('hidden');
|
||||
}
|
50
tags.html
50
tags.html
|
@ -1,25 +1,25 @@
|
|||
---
|
||||
layout: page
|
||||
title:
|
||||
header: 根据快速导航到相应的文章
|
||||
group: navigation
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
<ul class="tag_box inline">
|
||||
{% assign tags_list = site.tags %}
|
||||
{% include JB/tags_list %}
|
||||
</ul>
|
||||
|
||||
<div class = "card">
|
||||
{% for tag in site.tags %}
|
||||
|
||||
<h3 id="{{ tag[0] }}-ref">{{ tag[0] }}</h3>
|
||||
<ul>
|
||||
{% assign pages_list = tag[1] %}
|
||||
{% include JB/pages_list %}
|
||||
</ul>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
---
|
||||
layout: page
|
||||
title:
|
||||
header: 根据快速导航到相应的文章
|
||||
group: navigation
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
<ul class="tag_box inline">
|
||||
{% assign tags_list = site.tags %}
|
||||
{% include JB/tags_list %}
|
||||
</ul>
|
||||
|
||||
<div class = "card">
|
||||
{% for tag in site.tags %}
|
||||
|
||||
<h3 id="{{ tag[0] }}-ref">{{ tag[0] }}</h3>
|
||||
<ul>
|
||||
{% assign pages_list = tag[1] %}
|
||||
{% include JB/pages_list %}
|
||||
</ul>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue