mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 11:36:45 +00:00
Web-app-theme working
This commit is contained in:
parent
a257abd86f
commit
69463c3884
5 changed files with 84 additions and 22 deletions
3
Gemfile
3
Gemfile
|
|
@ -41,4 +41,5 @@ gem 'devise', '>= 2.0'
|
|||
gem 'whenever'
|
||||
gem 'mysql2'
|
||||
gem 'therubyracer'
|
||||
gem "acts_as_list"
|
||||
gem "acts_as_list"
|
||||
gem 'web-app-theme', :git => 'https://github.com/pilu/web-app-theme.git'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
|
||||
.bad { background-color:rgb(224, 102, 102); color:white; }
|
||||
.bad, .bad a{
|
||||
background-color:rgb(224, 102, 102);
|
||||
color:white !important;
|
||||
}
|
||||
.iffy { background-color:rgb(246, 178, 107); }
|
||||
.ok { background-color:rgb(255, 217, 102); }
|
||||
.good { background-color:rgb(147, 196, 125); }
|
||||
|
|
@ -15,7 +18,7 @@
|
|||
|
||||
.panel ul {
|
||||
padding:0px;
|
||||
margin-left:10px;
|
||||
margin-left:0px;
|
||||
}
|
||||
|
||||
.habit {
|
||||
|
|
@ -26,6 +29,7 @@
|
|||
border: 1px solid black;
|
||||
margin-bottom: 5px;
|
||||
padding:5px;
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
.habit:hover {
|
||||
|
|
|
|||
9
app/assets/stylesheets/web_app_theme.css
Normal file
9
app/assets/stylesheets/web_app_theme.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This css will include all web-app-theme css you need
|
||||
*
|
||||
*= require web-app-theme/base
|
||||
*= require web-app-theme/themes/default/style.css
|
||||
*= require_self
|
||||
*/
|
||||
|
||||
/* Write here your css for overriding the theme's rules */
|
||||
|
|
@ -1,26 +1,40 @@
|
|||
<h1>Score: <span id="score"><%= @score %></span></h1>
|
||||
<% content_for :score do %>
|
||||
Score: <span id="score"><%= @score %></span>
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= link_to 'New Habit', new_habit_path %>
|
||||
|
||||
<table id="layout">
|
||||
<tr>
|
||||
<th>Habits</th>
|
||||
<th>Daily</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="panel">
|
||||
<ul id="habits">
|
||||
<% @habits.each do |habit| %>
|
||||
<%= render :partial => "habit", :locals => { :habit => habit } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="block">
|
||||
<div class='content'>
|
||||
<h2 class='title'>Habits</h2>
|
||||
<div class='inner'>
|
||||
<ul id="habits">
|
||||
<% @habits.each do |habit| %>
|
||||
<%= render :partial => "habit", :locals => { :habit => habit } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="panel">
|
||||
<ul id="daily">
|
||||
<% @daily.each do |habit| %>
|
||||
<%= render :partial => "habit", :locals => { :habit => habit } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="block">
|
||||
<div class='content'>
|
||||
<h2 class='title'>Daily</h2>
|
||||
<div class='inner'>
|
||||
<ul id="daily">
|
||||
<% @daily.each do |habit| %>
|
||||
<%= render :partial => "habit", :locals => { :habit => habit } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -9,9 +9,43 @@
|
|||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
<%= yield %>
|
||||
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<!-- <h1><a href="/">Web App</a></h1> -->
|
||||
<h1><%= yield :score %></h1>
|
||||
<div id="user-navigation">
|
||||
<ul class="wat-cf">
|
||||
<li><a href="#"><%= t("web-app-theme.profile", :default => "Profile") %></a></li>
|
||||
<li><a href="#"><%= t("web-app-theme.settings", :default => "Settings") %></a></li>
|
||||
<li><a href="/logout" class="logout"><%= t("web-app-theme.logout", :default => "Logout") %></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="main-navigation">
|
||||
<ul class="wat-cf"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="wrapper" class="wat-cf">
|
||||
<div class="flash">
|
||||
<% flash.each do |type, message| -%>
|
||||
<div class="message <%= type %>">
|
||||
<p><%= message %></p>
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
</div>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div id="main">
|
||||
<%= yield %>
|
||||
<div id="footer">
|
||||
<div class="block">
|
||||
<p>Copyright © <%= Time.now.year %> Web App.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebar">
|
||||
<%= yield :sidebar %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue