[css] portal
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index 81a10c2..05181c0 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -1,7 +1,6 @@
 {% macro product_image_square(website_image, css_class="") %}
 <div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
 	{% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');" {%- endif %}>
-	{% if not website_image -%}<i class="centered octicon octicon-device-camera"></i>{%- endif %}
 </div>
 {% endmacro %}
 
@@ -9,8 +8,6 @@
     <div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
     	{% if website_image -%}
     		<img src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
-    	{%- else -%}
-    		<i class="centered octicon octicon-device-camera"></i>
     	{%- endif %}
     </div>
 {% endmacro %}
diff --git a/erpnext/templates/includes/order/order.css b/erpnext/templates/includes/order/order.css
deleted file mode 100644
index 54c8d0f..0000000
--- a/erpnext/templates/includes/order/order.css
+++ /dev/null
@@ -1,25 +0,0 @@
-.order-container {
-	margin: 50px 0px;
-}
-
-.order-items {
-	margin: 20px 0px;
-}
-
-.order-item-table {
-	margin: 0px -15px;
-}
-
-.order-item-header {
-	border-bottom: 1px solid #d1d8dd;
-}
-
-.order-image-col {
-	padding-right: 0px;
-}
-
-.order-image {
-	max-width: 55px;
-	max-height: 55px;
-	margin-top: -5px;
-}
diff --git a/erpnext/templates/includes/order/order_taxes.html b/erpnext/templates/includes/order/order_taxes.html
index 8c8e886..564e31e 100644
--- a/erpnext/templates/includes/order/order_taxes.html
+++ b/erpnext/templates/includes/order/order_taxes.html
@@ -1,20 +1,20 @@
 {% if doc.taxes %}
 <div class="row tax-net-total-row">
-    <div class="col-xs-6 text-right">{{ _("Net Total") }}</div>
-    <div class="col-xs-6 text-right">
+    <div class="col-xs-8 text-right">{{ _("Net Total") }}</div>
+    <div class="col-xs-4 text-right">
         {{ doc.get_formatted("net_total") }}</div>
 </div>
 {% endif %}
 {% for d in doc.taxes %}
-<div class="row  tax-row">
-    <div class="col-xs-6 text-right">{{ d.description }}</div>
-    <div class="col-xs-6 text-right">
+<div class="row tax-row">
+    <div class="col-xs-8 text-right">{{ d.description }}</div>
+    <div class="col-xs-4 text-right">
         {{ d.get_formatted("base_tax_amount") }}</div>
 </div>
 {% endfor %}
 <div class="row tax-grand-total-row">
-    <div class="col-xs-6 text-right">{{ _("Grand Total") }}</div>
-    <div class="col-xs-6 text-right">
+    <div class="col-xs-8 text-right">{{ _("Grand Total") }}</div>
+    <div class="col-xs-4 text-right">
         <span class="tax-grand-total">
             {{ doc.get_formatted("grand_total") }}
         </span>
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html
index a52bb60..05aed90 100644
--- a/erpnext/templates/includes/transaction_row.html
+++ b/erpnext/templates/includes/transaction_row.html
@@ -1,17 +1,27 @@
-<div class="web-list-item">
-<a href="/{{ pathname }}/{{ doc.name }}">
-<div class="row">
-	<div class="col-sm-6">
+<div class="web-list-item transaction-list-item">
+	<a href="/{{ pathname }}/{{ doc.name }}">
+		<div class="row">
+			<div class="col-sm-6">
+				<span>{{ doc.name }}</span>
+				<div class="small text-muted items-preview text-ellipsis">
+					{{ doc.items_preview }}
+				</div>
+			</div>
+			<div class="col-sm-4">
+				<span class="indicator {{ doc.indicator_color or "darkgrey" }}">
+					{{ doc.indicator_title or doc.status }}
+				</span>
+				<div class="small text-muted transaction-time"
+					title="{{ frappe.utils.format_datetime(doc.modified, "medium") }}">
+					{{ frappe.utils.pretty_date(doc.modified) }}
+				</div>
+			</div>
+			<div class="col-sm-2 text-right">
+				{{ doc.get_formatted("grand_total") }}
+			</div>
+			<!-- <div class="col-sm-3 text-right">
 
-                <span class="indicator {{ doc.indicator_color or "darkgrey" }}">{{ doc.name }}</span>
-                <div class="small text-muted">{{ doc.items_preview }}</div>
-
-	</div>
-	<div class="col-sm-3 col-xs-5">
-		{{ doc.get_formatted("grand_total") }}
-	</div>
-	<div class="col-sm-3 small text-muted text-right" title="{{ frappe.utils.format_datetime(doc.creation, "medium") }}">
-		{{ frappe.utils.pretty_date(doc.creation) }}</div>
-</div>
-</a>
+			</div> -->
+		</div>
+	</a>
 </div>
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index f2104f9..afba9b8 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -68,7 +68,7 @@
           </div>
           <div class="cart-link">
             <a href="#" onclick="show_terms();return false;">*Terms and Conditions</a>
-          </div>  
+          </div>
         {% endif %}
     	<div class="cart-addresses">
             {% include "templates/includes/cart/cart_address.html" %}
diff --git a/erpnext/templates/pages/home.html b/erpnext/templates/pages/home.html
index 5c0f330..e6cfc90 100644
--- a/erpnext/templates/pages/home.html
+++ b/erpnext/templates/pages/home.html
@@ -1,31 +1,48 @@
 {% extends "templates/web.html" %}
+{% from "erpnext/templates/includes/macros.html" import product_image_square %}
 
-{% block title %}{{brand_html}}{% endblock %}
+{% block title %}{{ brand_html }}{% endblock %}
 
 {% block page_content %}
-<script>{% include "templates/includes/product_list.js" %}</script>
-
-<script>
-frappe.ready(function() {
-	window.start = 0;
-	window.get_product_list();
-});
-</script>
 
 <div class="row">
 	<div class="col-sm-12">
-		<h2 class="text-center">{{ tag_line }}</h2>
-		<p class="lead text-center">{{ description }}</p>
-		<p class="text-center"><a href="/login" class="btn btn-primary text-center">Login</a></p>
-		<div style="margin-top:75px;">
-		<h5>{{_("FEATURED PRODUCTS")}}</h5>	
-		<div class="featured-products">	
-		<div id="search-list" class="row" style="margin-top:40px;">
+		<h2 class="text-center">{{ homepage.tag_line or '' }}</h2>
+		<p class="lead text-center">{{ homepage.description or '' }}</p>
+		<p class="text-center">
+			<a href="/login" class="btn btn-primary text-center">Login</a>
+		</p>
 
+		{% if homepage.products %}
+		<!-- TODO: styling of this section -->
+		<div class='featured-products-section'>
+			<h5 class='text-uppercase'>{{ _("Featured Products") }}</h5>
+			<div class="featured-products">
+				<div id="search-list" class="row" style="margin-top:40px;">
+					{% for item in homepage.products %}
+						<a class="product-link" href="{{ item.route | abs_url }}">
+							<div class="col-sm-4 product-image-wrapper">
+								{{ product_image_square(item.thumbnail or item.image) }}
+								<div class="text-ellipsis inline-block small product-text">
+									{{ item.item_name }}
+								</div>
+							</div>
+						</a>
+					{% endfor %}
+				</div>
+			</div>
+			<!-- TODO: remove hardcoding of /products -->
+			<p class="text-center"><a href="/products" class="btn btn-primary">More Products</a></p>
 		</div>
-		</div>
-		<p class="text-center"><a href="/products" class="btn btn-primary">More Products</a></p>
-	</div>
+		{% endif %}
 	</div>
 </div>
 {% endblock %}
+
+{% block style %}
+<style>
+	.featured-products-section {
+		margin-top: 75px;
+	}
+</style>
+{% endblock %}
diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py
index af75097..9488efe 100644
--- a/erpnext/templates/pages/home.py
+++ b/erpnext/templates/pages/home.py
@@ -9,6 +9,13 @@
 no_cache = 1
 no_sitemap = 1
 
+def get_context(context):
+	homepage = frappe.get_doc('Homepage')
+	return {
+		'homepage': homepage
+	}
+
+
 @frappe.whitelist(allow_guest=True)
 def get_product_list(search=None, start=0, limit=6):
 	# limit = 12 because we show 12 items in the grid view
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 3252eb9..191b078 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -1,32 +1,24 @@
 {% extends "templates/web.html" %}
-
-{% block header %}
-<h1>{{ doc.name }}</h1>
-<!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> -->
-{% endblock %}
+{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
 
 {% block breadcrumbs %}
 	{% include "templates/includes/breadcrumbs.html" %}
 {% endblock %}
 
-{% block style %}
-<style>
-    {% include "templates/includes/order/order.css" %}
-</style>
+{% block header %}
+<h1>{{ doc.name }}</h1>
 {% endblock %}
 
 {% block page_content %}
 
-{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
-
-<div class="row">
+<div class="row transaction-subheading">
     <div class="col-xs-6">
         <span class="indicator {{ doc.indicator_color or "darkgrey" }}">
             {{ doc.indicator_title or doc.status or "Submitted" }}
         </span>
 	</div>
-    <div class="col-xs-6 text-muted text-right h6">
-        {{ doc.get_formatted("transaction_date") }}
+    <div class="col-xs-6 text-muted text-right small">
+        {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }}
     </div>
 </div>
 
@@ -38,14 +30,14 @@
 
     <!-- items -->
     <div class="order-item-table">
-        <div class="row order-items order-item-header">
-            <div class="col-sm-8 col-xs-6 h6">
+        <div class="row order-items order-item-header text-muted">
+            <div class="col-sm-8 col-xs-6 h6 text-uppercase">
                 {{ _("Item") }}
             </div>
-            <div class="col-sm-2 col-xs-3 text-right h6">
+            <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
                 {{ _("Quantity") }}
             </div>
-            <div class="col-sm-2 col-xs-3 text-right h6">
+            <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
                 {{ _("Amount") }}
             </div>
         </div>
@@ -71,9 +63,9 @@
     </div>
 
     <!-- taxes -->
-    <div class="order-taxes row small">
-        <div class="col-sm-8"><!-- empty --></div>
-        <div class="col-sm-4">
+    <div class="order-taxes row">
+        <div class="col-sm-6"><!-- empty --></div>
+        <div class="col-sm-6 text-right">
             {% include "erpnext/templates/includes/order/order_taxes.html" %}
         </div>
     </div>