Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (111 sloc) 4.41 KB
{% extends "base.html" %}
{% block title %} - Standard File Icons{% endblock %}
{% block css %}
#blurb {
border : 1px solid #ddd;
padding : 20px;
background : #eff6ff;
}
.header h1 {
text-align : center;
}
#body {
width : 800px;
margin : auto;
}
#examples, #sets, #mimetypes, #footer {
border : 1px solid #ddd;
padding : 20px;
margin : 10px 0px;
}
#lists {
height : 100%;
}
#examples {
background : #fff6ef;
float : left;
width : 506px;
height : 100%;
}
#sets {
background : #ffefef;
float : left;
margin-right : 10px;
height : 100%;
width : 200px;
}
#mimetypes {
background : #effff6;
clear : both;
}
#footer {
background : #f6efff;
text-align : center;
}
a {
color : #3030FF;
text-decoration : none;
}
a:hover {
text-decoration : underline;
}
{% endblock %}
{% block content %}
<div class="header">
<h1><span class="std">std</span>icon</h1>
</div>
<div id="body">
<div id="blurb">
This site simply hosts icons for lots of filetypes that you can use and link to. You can use a file extention like <code><img src="/html?size=16">/html</code>, a filename like <code><img src="/movie.avi?size=16" />/movie.avi</code>, a <a href="http://en.wikipedia.org/wiki/MIME">mimetype</a> like <code><img src="/application/pdf?size=16">/application/pdf</code> and/or choose from a specific set like <code><img src="/neu/html?size=16">/neu/html</code> or even combine them like <code><img src="/neu/image/png?size=16">/neu/image/png</code>. You can also use the <code><img src="/html?size=16">?size=16</code> to get a consistent size of icons, and the <code><img src="/404.icon?size=16&default=http%3a%2f%2fwww.stdicon.com%2fhumility%2ftext%2fx-authors.ico" /> ?default=...</code> to force a default instead of an HTTP 404.
</div>
<div id="lists">
<div id="sets">
<h2>Sets</h2>
<ul>
{% for iconset in sets %}
<li><a href="/{{ iconset.set.name }}/"><img src="/{{ iconset.set.name }}/{{ iconset.icon.mimetype }}?size=16" /> {{ iconset.set.name }}</a></li>
{% endfor %}
</ul>
</div>
<div id="examples">
<h2>Quick Examples</h2>
<ul><li>
<a href="html"><img src="/html" height="16" />/html</a>
</li><li>
<a href="file.html"><img src="/file.html" height="16" />/file.html</a>
</li><li>
<a href="/crystal/html"><img src="/crystal/html" height="16" />/crystal/html</a>
</li><li>
<a href="/crystal/text/html"><img src="/crystal/text/html" height="16" />/crystal/text/html</a>
</li><li>
<a href="/crystal/text/html?size=16"><img src="/crystal/text/html?size=16" height="16" />/crystal/text/html?size=16</a>
</li><li>
<a href="/garbage?size=16&default=http%3a%2f%2fstdicon.com%2fhtml"><img src="/garbage?size=16&default=http%3a%2f%2fstdicon.com%2fhtml" height="16" />/garbage?size=16&default=http%3a%2f%2fstdicon.com%2fhtml</a>
</li></ul>
</div>
</div>
<div id="mimetypes">
<h2>Conversions</h2>
<p>File extension to mimetype lookup like <a href="/extension/html">/extension/html</a> or <a href="/extension/codemonkey.mp3">/extension/codemonkey.mp3</a> or in JSONP <a href="/extension/txt?callback=cb">/extension/txt?callback=cb</a>
<p>Mimetype to file extension like <a href="/mimetype/application/postscript">/mimetype/application/postscript</a> or <a href="/mimetype/application/zip">/mimetype/application/zip</a>
<p>Or the whole dump in <a href="/mimetypes">json</a> or <a href="/mimetypes?format=xml">xml</a> (from <a href="http://docs.python.org/library/mimetypes.html">python mimetypes</a> and <a href="http://www.home.unix-ag.org/bmeurer/files/dotfiles/dot.mime.types">apache</a>)
</div>
<div id="footer">
by <a href="http://paulisageek.com">Paul Tarjan</a> and <a href="http://progrium.com/">Jeff Lindsay</a>. <a href="http://github.com/ptarjan/stdicon/tree/master">Open Source</a>. On <a href="http://appengine.google.com/">App Engine</a>.
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
$(function() {
var height = 0;
$("#lists").children().each(function() {
var h = $(this).height();
if (height < h)
height = h;
});
$("#lists").children().each(function() {
$(this).height(height);
});
})
</script>
{% endblock %}