mirror of
https://github.com/tabler/tabler.git
synced 2026-08-21 02:14:26 +04:00
demo stylesheet, md fixes
This commit is contained in:
@@ -15,7 +15,7 @@ const path = require('path'),
|
|||||||
|
|
||||||
const dir = BUNDLE ? 'dist' : 'tmp-dist';
|
const dir = BUNDLE ? 'dist' : 'tmp-dist';
|
||||||
|
|
||||||
glob("scss/tabler*.scss", {}, function (er, files) {
|
glob("scss/{tabler*,demo}.scss", {}, function (er, files) {
|
||||||
files.forEach(function (file) {
|
files.forEach(function (file) {
|
||||||
var basename = path.basename(file, '.scss');
|
var basename = path.basename(file, '.scss');
|
||||||
|
|
||||||
|
|||||||
@@ -14,3 +14,5 @@
|
|||||||
{% for plugin in site.tabler-plugins %}
|
{% for plugin in site.tabler-plugins %}
|
||||||
<link href="{{ site.base }}/{% if jekyll.environment == 'development' %}tmp-{% endif %}dist/css/{{ plugin }}{% if jekyll.environment == 'production' %}.min{% endif %}.css?{{ site.time | date: '%s' }}" rel="stylesheet"/>
|
<link href="{{ site.base }}/{% if jekyll.environment == 'development' %}tmp-{% endif %}dist/css/{{ plugin }}{% if jekyll.environment == 'production' %}.min{% endif %}.css?{{ site.time | date: '%s' }}" rel="stylesheet"/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
<link href="{{ site.base }}/{% if jekyll.environment == 'development' %}tmp-{% endif %}dist/css/demo{% if jekyll.environment == 'production' %}.min{% endif %}.css?{{ site.time | date: '%s' }}" rel="stylesheet"/>
|
||||||
@@ -19,8 +19,8 @@ def render_rouge(code, lang, dark = false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def add_code_tag(code, lang)
|
def add_code_tag(code, lang)
|
||||||
code = code.sub(/<pre>\n*/, '<pre><code class="language-' + lang.to_s.gsub("+", "-") + '" data-lang="' + lang.to_s + '">')
|
code = code.sub(/<pre>\n*/, '<div class="example-code language-' + lang.to_s.gsub("+", "-") + '" data-lang="' + lang.to_s + '"><pre class="highlight"><code>')
|
||||||
code = code.sub(/\n*<\/pre>/, "</code></pre>")
|
code = code.sub(/\n*<\/pre>/, "</code></pre></div>")
|
||||||
|
|
||||||
code.strip
|
code.strip
|
||||||
end
|
end
|
||||||
@@ -74,7 +74,7 @@ Valid syntax: example <lang> [id=foo]
|
|||||||
render_rouge(code, @lang, @options[:linenos])
|
render_rouge(code, @lang, @options[:linenos])
|
||||||
end
|
end
|
||||||
|
|
||||||
rendered_output = example(code) + "<div class=\"highlight\">#{add_code_tag(output, @lang)}</div>"
|
rendered_output = example(code) + add_code_tag(output, @lang)
|
||||||
prefix + rendered_output + suffix
|
prefix + rendered_output + suffix
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -3,8 +3,7 @@
|
|||||||
@mixin dark-mode {
|
@mixin dark-mode {
|
||||||
&,
|
&,
|
||||||
.modal-content,
|
.modal-content,
|
||||||
.dropdown-menu,
|
.dropdown-menu {
|
||||||
.example-bg {
|
|
||||||
color: $dark-body-color;
|
color: $dark-body-color;
|
||||||
background: $dark-body-bg;
|
background: $dark-body-bg;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
@import "ui/dropdowns";
|
@import "ui/dropdowns";
|
||||||
@import "ui/empty";
|
@import "ui/empty";
|
||||||
@import "ui/grid";
|
@import "ui/grid";
|
||||||
@import "ui/highlight";
|
|
||||||
@import "ui/icons";
|
@import "ui/icons";
|
||||||
@import "ui/forms";
|
@import "ui/forms";
|
||||||
@import "ui/forms/form-icon";
|
@import "ui/forms/form-icon";
|
||||||
@@ -50,9 +49,6 @@
|
|||||||
@import "ui/markdown";
|
@import "ui/markdown";
|
||||||
@import "ui/charts";
|
@import "ui/charts";
|
||||||
|
|
||||||
@import "ui/examples";
|
|
||||||
|
|
||||||
@import "utils/border";
|
|
||||||
@import "utils/background";
|
@import "utils/background";
|
||||||
@import "utils/colors";
|
@import "utils/colors";
|
||||||
@import "utils/scroll";
|
@import "utils/scroll";
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
@import "config";
|
||||||
|
@import "demo/highlight";
|
||||||
|
@import "demo/examples";
|
||||||
@@ -6,13 +6,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.example-bg {
|
.example-bg {
|
||||||
background: $min-black;
|
background: $body-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example + .highlight {
|
.example-code {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-radius: 0 0 3px 3px;
|
|
||||||
|
pre {
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 0 0 3px 3px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.example-column {
|
.example-column {
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@import "config";
|
@import "config";
|
||||||
@import "ui/payments";
|
@import "ui/payments";
|
||||||
|
|
||||||
+4
-4
@@ -185,21 +185,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
>:last-child:not {
|
>:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-sm & {
|
.card-sm>& {
|
||||||
padding: map-get($spacers, 3);
|
padding: map-get($spacers, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-md & {
|
.card-md>& {
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
padding: map-get($spacers, 5);
|
padding: map-get($spacers, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-lg & {
|
.card-lg>& {
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
padding: map-get($spacers, 6);
|
padding: map-get($spacers, 6);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-7
@@ -68,13 +68,6 @@ code {
|
|||||||
background: rgba($code-color, .03);
|
background: rgba($code-color, .03);
|
||||||
border: 1px solid rgba($code-color, .064);
|
border: 1px solid rgba($code-color, .064);
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
|
||||||
pre & {
|
|
||||||
padding: 0;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -86,6 +79,14 @@ pre {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
tab-size: 3;
|
tab-size: 3;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 0;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
.border-dashed {
|
|
||||||
border-style: dashed !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-transparent {
|
|
||||||
border-color: transparent !important;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user