Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Dashboards
Tabler
提交
261604bb
T
Tabler
项目概览
Dashboards
/
Tabler
10 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
261604bb
编写于
10月 25, 2019
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
charts code in footer, capture_global tag
上级
6ff80452
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
48 addition
and
4 deletion
+48
-4
package.json
package.json
+2
-1
pages/_data/libs.json
pages/_data/libs.json
+3
-1
pages/_includes/js/charts.html
pages/_includes/js/charts.html
+2
-0
pages/_includes/ui/avatar.html
pages/_includes/ui/avatar.html
+1
-1
pages/_layouts/base.html
pages/_layouts/base.html
+2
-0
pages/_plugins/jekyll-base.rb
pages/_plugins/jekyll-base.rb
+0
-1
pages/_plugins/jekyll-capture.rb
pages/_plugins/jekyll-capture.rb
+38
-0
未找到文件。
package.json
浏览文件 @
261604bb
...
...
@@ -91,7 +91,8 @@
"dependencies"
:
{
"
apexcharts
"
:
"
3.10.0
"
,
"
autosize
"
:
"
4.0.2
"
,
"
bootstrap
"
:
"
twbs/bootstrap#8d56c19
"
,
"
bootstrap
"
:
"
twbs/bootstrap#9ee9b8a
"
,
"
chart.js
"
:
"
^2.8.0
"
,
"
imask
"
:
"
5.2.1
"
,
"
jquery
"
:
"
3.4.1
"
,
"
jqvmap
"
:
"
1.5.1
"
,
...
...
pages/_data/libs.json
浏览文件 @
261604bb
...
...
@@ -7,6 +7,7 @@
"selectize/dist/js/standalone/selectize.min.js"
,
"apexcharts/dist/apexcharts.min.js"
,
"chart.js/dist/Chart.min.js"
,
"jqvmap/dist/jquery.vmap.min.js"
,
"jqvmap/dist/maps/jquery.vmap.world.js"
,
"jqvmap/dist/maps/jquery.vmap.usa.js"
,
...
...
@@ -16,6 +17,7 @@
],
"css"
:
[
"jqvmap/dist/jqvmap.min.css"
,
"selectize/dist/css/selectize.css"
"selectize/dist/css/selectize.css"
,
"chart.js/dist/Chart.min.css"
]
}
pages/_includes/js/charts.html
浏览文件 @
261604bb
{% capture_global scripts %}
{% removeemptylines %}
{% assign data = site.data.charts[include.chart-id] %}
...
...
@@ -127,3 +128,4 @@ document.addEventListener("DOMContentLoaded", function(event) {
</script>
{% endif %}
{% endremoveemptylines %}
{% endcapture_global %}
pages/_includes/ui/avatar.html
浏览文件 @
261604bb
...
...
@@ -17,7 +17,7 @@
{% assign link = include.link | default: false %}
{% assign el = 'span' %}
{% if link %}{% assign el = 'a' %}{% endif %}
<
{{
el
}}
class=
"avatar{% if include['size'] %} avatar-{{ include['size'] }}{% endif %}{% if include.thumb %} avatar-thumb{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.shape %} {{ include.shape }}{% endif %}{% if include.color %} bg-{{ include.color }}-lt{% endif %}"
{%
if
src
%}
style=
"background-image: url({{ site.base }}{{ src }})"
{%
endif
%}
>
{% if include.status %}
<
{{
el
}}
class=
"avatar{% if include['size'] %} avatar-{{ include['size'] }}{% endif %}{% if include.thumb %} avatar-thumb{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.shape %} {{ include.shape }}{% endif %}{% if include.color %} bg-{{ include.color }}-lt{% endif %}"
{%
if
src
%}
style=
"background-image: url({{ site.base }}
/
{{ src }})"
{%
endif
%}
>
{% if include.status %}
<span
class=
"badge bg-{{ include.status }}"
>
{% if include.status-text %}{{ include.status-text }}{% elsif include.status-icon %}{% include ui/icon.html icon=include.status-icon class="avatar-status-icon" %}{% endif %}
</span>
{% endif %}{% if placeholder %}{{ placeholder }}{% elsif include.icon %} {% include ui/icon.html icon=include.icon class="avatar-icon" %}{% endif %}
</
{{
el
}}
>
{% endremoveemptylines %}
pages/_layouts/base.html
浏览文件 @
261604bb
...
...
@@ -44,6 +44,8 @@
{% endif %}
{% endif %}
{{ site.capture_global.scripts }}
<script>
document
.
body
.
style
.
display
=
'
block
'
;
</script>
</body>
</html>
pages/_plugins/jekyll-base.rb
浏览文件 @
261604bb
...
...
@@ -22,5 +22,4 @@ module Jekyll
Jekyll
::
Hooks
.
register
:documents
,
:pre_render
do
|
doc
,
jekyll
|
jekyll
.
site
[
'base'
]
=
get_dir
(
doc
.
relative_path
)
end
end
pages/_plugins/jekyll-capture.rb
0 → 100644
浏览文件 @
261604bb
module
Jekyll
module
Tags
class
CaptureGlobal
<
Liquid
::
Block
def
initialize
(
tag_name
,
text
,
tokens
)
super
@text
=
text
.
strip
end
def
render
(
context
)
if
$capture_global
[
@text
]
===
nil
$capture_global
[
@text
]
=
''
;
end
$capture_global
[
@text
]
+=
super
.
strip
+
"
\n\n
"
''
end
end
end
Jekyll
::
Hooks
.
register
:site
,
:after_init
do
|
page
,
jekyll
|
$capture_global
=
{}
end
Jekyll
::
Hooks
.
register
:pages
,
:pre_render
do
|
page
,
jekyll
|
jekyll
.
site
[
'capture_global'
]
=
$capture_global
end
Jekyll
::
Hooks
.
register
:pages
,
:post_render
do
|
page
,
jekyll
|
$capture_global
=
{}
end
end
Liquid
::
Template
.
register_tag
(
'capture_global'
,
Jekyll
::
Tags
::
CaptureGlobal
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录