Skip to content

Commit 1eabffc

Browse files
committed
Button in center and under pointy point
Also move body css to global.scss
1 parent c22aae1 commit 1eabffc

File tree

3 files changed

+44
-38
lines changed

3 files changed

+44
-38
lines changed

app/assets/stylesheets/global.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ $DJSdark-text: darkslategrey;
1515
//background-color: $DJSwhite;
1616
}
1717

18+
body {
19+
//margin: 1vw 3vw; // side margin just enough for good scroll bar on xs screens
20+
margin: 0;
21+
color: $DJSdark-text;
22+
font-size: large;
23+
background-color: $DJSwhite;
24+
font-family: 'Catamaran', sans-serif;
25+
font-weight: 200;
26+
max-width: max-content;
27+
}
1828

1929
a {
2030
text-decoration: none;

app/assets/stylesheets/home.scss

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
body {
2-
//margin: 1vw 3vw; // side margin just enough for good scroll bar on xs screens
3-
margin: 1em 0;
4-
color: $DJSdark-text;
5-
font-size: large;
6-
background-color: $DJSwhite;
7-
font-family: 'Catamaran', sans-serif;
8-
font-weight: 200;
9-
}
101

112
//// HERO things
123
//copied from https://wweb.dev/resources/css-separator-generator
134
.triangle {
145
position: relative;
156
background: $DJSbackground_grey;
16-
min-height: calc(50vh + 20px);
7+
min-height: max-content;
8+
padding-bottom: 80px;
179
}
1810

1911
.triangle::before {
@@ -44,13 +36,14 @@ body {
4436

4537
.hero-over-title {
4638
text-transform: uppercase;
47-
padding-bottom: 1rem;
39+
padding-bottom: 1.4rem;
4840
}
4941

5042
.hero-payoff {
5143
padding-top: 2rem;
5244
letter-spacing: initial;
5345
color: lighten($DJSlavender, 10%);
46+
padding-bottom: 2rem;
5447
}
5548

5649
hr.separator-line {
@@ -65,18 +58,23 @@ hr.separator-line {
6558
// cards (grid) -> card (flex) -> card Content (See below)
6659

6760
.text-container {
68-
max-width: 90%;
69-
margin: 15vh auto;
70-
//margin: auto;
61+
margin: 35px 3vw 0 3vw;
7162
}
7263

7364
.intro {
7465
//padding: 0 19vw 15vh 20vw;
7566
font-size: larger;
76-
padding-bottom: 7vh;
67+
//padding-top: 4vh;
68+
padding-bottom: 30px;
7769
max-width: 45ch;
70+
margin-top: 30px;
7871
margin-left: auto;
79-
margin-right: auto;
72+
margin-right: auto; // this auto margins is needed to center the text block...
73+
//text-align: center; // ... and this is needed to center the button (See below)
74+
}
75+
76+
.intro-with-button-centered {
77+
text-align: center
8078
}
8179

8280
.cards {
@@ -85,7 +83,7 @@ hr.separator-line {
8583
grid-gap: 1rem;
8684
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
8785
// ^ make it responsive without mediaqueries:
88-
margin-bottom: 7vh;
86+
margin-bottom: 3vh;
8987
}
9088

9189
.card {
@@ -131,35 +129,33 @@ hr.separator-line {
131129
padding: 1em;
132130
}
133131

134-
//styling elements
135-
136-
ul {
137-
list-style: outside "\2043"+" ";
138-
}
139-
140-
.accented {
141-
color: $DJSsunshine;
142-
}
143-
144-
$w: 33vw;
145-
$h: 8vh;
132+
//button
146133

147134
.btn-enroll {
148-
width: $w;
149-
height: $h;
135+
border: none;
136+
border-radius: 10%;
150137
background-color: $DJSsunshine;
151-
border-radius: .5*$h;
152-
//display:inline-block;
138+
color: $DJSwhite;
139+
140+
display: inline-block;
141+
font-size: 2rem;
142+
margin: 60px auto 0 auto;
143+
padding: 14px 30px;
153144
cursor: pointer;
154-
color: whitesmoke;
155-
font-size: 1.5em;
156-
text-decoration: none;
157145

158146
&:hover {
159-
// do something
147+
background-color: darken($DJSsunshine, 10%);;
160148
}
161149
}
162150

151+
//styling
152+
153+
ul {
154+
list-style: outside "\2043"+" ";
155+
}
163156

157+
.accented {
158+
color: $DJSsunshine;
159+
}
164160

165161

app/views/pages/home.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
</section>
114114

115115
<section class="text-container">
116-
<div class="intro">
116+
<div class="intro intro-with-button-centered">
117117
<%=button_tag "Enroll", class: 'btn-enroll' %>
118118
</div>
119119
<div class="intro">

0 commit comments

Comments
 (0)