tiendapp_validator 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +46 -0
  8. data/Rakefile +6 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/lib/tiendapp_validator.rb +31 -0
  12. data/lib/tiendapp_validator/auxiliar_methods.rb +75 -0
  13. data/lib/tiendapp_validator/liquid_validators.rb +61 -0
  14. data/lib/tiendapp_validator/required_files.rb +30 -0
  15. data/lib/tiendapp_validator/schema_validators.rb +11 -0
  16. data/lib/tiendapp_validator/version.rb +3 -0
  17. data/public/store_templates/public/_blog_navigator.liquid +13 -0
  18. data/public/store_templates/public/_cart.liquid +4 -0
  19. data/public/store_templates/public/_cart_button_product.liquid +4 -0
  20. data/public/store_templates/public/_customizations.liquid +157 -0
  21. data/public/store_templates/public/_footer.liquid +77 -0
  22. data/public/store_templates/public/_header.liquid +61 -0
  23. data/public/store_templates/public/_login.liquid +26 -0
  24. data/public/store_templates/public/_navbar.liquid +139 -0
  25. data/public/store_templates/public/_navbar_submenu.liquid +11 -0
  26. data/public/store_templates/public/_product.liquid +20 -0
  27. data/public/store_templates/public/_products.liquid +30 -0
  28. data/public/store_templates/public/assets/css/bootstrap-submenu.min.css +8 -0
  29. data/public/store_templates/public/assets/css/bootstrap.min.css +6 -0
  30. data/public/store_templates/public/assets/css/bootstrap.min.css.map +1 -0
  31. data/public/store_templates/public/assets/css/progress-wizard.min.css +1 -0
  32. data/public/store_templates/public/assets/css/theme.css +1307 -0
  33. data/public/store_templates/public/assets/css/ui-notification.css +105 -0
  34. data/public/store_templates/public/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  35. data/public/store_templates/public/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  36. data/public/store_templates/public/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  37. data/public/store_templates/public/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  38. data/public/store_templates/public/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  39. data/public/store_templates/public/assets/images/blog_header.jpg +0 -0
  40. data/public/store_templates/public/assets/images/email_header_logo.png +0 -0
  41. data/public/store_templates/public/assets/images/header_image_1.png +0 -0
  42. data/public/store_templates/public/assets/images/header_image_2.png +0 -0
  43. data/public/store_templates/public/assets/images/header_image_3.png +0 -0
  44. data/public/store_templates/public/assets/images/logo_navbar.png +0 -0
  45. data/public/store_templates/public/assets/js/bootstrap-submenu.min.js +7 -0
  46. data/public/store_templates/public/assets/js/bootstrap.min.js +7 -0
  47. data/public/store_templates/public/assets/js/navbar_responsive_navigation.js +28 -0
  48. data/public/store_templates/public/assets/js/npm.js +13 -0
  49. data/public/store_templates/public/assets/js/sessions.js +27 -0
  50. data/public/store_templates/public/blog.liquid +71 -0
  51. data/public/store_templates/public/checkout/address.liquid +33 -0
  52. data/public/store_templates/public/checkout/cart.liquid +108 -0
  53. data/public/store_templates/public/checkout/delivery.liquid +33 -0
  54. data/public/store_templates/public/checkout/payment.liquid +33 -0
  55. data/public/store_templates/public/config/customization_schema.json +662 -0
  56. data/public/store_templates/public/config/email_customization_schema.json +394 -0
  57. data/public/store_templates/public/home.liquid +18 -0
  58. data/public/store_templates/public/layout.liquid +28 -0
  59. data/public/store_templates/public/login/_footer.liquid +14 -0
  60. data/public/store_templates/public/login/_recover.liquid +14 -0
  61. data/public/store_templates/public/login/_sign_in.liquid +19 -0
  62. data/public/store_templates/public/login/_sign_up.liquid +30 -0
  63. data/public/store_templates/public/mailer/cancel_order.liquid +49 -0
  64. data/public/store_templates/public/mailer/confirm_order.liquid +55 -0
  65. data/public/store_templates/public/mailer/layout.liquid +831 -0
  66. data/public/store_templates/public/mailer/shipped_order.liquid +57 -0
  67. data/public/store_templates/public/order.liquid +26 -0
  68. data/public/store_templates/public/post.liquid +42 -0
  69. data/public/store_templates/public/product.liquid +106 -0
  70. data/public/store_templates/public/sidebar.liquid +2 -0
  71. data/public/store_templates/public/static_page.liquid +28 -0
  72. data/public/store_templates/public/utils/_fonts.liquid +9 -0
  73. data/public/store_templates/public/widgets/_breadcrumbs.liquid +32 -0
  74. data/public/store_templates/public/widgets/_carousel.liquid +37 -0
  75. data/public/store_templates/public/widgets/_cart.liquid +86 -0
  76. data/public/store_templates/public/widgets/_tiendapp_footer.liquid +10 -0
  77. data/tiendapp_validator-0.1.0.gem +0 -0
  78. data/tiendapp_validator-0.1.1.gem +0 -0
  79. data/tiendapp_validator-1.0.0.gem +0 -0
  80. data/tiendapp_validator.gemspec +34 -0
  81. metadata +185 -0
@@ -0,0 +1,57 @@
1
+ <style>
2
+
3
+ .products-table tr:nth-child(even) {
4
+ background-color: {{"email_shipment_table_background_color_even" | customizable : customization.email_shipment_table_background_color_even, preview }};
5
+ }
6
+ .products-table tr:nth-child(even) td{
7
+ color:{{"email_shipment_table_text_color_even" | customizable : customization.email_shipment_table_text_color_even, preview }};
8
+ }
9
+ .products-table tr:nth-child(odd) {
10
+ background-color: {{"email_shipment_table_background_color_odd" | customizable : customization.email_shipment_table_background_color_odd, preview }};
11
+ }
12
+ .products-table th{
13
+ background-color: {{"email_shipment_table_background_color_header" | customizable : customization.email_shipment_table_background_color_header, preview }};
14
+ }
15
+ .products-table tr:nth-child(odd) td{
16
+ color:{{"email_shipment_table_text_color_odd" | customizable : customization.email_shipment_table_text_color_odd, preview }};
17
+
18
+ }
19
+ .products-table td, .products-table tr{
20
+ border: solid {{"email_shipment_table_border_size" | customizable : customization.email_shipment_table_border_size, preview }}px {{"email_shipment_table_border_color" | customizable : customization.email_shipment_table_border_color, preview }};
21
+ padding: {{"email_shipment_table_padding" | customizable : customization.email_order_table_padding, preview }}px;
22
+ }
23
+
24
+ .products-table{
25
+ margin: 20px 0px;
26
+ }
27
+
28
+ .email-content-header{
29
+ margin-top: 20px;
30
+ }
31
+ .products-table th{
32
+ text-align: center;
33
+ font-weight: normal;
34
+ }
35
+ </style>
36
+ <table>
37
+ <tr>
38
+ <td>
39
+ <p class="lede email-content-header">
40
+ {{"email_shipment_head_text" | customizable_with_variables : customization.email_shipment_head_text, preview, variables }}
41
+
42
+ </p>
43
+ <p>
44
+ {{"email_shipment_before_contents" | customizable_with_variables : customization.email_shipment_before_contents, preview, variables }}
45
+
46
+
47
+ </p>
48
+
49
+ {{ shipment_contents }}
50
+ <p>
51
+ {{"email_shipment_bottom_text" | customizable_with_variables : customization.email_shipment_bottom_text, preview, variables }}
52
+
53
+ </p>
54
+ </td>
55
+ <td class="expander"></td>
56
+ </tr>
57
+ </table>
@@ -0,0 +1,26 @@
1
+ {% if just_completed? == 'true' %}
2
+ {{ 'css/progress-wizard.min.css' | asset_url | stylesheet_tag }}
3
+
4
+ <div class="row">
5
+ <ul class="progress-indicator">
6
+
7
+ <li class="completed"> <span class="bubble"></span> Confirmar Carro </li>
8
+
9
+
10
+ <li class="completed"> <span class="bubble"></span> Información de Envío </li>
11
+
12
+
13
+ <li class="completed"> <span class="bubble"></span>Métodos de Envío </li>
14
+
15
+
16
+ <li class="completed"> <span class="bubble"></span>Medios de Pago</li>
17
+
18
+ <li class="current"> <span class="bubble"></span> Completado </li>
19
+ </ul>
20
+ </div>
21
+ {% endif %}
22
+ <div class="row">
23
+ <div class="col-xs-8 col-xs-offset-2">
24
+ {{content_for_order}}
25
+ </div>
26
+ </div>
@@ -0,0 +1,42 @@
1
+
2
+ <div id="blog">
3
+ {%if post.has_main_image?%}
4
+ <header class="intro-header" style="background-image: url('{{post.main_image_large_url}}')">
5
+ {%else%}
6
+ <header class="intro-header" style="background-color: #808080;">
7
+ {%endif%}
8
+ <div class="veil">
9
+ <div class="container">
10
+ <div class="row">
11
+ <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
12
+ <div class="post-heading">
13
+ <h1>{{post.title}}</h1>
14
+ <h2 class="subheading">{{post.subtitle}}</h2>
15
+ <span class="meta">{{post.printed_date}}</span>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </header>
22
+ <article>
23
+ <div class="container">
24
+ <div class="row">
25
+ <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
26
+ {{content}}
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </article>
31
+ <hr>
32
+ <div class="row">
33
+ <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
34
+ <ul class="pager">
35
+ <li class="next">
36
+ <a href="/blog">Volver al Blog <span class="glyphicon glyphicon-arrow-left"></span></a>
37
+ </li>
38
+ </ul>
39
+ </div>
40
+ </div>
41
+
42
+ </div>
@@ -0,0 +1,106 @@
1
+ <span ng-controller="ProductController as product" >
2
+ {% include 'widgets/breadcrumbs' %}
3
+ <div class="product-container" ng-init="product.load({{product.id}})">
4
+
5
+ <div class="row">
6
+ <div class="product-image-container col-sm-6">
7
+ <div class="main-image">
8
+ <img ng-src="{[product.image]}">
9
+ </div>
10
+ <div class="thumbnails">
11
+ <div class="thumbnail" ng-repeat="image in product.images" ng-click="product.setImage($index)">
12
+ <img ng-src="{[image.small_url]}">
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <div class="product-description-container col-sm-6">
17
+ <h3 class="product-title">
18
+ {{product.name}}
19
+ </h3>
20
+ <p class="product-price">
21
+ {{product.price | chilean_currency}}
22
+ </p>
23
+ <div class="variants">
24
+ {% for variant in product.variants %}
25
+ <div class="variant">
26
+ <input type="radio" name="variant" value="{{variant.id}}" ng-click="product.setVariant({{variant.id}})"> <span>{{variant.options_text}}</span> </input>
27
+ </div>
28
+ {% endfor %}
29
+ <br/>
30
+ </div>
31
+ </ul>
32
+ {% if user.has_cart? %}
33
+ <div class="row available-actions">
34
+ <div class="col-sm-6">
35
+ <p class="in-stock" ng-init="product.inStock = {{product.in_stock?}}">
36
+ {% if product.in_stock? %}
37
+ En Stock
38
+ {% else %}
39
+ Sin Stock
40
+ {% endif %}
41
+ </p>
42
+ </div>
43
+ <div class="col-xs-2">
44
+ <div class="form-group">
45
+ {% if product.in_stock? %}
46
+ <input type="number" name="quantity" ng-model="product.quantity" value="1"/>
47
+ {% else %}
48
+ <input type="number" name="quantity" min="0" value="0" max="0">
49
+ {% endif %}
50
+ </div>
51
+ </div>
52
+
53
+
54
+ <div class="col-xs-4">
55
+ {% include 'cart_button_product' %}
56
+ </div>
57
+
58
+ </div>
59
+ {% endif %}
60
+
61
+ <div class="divisor"></div>
62
+ <div class="row">
63
+ <p>
64
+ {{product.description}}
65
+ </p>
66
+ </div>
67
+
68
+ <div class="row" ng-cloak>
69
+ <br>
70
+ <span class = "inline" ng-repeat="property in product.properties">
71
+ <ul>
72
+ <li class = "select">
73
+ {[property.property_name]}:
74
+ </li>
75
+ <li>
76
+ {[property.value]}
77
+ </li>
78
+ </ul>
79
+ </span>
80
+ </div>
81
+
82
+ </div>
83
+ </div>
84
+
85
+ </div>
86
+
87
+ <div id="related-products-container">
88
+ <span class="overlay" ng-show="products.loading()">
89
+ <i class="fa fa-circle-o-notch fa-spin fa-4x"></i>
90
+ </span>
91
+ <h4>
92
+ También podría interesarte
93
+ </h4>
94
+ <ul id="related-products">
95
+ <li class="product" ng-repeat="p in products.productsFactory.products" ng-if="p.id !== product.product.id" ng-cloak>
96
+
97
+ <a href="/products/{[p.slug]}">
98
+ <img ng-src="{[p.master.images[0].small_url]}">
99
+ <div class="name">
100
+ {[p.name]}
101
+ </div>
102
+ </a>
103
+ </li>
104
+ </ul>
105
+ </div>
106
+ </span>
@@ -0,0 +1,2 @@
1
+ %aside#sidebar.col-sm-4.col-md-3{'data-hook'=>''}
2
+ =yield :sidebar
@@ -0,0 +1,28 @@
1
+ <style>
2
+ #static-page h1,
3
+ #static-page h2,
4
+ #static-page h3,
5
+ #static-page h4,
6
+ #static-page h5,
7
+ #static-page h6 {
8
+ font-family: {{"static_pages_header_font" | customizable : customization.static_pages_header_font, preview}}, Helvetica, Arial, sans-serif;
9
+ color: {{"static_pages_header_color" | customizable : customization.static_pages_header_color, preview}};
10
+ }
11
+ #static-page p{
12
+ font-family: {{"static_pages_paragraph_font" | customizable : customization.static_pages_paragraph_font, preview}}, Helvetica, Arial, sans-serif;
13
+ color: {{"static_pages_paragraph_color" | customizable : customization.static_pages_paragraph_color, preview}};
14
+ font-size: {{"static_pages_paragraph_size" | customizable : customization.static_pages_paragraph_size, preview}}pt;
15
+ }
16
+ #static-page{
17
+ margin-top: 80px; /*Navbar Fixed*/
18
+ }
19
+ </style>
20
+ <div id="static-page">
21
+ <div class="row static-content">
22
+ <div class="col-xs-1"></div>
23
+ <div class="col-xs-10">
24
+ {{content}}
25
+ </div>
26
+ <div class="col-xs-1"></div>
27
+ </div>
28
+ </div>
@@ -0,0 +1,9 @@
1
+ {% if preview %}
2
+ {% for font in available_fonts %}
3
+ {{font | generic_font_tag}}
4
+ {% endfor %}
5
+ {% else %}
6
+ {% for item in customization %}
7
+ {{ item[1] | generic_font_tag }}
8
+ {% endfor %}
9
+ {% endif %}
@@ -0,0 +1,32 @@
1
+ <ol class="breadcrumb" role="navigation" aria-label="breadcrumbs" ng-show="products.productsFactory.breadcrumbs.length > 0 || product" ng-cloak>
2
+ <li title="Home" href="/#" ng-click="products.goHome(); search = false; products.query = ''">{{store.name}}</li>
3
+
4
+ <li ng-repeat="bread in products.productsFactory.breadcrumbs" >
5
+ <a href="/#categories/{[bread.id]}/{[bread.name | lowercase]}" ng-class="($last && !product) ? 'select' : ''">
6
+ {[bread.name]}
7
+ </a>
8
+ </li>
9
+
10
+
11
+ <li class = "dropdown" ng-if="!product">
12
+ <span id="sub_categories" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
13
+ <a href="#">
14
+ Todo
15
+ <span class="caret"></span>
16
+ </a>
17
+ </span>
18
+ <ul class="dropdown-menu" aria-labelledby="sub_categories">
19
+ <li><a>Todo</a></li>
20
+ <li ng-repeat="breadChild in products.productsFactory.breadcrumbsChildren">
21
+ <a href="/#categories/{[breadChild.id]}/{[breadChild.name | lowercase]}">
22
+ {[breadChild.name]}
23
+ </a>
24
+ </li>
25
+ </ul>
26
+ </li>
27
+
28
+ <li ng-if="product">
29
+ <a href class="select">{[product.name]}</a>
30
+ </li>
31
+
32
+ </ol>
@@ -0,0 +1,37 @@
1
+ <div id="carousel-widget" class="carousel slide" data-ride="carousel">
2
+ <!-- Indicators -->
3
+
4
+
5
+ <!-- Wrapper for slides -->
6
+ <div class="carousel-inner" role="listbox">
7
+ <div class="item active">
8
+ {{'header_image_1' | customizable_image : customization.header_image_1, preview, 'Header Image 1'}}
9
+ <h2 class="carousel-caption">
10
+ {{"header_title_1" | customizable : customization.header_title_1, preview}}
11
+ </h2>
12
+ </div>
13
+ <div class="item">
14
+ {{'header_image_2' | customizable_image : customization.header_image_2, preview, 'Header Image 2'}}
15
+ <h2 class="carousel-caption">
16
+ {{"header_title_2" | customizable : customization.header_title_2, preview}}
17
+ </h2>
18
+ </div>
19
+ <div class="item">
20
+ {{'header_image_3' | customizable_image : customization.header_image_3, preview, 'Header Image 3'}}
21
+ <h2 class="carousel-caption">
22
+ {{"header_title_3" | customizable : customization.header_title_3, preview}}
23
+ </h2>
24
+ </div>
25
+
26
+ </div>
27
+
28
+ <!-- Controls -->
29
+ <a class="left carousel-control" href="#carousel-widget" role="button" data-slide="prev">
30
+ <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
31
+ <span class="sr-only">Anterior</span>
32
+ </a>
33
+ <a class="right carousel-control" href="#carousel-widget" role="button" data-slide="next">
34
+ <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
35
+ <span class="sr-only">Siguiente</span>
36
+ </a>
37
+ </div>
@@ -0,0 +1,86 @@
1
+ <style>
2
+ #mini-cart table#mini-cart-table tr{
3
+ border-bottom: solid {{"shopping_cart_separator_size" | customizable : customization.shopping_cart_separator_size, preview}}px {{"shopping_cart_accent_color" | customizable : customization.shopping_cart_accent_color, preview}};
4
+ }
5
+ #mini-cart .header-cart-icon{
6
+ color: {{"shopping_cart_accent_color" | customizable : customization.shopping_cart_accent_color, preview}};
7
+ }
8
+ </style>
9
+ <div id="mini-cart" class="ng-hide" ng-show="cart.show" click-outside="cart.hideCart()" ng-cloak>
10
+
11
+ <h3 >
12
+ <span class="glyphicon glyphicon-shopping-cart header-cart-icon"> </span>
13
+ Mi Carro
14
+ <a id="close-cart" href="#" ng-click="cart.hideCart()"><span class="fa fa-times"></span></a>
15
+ </h3>
16
+ <hr>
17
+ <table id="mini-cart-table">
18
+ <thead>
19
+ <tr ng-hide="cart.noItems()">
20
+ <th></th>
21
+ <th>Item</th>
22
+ <th>Precio</th>
23
+ <th>Cantidad</th>
24
+ <th></th>
25
+ <th>Total</th>
26
+ <th></th>
27
+
28
+ </tr>
29
+ </thead>
30
+ <tbody>
31
+ <tr ng-show="cart.noItems()">
32
+ <td></td>
33
+ <td colspan="5">No hay productos en el carro</td>
34
+ </tr>
35
+
36
+ <tr ng-repeat="item in cart.itemsInCart" ng-class-odd="'odd'" ng-class-even="'even'" ng-hide="cart.noItems()">
37
+ <td class="picture">
38
+ <img ng-src="{[item.variant.images[0].mini_url]}"/>
39
+ </td>
40
+ <td class="name">
41
+ <a href="/products/{[item.variant.slug]}">
42
+ {[item.variant.name]}
43
+ </a>
44
+ </td>
45
+ <td class="price">
46
+ {[item.variant.price | currency : '$' : 0 | comma_to_dot]}
47
+ </td>
48
+ <td class="quantity">
49
+ <input type="number" class="form-control" ng-model="item.new_quantity" ng-init="item.new_quantity = item.quantity"/>
50
+ </form>
51
+ </td>
52
+ <td class="refresh">
53
+ <a href="#" ng-click="cart.updateCartWithValidation(item.id, item.variant.name, item.variant.id, item.new_quantity, item.quantity)" ng-show="item.new_quantity != item.quantity" ><i class= "glyphicon glyphicon-refresh" ng-class="{'fa-spin': cart.isUpdatingElement(item.id)}" ></i></a>
54
+ </td>
55
+ <td class="subtotal">
56
+ {[item.total | currency : '$' : 0 | comma_to_dot]}
57
+ </td>
58
+ <td>
59
+ <a href ng-click="cart.removeFromCart(item.id, item.variant.name)"><i class= "glyphicon glyphicon-remove-sign"></i></a>
60
+ </td>
61
+ </tr>
62
+
63
+ </tbody>
64
+ </table>
65
+ <div class="row" ng-hide="cart.noItems()">
66
+ <div class="col-xs-5 pull-right text-right cart-total">
67
+ <span>
68
+ Total:
69
+ </span>
70
+ <h4>
71
+ {[cart.total | currency : '$' : 0 | comma_to_dot]}
72
+ </h4>
73
+ </div>
74
+ </div>
75
+ <div class="row" ng-hide="cart.noItems()">
76
+ <div class="col-xs-5 pull-right text-right">
77
+ <a href="/checkout">
78
+ <div class="btn btn-cart">
79
+ <span>Realizar la Compra</span>
80
+ <span class="glyphicon glyphicon-arrow-right"></span>
81
+ </div>
82
+ </a>
83
+ </div>
84
+ </div>
85
+
86
+ </div>
@@ -0,0 +1,10 @@
1
+ {% if user.has_tiendapp_footer? %}
2
+ <div class="tiendapp-footer">
3
+
4
+ Hecho en
5
+ <a href="www.tiendapp.cl">
6
+ {{'logo_navbar' | customizable_image : customization.logo_tiendapp, preview, 'Logo'}}
7
+ </a>
8
+
9
+ </div>
10
+ {% endif %}