Skip to content

Instantly share code, notes, and snippets.

@andrewminton
andrewminton / gist:1207489
Created September 9, 2011 22:28
Front-end Admin Bar - Sample CSS
.adminBar{
width: 100%;
height: 50px;
background: #353530;
}
.adminBar h1, .adminBar span{
background:none repeat scroll 0 0 #353530;
color:#FFFFFF;
font-weight:bold;
margin:0;
@andrewminton
andrewminton / ajax-submit
Created October 2, 2011 06:16
Ajax Submit form
<!-- ================== -->
<!-- = At Normal Page = -->
<!-- ================== -->
<xsl:template match="data">
<h1>Contact Form</h1>
<form method="post" action="{$current-path}">
<xsl:call-template name="send-message"/>
</form>
<script type="text/javascript">
<data>
<workthumbimages>
<section id="6" handle="work-images">work images</section>
<entry id="126">
<description>cartier-bresson</description>
<image size="114 KB" path="/images" type="image/jpeg">
<filename>hcb2.jpg</filename>
<meta creation="2012-03-13T14:37:02+00:00" width="715" height="440" />
</image>
<project>
<data>
<workthumbimages>
<section id="6" handle="work-images">work images</section>
<entry id="126">
<description>cartier-bresson</description>
<image size="114 KB" path="/images" type="image/jpeg">
<filename>hcb2.jpg</filename>
<meta creation="2012-03-13T14:37:02+00:00" width="715" height="440" />
</image>
<project>
<data>
<hello>paste your xml here</hello>
</data>
<data>
<page-title>This is a H1 tag</page-title>
<page-content id="82">
<h2>The Gorilla Team</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac metus non ante sodales vulputate. Cras porttitor vestibulum varius. Maecenas tristique tortor id nulla gravida venenatis. Integer dapibus, sapien vitae aliquam laoreet, libero massa elementum ante, eu pulvinar erat odio vel augue. Nulla facilisi. Praesent vestibulum bibendum metus.</p>
</page-content>
</data>
<data>
<h1>This is a H1 outside of content block</h1>
<page-content id="82">
<h2 class="this-is-another-class and-another">The Gorilla Team</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac metus non ante sodales vulputate. Cras porttitor vestibulum varius. Maecenas tristique tortor id nulla gravida venenatis. Integer dapibus, sapien vitae aliquam laoreet, libero massa elementum ante, eu pulvinar erat odio vel augue. Nulla facilisi. Praesent vestibulum bibendum metus.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac metus non ante sodales vulputate. Cras porttitor vestibulum varius. Maecenas tristique tortor id nulla gravida venenatis. Integer dapibus, sapien vitae aliquam laoreet, libero massa elementum ante, eu pulvinar erat odio vel augue. Nulla facilisi. Praesent vestibulum bibendum metus.</p>
<h2>This is another h2 I don't want affected</h2>
</page-content>
</data>
<data>
<page-content id="82">
<h2>The Gorilla Team</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac metus non ante sodales vulputate. Cras porttitor vestibulum varius. Maecenas tristique tortor id nulla gravida venenatis. Integer dapibus, sapien vitae aliquam laoreet, libero massa elementum ante, eu pulvinar erat odio vel augue. Nulla facilisi. Praesent vestibulum bibendum metus.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac metus non ante sodales vulputate. Cras porttitor vestibulum varius. Maecenas tristique tortor id nulla gravida venenatis. Integer dapibus, sapien vitae aliquam laoreet, libero massa elementum ante, eu pulvinar erat odio vel augue. Nulla facilisi. Praesent vestibulum bibendum metus.</p>
<h2>This is another h2 I don't want affected</h2>
</page-content>
</data>
<data>
<the-pip>
<entry>
<published-by>
<item id="191" handle="tim-powell" section-handle="team-members" section-name="Team Members">Tim Powell</item>
</published-by>
</entry>
<entry>
<published-by>
<data>
<the-pip>
<entry>
<published-by id="0001">
<item>Smith</item>
</published-by>
</entry>
<entry>
<published-by id="0002">
<item>Jones</item>