summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/_head.html.erb9
-rw-r--r--app/views/layouts/application.html.erb11
-rw-r--r--app/views/users/edit.html.erb7
-rw-r--r--app/views/users/edit_website_settings.html.erb34
4 files changed, 54 insertions, 7 deletions
diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb
index 183a615..e6b5080 100644
--- a/app/views/layouts/_head.html.erb
+++ b/app/views/layouts/_head.html.erb
@@ -1,4 +1,9 @@
-<div id="head">
+<% head = "head_top" %>
+<% if current_user != nil && current_user.header_scroll == true %>
+ <% head = "head_scroll" %>
+<% end %>
+
+<div id="<%= head %>">
<div id="menu">
<%= link_to "", root_path, id: "logo" %>
<ul>
@@ -41,4 +46,4 @@
<% end %>
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index a0a5f83..e85d417 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -5,6 +5,9 @@
<meta name="viewport" content="initial-scale=1,maximum-scale=1">
<meta name="description" content="Redstoner is a creative minecraft server made for redstoners">
<%= stylesheet_link_tag "application", :media => "all" %>
+ <% if current_user.try(:dark) == true %>
+ <%= stylesheet_link_tag "dark", :media => "all" %>
+ <% end %>
<%= csrf_meta_tags %>
<%= favicon_link_tag "favicon.ico" %>
<%= javascript_include_tag "https://cdn.rawgit.com/jomo/ago.js/v0.0.1/ago.min.js", crossorigin: :anonymous, integrity: "sha256-xw0JUUdbuZQCVO+QScoxrlEsD4nZGCjMRh9PP8GLhcY=" %>
@@ -14,7 +17,11 @@
</head>
<body>
<%= render partial: "/layouts/head" %>
- <div id="main-content" class="<%= yield(:main_class) %>">
+ <% content = "main-content" %>
+ <% if current_user.try(:header_scroll) == true %>
+ <% content = "main-content-scroll" %>
+ <% end %>
+ <div id="<%=content%>" class="<%=yield(:main_class) %>">
<% if alert %>
<div class='flash alert'><%= alert %></div>
<% end %>
@@ -25,4 +32,4 @@
</div>
<%= render partial: "/layouts/footer" %>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 5e63c00..133a69d 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -75,10 +75,11 @@
</tbody>
</table>
-<p><%= f.submit "Save profile", class: "btn blue left", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
+<p><%= f.submit "Save profile", class: "btn variable-size left", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
<p>
- <%= link_to "Edit login details", edit_login_user_path(@user), class: "btn blue right" %>
- <%= link_to "Notification settings", edit_notifications_user_path(@user), class: "btn blue right" %>
+ <%= link_to "Edit login details", edit_login_user_path(@user), class: "btn variable-size right" %>
+ <%= link_to "Notification settings", edit_notifications_user_path(@user), class: "btn variable-size right" %>
+ <%= link_to "Website settings", edit_website_settings_user_path(@user), class: "btn variable-size right" %>
</p>
<div class="clear"></div>
diff --git a/app/views/users/edit_website_settings.html.erb b/app/views/users/edit_website_settings.html.erb
new file mode 100644
index 0000000..2fdeffb
--- /dev/null
+++ b/app/views/users/edit_website_settings.html.erb
@@ -0,0 +1,34 @@
+<% title "Edit Website Settings: #{@user.name}" %>
+
+<%= link_to @user.name, @user %> → Edit Website Settings
+<h1>Edit Website Settings</h1>
+
+
+<%= form_for @user do |f| %>
+ <table>
+ <tbody>
+ <tr>
+ <td>Header moves with scrolling (Experimental - do not report bugs)</td>
+ <td>
+ <%= f.check_box :header_scroll %>
+ </td>
+ </tr>
+ <tr>
+ <td>Show exact UTC times</td>
+ <td>
+ <%= f.check_box :utc_time %>
+ </td>
+ </tr>
+ <tr>
+ <td>Dark theme*</td>
+ <td>
+ <%= f.check_box :dark %>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p><%= f.submit "Save changes", class: "btn blue left" %></p>
+ <div class="clear"></div>
+<% end %>
+<br><br><br>
+*Warning: If as a result to enabling this style your eyes get infected with a severe case of eye cancer, we are not reliable for any damage. Please contact your doctor in advance to ensure that in case of infection you will be treated accordingly. Quality theme brought to you by Redemptâ„¢.