Skip to content

Instantly share code, notes, and snippets.

View dshookowsky's full-sized avatar

Daniel Shookowsky dshookowsky

View GitHub Profile
@dshookowsky
dshookowsky / gist:3679a6bdc83fc4f9f285
Last active August 29, 2015 14:13
Using font icons in Xamarin.Android
public override View GetView (int position, View convertView, ViewGroup parent)
{
var item = items [position];
View view = convertView;
TextView details = null;
if (view == null) { // no view to re-use, create new
view = context.LayoutInflater.Inflate (Resource.Layout.Room, null);
@dshookowsky
dshookowsky / index2.html
Last active August 29, 2015 14:04
A better login page
<!DOCTYPE html>
<html lang="en">
<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>A better login page</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@dshookowsky
dshookowsky / index.html
Last active August 29, 2015 14:04
Contrived Bad Login Screen
<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<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>A very bad login page</title>
</head>
<body style="margin: 0; padding: 0; height: 100%;">
<!-- Here's an example of what *not* to do. Inline styles, table-based layout -->
@dshookowsky
dshookowsky / Customization.cs
Last active August 29, 2015 13:58
Models/Customization.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Branding.Models
{
public class Customization
{
public string titleColor;
@dshookowsky
dshookowsky / brand.xslt
Created April 10, 2014 14:11
Content/xslt/brand.xslt
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes"/>
<xsl:param name="title-color" />
<xsl:param name="title-text-color" />
<xsl:template match="/">
<xsl:copy>
.titlebar {
background-color: <xsl:value-of select="$title-color"/>;
}
@dshookowsky
dshookowsky / brand.xml
Created April 10, 2014 14:11
Content/xml/brand.xml
<?xml version="1.0" encoding="utf-8" ?>
<style>
</style>
@dshookowsky
dshookowsky / structure.css
Created April 10, 2014 14:11
Content/css/structure.css
body {
margin: 0px;
padding: 0px;
}
.titlebar {
height: 44px;
width: 100%;
text-align: center;
}
@dshookowsky
dshookowsky / StyleController.cs
Created April 10, 2014 14:10
Controllers/StyleController.cs
using System.IO;
using System.Web.Mvc;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
namespace Branding.Controllers
{
public class StyleController : Controller
{
@dshookowsky
dshookowsky / HomeController.cs
Created April 10, 2014 14:09
Controllers/HomeController.cs
using System.Web.Mvc;
namespace Branding.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
@dshookowsky
dshookowsky / Index.cshtml
Created April 10, 2014 14:08
Views/Home/Index.cshtml
@{
ViewBag.Title = "Home";
}
<h2>Home</h2>
<span class="welcome">Welcome</span>