Skip to content

Commit 4c04c48

Browse files
committed
Clean up sections with text only
1 parent b5dadbd commit 4c04c48

File tree

1 file changed

+60
-66
lines changed

1 file changed

+60
-66
lines changed
Lines changed: 60 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,95 @@
11
{{#let
22
@subsection.id
3-
(t (concat @sectionId "." @subsection.id ".title"))
4-
(t (concat @sectionId "." @subsection.id ".description") htmlSafe=true)
3+
(t (concat @sectionId '.' @subsection.id '.title'))
4+
(t (concat @sectionId '.' @subsection.id '.description') htmlSafe=true)
55
as |subsectionId subsectionTitle subsectionDescription|
66
}}
77
<section
8-
aria-labelledby="{{@sectionId}}__{{subsectionId}}"
8+
aria-labelledby='{{@sectionId}}__{{subsectionId}}'
99
data-test-subsection={{subsectionTitle}}
1010
>
11-
<div local-class="title-container">
11+
<div local-class='title-container'>
1212
<h3
13-
data-test-field="Subsection Title"
14-
id="{{@sectionId}}__{{subsectionId}}"
15-
local-class="title"
13+
data-test-field='Subsection Title'
14+
id='{{@sectionId}}__{{subsectionId}}'
15+
local-class='title'
1616
>
1717
{{subsectionTitle}}
1818
</h3>
1919

2020
<a
21-
href="#{{@sectionId}}__{{subsectionId}}"
22-
local-class="permalink"
21+
href='#{{@sectionId}}__{{subsectionId}}'
22+
local-class='permalink'
2323
title={{subsectionTitle}}
2424
>
25-
{{t "component.guide-section.section"}}
25+
{{t 'component.guide-section.section'}}
2626
</a>
2727
</div>
2828

29-
<p
30-
data-test-field="Subsection Description"
31-
local-class="description"
32-
>
29+
<p data-test-field='Subsection Description' local-class='description'>
3330
{{subsectionDescription}}
3431
</p>
3532

3633
<ContainerQuery
37-
@features={{hash
38-
wide=(width min=900)
39-
}}
40-
local-class="code-examples-container"
34+
@features={{hash wide=(width min=900)}}
35+
local-class='code-examples-container'
4136
>
42-
<div
43-
data-test-ember-classic
44-
local-class="ember-classic"
45-
>
46-
<h4 local-class="subtitle">
47-
{{t "component.guide-section.subsection.classic"}}
48-
</h4>
37+
{{#if @subsection.classicFiles.length}}
38+
<div data-test-ember-classic local-class='ember-classic'>
39+
<h4 local-class='subtitle'>
40+
{{t 'component.guide-section.subsection.classic'}}
41+
</h4>
4942

50-
{{#each @subsection.classicFiles as |file|}}
51-
<div local-class="code-snippet">
52-
<CodeSnippet
53-
@fileName="{{@sectionId}}/{{subsectionId}}/{{file}}"
54-
/>
55-
</div>
56-
{{/each}}
43+
{{#each @subsection.classicFiles as |file|}}
44+
<div local-class='code-snippet'>
45+
<CodeSnippet
46+
@fileName='{{@sectionId}}/{{subsectionId}}/{{file}}'
47+
/>
48+
</div>
49+
{{/each}}
5750

58-
{{#if @subsection.classicDescriptionKey}}
59-
<p data-test-general-text>
60-
{{t @subsection.classicDescriptionKey htmlSafe=true}}
61-
</p>
62-
{{/if}}
63-
</div>
51+
{{#if @subsection.classicDescriptionKey}}
52+
<p data-test-general-text>
53+
{{t @subsection.classicDescriptionKey htmlSafe=true}}
54+
</p>
55+
{{/if}}
56+
</div>
6457

65-
<div
66-
data-test-ember-octane
67-
local-class="ember-octane"
68-
>
69-
<h4 local-class="subtitle">
70-
{{t "component.guide-section.subsection.octane"}}
71-
</h4>
58+
{{/if}}
59+
60+
{{#if @subsection.octaneFiles.length}}
61+
<div data-test-ember-octane local-class='ember-octane'>
62+
<h4 local-class='subtitle'>
63+
{{t 'component.guide-section.subsection.octane'}}
64+
</h4>
7265

73-
{{#each @subsection.octaneFiles as |file|}}
74-
<div local-class="code-snippet">
75-
<CodeSnippet
76-
@fileName="{{@sectionId}}/{{subsectionId}}/{{file}}"
77-
/>
78-
</div>
79-
{{/each}}
66+
{{#each @subsection.octaneFiles as |file|}}
67+
<div local-class='code-snippet'>
68+
<CodeSnippet
69+
@fileName='{{@sectionId}}/{{subsectionId}}/{{file}}'
70+
/>
71+
</div>
72+
{{/each}}
8073

81-
{{#if @subsection.octaneDescriptionKey}}
82-
<p data-test-general-text>
83-
{{t @subsection.octaneDescriptionKey htmlSafe=true}}
84-
</p>
85-
{{/if}}
86-
</div>
74+
{{#if @subsection.octaneDescriptionKey}}
75+
<p data-test-general-text>
76+
{{t @subsection.octaneDescriptionKey htmlSafe=true}}
77+
</p>
78+
{{/if}}
79+
</div>
80+
{{/if}}
8781
</ContainerQuery>
8882

89-
<div local-class="edit-link-container">
83+
<div local-class='edit-link-container'>
9084
<a
91-
data-test-link="Edit Translation"
92-
href="https://github.com/ember-learn/ember-data-request-service-cheat-sheet/edit/main/translations/{{@sectionId}}/{{subsectionId}}/{{this.intl.locale}}.yaml"
93-
local-class="edit-link"
94-
rel="noopener noreferrer"
95-
target="_blank"
85+
data-test-link='Edit Translation'
86+
href='https://github.com/ember-learn/ember-data-request-service-cheat-sheet/edit/main/translations/{{@sectionId}}/{{subsectionId}}/{{this.intl.locale}}.yaml'
87+
local-class='edit-link'
88+
rel='noopener noreferrer'
89+
target='_blank'
9690
>
97-
{{t "component.guide-section.edit-translation-text"}}
91+
{{t 'component.guide-section.edit-translation-text'}}
9892
</a>
9993
</div>
10094
</section>
101-
{{/let}}
95+
{{/let}}

0 commit comments

Comments
 (0)