This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
head: | |
snipcart.html | |
--- | |
<div class="product-details"> | |
<img src="{{ page.image }}" alt="{{ page.name }}" class="thumbnail"/> | |
<div class="product-description"> | |
<p>{{ page.name }}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.snipcart.com/scripts/2.0/snipcart.js" | |
data-api-key="{{ site.api_key }}" | |
id="snipcart"> | |
</script> | |
<link href="https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css" rel="stylesheet" type="text/css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
head: | |
snipcart.html | |
--- | |
<div class="products"> | |
{{ content }} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="product"> | |
<a class="product" href="{{ site.baseurl }}{{ product.url }}"> | |
<img src="{{ product.image }}" alt="{{ product.name }}" class="thumbnail"/> | |
<p>{{ product.name }}</p> | |
</a> | |
<button class="snipcart-add-item" | |
data-item-name="{{ product.name }}" | |
data-item-id="{{ product.sku }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: products | |
title: Store | |
--- | |
{% for product in site.products %} | |
{% include product.html %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title> | |
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: How Google Works | |
price: 20.99 | |
slug: how-google-works | |
sku: HGW | |
image: http://d.gr-assets.com/books/1422538855l/23158207.jpg | |
layout: productdetails | |
--- | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper ante non vehicula eleifend. | |
Phasellus ut feugiat tellus, vitae malesuada mi. Sed placerat ultrices enim, id fermentum ante tincidunt nec. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="https://cdn.snipcart.com/scripts/2.0/snipcart.js" data-api-key="YjdiNWIyOTUtZTIyMy00MWMwLTkwNDUtMzI1M2M2NTgxYjE0" id="snipcart"></script> | |
<link href="https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css" rel="stylesheet" type="text/css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="text-align:center"> | |
<a href="/"> | |
<h1> | |
Snipcart & Sanity powered demo! | |
</h1> | |
</a> | |
<router-outlet></router-outlet> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { HttpClientModule } from '@angular/common/http'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { AppComponent } from './app.component'; | |
import { ProductComponent } from './components/product/product.component'; | |
import { ProductsComponent } from './components/products/products.component'; | |
const appRoutes: Routes = [ |