compostrap 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1939,15 +1939,14 @@ button[data-vc-week-day] {
1939
1939
  transition: none;
1940
1940
  }
1941
1941
  }
1942
- @supports (-webkit-touch-callout: none) {
1943
- .lightbox-open {
1944
- overflow: hidden;
1945
- }
1942
+ html.lightbox-open {
1943
+ overflow: hidden;
1946
1944
  }
1945
+
1947
1946
  .lightbox {
1948
1947
  overscroll-behavior: contain;
1949
- width: 100vw;
1950
- max-width: 100vw;
1948
+ width: 100%;
1949
+ max-width: 100%;
1951
1950
  height: 100dvh;
1952
1951
  max-height: 100dvh;
1953
1952
  padding: 0;
@@ -4625,7 +4624,7 @@ body {
4625
4624
  z-index: 1080;
4626
4625
  min-width: 12rem;
4627
4626
  max-height: calc(100vh - 1rem);
4628
- padding: 0.5rem 0;
4627
+ padding: 0.5rem 0.5rem;
4629
4628
  overflow-y: auto;
4630
4629
  margin: 0;
4631
4630
  font-size: 0.875rem;
@@ -4641,7 +4640,7 @@ body {
4641
4640
  }
4642
4641
 
4643
4642
  .sidebar-compact-menu-header {
4644
- padding: 0.5rem 1rem;
4643
+ padding: 0.5rem 0.5rem;
4645
4644
  margin: 0;
4646
4645
  font-size: 0.765625rem;
4647
4646
  color: var(--bs-secondary-color);
@@ -4650,10 +4649,11 @@ body {
4650
4649
 
4651
4650
  .sidebar-compact-menu-item {
4652
4651
  display: block;
4653
- padding: 0.25rem 1rem;
4652
+ padding: 0.25rem 0.5rem;
4654
4653
  color: var(--bs-body-color);
4655
4654
  white-space: nowrap;
4656
4655
  text-decoration: none;
4656
+ border-radius: var(--bs-border-radius);
4657
4657
  }
4658
4658
  .sidebar-compact-menu-item:hover, .sidebar-compact-menu-item:focus {
4659
4659
  color: var(--bs-body-color);
@@ -1,12 +1,11 @@
1
- @supports (-webkit-touch-callout: none) {
2
- .lightbox-open {
3
- overflow: hidden;
4
- }
1
+ html.lightbox-open {
2
+ overflow: hidden;
5
3
  }
4
+
6
5
  .lightbox {
7
6
  overscroll-behavior: contain;
8
- width: 100vw;
9
- max-width: 100vw;
7
+ width: 100%;
8
+ max-width: 100%;
10
9
  height: 100dvh;
11
10
  max-height: 100dvh;
12
11
  padding: 0;
@@ -377,7 +377,7 @@
377
377
  z-index: 1080;
378
378
  min-width: 12rem;
379
379
  max-height: calc(100vh - 1rem);
380
- padding: 0.5rem 0;
380
+ padding: 0.5rem 0.5rem;
381
381
  overflow-y: auto;
382
382
  margin: 0;
383
383
  font-size: 0.875rem;
@@ -393,7 +393,7 @@
393
393
  }
394
394
 
395
395
  .sidebar-compact-menu-header {
396
- padding: 0.5rem 1rem;
396
+ padding: 0.5rem 0.5rem;
397
397
  margin: 0;
398
398
  font-size: 0.765625rem;
399
399
  color: var(--bs-secondary-color);
@@ -402,10 +402,11 @@
402
402
 
403
403
  .sidebar-compact-menu-item {
404
404
  display: block;
405
- padding: 0.25rem 1rem;
405
+ padding: 0.25rem 0.5rem;
406
406
  color: var(--bs-body-color);
407
407
  white-space: nowrap;
408
408
  text-decoration: none;
409
+ border-radius: var(--bs-border-radius);
409
410
  }
410
411
  .sidebar-compact-menu-item:hover, .sidebar-compact-menu-item:focus {
411
412
  color: var(--bs-body-color);
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
  /*!
3
- * Bootstrap v5.3.8 (https://getbootstrap.com/)
4
- * Copyright 2011-2025 The Bootstrap Authors
3
+ * Bootstrap v5.3.9 (https://getbootstrap.com/)
4
+ * Copyright 2011-2026 The Bootstrap Authors
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6
6
  */
7
7
  :root,
@@ -526,7 +526,7 @@ legend + * {
526
526
 
527
527
  ::-webkit-datetime-edit-fields-wrapper,
528
528
  ::-webkit-datetime-edit-text,
529
- ::-webkit-datetime-edit-minute,
529
+ ::-webkit-datetime-edit-minute-field,
530
530
  ::-webkit-datetime-edit-hour-field,
531
531
  ::-webkit-datetime-edit-day-field,
532
532
  ::-webkit-datetime-edit-month-field,
@@ -3334,7 +3334,7 @@ textarea.form-control-lg {
3334
3334
  .dropdown-menu {
3335
3335
  --bs-dropdown-zindex: 1000;
3336
3336
  --bs-dropdown-min-width: 10rem;
3337
- --bs-dropdown-padding-x: 0;
3337
+ --bs-dropdown-padding-x: 0.5rem;
3338
3338
  --bs-dropdown-padding-y: 0.5rem;
3339
3339
  --bs-dropdown-spacer: 0.125rem;
3340
3340
  --bs-dropdown-font-size: 0.875rem;
@@ -3353,10 +3353,10 @@ textarea.form-control-lg {
3353
3353
  --bs-dropdown-link-active-color: var(--bs-body-color);
3354
3354
  --bs-dropdown-link-active-bg: rgba(var(--bs-primary-rgb), 0.1);
3355
3355
  --bs-dropdown-link-disabled-color: var(--bs-tertiary-color);
3356
- --bs-dropdown-item-padding-x: 1rem;
3356
+ --bs-dropdown-item-padding-x: 0.5rem;
3357
3357
  --bs-dropdown-item-padding-y: 0.25rem;
3358
3358
  --bs-dropdown-header-color: #525252;
3359
- --bs-dropdown-header-padding-x: 1rem;
3359
+ --bs-dropdown-header-padding-x: 0.5rem;
3360
3360
  --bs-dropdown-header-padding-y: 0.5rem;
3361
3361
  position: absolute;
3362
3362
  z-index: var(--bs-dropdown-zindex);
@@ -5530,15 +5530,22 @@ textarea.form-control-lg {
5530
5530
  }
5531
5531
  @media (min-width: 992px) {
5532
5532
  .modal-lg,
5533
- .modal-xl {
5533
+ .modal-xl,
5534
+ .modal-xxl {
5534
5535
  --bs-modal-width: 800px;
5535
5536
  }
5536
5537
  }
5537
5538
  @media (min-width: 1200px) {
5538
- .modal-xl {
5539
+ .modal-xl,
5540
+ .modal-xxl {
5539
5541
  --bs-modal-width: 1140px;
5540
5542
  }
5541
5543
  }
5544
+ @media (min-width: 1400px) {
5545
+ .modal-xxl {
5546
+ --bs-modal-width: 1320px;
5547
+ }
5548
+ }
5542
5549
  .modal-fullscreen {
5543
5550
  width: 100vw;
5544
5551
  max-width: none;
@@ -6713,6 +6720,11 @@ textarea.form-control-lg {
6713
6720
  .placeholder-glow .placeholder {
6714
6721
  animation: placeholder-glow 2s ease-in-out infinite;
6715
6722
  }
6723
+ @media (prefers-reduced-motion: reduce) {
6724
+ .placeholder-glow .placeholder {
6725
+ animation: none;
6726
+ }
6727
+ }
6716
6728
 
6717
6729
  @keyframes placeholder-glow {
6718
6730
  50% {
@@ -6724,6 +6736,11 @@ textarea.form-control-lg {
6724
6736
  mask-size: 200% 100%;
6725
6737
  animation: placeholder-wave 2s linear infinite;
6726
6738
  }
6739
+ @media (prefers-reduced-motion: reduce) {
6740
+ .placeholder-wave {
6741
+ animation: none;
6742
+ }
6743
+ }
6727
6744
 
6728
6745
  @keyframes placeholder-wave {
6729
6746
  100% {
@@ -12961,13 +12978,25 @@ button.badge.badge-subtle.show {
12961
12978
  }
12962
12979
  }
12963
12980
  .dropdown-menu {
12981
+ --bs-dropdown-item-border-radius: var(--bs-border-radius);
12964
12982
  box-shadow: var(--bs-box-shadow-lg);
12965
12983
  }
12966
12984
 
12985
+ .dropdown-item + .dropdown-item,
12986
+ li + li > .dropdown-item {
12987
+ margin-top: 2px;
12988
+ }
12989
+
12990
+ .dropdown-divider {
12991
+ margin-right: calc(-1 * var(--bs-dropdown-padding-x));
12992
+ margin-left: calc(-1 * var(--bs-dropdown-padding-x));
12993
+ }
12994
+
12967
12995
  [data-bs-theme=dark] .dropdown-menu,
12968
12996
  .dropdown-menu[data-bs-theme=dark] {
12969
12997
  --bs-dropdown-bg: var(--bs-secondary-bg);
12970
12998
  --bs-dropdown-link-hover-bg: rgba(var(--bs-body-color-rgb), .08);
12999
+ --bs-dropdown-header-color: var(--bs-secondary-color);
12971
13000
  }
12972
13001
 
12973
13002
  [data-bs-theme=dark] .toast,
@@ -29,7 +29,15 @@ var e = {
29
29
  }
30
30
  static open(e) {
31
31
  let t = this._getDialog();
32
- this._setLabels(t), t.classList.toggle("lightbox-single", this._links.length < 2), this._show(e), t.open || (document.documentElement.classList.add("lightbox-open"), t.showModal());
32
+ if (this._setLabels(t), t.classList.toggle("lightbox-single", this._links.length < 2), this._show(e), !t.open) {
33
+ let e = document.documentElement, n = window.innerWidth - e.clientWidth;
34
+ if (n > 0) {
35
+ this._bodyPadding = document.body.style.paddingRight;
36
+ let e = parseFloat(getComputedStyle(document.body).paddingRight) || 0;
37
+ document.body.style.paddingRight = `${e + n}px`;
38
+ }
39
+ e.classList.add("lightbox-open"), t.showModal();
40
+ }
33
41
  }
34
42
  static close() {
35
43
  this._dialog?.close();
@@ -70,7 +78,7 @@ var e = {
70
78
  let t = e.changedTouches[0].clientX - n;
71
79
  n = null, Math.abs(t) > 50 && this._show(this._index + (t < 0 ? 1 : -1));
72
80
  }), e.addEventListener("close", () => {
73
- document.documentElement.classList.remove("lightbox-open"), e.querySelector(".lightbox-image").removeAttribute("src");
81
+ document.documentElement.classList.remove("lightbox-open"), this._bodyPadding !== void 0 && (document.body.style.paddingRight = this._bodyPadding, this._bodyPadding = void 0), e.querySelector(".lightbox-image").removeAttribute("src");
74
82
  }), document.body.append(e), this._dialog = e, e;
75
83
  }
76
84
  };
package/docs/blog.md CHANGED
@@ -1,85 +1,85 @@
1
- # Blog
2
-
3
- [← Compostrap](../readme.md#documentation)
4
-
5
- The module `blog` styles a website with a blog, outside the administration: a header with the links of the website, the list of articles with its categories, an article with its text and the comments under it. The page is white, the header and the footer are tinted bars and the boxes (cards of articles, comments, the comment form) are tinted instead of framed (`--blog-page-bg`, `--blog-tint-bg`, `--blog-tint-hover-bg`). The header holds a navbar of Bootstrap, so the links fold into a menu on a phone.
6
-
7
- ```html
8
- <body class="blog-page">
9
- <header class="blog-header">
10
- <nav class="navbar navbar-expand-lg">
11
- <div class="container">
12
- <a class="blog-brand" href="/">Logo <span>Name</span></a>
13
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#blog-menu" aria-controls="blog-menu" aria-expanded="false" aria-label="Menu"><span class="navbar-toggler-icon"></span></button>
14
- <div class="collapse navbar-collapse" id="blog-menu">
15
- <ul class="navbar-nav ms-auto"><li class="nav-item"><a class="nav-link active" href="/blog">Blog</a></li></ul>
16
- <div class="blog-header-actions"><a class="btn btn-primary btn-sm" href="/sign-in">Sign in</a></div>
17
- </div>
18
- </div>
19
- </nav>
20
- </header>
21
- <main class="container">…</main>
22
- <footer class="blog-footer">
23
- <div class="container">
24
- <div class="row g-4">
25
- <div class="col-lg-4">…</div>
26
- <div class="col-6 col-md-4 col-lg-2"><h2 class="blog-footer-title">Links</h2><ul class="blog-footer-links"><li><a href="/blog">Blog</a></li></ul></div>
27
- </div>
28
- </div>
29
- </footer>
30
- </body>
31
- ```
32
-
33
- **List of articles.**
34
-
35
- - `.blog-title` is the heading of a page; `.blog-heading` puts a link on its right.
36
- - `nav.blog-pills` holds the categories as links `.blog-pill`, the chosen one with `active`.
37
- - `article.blog-featured` is the newest article over the whole row: a picture in `.blog-featured-image` next to `.blog-featured-body`.
38
- - `article.blog-card` are the other articles, in a Bootstrap grid (`row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4`).
39
- - `.blog-card-title` holds the link of the whole block (`stretched-link`); other links in the block get `.blog-over`.
40
- - `.blog-meta` is a line of date, category and comments parted by dots.
41
- - `.blog-author` is an `avatar` of the theme with the name (`.blog-author-name`).
42
-
43
- ```html
44
- <article class="blog-card">
45
- <div class="blog-card-image"><img src="…" alt="" loading="lazy"></div>
46
- <div class="blog-meta"><time datetime="2026-11-05">5 days ago</time><a class="blog-over" href="/blog/latte">Latte</a></div>
47
- <h2 class="blog-card-title"><a class="stretched-link" href="/blog/article">Title</a></h2>
48
- <p class="blog-card-text">Perex, cut after three lines.</p>
49
- <div class="blog-card-footer">
50
- <div class="blog-author"><span class="avatar avatar-sm theme-success">PK</span><span>Petra Králová</span></div>
51
- <a class="blog-over" href="/blog/article#comments">Comments: 5</a>
52
- </div>
53
- </article>
54
- ```
55
-
56
- **Article.** `article.blog-article` is a narrow column (`--blog-article-width`, 48rem) with:
57
-
58
- - `.blog-back`, a link back,
59
- - `.blog-article-title` and the perex `.blog-article-lead`,
60
- - `.blog-meta.blog-article-meta` with the author, the date and the category,
61
- - `.blog-article-image`, the cover (a 21 : 9 cut),
62
- - `.blog-content`, the text: 16px text with more room between lines, headings, lists, pictures as wide cuts, a quote with a line of the primary color and code blocks on the tint. Links in the text are underlined (the theme draws links without a line, and a color alone does not tell a link from the text); so are the links in `.blog-comment-content`.
63
-
64
- A highlighted code is written with the text classes of Bootstrap; in a code block they take the colors of the code on nette.org, which can be changed by a variable (each as `r, g, b`):
65
-
66
- | Class | Part of the code | Variable |
67
- |-------|------------------|----------|
68
- | `text-primary` | keyword and tag | `--blog-code-keyword` |
69
- | `text-primary-emphasis` | name of a function or method | `--blog-code-function` |
70
- | `text-success` | string | `--blog-code-string` |
71
- | `text-danger` | number | `--blog-code-number` |
72
- | `text-warning-emphasis` | variable | `--blog-code-variable` |
73
- | `text-info-emphasis` | attribute | `--blog-code-attribute` |
74
- | `text-danger-emphasis` | Latte tag | `--blog-code-macro` |
75
- | `text-body-secondary` | comment | `--blog-code-comment` |
76
-
77
- The box of a code is `--blog-code-bg`.
78
-
79
- **Comments.** `section.blog-comments` with `.blog-comments-title`; a comment is `article.blog-comment` with:
80
-
81
- - `.blog-comment-head`: the avatar, `.blog-comment-author`, the link of its number and the time,
82
- - `.blog-comment-content`: the text of a comment, which holds only the message;
83
- - `.blog-meta.blog-comment-foot`: Reply and, in a comment that answers another one, the link to it as "In reply to".
84
-
85
- A comment opened by its link (`#comment-2`) is stronger and stays under the sticky header. The form of a new comment stands in `.blog-comment-form` with its title `.blog-comment-form-title` over the box.
1
+ # Blog
2
+
3
+ [← Compostrap](../readme.md#documentation)
4
+
5
+ The module `blog` styles a website with a blog, outside the administration: a header with the links of the website, the list of articles with its categories, an article with its text and the comments under it. The page is white, the header and the footer are tinted bars and the boxes (cards of articles, comments, the comment form) are tinted instead of framed (`--blog-page-bg`, `--blog-tint-bg`, `--blog-tint-hover-bg`). The header holds a navbar of Bootstrap, so the links fold into a menu on a phone.
6
+
7
+ ```html
8
+ <body class="blog-page">
9
+ <header class="blog-header">
10
+ <nav class="navbar navbar-expand-lg">
11
+ <div class="container">
12
+ <a class="blog-brand" href="/">Logo <span>Name</span></a>
13
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#blog-menu" aria-controls="blog-menu" aria-expanded="false" aria-label="Menu"><span class="navbar-toggler-icon"></span></button>
14
+ <div class="collapse navbar-collapse" id="blog-menu">
15
+ <ul class="navbar-nav ms-auto"><li class="nav-item"><a class="nav-link active" href="/blog">Blog</a></li></ul>
16
+ <div class="blog-header-actions"><a class="btn btn-primary btn-sm" href="/sign-in">Sign in</a></div>
17
+ </div>
18
+ </div>
19
+ </nav>
20
+ </header>
21
+ <main class="container">…</main>
22
+ <footer class="blog-footer">
23
+ <div class="container">
24
+ <div class="row g-4">
25
+ <div class="col-lg-4">…</div>
26
+ <div class="col-6 col-md-4 col-lg-2"><h2 class="blog-footer-title">Links</h2><ul class="blog-footer-links"><li><a href="/blog">Blog</a></li></ul></div>
27
+ </div>
28
+ </div>
29
+ </footer>
30
+ </body>
31
+ ```
32
+
33
+ **List of articles.**
34
+
35
+ - `.blog-title` is the heading of a page; `.blog-heading` puts a link on its right.
36
+ - `nav.blog-pills` holds the categories as links `.blog-pill`, the chosen one with `active`.
37
+ - `article.blog-featured` is the newest article over the whole row: a picture in `.blog-featured-image` next to `.blog-featured-body`.
38
+ - `article.blog-card` are the other articles, in a Bootstrap grid (`row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4`).
39
+ - `.blog-card-title` holds the link of the whole block (`stretched-link`); other links in the block get `.blog-over`.
40
+ - `.blog-meta` is a line of date, category and comments parted by dots.
41
+ - `.blog-author` is an `avatar` of the theme with the name (`.blog-author-name`).
42
+
43
+ ```html
44
+ <article class="blog-card">
45
+ <div class="blog-card-image"><img src="…" alt="" loading="lazy"></div>
46
+ <div class="blog-meta"><time datetime="2026-11-05">5 days ago</time><a class="blog-over" href="/blog/latte">Latte</a></div>
47
+ <h2 class="blog-card-title"><a class="stretched-link" href="/blog/article">Title</a></h2>
48
+ <p class="blog-card-text">Perex, cut after three lines.</p>
49
+ <div class="blog-card-footer">
50
+ <div class="blog-author"><span class="avatar avatar-sm theme-success">PK</span><span>Petra Králová</span></div>
51
+ <a class="blog-over" href="/blog/article#comments">Comments: 5</a>
52
+ </div>
53
+ </article>
54
+ ```
55
+
56
+ **Article.** `article.blog-article` is a narrow column (`--blog-article-width`, 48rem) with:
57
+
58
+ - `.blog-back`, a link back,
59
+ - `.blog-article-title` and the perex `.blog-article-lead`,
60
+ - `.blog-meta.blog-article-meta` with the author, the date and the category,
61
+ - `.blog-article-image`, the cover (a 21 : 9 cut),
62
+ - `.blog-content`, the text: 16px text with more room between lines, headings, lists, pictures as wide cuts, a quote with a line of the primary color and code blocks on the tint. Links in the text are underlined (the theme draws links without a line, and a color alone does not tell a link from the text); so are the links in `.blog-comment-content`.
63
+
64
+ A highlighted code is written with the text classes of Bootstrap; in a code block they take the colors of the code on nette.org, which can be changed by a variable (each as `r, g, b`):
65
+
66
+ | Class | Part of the code | Variable |
67
+ |-------|------------------|----------|
68
+ | `text-primary` | keyword and tag | `--blog-code-keyword` |
69
+ | `text-primary-emphasis` | name of a function or method | `--blog-code-function` |
70
+ | `text-success` | string | `--blog-code-string` |
71
+ | `text-danger` | number | `--blog-code-number` |
72
+ | `text-warning-emphasis` | variable | `--blog-code-variable` |
73
+ | `text-info-emphasis` | attribute | `--blog-code-attribute` |
74
+ | `text-danger-emphasis` | Latte tag | `--blog-code-macro` |
75
+ | `text-body-secondary` | comment | `--blog-code-comment` |
76
+
77
+ The box of a code is `--blog-code-bg`.
78
+
79
+ **Comments.** `section.blog-comments` with `.blog-comments-title`; a comment is `article.blog-comment` with:
80
+
81
+ - `.blog-comment-head`: the avatar, `.blog-comment-author`, the link of its number and the time,
82
+ - `.blog-comment-content`: the text of a comment, which holds only the message;
83
+ - `.blog-meta.blog-comment-foot`: Reply and, in a comment that answers another one, the link to it as "In reply to".
84
+
85
+ A comment opened by its link (`#comment-2`) is stronger and stays under the sticky header. The form of a new comment stands in `.blog-comment-form` with its title `.blog-comment-form-title` over the box.