Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Updated themes for correct bootstrap version - icons need fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
icecube45 committed Dec 27, 2017
1 parent a9f65fa commit 9de8c47
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class User < Sequel::Model
HASH_BYTES = 24
SALT_BYTES = 24
PERMISSION_MAP = { "readonly" => "Read-only", "editor" => "Editor", "admin" => "Administrator" }
THEMES = {"classic" => "Classic", "darkly" => "Darkly"}
THEMES = {"classic" => "Classic", "cyborg" => "Cyborg", "slate" => "Slate"}
# Checks the given credentials against the database. Returns the user object on success and nil otherwise.
def self.authenticate(email, password)
user = User[:email => email]
Expand Down
9 changes: 9 additions & 0 deletions public/css/cyborg/bootstrap.min.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions public/css/slate/bootstrap.min.css

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions views/header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<meta charset="utf-8">
<title>Cheesy Parts</title>
<link rel="shortcut icon" href="//media.team254.com/homepage/icons/favicon32.png">
<% if @user && @user.theme?("classic") %>
<link href="/css/bootstrap.min.css" rel="stylesheet"> <% end %>
<% if @user && @user.theme?("darkly") %>
<link href="/css/dark/bootstrap.min.css" rel="stylesheet">
<% if @user && @user.theme?("slate") %>
<link href="/css/slate/bootstrap.min.css" rel="stylesheet">
<% elsif @user && @user.theme?("cyborg") %>
<link href="/css/cyborg/bootstrap.min.css" rel="stylesheet">
<% else %>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<% end %>
<link href="/css/bootstrap-datepicker.css" rel="stylesheet">
<link href='/css/css.css' rel='stylesheet' type='text/css' />
Expand Down

0 comments on commit 9de8c47

Please sign in to comment.