From 83353dd1357b32870ec2b695f7a79b6fdea84b0d Mon Sep 17 00:00:00 2001
From: wangzhiming <8449761382@qq.com>
Date: Sat, 6 Jun 2020 10:58:46 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=84=E4=BB=B6-=E5=8D=A1=E7=89=87=20?=
=?UTF-8?q?=E6=9C=80=E4=B8=8B=E6=96=B9=E5=86=85=E5=AE=B9=E7=BA=AF=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/public/css/app.css | 11 ++++++++++-
admin/public/js/index.js | 24 +++++++++++++++++++++---
admin/views/components/card.njk | 27 +++++++++++----------------
3 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/admin/public/css/app.css b/admin/public/css/app.css
index f3583c9..b08705b 100644
--- a/admin/public/css/app.css
+++ b/admin/public/css/app.css
@@ -791,8 +791,17 @@ a:hover{
padding:10px 15px 13px;
}
+.code-source-show{
+ margin-top: 15px;
+ border: 1px solid rgb(235, 235, 235);
+ border-radius: 3px;
+ background-color: rgb(250, 250, 250);
+ overflow: hidden;
+}
-
+.code-source-show .code-show{
+ margin-top: 0;
+}
diff --git a/admin/public/js/index.js b/admin/public/js/index.js
index 64dd349..6cd0bc1 100644
--- a/admin/public/js/index.js
+++ b/admin/public/js/index.js
@@ -43,17 +43,35 @@ var PageIndex = {
'
' +
' ' +
'
' +
- ''
-
+ '',
+ _showOnlyCode = '' +
+ '' +
+ '
' +
+ ' ' +
+ '
' +
+ '
' +
+ '
' +
+ ' ' +
+ '
' +
+ '
'
$('.demo-code').each(function (index, item) {
var scope = $(this),
source = scope.find('.code-source')
-
if (source.length) {
// $(_show).appendTo(scope).find('.hljs').html(hljs.highlightAuto(source.html()).value)
$(_show).insertAfter(source).find('.hljs').html(hljs.highlightAuto(source.html()).value)
}
+ // 只展示代码
+ var sourceToShow = scope.find('.code-source-show')
+ if (sourceToShow.length) {
+ // $(_show).appendTo(scope).find('.hljs').html(hljs.highlightAuto(source.html()).value)
+ let content = sourceToShow.html()
+ let result = $(_showOnlyCode)
+ sourceToShow.html(result).find('.hljs').html(hljs.highlightAuto(content).value)
+ sourceToShow.find('.code-control').hide()
+ sourceToShow.find('pre.hljs-pre').show()
+ }
})
/*
diff --git a/admin/views/components/card.njk b/admin/views/components/card.njk
index 3bd7248..6e34531 100644
--- a/admin/views/components/card.njk
+++ b/admin/views/components/card.njk
@@ -1175,25 +1175,20 @@
卡列也可以扩展并使用一些其他代码进行自定义。下面显示的是.card-columns使用与我们使用的相同CSS(即CSS列)的类的扩展,以生成一组用于更改列数的响应层。
-
-
-
-
- .card-columns {
- @include media-breakpoint-only(lg) {
- column-count: 4;
- }
- @include media-breakpoint-only(xl) {
- column-count: 5;
- }
- }
-
-
-
+
+
+ .card-columns {
+ @include media-breakpoint-only(lg) {
+ column-count: 4;
+ }
+ @include media-breakpoint-only(xl) {
+ column-count: 5;
+ }
+ }
+
-
--
Gitee
From 962e7d0d099400e730c32936ea6fc1a95e85c0d8 Mon Sep 17 00:00:00 2001
From: wangzhiming <8449761382@qq.com>
Date: Fri, 12 Jun 2020 10:15:49 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E7=BB=84=E4=BB=B6-=E5=8D=A1=E7=89=87=20?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/public/css/app.css | 11 +---
admin/public/css/override.css | 32 ++++++++++
admin/public/js/index.js | 24 +-------
admin/views/components/card.njk | 106 +++++++++++++++++---------------
4 files changed, 94 insertions(+), 79 deletions(-)
diff --git a/admin/public/css/app.css b/admin/public/css/app.css
index b08705b..f3583c9 100644
--- a/admin/public/css/app.css
+++ b/admin/public/css/app.css
@@ -791,17 +791,8 @@ a:hover{
padding:10px 15px 13px;
}
-.code-source-show{
- margin-top: 15px;
- border: 1px solid rgb(235, 235, 235);
- border-radius: 3px;
- background-color: rgb(250, 250, 250);
- overflow: hidden;
-}
-.code-source-show .code-show{
- margin-top: 0;
-}
+
diff --git a/admin/public/css/override.css b/admin/public/css/override.css
index 36efa07..a2b9635 100644
--- a/admin/public/css/override.css
+++ b/admin/public/css/override.css
@@ -27,3 +27,35 @@ a[disabled] {
display: block;
margin-top: 0;
}
+/* components card */
+/*.card-body p.card-text+a.btn{*/
+/* margin-top: 0.75rem;*/
+/*}*/
+.my-card .card-body p {
+ margin-bottom: .75rem;
+}
+.my-card .card+.card {
+ margin-top: .75rem;
+}
+.my-card li.caption {
+ height: 2rem;
+ line-height: 2rem;
+ margin-bottom: .75rem;
+ font-size: 1.6rem;
+ font-weight: bold;
+}
+.my-card .demo-row:before {
+ width: 80px;
+ height: 2rem;
+ line-height: 2rem;
+ text-align: right;
+ top: 0;
+ left: -55px;
+ padding: 0;
+ margin: 0;
+ font-size: 1.8rem;
+ font-weight: bold;
+}
+.my-card .caption:nth-child(3), .my-card .caption:nth-child(5) {
+ margin-top: .75rem;
+}
diff --git a/admin/public/js/index.js b/admin/public/js/index.js
index 6cd0bc1..64dd349 100644
--- a/admin/public/js/index.js
+++ b/admin/public/js/index.js
@@ -43,35 +43,17 @@ var PageIndex = {
' ' +
' ' +
'
' +
- '',
- _showOnlyCode = '' +
- '' +
- '
' +
- ' ' +
- '
' +
- '
' +
- '
' +
- ' ' +
- '
' +
- '
'
+ ''
+
$('.demo-code').each(function (index, item) {
var scope = $(this),
source = scope.find('.code-source')
+
if (source.length) {
// $(_show).appendTo(scope).find('.hljs').html(hljs.highlightAuto(source.html()).value)
$(_show).insertAfter(source).find('.hljs').html(hljs.highlightAuto(source.html()).value)
}
- // 只展示代码
- var sourceToShow = scope.find('.code-source-show')
- if (sourceToShow.length) {
- // $(_show).appendTo(scope).find('.hljs').html(hljs.highlightAuto(source.html()).value)
- let content = sourceToShow.html()
- let result = $(_showOnlyCode)
- sourceToShow.html(result).find('.hljs').html(hljs.highlightAuto(content).value)
- sourceToShow.find('.code-control').hide()
- sourceToShow.find('pre.hljs-pre').show()
- }
})
/*
diff --git a/admin/views/components/card.njk b/admin/views/components/card.njk
index 6e34531..f0b15e3 100644
--- a/admin/views/components/card.njk
+++ b/admin/views/components/card.njk
@@ -7,10 +7,10 @@
{% endblock %}
{% block content %}
-
+
-
+
@@ -23,7 +23,7 @@
- - 示例
+ - 示例
- 卡片的标记和样式尽可能少,但仍能提供大量控制和自定义功能。它们与flexbox一起构建,可以轻松对齐并与其他Bootstrap组件很好地混合。它们margin默认情况下没有,因此请根据需要使用空格实用程序。
以下是具有混合内容和固定宽度的基本卡的示例。卡没有固定的宽度开始,因此它们自然会填满其父元素的整个宽度。通过我们的各种尺寸选择,可以轻松自定义此尺寸。
@@ -56,10 +56,10 @@
@@ -89,8 +89,8 @@
- - 图片
- - .card-img-top将图像放置在卡的顶部。使用.card-text,可以将文本添加到卡中。其中的文本.card-text也可以使用标准HTML标记设置样式。
+
- 图片
+ .card-img-top
将图像放置在卡的顶部。使用.card-text
,可以将文本添加到卡中。其中的文本.card-text
也可以使用标准HTML标记设置样式。
@@ -117,7 +117,7 @@
- - 清单群组
+ - 清单群组
- 在带有刷新列表组的卡中创建内容列表。
@@ -164,7 +164,7 @@
- - 厨房水槽
+ - 厨房水槽
- 混合并匹配多种内容类型以创建所需的卡,或将所有内容丢在其中。下面显示的是图像样式,块,文本样式和列表组,它们都包裹在定宽卡中。
@@ -201,7 +201,7 @@
- - 页眉和页脚
+ - 页眉和页脚
- 在卡中添加可选的页眉和/或页脚。
@@ -284,10 +284,10 @@
- - 尺寸
- - 卡片没有具体规定width,因此除非另有说明,否则卡片的宽度为100%。您可以根据需要使用自定义CSS,网格类,网格Sass mixins或实用程序来更改此设置。
+
- 尺寸
+ - 卡片没有具体规定
width
,因此除非另有说明,否则卡片的宽度为100%。您可以根据需要使用自定义CSS,网格类,网格Sass mixins或实用程序来更改此设置。
- - 使用网格标记
+ - 使用网格标记
- 使用网格,根据需要将卡包装在列和行中。
@@ -328,7 +328,7 @@
- - 使用实用程序
+ - 使用实用程序
- 使用我们少数可用的大小调整实用程序来快速设置卡片的宽度。
@@ -364,7 +364,7 @@
- - 使用自定义CSS
+ - 使用自定义CSS
- 在样式表中或作为内联样式使用自定义CSS来设置宽度。
@@ -392,7 +392,7 @@
- - 文字对齐
+ - 文字对齐
- 您可以使用我们的文本对齐类快速更改任何卡的整体或特定部分的文本对齐方式。
@@ -436,7 +436,7 @@
- - 导航
+ - 导航
- 使用Bootstrap的nav组件在卡的头(或块)中添加一些导航。
@@ -505,7 +505,7 @@
- - 图像帽
+ - 图像帽
- 与页眉和页脚相似,卡片可以包含顶部和底部的“图像上限”,即图像顶部或底部的图像。
@@ -544,7 +544,7 @@
- - 图像叠加
+ - 图像叠加
- 将图像变成卡片背景并覆盖卡片的文本。根据图像,您可能需要也可能不需要其他样式或实用程序。
@@ -575,8 +575,8 @@
- - 卧式
- - 结合使用网格和实用程序类,可以以移动友好且响应迅速的方式使卡水平放置。在下面的示例中,我们使用删除网格装订线,.no-gutters并使用.col-md-*类使卡在md断点处水平。根据您的卡内容,可能需要进一步调整。
+
- 卧式
+ - 结合使用网格和实用程序类,可以以移动友好且响应迅速的方式使卡水平放置。在下面的示例中,我们使用删除网格装订线,
.no-gutters
并使用.col-md-*
类使卡在md断点处水平。根据您的卡内容,可能需要进一步调整。
@@ -612,10 +612,10 @@
- - 卡片样式
+ - 卡片样式
- 卡片包含用于自定义背景,边框和颜色的各种选项。
- - 背景和颜色
+ - 背景和颜色
- 使用文本和背景实用程序来更改卡的外观。
@@ -694,8 +694,8 @@
- - 边框
- - 使用边界实用程序仅更改border-color卡的。请注意,您可以将.text-{color}类放在父级.card或卡内容的子集中,如下所示。
+
- 边框
+ - 使用边界实用程序仅更改
border-color
卡的。请注意,您可以将.text-{color}
类放在父级.card
或卡内容的子集中,如下所示。
@@ -773,8 +773,8 @@
- - Mixins实用程序
- - 您还可以更改卡上的页眉和页脚所需的边界,甚至删除其background-color用.bg-transparent。
+
- Mixins实用程序
+ - 您还可以更改卡上的页眉和页脚所需的边界,甚至删除其
background-color
用.bg-transparent。
@@ -804,11 +804,11 @@
- - 卡布局
+ - 卡布局
- 除了在卡片中设置内容的样式外,Bootstrap还提供了一些用于布置一系列卡片的选项。目前,这些布局选项尚未响应。
- - 卡组
- - 使用卡组将卡呈现为具有相等宽度和高度列的单个附加元素。卡组从堆叠开始,并用于display: flex;从sm断点开始以统一的尺寸连接。
+
- 卡组
+ - 使用卡组将卡呈现为具有相等宽度和高度列的单个附加元素。卡组从堆叠开始,并用于
display: flex;
从sm断点开始以统一的尺寸连接。
@@ -856,7 +856,7 @@
- - 卡套
+ - 卡套
- 需要一组彼此不连接的宽度和高度相等的卡吗?使用卡片组。
@@ -943,7 +943,7 @@
- - 网格卡
+ - 网格卡
- 使用Bootstrap网格系统及其.row-cols类来控制每行显示多少个网格列(卡周围)。例如,这里.row-cols-1将卡片布置在一列上,然后.row-cols-md-2从中等的断点开始,将四张卡片分成相等的宽度,跨多行。
@@ -1091,10 +1091,10 @@
- - 卡列
- - 只需将CSS包裹在卡片中,就可以将其组织成类似Masonry的列.card-columns。卡是使用CSS column属性而不是flexbox构建的,以便于对齐。卡的排列顺序是从上到下,从左到右。
+
- 卡列
+ - 只需将CSS包裹在卡片中,就可以将其组织成类似Masonry的列
.card-columns
。卡是使用CSS column属性而不是flexbox构建的,以便于对齐。卡的排列顺序是从上到下,从左到右。
- - 小心!您使用信用卡栏的里程可能会有所不同。为防止卡跨列断裂,我们必须将其设置display: inline-block为column-break-inside: avoid还不是防弹解决方案。
+ - 小心!您使用信用卡栏的里程可能会有所不同。为防止卡跨列断裂,我们必须将其设置
display: inline-block为column-break-inside: avoid
还不是防弹解决方案。
@@ -1170,25 +1170,35 @@
+
+
+
+
+
+
+
+
-
卡列也可以扩展并使用一些其他代码进行自定义。下面显示的是.card-columns使用与我们使用的相同CSS(即CSS列)的类的扩展,以生成一组用于更改列数的响应层。
+
+ - 卡列扩展
+ - 卡列也可以扩展并使用一些其他代码进行自定义。下面显示的是
.card-columns
使用与我们使用的相同CSS(即CSS列)的类的扩展,以生成一组用于更改列数的响应层。
+
-
--
Gitee
From c8b4618ffabcda8512883f2d73bd7f8907b6ae94 Mon Sep 17 00:00:00 2001
From: wangzhiming <8449761382@qq.com>
Date: Fri, 12 Jun 2020 15:17:25 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=84=E4=BB=B6-=E5=8D=A1=E7=89=87=20?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/public/css/card.css | 25 +++++++++++++++++++++++++
admin/public/css/override.css | 32 --------------------------------
admin/views/components/card.njk | 27 +++++++++++++++++----------
3 files changed, 42 insertions(+), 42 deletions(-)
create mode 100644 admin/public/css/card.css
diff --git a/admin/public/css/card.css b/admin/public/css/card.css
new file mode 100644
index 0000000..1d1dcf7
--- /dev/null
+++ b/admin/public/css/card.css
@@ -0,0 +1,25 @@
+.app-card .card-body p {
+ margin-bottom: .75rem;
+}
+.app-card li.caption {
+ height: 2rem;
+ line-height: 2rem;
+ margin-bottom: .75rem;
+ font-size: 1.6rem;
+ font-weight: bold;
+}
+.app-card .demo-row:before {
+ width: 80px;
+ height: 2rem;
+ line-height: 2rem;
+ text-align: right;
+ top: 0;
+ left: -55px;
+ padding: 0;
+ margin: 0;
+ font-size: 1.8rem;
+ font-weight: bold;
+}
+.app-card .caption:nth-child(3), .app-card .caption:nth-child(5) {
+ margin-top: .75rem;
+}
diff --git a/admin/public/css/override.css b/admin/public/css/override.css
index a2b9635..36efa07 100644
--- a/admin/public/css/override.css
+++ b/admin/public/css/override.css
@@ -27,35 +27,3 @@ a[disabled] {
display: block;
margin-top: 0;
}
-/* components card */
-/*.card-body p.card-text+a.btn{*/
-/* margin-top: 0.75rem;*/
-/*}*/
-.my-card .card-body p {
- margin-bottom: .75rem;
-}
-.my-card .card+.card {
- margin-top: .75rem;
-}
-.my-card li.caption {
- height: 2rem;
- line-height: 2rem;
- margin-bottom: .75rem;
- font-size: 1.6rem;
- font-weight: bold;
-}
-.my-card .demo-row:before {
- width: 80px;
- height: 2rem;
- line-height: 2rem;
- text-align: right;
- top: 0;
- left: -55px;
- padding: 0;
- margin: 0;
- font-size: 1.8rem;
- font-weight: bold;
-}
-.my-card .caption:nth-child(3), .my-card .caption:nth-child(5) {
- margin-top: .75rem;
-}
diff --git a/admin/views/components/card.njk b/admin/views/components/card.njk
index f0b15e3..4728347 100644
--- a/admin/views/components/card.njk
+++ b/admin/views/components/card.njk
@@ -1,16 +1,14 @@
{% extends "../layouts/_base.njk" %}
{% block title %}
- 公告板 Button
+ 公告板 card
{% endblock %}
-{% block js_head %}
-
+{% block css %}
+
{% endblock %}
{% block content %}
-
-
+
+
+
+
卡标题
@@ -408,7 +409,10 @@
去某地
-
+
+
+
+
特殊标题处理
@@ -416,7 +420,10 @@
去某地
-
+
+
+