Skip to content

Commit 8b8352c

Browse files
committed
refactor: update tabs id generator to prevent unnecessary diffs
1 parent b883354 commit 8b8352c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+604
-1109
lines changed

src/pug/_layout/default.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- var static = true
1+
- var count = 1000
22
doctype html
33
include ../_partials/banner.pug
44
include ../_mixins/breadcrumb.pug

src/pug/_mixins/example.pug

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
mixin example(url)
2-
- var id = Math.floor(Math.random() * (15 - 1300) + 1300)
3-
2+
43
.example
54
ul.nav.nav-tabs(role="tablist")
65
li.nav-item
7-
a.nav-link.active(data-coreui-toggle="tab" href="#preview-"+id role="tab")
6+
a.nav-link.active(data-coreui-toggle="tab" href="#preview-"+count role="tab")
87
svg.icon.me-2
98
use(xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-media-play")
109
|
@@ -17,5 +16,5 @@ mixin example(url)
1716
|
1817
| Code
1918
.tab-content.rounded-bottom
20-
.tab-pane.p-3.active.preview(role="tabpanel" id="preview-"+id )
19+
.tab-pane.p-3.active.preview(role="tabpanel" id="preview-"+count++ )
2120
block

src/views/404.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,7 @@
4040
<!-- Main styles for this application-->
4141
<link href="css/style.css" rel="stylesheet">
4242
<!-- We use those styles to show code examples, you should remove them in your application.-->
43-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
4443
<link href="css/examples.css" rel="stylesheet">
45-
<!-- Global site tag (gtag.js) - Google Analytics-->
46-
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-118965717-3"></script>
47-
<script>
48-
window.dataLayer = window.dataLayer || [];
49-
function gtag(){dataLayer.push(arguments);}
50-
gtag('js', new Date());
51-
// Shared ID
52-
gtag('config', 'UA-118965717-3');
53-
// Bootstrap ID
54-
gtag('config', 'UA-118965717-5');
55-
</script>
5644
</head>
5745
<body>
5846
<div class="bg-light min-vh-100 d-flex flex-row align-items-center">

src/views/500.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,7 @@
4040
<!-- Main styles for this application-->
4141
<link href="css/style.css" rel="stylesheet">
4242
<!-- We use those styles to show code examples, you should remove them in your application.-->
43-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
4443
<link href="css/examples.css" rel="stylesheet">
45-
<!-- Global site tag (gtag.js) - Google Analytics-->
46-
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-118965717-3"></script>
47-
<script>
48-
window.dataLayer = window.dataLayer || [];
49-
function gtag(){dataLayer.push(arguments);}
50-
gtag('js', new Date());
51-
// Shared ID
52-
gtag('config', 'UA-118965717-3');
53-
// Bootstrap ID
54-
gtag('config', 'UA-118965717-5');
55-
</script>
5644
</head>
5745
<body>
5846
<div class="bg-light min-vh-100 d-flex flex-row align-items-center">

src/views/base/accordion.html

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,7 @@
4141
<!-- Main styles for this application-->
4242
<link href="css/style.css" rel="stylesheet">
4343
<!-- We use those styles to show code examples, you should remove them in your application.-->
44-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
4544
<link href="css/examples.css" rel="stylesheet">
46-
<!-- Global site tag (gtag.js) - Google Analytics-->
47-
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-118965717-3"></script>
48-
<script>
49-
window.dataLayer = window.dataLayer || [];
50-
function gtag(){dataLayer.push(arguments);}
51-
gtag('js', new Date());
52-
// Shared ID
53-
gtag('config', 'UA-118965717-3');
54-
// Bootstrap ID
55-
gtag('config', 'UA-118965717-5');
56-
</script>
5745
<link rel="canonical" href="https://coreui.io/docs/components/accordion/">
5846
</head>
5947
<body>
@@ -297,7 +285,7 @@
297285
<p class="text-medium-emphasis small">Click the accordions below to expand/collapse the accordion content.</p>
298286
<div class="example">
299287
<ul class="nav nav-tabs" role="tablist">
300-
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-734" role="tab">
288+
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-22" role="tab">
301289
<svg class="icon me-2">
302290
<use xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-media-play"></use>
303291
</svg>Preview</a></li>
@@ -307,7 +295,7 @@
307295
</svg>Code</a></li>
308296
</ul>
309297
<div class="tab-content rounded-bottom">
310-
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-734">
298+
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-22">
311299
<div class="accordion" id="accordionExample">
312300
<div class="accordion-item">
313301
<h2 class="accordion-header" id="headingOne">
@@ -347,7 +335,7 @@ <h2 class="accordion-header" id="headingThree">
347335
<p class="text-medium-emphasis small">Add <code>.accordion-flush</code> to remove the default <code>background-color</code>, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.</p>
348336
<div class="example">
349337
<ul class="nav nav-tabs" role="tablist">
350-
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-639" role="tab">
338+
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-217" role="tab">
351339
<svg class="icon me-2">
352340
<use xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-media-play"></use>
353341
</svg>Preview</a></li>
@@ -357,7 +345,7 @@ <h2 class="accordion-header" id="headingThree">
357345
</svg>Code</a></li>
358346
</ul>
359347
<div class="tab-content rounded-bottom">
360-
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-639">
348+
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-217">
361349
<div class="accordion accordion-flush" id="accordionFlushExample">
362350
<div class="accordion-item">
363351
<h2 class="accordion-header" id="flush-headingOne">

src/views/base/breadcrumb.html

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,7 @@
4141
<!-- Main styles for this application-->
4242
<link href="css/style.css" rel="stylesheet">
4343
<!-- We use those styles to show code examples, you should remove them in your application.-->
44-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
4544
<link href="css/examples.css" rel="stylesheet">
46-
<!-- Global site tag (gtag.js) - Google Analytics-->
47-
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-118965717-3"></script>
48-
<script>
49-
window.dataLayer = window.dataLayer || [];
50-
function gtag(){dataLayer.push(arguments);}
51-
gtag('js', new Date());
52-
// Shared ID
53-
gtag('config', 'UA-118965717-3');
54-
// Bootstrap ID
55-
gtag('config', 'UA-118965717-5');
56-
</script>
5745
<link rel="canonical" href="https://coreui.io/docs/components/breadcrumb/">
5846
</head>
5947
<body>
@@ -297,7 +285,7 @@
297285
<p class="text-medium-emphasis small">The breadcrumb navigation provides links back to each previous page the user navigated through and shows the current ___location in a website or an application. You don’t have to add separators, because they automatically added in CSS through <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::before"> <code>::before</code></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/content"> <code>content</code></a>.</p>
298286
<div class="example">
299287
<ul class="nav nav-tabs" role="tablist">
300-
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-1001" role="tab">
288+
<li class="nav-item"><a class="nav-link active" data-coreui-toggle="tab" href="#preview-283" role="tab">
301289
<svg class="icon me-2">
302290
<use xlink:href="node_modules/@coreui/icons/sprites/free.svg#cil-media-play"></use>
303291
</svg>Preview</a></li>
@@ -307,7 +295,7 @@
307295
</svg>Code</a></li>
308296
</ul>
309297
<div class="tab-content rounded-bottom">
310-
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-1001">
298+
<div class="tab-pane p-3 active preview" role="tabpanel" id="preview-283">
311299
<nav aria-label="breadcrumb" role="navigation">
312300
<ol class="breadcrumb">
313301
<li class="breadcrumb-item active" aria-current="page">Home</li>

0 commit comments

Comments
 (0)