Skip to content

Commit 60ead9c

Browse files
authored
Merge pull request #84 from poofichu/css-content
Add class names to Content types
2 parents 25a8745 + 762224f commit 60ead9c

File tree

8 files changed

+38
-32
lines changed

8 files changed

+38
-32
lines changed

src/sass/partials/base/_content.scss

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body {
88
margin: 0;
99
}
1010

11-
.wrapper {
11+
._content {
1212

1313
margin: 0 auto;
1414
margin-bottom: -50px;
@@ -22,20 +22,13 @@ body {
2222
height: 75px;
2323
}
2424

25-
.punchcard-logomark {
26-
display: block;
27-
margin: 0 auto;
28-
margin-top: 75px;
29-
width: 250px;
30-
}
31-
3225
}
3326

34-
.base--a {
35-
color: color('teal', 60);
36-
text-decoration: none;
3727

38-
&:hover {
39-
text-decoration: underline;
40-
}
28+
.content--logomark {
29+
display: block;
30+
margin: 0 auto;
31+
margin-top: 75px;
32+
width: 250px;
4133
}
34+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.base--a {
2+
color: color('teal', 60);
3+
text-decoration: none;
4+
5+
&:hover {
6+
text-decoration: underline;
7+
}
8+
}
9+
10+
.base--ul {
11+
list-style-type: none;
12+
padding: 1em;
13+
}

views/_donut.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% include "_header.html" %}
1212
{% endblock %}
1313

14-
<main class="wrapper">
14+
<main class="_content">
1515
{% block main %}
1616
<div><h1>Original MAIN</h1></div>
1717
{% endblock %}

views/content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% endblock %}
88

99
{% block main %}
10-
<h1>{{title}}</h1>
11-
<div>{{description}}</div>
10+
<h1 class="base--h1">{{title}}</h1>
11+
<div class="content--description">{{description}}</div>
1212
{% endblock %}
1313

views/content/add.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{% endblock %}
1010

1111
{% block main %}
12-
<h1>{{type.name}}</h1>
13-
<p>{{type.description}}</p>
12+
<h1 class="base--h1">{{type.name}}</h1>
13+
<p class="base--p">{{type.description}}</p>
1414
{% include "content/form.html" %}
1515
{% endblock %}
1616

views/content/form.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
{{form.html | safe}}
44

5-
<fieldset id="sunrise-sunset">
6-
<legend>Select Sunrise and Sunset</legend>
7-
<label for="sunrise-date"><input type="date" name="sunrise-date" id="sunrise-date" value="{{data['sunrise-date'].value}}"></label>
8-
<label for="sunrise-time"><input type="time" name="sunrise-time" id="sunrise-time" value="{{data['sunrise-time'].value}}"></label>
9-
<label for="sunset-date"><input type="date" name="sunset-date" id="sunset-date" value="{{data['sunset-date'].value}}"></label>
10-
<label for="sunset-time"><input type="time" name="sunset-time" id="sunset-time" value="{{data['sunset-time'].value}}"></label>
5+
<fieldset id="sunrise-sunset" class="base--FORM">
6+
<legend class="base--legend">Select Sunrise and Sunset</legend>
7+
<label for="sunrise-date" class="base--label"><input type="date" name="sunrise-date" id="sunrise-date" value="{{data['sunrise-date'].value}}" class="base--date-input"></label>
8+
<label for="sunrise-time" class="base--label"><input type="time" name="sunrise-time" id="sunrise-time" value="{{data['sunrise-time'].value}}" class="base--time-input"></label>
9+
<label for="sunset-date" class="base--label"><input type="date" name="sunset-date" id="sunset-date" value="{{data['sunset-date'].value}}" class="base--date-input"></label>
10+
<label for="sunset-time" class="base--label"><input type="time" name="sunset-time" id="sunset-time" value="{{data['sunset-time'].value}}" class="base--time-input"></label>
1111
</fieldset>
1212

13-
<button type="submit">Submit</button>
14-
<button type="cancel">Cancel</button>
13+
<button type="submit" class="base--button">Submit</button>
14+
<button type="cancel" class="base--button">Cancel</button>
1515
</form>

views/content/home.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
{% endblock %}
1111

1212
{% block main %}
13-
<h1 class="sub-title">{{content.home.title}}</h1>
14-
<ul class="base--STYLED">
13+
<h1 class="base--h1">{{content.home.title}}</h1>
14+
<ul class="base--ul">
1515
{% for type in content.types %}
16-
<li><a href="/{{content.base}}/{{type.id}}" class="base--a">{{type.name}}</a></li>
16+
<li class="base--li"><a href="/{{content.base}}/{{type.id}}" class="base--a">{{type.name}}</a></li>
1717
{% endfor %}
1818
</ul>
1919
{% endblock %}

views/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{% endblock %}
66

77
{% block main %}
8-
<h1>{{siteName}}</h1>
9-
<img src="/images/punchcard-image.svg" alt="punchcard-logomark" class="punchcard-logomark">
8+
<h1 class="content--title">{{siteName}}</h1>
9+
<img src="/images/punchcard-image.svg" alt="punchcard-logomark" class="content--logomark">
1010
{% endblock %}
1111

1212
{% block footer %}

0 commit comments

Comments
 (0)