Browse Source

Add footer disclaimer

master
Dylan Baker 4 years ago
parent
commit
81a80815ec

+ 1
- 0
web/assets/style.scss View File

@@ -2,3 +2,4 @@
2 2
 @import './web/assets/styles/form.scss';
3 3
 @import './web/assets/styles/global.scss';
4 4
 @import './web/assets/styles/results.scss';
5
+@import './web/assets/styles/footer.scss';

+ 5
- 0
web/assets/styles/footer.scss View File

@@ -0,0 +1,5 @@
1
+.footer {
2
+  border-top: 1px solid black;
3
+  font-size: 12px;
4
+  margin: 20px 0;
5
+}

+ 1
- 1
web/assets/styles/form.scss View File

@@ -1,5 +1,6 @@
1 1
 .form {
2 2
   display: flex;
3
+  flex: 1;
3 4
   flex-direction: column;
4 5
   margin: 2em auto;
5 6
   width: 100%;
@@ -9,7 +10,6 @@
9 10
   border: 1px solid #999;
10 11
   border-radius: 5px;
11 12
   font-size: 20px;
12
-  flex: 1;
13 13
   padding: 0.5em;
14 14
 }
15 15
 

+ 9
- 0
web/assets/styles/global.scss View File

@@ -2,6 +2,11 @@
2 2
   box-sizing: border-box;
3 3
 }
4 4
 
5
+html, body {
6
+  margin: 0;
7
+  padding: 0;
8
+}
9
+
5 10
 body {
6 11
   font-family: verdana, sans-serif;
7 12
 }
@@ -20,8 +25,12 @@ blockquote {
20 25
 }
21 26
 
22 27
 .container {
28
+  display: flex;
29
+  flex-direction: column;
23 30
   margin: auto;
24 31
   max-width: 800px;
32
+  min-height: 100vh;
33
+  padding: 15px;
25 34
 }
26 35
 
27 36
 .header__link {

+ 2
- 3
web/views/layout.erb View File

@@ -7,11 +7,10 @@
7 7
   </head>
8 8
   <body>
9 9
     <div class="container">
10
-      <h1 class="header">
11
-        <a href="/" class="header__link">vlv search</a>
12
-      </h1>
10
+      <%= erb :'partials/header' %>
13 11
       <%= erb :'partials/auth' %>
14 12
       <%= yield %>
13
+      <%= erb :'partials/footer' %>
15 14
     </div>
16 15
     <script src="/script.js"></script>
17 16
   </body>

+ 17
- 19
web/views/login.erb View File

@@ -1,19 +1,17 @@
1
-<div class="container">
2
-  <form class="form form--login" action="/login" method="POST">
3
-    <p>Log in with your VLV credentials</p>
4
-    <% if error_message %>
5
-      <p class="error"><%= error_message %></p>
6
-    <% end %>
7
-    <div class="form__field">
8
-      <label class="form__label">Username</label>
9
-      <input type="text" name="username" class="form__text-field" value="<%= params[:username] %>">
10
-    </div>
11
-    <div class="form__field">
12
-      <label class="form__label">Password</label>
13
-      <input type="password" name="password" class="form__text-field" value="<%= params[:password] %>">
14
-    </div>
15
-    <div class="form__field">
16
-      <input type="submit" value="Login" class="btn form__submit">
17
-    </div>
18
-  </form>
19
-</div>
1
+<form class="form form--login" action="/login" method="POST">
2
+  <p>Log in with your VLV credentials</p>
3
+  <% if error_message %>
4
+    <p class="error"><%= error_message %></p>
5
+  <% end %>
6
+  <div class="form__field">
7
+    <label class="form__label">Username</label>
8
+    <input type="text" name="username" class="form__text-field" value="<%= params[:username] %>">
9
+  </div>
10
+  <div class="form__field">
11
+    <label class="form__label">Password</label>
12
+    <input type="password" name="password" class="form__text-field" value="<%= params[:password] %>">
13
+  </div>
14
+  <div class="form__field">
15
+    <input type="submit" value="Login" class="btn form__submit">
16
+  </div>
17
+</form>

+ 8
- 0
web/views/partials/footer.erb View File

@@ -0,0 +1,8 @@
1
+<footer class="footer">
2
+  <p>
3
+    Made by user reddwarf. This site is a third party product and not officially
4
+    associated with VLV. Feel free to
5
+    <a href="http://board.vivalavinyl.com/message/create/reddwarf/">PM me</a>
6
+    with any questions or suggestions.
7
+  </p>
8
+</footer>

+ 5
- 0
web/views/partials/header.erb View File

@@ -0,0 +1,5 @@
1
+<header class="header">
2
+  <h1 class="header__logo">
3
+    <a href="/" class="header__link">vlv search</a>
4
+  </h1>
5
+</header>

+ 31
- 33
web/views/partials/search.erb View File

@@ -1,34 +1,32 @@
1
-<div class="search">
2
-  <form action="/search" method="get" class="form">
3
-    <input name="q" type="search" value="<%= params[:q] %>" placeholder="Search for..." class="form__search" required>
4
-    <div class="filters">
5
-      <div class="filters__section">
6
-        <p>Search in:</p>
7
-        <label class="form__label">
8
-          <input type="radio" name="type" value="threads" <% if [nil, "threads"].include?(params[:type]) %>checked<% end%>>
9
-          Threads
10
-        </label>
11
-        <label class="form__label">
12
-          <input type="radio" name="type" value="posts" <% if params[:type] == "posts" %>checked<% end %>>
13
-          Posts
14
-        </label>
15
-      </div>
16
-      <div class="filters__section filters__section--sort <%= params[:type] == 'threads' ? 'open' : '' %>">
17
-        <p>Sort by:</p>
18
-        <label class="form__label">
19
-          <input type="radio" name="sort" value="thread" <% if [nil, "thread"].include? params[:sort] %>checked<% end%>>
20
-          Thread creation
21
-        </label>
22
-        <label class="form__label">
23
-          <input type="radio" name="sort" value="post" <% if params[:sort] == "post" %>checked<% end %>>
24
-          Most recent post
25
-        </label>
26
-      </div>
27
-      <div class="filters__section">
28
-        <p>Posted by:</p>
29
-        <input type="text" name="username" value="<%= params[:username] %>" class="form__text-field">
30
-      </div>
1
+<form action="/search" method="get" class="form search">
2
+  <input name="q" type="search" value="<%= params[:q] %>" placeholder="Search for..." class="form__search" required>
3
+  <div class="filters">
4
+    <div class="filters__section">
5
+      <p>Search in:</p>
6
+      <label class="form__label">
7
+        <input type="radio" name="type" value="threads" <% if [nil, "threads"].include?(params[:type]) %>checked<% end%>>
8
+        Threads
9
+      </label>
10
+      <label class="form__label">
11
+        <input type="radio" name="type" value="posts" <% if params[:type] == "posts" %>checked<% end %>>
12
+        Posts
13
+      </label>
31 14
     </div>
32
-    <input type="submit" value="Search" class="btn form__submit">
33
-  </form>
34
-</div>
15
+    <div class="filters__section filters__section--sort <%= params[:type] == 'threads' ? 'open' : '' %>">
16
+      <p>Sort by:</p>
17
+      <label class="form__label">
18
+        <input type="radio" name="sort" value="thread" <% if [nil, "thread"].include? params[:sort] %>checked<% end%>>
19
+        Thread creation
20
+      </label>
21
+      <label class="form__label">
22
+        <input type="radio" name="sort" value="post" <% if params[:sort] == "post" %>checked<% end %>>
23
+        Most recent post
24
+      </label>
25
+    </div>
26
+    <div class="filters__section">
27
+      <p>Posted by:</p>
28
+      <input type="text" name="username" value="<%= params[:username] %>" class="form__text-field">
29
+    </div>
30
+  </div>
31
+  <input type="submit" value="Search" class="btn form__submit">
32
+</form>

Loading…
Cancel
Save