From ee1a0501f9841ea3719dbde8dd542f25982cc826 Mon Sep 17 00:00:00 2001 From: vjeantet Date: Wed, 16 Sep 2020 22:36:25 +0200 Subject: fix for bootstrap --- assets/sass/main.scss | 32 +++++----- assets/sass/shortcodes/button.scss | 74 ---------------------- assets/sass/shortcodes/columns.scss | 6 +- exampleSite/content/docport-theme/_index.md | 9 +-- exampleSite/content/shortcodes/badge/_index.md | 41 ++++++++++++ ...n.scss_97a9b8e6852415b29a37632934745b8b.content | 32 ++++------ ...s.scss_f300667da4f5b5f84e1a9e0702b2fdde.content | 6 +- layouts/partials/body-article-content.html | 9 +-- layouts/partials/body-article-sidepage.html | 3 +- layouts/partials/html-head.html | 6 ++ layouts/shortcodes/badge.html | 1 + layouts/shortcodes/button.html | 4 +- .../bootstrap-4.5.2-dist/css/bootstrap.min.css | 7 ++ .../bootstrap-4.5.2-dist/js/bootstrap.min.js | 7 ++ 14 files changed, 111 insertions(+), 126 deletions(-) delete mode 100644 assets/sass/shortcodes/button.scss create mode 100644 exampleSite/content/shortcodes/badge/_index.md create mode 100644 layouts/shortcodes/badge.html create mode 100644 static/vendor/bootstrap/bootstrap-4.5.2-dist/css/bootstrap.min.css create mode 100644 static/vendor/bootstrap/bootstrap-4.5.2-dist/js/bootstrap.min.js diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 3abd3ce..e237708 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -30,6 +30,12 @@ $c_saturate4 : saturate($color_second, 50%); $c_saturate5 : saturate($color_second, 60%); $c_saturate6 : saturate($color_second, 75%); $c_saturate7 : saturate($color_second, 90%); + + + + + + body:not(.render_raw){ font-family:"Montserrat",sans-serif; @@ -198,7 +204,7 @@ body:not(.render_raw){ article section.page { background-color: inherit; - #breadcrumb{ + #ariane{ display: block; font-size: 1rem; line-height: 1.5; @@ -206,6 +212,7 @@ article section.page { font-weight: 500; ol{ + margin-top: 1em!important; padding: 0px; display: flex; flex-wrap: wrap; @@ -394,16 +401,19 @@ article section.page div.content{ h1 { color:$c_dark1; - font-size:30px; + font-variant-ligatures:none; - font-weight:700; - height:88px; + font-weight:800; + letter-spacing:-0.75px; line-height:32px; } h2 { - + margin-top: 0.5em; + font-weight:700; + letter-spacing:-0.95px; + } // TABLE table { width: 100%; @@ -478,21 +488,11 @@ article section.page div.content{ } } - code { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; - font-size: 85%; - color: #e83e8c; - word-wrap: break-word; - - padding: 0.5px; - font-weight: 600; - white-space: pre-wrap; - } - div.highlight{ pre{ display:block; white-space: pre-wrap; + overflow: inherit!important; code{ color:inherit!important; font-size: 75%; diff --git a/assets/sass/shortcodes/button.scss b/assets/sass/shortcodes/button.scss deleted file mode 100644 index d82ffa5..0000000 --- a/assets/sass/shortcodes/button.scss +++ /dev/null @@ -1,74 +0,0 @@ -$color_primary : #007bff ; -$color_secondary : #6c757d ; -$color_success : #28a745 ; -$color_danger : #dc3545 ; -$color_warning : #ffc107 ; -$color_info : #17a2b8 ; -$color_light : #f8f9fa ; -$color_dark : #343a40 ; -$color_white : #fff ; -$color_transparent : transparent ; - -button.btn{ - - border: 1px solid transparent; - padding: .375rem .75rem; - font-size: 1rem; - line-height: 1.5; - border-radius: .25rem; - cursor: pointer; - - color: #fff; - background-color: #007bff; - border-color: #007bff; - - a{color:inherit!important;} - - &.primary{ - color: white; - background-color: $color_primary; - border-color: $color_primary; - } - &.info{ - color: white; - background-color: $color_info; - border-color: $color_info; - } - &.success{ - color: white; - background-color: $color_success; - border-color: $color_success; - } - &.warning{ - color: black; - background-color: $color_warning; - border-color: $color_warning; - } - &.danger{ - color: white; - background-color: $color_danger; - border-color: $color_danger; - } - &.danger{ - color: white; - background-color: $color_danger; - border-color: $color_danger; - } - &.secondary{ - color: white; - background-color: $color_secondary; - border-color: $color_secondary; - } - &.light{ - color: black; - background-color: $color_light; - border-color: $color_light; - } - &.dark{ - color: white; - background-color: $color_dark; - border-color: $color_dark; - } - - -} \ No newline at end of file diff --git a/assets/sass/shortcodes/columns.scss b/assets/sass/shortcodes/columns.scss index 5b367db..4aea2e8 100644 --- a/assets/sass/shortcodes/columns.scss +++ b/assets/sass/shortcodes/columns.scss @@ -4,13 +4,13 @@ div.columns{ div.column{ flex: 1 1; - padding: 0 1em; + margin: 0 1em; } :first-child{ - padding-left: 0px!important; + margin-left: 0px!important; } :last-child{ - padding-right: 0px!important; + margin-right: 0px!important; } } diff --git a/exampleSite/content/docport-theme/_index.md b/exampleSite/content/docport-theme/_index.md index da0b62e..95beee1 100644 --- a/exampleSite/content/docport-theme/_index.md +++ b/exampleSite/content/docport-theme/_index.md @@ -18,9 +18,10 @@ It provides a simple navigation, automatic search engine, a high level of config * [RevealJS presentation]({{%relref "content-and-customization/00-adding-content/page-slide/"%}}) from markdown (embededed or fullscreen page) * [Image resizing, shadow...]({{%relref "content-and-customization/00-adding-content/page-images/" %}}) * A bunch of shortcodes - *[Mermaid diagram]({{%relref "shortcodes/mermaid/_index.md" %}}) (flowchart, sequence, gantt)* - [Attachments files]({{%relref "shortcodes/attachments/_index.md" %}}), [Icons]({{%relref "shortcodes/icon/_index.md" %}}), [Buttons]({{%relref "shortcodes/button/_index.md" %}}), [Alerts]({{%relref "shortcodes/alert/_index.md" %}}), [Panels]({{%relref "shortcodes/panel/_index.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice/_index.md" %}}), [Expand]({{%relref "shortcodes/expand/_index.md" %}}), [List child pages]({{%relref "shortcodes/children/_index.md" %}}) - *[Excerpt]({{%relref "shortcodes/excerpt/_index.md"%}}) ! Include segment of content from one page in another* + * [Mermaid diagram]({{%relref "shortcodes/mermaid/_index.md" %}}) (flowchart, sequence, gantt)* + [Attachments files]({{%relref "shortcodes/attachments/_index.md" %}}), [Icons]({{%relref "shortcodes/icon/_index.md" %}}), [Buttons]({{%relref "shortcodes/button/_index.md" %}}), [Alerts]({{%relref "shortcodes/alert/_index.md" %}}), [Panels]({{%relref "shortcodes/panel/_index.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice/_index.md" %}}), [Expand]({{%relref "shortcodes/expand/_index.md" %}}), [List child pages]({{%relref "shortcodes/children/_index.md" %}}), \ + [Badges]({{%relref "shortcodes/badge/_index.md" %}}) {{% badge success%}}new{{% /badge %}} + * [Excerpt]({{%relref "shortcodes/excerpt/_index.md"%}}) ! Include segment of content from one page in another* [columns]({{%relref "shortcodes/columns/_index.md"%}}), [tabs]({{%relref "shortcodes/tabs/_index.md"%}}) ## Contribute to this documentation @@ -37,4 +38,4 @@ This current documentation has been statically generated with Hugo with a simple I author this current documentation via Netlify CMS.\ Docport theme seamless works with [Netlify CMS](https://www.netlifycms.org/) -Try the improve this page button on the right side of each page \ No newline at end of file +{{% badge %}}Help{{% /badge %}} Try the improve this page button on the right side of each page \ No newline at end of file diff --git a/exampleSite/content/shortcodes/badge/_index.md b/exampleSite/content/shortcodes/badge/_index.md new file mode 100644 index 0000000..20e8f7d --- /dev/null +++ b/exampleSite/content/shortcodes/badge/_index.md @@ -0,0 +1,41 @@ +--- +description: Disclaimers to help you structure your page +title: badge +--- + +{{% badge %}}primary _(default)_{{% /badge %}} +{{% badge warning %}}In progress{{% /badge %}} +{{% badge secondary %}}docport{{% /badge %}} +{{% badge success %}}beta{{% /badge %}} +{{% badge danger %}}danger{{% /badge %}} +{{% badge warning %}}warning{{% /badge %}} +{{% badge info %}}info{{% /badge %}} +{{% badge light %}}light{{% /badge %}} +{{% badge dark %}}dark{{% /badge %}} + +## Shortcode markup {{% badge warning %}}new{{% /badge %}} +``` + {{%/* badge %}}primary _(default)_{{% /badge %}} + {{% badge warning %}}In progress{{% /badge %}} + {{% badge secondary %}}docport{{% /badge %}} + {{% badge success %}}beta{{% /badge %}} + {{% badge danger %}}danger{{% /badge %}} + {{% badge warning %}}warning{{% /badge %}} + {{% badge info %}}info{{% /badge %}} + {{% badge light %}}light{{% /badge %}} + {{% badge dark %}}dark{{% /badge */%}} +``` + + + + + +## Usage +``` + {{%/*badge $style %}}Lorem ipsum{{%/badge*/%}} +``` + +| Parameter | Description | +|:--|:--| +| $style | type/color of badge | + diff --git a/exampleSite/resources/_gen/assets/scss/sass/main.scss_97a9b8e6852415b29a37632934745b8b.content b/exampleSite/resources/_gen/assets/scss/sass/main.scss_97a9b8e6852415b29a37632934745b8b.content index 08a4f05..fa46bc4 100644 --- a/exampleSite/resources/_gen/assets/scss/sass/main.scss_97a9b8e6852415b29a37632934745b8b.content +++ b/exampleSite/resources/_gen/assets/scss/sass/main.scss_97a9b8e6852415b29a37632934745b8b.content @@ -100,31 +100,32 @@ body:not(.render_raw) { article section.page { background-color: inherit; } - article section.page #breadcrumb { + article section.page #ariane { display: block; font-size: 1rem; line-height: 1.5; letter-spacing: -.01em; font-weight: 500; } - article section.page #breadcrumb ol { + article section.page #ariane ol { + margin-top: 1em !important; padding: 0px; display: flex; flex-wrap: wrap; list-style: none; } - article section.page #breadcrumb ol li { + article section.page #ariane ol li { display: list-item; } - article section.page #breadcrumb ol li:after { + article section.page #ariane ol li:after { display: inline-block; padding-right: .5rem; padding-left: .5rem; color: black; content: "⊸"; } - article section.page #breadcrumb ol li a { + article section.page #ariane ol li a { color: black; border-bottom: 1px dotted #737373; padding-bottom: 4px; padding-right: 0px; } - article section.page #breadcrumb ol li.active:after { + article section.page #ariane ol li.active:after { display: inline-block; padding-left: .75rem; content: ""; } @@ -235,12 +236,14 @@ article section.page div.content { text-decoration: underline; } article section.page div.content h1 { color: #4d4d4d; - font-size: 30px; font-variant-ligatures: none; - font-weight: 700; - height: 88px; + font-weight: 800; letter-spacing: -0.75px; line-height: 32px; } + article section.page div.content h2 { + margin-top: 0.5em; + font-weight: 700; + letter-spacing: -0.95px; } article section.page div.content table { width: 100%; margin-bottom: 2em; @@ -285,17 +288,10 @@ article section.page div.content { article section.page div.content img.inline { display: inline !important; vertical-align: bottom; } - article section.page div.content code { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; - font-size: 85%; - color: #e83e8c; - word-wrap: break-word; - padding: 0.5px; - font-weight: 600; - white-space: pre-wrap; } article section.page div.content div.highlight pre { display: block; - white-space: pre-wrap; } + white-space: pre-wrap; + overflow: inherit !important; } article section.page div.content div.highlight pre code { color: inherit !important; font-size: 75%; diff --git a/exampleSite/resources/_gen/assets/scss/sass/shortcodes/columns.scss_f300667da4f5b5f84e1a9e0702b2fdde.content b/exampleSite/resources/_gen/assets/scss/sass/shortcodes/columns.scss_f300667da4f5b5f84e1a9e0702b2fdde.content index fa08e31..98fb8b5 100644 --- a/exampleSite/resources/_gen/assets/scss/sass/shortcodes/columns.scss_f300667da4f5b5f84e1a9e0702b2fdde.content +++ b/exampleSite/resources/_gen/assets/scss/sass/shortcodes/columns.scss_f300667da4f5b5f84e1a9e0702b2fdde.content @@ -3,8 +3,8 @@ div.columns { display: flex; } div.columns div.column { flex: 1 1; - padding: 0 1em; } + margin: 0 1em; } div.columns :first-child { - padding-left: 0px !important; } + margin-left: 0px !important; } div.columns :last-child { - padding-right: 0px !important; } + margin-right: 0px !important; } diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html index 14d911d..0eedee2 100644 --- a/layouts/partials/body-article-content.html +++ b/layouts/partials/body-article-content.html @@ -1,8 +1,8 @@ {{if not (in .Params.hide "breadcrumb")}} -