File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{% case section[0] %}
22 {% when "features" %}
3- {% assign colors = "bg-gradient-aquamarine-mauve text-white" %}
43 {% assign text = "Features" %}
54 {% when "bugs" %}
6- {% assign colors = "bg-gradient-red-orange text-white" %}
75 {% assign text = "Bug fixes" %}
86 {% when "known_issues" %}
9- {% assign colors = "bg-gradient-dark-mint text-white" %}
107 {% assign text = "Known issues" %}
118 {% when "security_fixes" %}
12- {% assign colors = "bg-gradient-coral-yellow text-white" %}
139 {% assign text = "Security fixes" %}
1410 {% when "changes" %}
15- {% assign colors = "bg-gradient-blue-purple text-white" %}
1611 {% assign text = "Changes" %}
1712 {% when "deprecations" %}
18- {% assign colors = "bg-gradient-mint-blue text-white" %}
1913 {% assign text = "Deprecations" %}
2014 {% else %}
21- {% assign colors = "bg-blue text-white" %}
2215 {% assign text = "INVALID SECTION" %}
2316{% endcase %}
2417
25- < span class ="{{ colors }} px-3 py-2 f5 text-uppercase text-mono "> {{ text }}</ span >
18+ < span class ="px-3 py-2 f5 text-uppercase text-mono text-white release-notes-section-label "> {{ text }}</ span >
Original file line number Diff line number Diff line change 1- {% case section[0] %}
2- {% when "features" %}
3- {% assign colors = "text-gradient-aquamarine-mauve" %}
4- {% when "bugs" %}
5- {% assign colors = "text-gradient-red-orange" %}
6- {% when "known_issues" %}
7- {% assign colors = "text-gradient-dark-mint" %}
8- {% when "security_fixes" %}
9- {% assign colors = "text-gradient-coral-yellow-dark" %}
10- {% when "changes" %}
11- {% assign colors = "text-gradient-blue-purple" %}
12- {% when "deprecations" %}
13- {% assign colors = "text-gradient-dark-mint" %}
14- {% else %}
15- {% assign colors = "text-gradient-aquamarine-mauve" %}
16- {% endcase %}
1+ {% assign slug = note.heading | slugify %}
172
18- < h4 class ="{{ colors }} text-uppercase text-bold "> {{ note.heading }}</ h4 >
3+ < h4 id ="{{ slug }} " class ="release-notes-section-heading text-uppercase text-bold ">
4+ < a href ="#{{ slug }} " class ="text-inherit "> {{ note.heading }}</ a >
5+ </ h4 >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ <h2 class="d-flex flex-items-center border-bottom-0 mr-3 mb-0">
6666 < p class ="mt-3 "> {{ patch.intro }}</ p >
6767
6868 {% for section in patch.sections %}
69- < div class ="py-6 d-block d-xl-flex flex-items-baseline {% unless forloop.last %}border-bottom{% endunless %} ">
69+ < div class ="release-notes-section-{{ section[0] }} py-6 d-block d-xl-flex flex-items-baseline {% unless forloop.last %}border-bottom{% endunless %} ">
7070 < div class ="mr-2 flex-shrink-0 mb-5 col-12 col-xl-3 ">
7171 {% include 'release-notes-category-label' %}
7272 </ div >
Original file line number Diff line number Diff line change 1+ const GithubSlugger = require ( 'github-slugger' )
12const renderContent = require ( './renderContent' )
23const { ExtendedMarkdown, tags } = require ( '../liquid-tags/extended-markdown' )
34
@@ -33,6 +34,13 @@ renderContent.liquid.registerFilters({
3334 */
3435 version_num : ( input ) => {
3536 return input . split ( '@' ) [ 1 ]
37+ } ,
38+ /**
39+ * Convert the input to a slug
40+ */
41+ slugify : ( input ) => {
42+ const slugger = new GithubSlugger ( )
43+ return slugger . slug ( input )
3644 }
3745} )
3846
Original file line number Diff line number Diff line change @@ -15,3 +15,23 @@ ul.release-notes-list li.release-notes-list-item {
1515details [open ].release-notes-version-picker summary .octicon.octicon-chevron-down {
1616 transform : rotate (180deg );
1717}
18+
19+ $colors-list :(
20+ features : #05a88b ,
21+ bugs : #ec8c1c ,
22+ known_issues : #4f6db3 ,
23+ security_fixes : #e53e72 ,
24+ changes : #69b378 ,
25+ deprecations : #9a62a3
26+ );
27+
28+ @each $key ,$val in $colors-list {
29+ .release-notes-section-#{$key } {
30+ .release-notes-section-label {
31+ background-color : #{$val } ;
32+ }
33+ .release-notes-section-heading {
34+ color : #{$val } ;
35+ }
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments