Skip to content

Commit bce41a4

Browse files
committed
Update homepage with rules
1 parent be293d1 commit bce41a4

File tree

2 files changed

+105
-11
lines changed

2 files changed

+105
-11
lines changed

app/assets/stylesheets/application.css

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,73 @@ body {
1616
}
1717

1818
body.login {
19+
color: #333;
20+
margin: 150px auto;
21+
min-height: 100vh;
1922
display: flex;
20-
justify-content: center;
23+
flex-direction: column;
2124
align-items: center;
22-
height: 100vh;
23-
margin: 0;
25+
justify-content: flex-start;
26+
max-width: 800px;
27+
}
28+
29+
.how-to-play-container, .intro-text {
30+
margin: 40px auto 32px auto;
31+
width: 100%;
32+
text-align: center;
33+
}
34+
35+
.how-to-play-container {
36+
min-height: 400px;
37+
}
38+
39+
.login-bottom-row {
40+
display: flex;
41+
flex-direction: row;
42+
justify-content: center;
43+
align-items: flex-start;
44+
gap: 32px;
45+
margin-bottom: 40px;
46+
}
47+
48+
.login-box {
49+
min-width: 260px;
50+
max-width: 340px;
51+
flex: 1 1 0;
2452
}
53+
2554
.container {
2655
text-align: center;
2756
padding: 20px;
2857
border: 2px solid #FFD633;
2958
border-radius: 5px;
3059
max-width: 400px;
60+
min-height: 170px;
61+
}
62+
63+
.game-details {
64+
margin-top: 24px;
65+
text-align: left;
66+
}
67+
68+
.game-details h3 {
69+
margin-bottom: 12px;
70+
font-size: 1.2rem;
71+
}
72+
73+
.game-details ul {
74+
margin: 0 0 16px;
75+
padding-left: 20px;
76+
list-style: disc;
77+
}
78+
79+
.game-details a {
80+
color: #FF8C00;
81+
font-weight: 600;
82+
}
83+
84+
.game-details a:hover {
85+
text-decoration: underline;
3186
}
3287

3388
.logout-container {
@@ -114,8 +169,8 @@ th {
114169
/* full screen overlay */
115170
.modal-overlay {
116171
position: fixed;
117-
top: 0;
118-
left: 0;
172+
top: 0;
173+
left: 0;
119174
width: 100vw;
120175
height: 100vh;
121176
background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black */
@@ -166,4 +221,3 @@ input.error, textarea.error {
166221
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
167222
}
168223

169-

app/views/puzzles/login.html.erb

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,51 @@
11
<% @title = "Ruby or Rails Login" %>
22

33
<body class="login">
4-
<div class="container">
5-
<h2>Log In</h2>
6-
<div>
7-
<p>Log in to access the Ruby or Rails admin panel.</p>
8-
<a href="/auth/google_oauth2" class="btn">Login with Google</a>
4+
<h1>It is Ruby or Rails Discord Puzzle</h1>
5+
6+
<div class="intro-text">
7+
<p><strong>Have you ever wondered whether something is Ruby or Rails? We have. A lot.</strong></p>
8+
<p>
9+
<strong>Is It Ruby or Rails?</strong> is a game to test your Ruby knowledge brought to you by FastRuby.io.
10+
</p>
11+
</div>
12+
13+
<div class="how-to-play-container">
14+
<div class="game-details">
15+
<h3>How to Play</h3>
16+
<p>
17+
Every day, a new puzzle is sent to a defined channel, and members get to answer the "Ruby or Rails?" question. At the end of each week, we'll share a leaderboard so you know who's the Ruby master of the week!
18+
</p>
19+
<p>Each puzzle shows a Ruby-related code snippet or method.</p>
20+
<p>Decide whether it comes from core Ruby or from Rails.</p>
21+
<p>Review the explanation to sharpen your understanding and share the fun.</p>
22+
</div>
23+
</div>
24+
25+
<div class="login-bottom-row">
26+
<div class="container login-box">
27+
<h2>Log In</h2>
28+
<div>
29+
<p>Log in to access the Ruby or Rails admin panel.</p>
30+
<a href="/auth/google_oauth2" class="btn">Login with Google</a>
31+
</div>
32+
</div>
33+
<div class="container login-box">
34+
<h2>About</h2>
35+
<div>
36+
<p>
37+
Created by us at <a href="https://www.fastruby.io" target="_blank" rel="noopener noreferrer">FastRuby.io</a>
38+
</p>
39+
</div>
40+
</div>
41+
<div class="container login-box">
42+
<h2>Source</h2>
43+
<div>
44+
<p>
45+
Explore the source on
46+
<a href="https://github.com/fastruby/ruby_or_rails" target="_blank" rel="noopener noreferrer">GitHub</a>.
47+
</p>
48+
</div>
949
</div>
1050
</div>
1151
</body>

0 commit comments

Comments
 (0)