diff --git a/assets/styles/kraken.scss b/assets/styles/kraken.scss index 02f2d8e..64cd4dc 100644 --- a/assets/styles/kraken.scss +++ b/assets/styles/kraken.scss @@ -8,6 +8,13 @@ body{ padding-left: $nav-width; } +.card{ + padding: 20px 30px; + background: white; + border-radius: 5px; + box-shadow: $box-shadow-2; +} + #main-nav{ position: fixed; top: 0; @@ -53,13 +60,31 @@ body{ } } +#main-actions{ + width: 100%; + max-width: 100%; + margin-top: 0; + margin-bottom: 25px; + + form, + input{ + margin: 0; + } +} + #main-wrapper{ max-width: 1200px; margin-top: 25px; - padding: 20px 30px; - background: white; - border-radius: 5px; - box-shadow: $box-shadow-2; +} + +#main-wrapper.container.fluid{ + width: 100%; + max-width: 100%; + margin: 0; +} + +#site-header{ + margin-bottom: 0; } #item-header, diff --git a/lib/routes/index.rb b/lib/routes/index.rb index f617bb6..c37b1a7 100644 --- a/lib/routes/index.rb +++ b/lib/routes/index.rb @@ -2,9 +2,11 @@ namespace '/' do get '' do items = Item.reverse(:updated_at).limit(10).all() + licenses = License.reverse(:updated_at).limit(10).all() erb :index, :locals => { :title => 'Dashboard', - :items => items + :items => items, + :licenses => licenses } end diff --git a/views/index.erb b/views/index.erb index cf581a6..174079c 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,11 +1,57 @@ -

This is a test.

+
+
+

Welcome to Raven

+
+
-<% if items.length > 0 %> - -<% else %> -

There are no items to display.

-<% end %> +
+ +
+
+

Recent inventory updates

+ <% if items.length > 0 %> + + + + + + + + + <% items.each do |item| %> + + + + + <% end %> + +
Item nameUpdated at
<%= item.name %><%= date_format(item.updated_at) %>
+ <% else %> +

There are no items to display.

+ <% end %> +
+ +
+

Recent license updates

+ <% if licenses.length > 0 %> + + + + + + + + + <% licenses.each do |license| %> + + + + + <% end %> + +
License nameUpdated at
<%= license.name %><%= date_format(license.updated_at) %>
+ <% else %> +

There are no licenses to display.

+ <% end %> +
+
diff --git a/views/layout.erb b/views/layout.erb index 34636d0..ffbf137 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -13,7 +13,10 @@ <%= erb :'layout/navbar' %> -
+ + <%= erb :'layout/actions' %> + +
<%= yield %>
diff --git a/views/layout/actions.erb b/views/layout/actions.erb new file mode 100644 index 0000000..c140d9c --- /dev/null +++ b/views/layout/actions.erb @@ -0,0 +1,9 @@ +
+
+
+
+ +
+
+
+