diff --git a/app/assets/images/7apps.jpg b/app/assets/images/7apps.jpg new file mode 100644 index 0000000..b05403b Binary files /dev/null and b/app/assets/images/7apps.jpg differ diff --git a/app/assets/images/adrpo.jpg b/app/assets/images/adrpo.jpg new file mode 100644 index 0000000..25adcd2 Binary files /dev/null and b/app/assets/images/adrpo.jpg differ diff --git a/app/assets/images/dcbang.jpg b/app/assets/images/dcbang.jpg new file mode 100644 index 0000000..d227769 Binary files /dev/null and b/app/assets/images/dcbang.jpg differ diff --git a/app/assets/images/logo.svg b/app/assets/images/logo.svg new file mode 100644 index 0000000..c5ac7de --- /dev/null +++ b/app/assets/images/logo.svg @@ -0,0 +1,116 @@ + diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png new file mode 100644 index 0000000..b8441f1 Binary files /dev/null and b/app/assets/images/rails.png differ diff --git a/app/assets/stylesheets/products.scss b/app/assets/stylesheets/products.scss index bff386e..de5df1f 100644 --- a/app/assets/stylesheets/products.scss +++ b/app/assets/stylesheets/products.scss @@ -1,3 +1,50 @@ // Place all the styles related to the Products controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ +.products { + table { + border-collapse: collapse; + } + + table tr td { + padding: 5px; + vertical-align: top; + } + + .list_image { + width: 60px; + height: 70px; + } + + .list_description { + width: 60%; + + dl { + margin: 0; + } + + dt { + color: #244; + font-weight: bold; + font-size: larger; + } + + dd { + margin: 0; + } + } + + .list_actions { + font-size: x-small; + text-align: right; + padding-left: 1em; + } + + .list_line_even { + background: #e0f8f8; + } + + .list_line_odd { + background: #f8b0f8 + } +} diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 64a50be..b2de017 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,7 +8,7 @@ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> -
+ <%= yield %> diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb index 64e927f..9060d6a 100644 --- a/app/views/products/index.html.erb +++ b/app/views/products/index.html.erb @@ -3,31 +3,31 @@| Title | -Description | -Image url | -Price | -- | ||
|---|---|---|---|---|---|---|
| <%= product.title %> | -<%= product.description %> | -<%= product.image_url %> | -<%= product.price %> | -<%= link_to 'Show', product %> | -<%= link_to 'Edit', edit_product_path(product) %> | -<%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %> | -+ <%= image_tag(product.image_url, class: 'list_image') %> + | + +
+
|
+
+
+ <%= link_to 'Show', product %> + <%= link_to 'Edit', edit_product_path(product) %> + <%= link_to 'Destroy', product, method: :delete, + data: { confirm: 'Are you sure?' } %> + |
+
+<% end %>
+ Powerful, Effective, and Efficient Full-Stack Web Development + As a Rails developer, you care about user experience and performance, + but you also want simple and maintainable code. Achieve all that by + embracing the full stack of web development, from styling with + Bootstrap, building an interactive user interface with AngularJS, to + storing data quickly and reliably in PostgreSQL. Take a holistic view of + full-stack development to create usable, high-performing applications, + and learn to use these technologies effectively in a Ruby on Rails + environment. +
}, + image_url: 'dcbang.jpg', + price: 45.00) +# . . . +Product.create(title: 'Seven Mobile Apps in Seven Weeks', + description: + %{+ Native Apps, Multiple Platforms + Answer the question “Can we build this for ALL the devices?” with a + resounding YES. This book will help you get there with a real-world + introduction to seven platforms, whether you’re new to mobile or an + experienced developer needing to expand your options. Plus, you’ll find + out which cross-platform solution makes the most sense for your needs. +
}, + image_url: '7apps.jpg', + price: 26.00) +# . . . + +Product.create(title: 'Ruby Performance Optimization', + description: + %{+ Why Ruby Is Slow, and How to Fix It + You don’t have to accept slow Ruby or Rails performance. In this + comprehensive guide to Ruby optimization, you’ll learn how to write + faster Ruby code—but that’s just the beginning. See exactly what makes + Ruby and Rails code slow, and how to fix it. Alex Dymo will guide you + through perils of memory and CPU optimization, profiling, measuring, + performance testing, garbage collection, and tuning. You’ll find that + all those “hard” things aren’t so difficult after all, and your code + will run orders of magnitude faster. +
}, + image_url: 'adrpo.jpg', + price: 46.00)