Skip to content

Instantly share code, notes, and snippets.

@Lobstrosity
Lobstrosity / 1.Widget.cs
Created August 9, 2011 00:13
Mapping Parent-Child Relationships with Dapper
public class Widget
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Templates</title>
</head>
<body>
<div class="listing"></div>
<script class="listing" type="text/x-jquery-tmpl">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Templates</title>
</head>
<body>
<div class="items"><ul /></div>
<script class="items" type="text/x-jquery-tmpl">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Templates</title>
</head>
<body>
<div class="listing"></div>
<script class="listing" type="text/x-jquery-tmpl">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Templates</title>
</head>
<body>
<div class="greeting"></div>
<script class="greeting" type="text/x-jquery-tmpl">
<script type="text/x-jquery-tmpl">
{{each items}}
<li>${$value}</li>
{{/each}}
<!-- is equivalent to -->
{{each(i, item) items}}
<li>${item}</li>
{{/each}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Templates Yay</title>
</head>
<body>
<div id="music"></div>
<script id="musicTemplate" type="text/x-jquery-tmpl">
#wrapper
{
-webkit-transition: width 0.2s ease-in-out;
-moz-transition: width 0.2s ease-in-out;
-o-transition: width 0.2s ease-in-out;
transition: width 0.2s ease-in-out;
}
<meta name="viewport" content="width=device-width" />
<!-- Common styles -->
<link rel="stylesheet" href="base.css" />
<!-- For tiny (most likely mobile) browsers -->
<link rel="stylesheet" href="small.css" media="max-width: 320px" />
<!-- For small desktop or large mobile browsers -->
<link rel="stylesheet" href="medium.css"
media="min-width: 321px and max-width: 799px" />