Skip to content

Commit 6ba9b64

Browse files
committed
Fix heading structure (always begin with a h1)
1 parent a340a1d commit 6ba9b64

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

customizing-components.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## How do I customize components?
1+
# How do I customize components?
22

33
The ZASAF follows the Convention over Configuration principle: You should write components that come with good defaults.
44
If you want to deviate from the default there are two options:
@@ -9,7 +9,7 @@ If you want to deviate from the default there are two options:
99
Each of those options come with its own pros and cons, so choose carefully.
1010
Translate your rule into a human-understandable sentence – is this what you want to declare?
1111

12-
### Example
12+
## Example
1313

1414
``` haml
1515
.product-page
@@ -27,7 +27,7 @@ Translate your rule into a human-understandable sentence – is this what you wa
2727
So we start with a basic `.teaser` component in the sidebar of the `.product-page`.
2828
Now we look at the PSD or HTML or whatever the designer gave us and observe that this teaser should be more grayish than normal.
2929

30-
#### Option 1: Add a modifier
30+
### Option 1: Add a modifier
3131

3232
``` sass
3333
.teaser
@@ -65,7 +65,7 @@ Examples:
6565
6666
```
6767

68-
#### Option 2: Location-based customization
68+
### Option 2: Location-based customization
6969

7070
Now you are saying: "This particular teaser should be unobtrusive."
7171

haml-style-guide.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## HAML best practices
1+
# HAML Styleguide
22

33
Because of the importance indentation has on how your code is rendered, the indents should be consistent throughout the document. Any differences in indentation will throw an error. It's common-practice to use two spaces.
44

5-
### How to use HTML elements
5+
## How to use HTML elements
66

77
To write your tags, use the percent sign followed by the name of the tag
88

@@ -30,7 +30,7 @@ If you want to add multiple classes, simply chain them:
3030
.container.large.unobtrusive
3131
```
3232

33-
### How to use comments
33+
## How to use comments
3434

3535
There’re three different styles to write comments in Haml.
3636

@@ -56,11 +56,11 @@ There’re three different styles to write comments in Haml.
5656

5757
**Note:** Single and multiline comments will be redenred into the document. Therefore we commonly choose the third option because usually comments are meant for developers only.
5858

59-
### Use blocks
59+
## Use blocks
6060

6161
HAML isn’t Ruby, but it still incorporates some convenient elements of it, and there’s no better example of that than the block syntax.
6262

63-
#### Morph code into block format with `precede`, `succeed` and `surround`
63+
### Morph code into block format with `precede`, `succeed` and `surround`
6464

6565
**Example:**
6666

@@ -93,7 +93,7 @@ Using inline HTML and `content_tag`
9393

9494
This isn’t terrible, but the above blocks are much more readable!
9595

96-
#### Use `link_to` as a block
96+
### Use `link_to` as a block
9797

9898
When wrapping long or multiple elements in a link tag, It’s wise to use `link_to` in block format.
9999

@@ -125,7 +125,7 @@ Rails routing is best used with its built-in helper methods, where objects can b
125125
%a{href: users_path(@user)} View User Profile
126126
```
127127

128-
#### Use `list_of`
128+
### Use `list_of`
129129

130130
A lesser known – and thus, lesser used – feature of HAML is `list_of`.
131131
This method generates * elements for you as you iterate over a list of items.
@@ -158,7 +158,7 @@ Whitespace abuse. Every time you use `list_of`, you’ve saved one indentation.
158158
= link_to student.name, [course, student]
159159
```
160160

161-
### Use filters
161+
## Use filters
162162

163163
Use the colon to define [Haml filters](http://haml.info/docs/yardoc/file.REFERENCE.html#filters). This allows you to pass an indented block of text as input to another filtering program and add the result to the output of Haml.
164164

@@ -176,7 +176,7 @@ Use the colon to define [Haml filters](http://haml.info/docs/yardoc/file.REFEREN
176176
console.log('This is inline script');
177177
```
178178

179-
### Use curly braces
179+
## Use curly braces
180180

181181
The name of the game here is readability and a big part of readability is DRY.
182182

@@ -206,7 +206,7 @@ Note that you can also pass in hashes directly into the data attribute, and it w
206206
.profile(data-name='Popeye' data-favorite-food='Spinach') Loading
207207
```
208208

209-
### Use alternative expression methods
209+
## Use alternative expression methods
210210

211211
At this point, you know exactly what `-` and `=` do in your HAML views, but what about the other fun Ruby expression outputting methods? These alternative outputting methods have got to be some of the most underused features of HAML, yet is one of the most useful, especially for internal communication.
212212

@@ -256,6 +256,6 @@ When you don’t know about interpolated Ruby code, you’re bound to pull this
256256

257257
Don’t bother with these strings – just cut right into the interpolated input expressed above and save characters and eye strain.
258258

259-
### HAML Cheat-Sheet
259+
## HAML Cheat-Sheet
260260

261261
* https://www.cheatography.com/specialbrand/cheat-sheets/haml/

0 commit comments

Comments
 (0)