Skip to content

Instantly share code, notes, and snippets.

package riff.raff.snippet
import net.liftweb.http._
import xml.NodeSeq
import net.liftweb.sitemap.MenuItem
class BootstrapMenu {
def render(in: NodeSeq): NodeSeq = {
val menuEntries =
- import net.liftweb.http._
!!! 5
html{:xmlns => "http://www.w3.org/1999/xhtml", "xmlns:lift" => "http://liftweb.net/"}
head
meta{:content => "text/html", :charset => "UTF-8", "http-equiv" => "content-type"}
meta{:name => "description", :content => ""}
meta{:name => "keywords", :content => ""}
title{:class => "lift:Menu.title"}
|App:
html
head
title
|Home
body{:class => "lift:content_id=main"}
#main{:class => "lift:surround?with=default;at=content"}
h2
|Welcome to your Lift Application!
p
span{:class => "lift:helloWorld.hello"}
@arashi01
arashi01 / Boot.scala
Created October 10, 2012 10:24 — forked from karma4u101/Boot.scala
Lift - Locale via user action (clicking flag img)
package bootstrap.liftweb
import java.util.Locale
:
//object holding the chosen locale during the session, can be updated by user at any time.
object localeOverride extends SessionVar[Box[Locale]](Empty)
class Boot extends Loggable {
def boot {
:
@arashi01
arashi01 / pom.xml
Created October 13, 2012 20:21 — forked from mkristian/pom-compass.xml
using gem-maven-plugin to compass compile
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>example</artifactId>
<version>0.0.36</version>
9: class file needed by HTTPServletContext is missing.
[error] reference value servlet of package javax refers to nonexisting symbol.
[error] case http: HTTPServletContext => http.ctx.getRealPath(uri)
[error] ^
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 1 s, completed 19-Oct-2012 07:39:30
> compile
[info] Compiling 7 Scala sources to /home/a.rashid/Work/projects/zantekk-web/target/scala-2.9.2/classes...
[error] /home/a.rashid/Work/projects/zantekk-web/src/main/scala/com/zantekk/www/conf/LiftTemplateEngine.scala:59: class file needed by HTTPServletContext is missing.
<a href="#" class="showhide" source="one"> Thing </a>
<div id="one">aaa</div>
<a href="#" class="showhide" source="two"> Other Thing</a>
<div id="two">bbbb</div>
@arashi01
arashi01 / stickyfoundationfooter.js
Created October 29, 2012 00:20 — forked from spilliams/stickyfoundationfooter.js
Make Ryan Fait's Sticky Footer work with ZURB Foundation
/* Sticky Footer Foundation fix */
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
window.onresize = function(){
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
}
package riff.raff.snippet
import net.liftweb.http._
import xml.NodeSeq
import net.liftweb.sitemap.MenuItem
class BootstrapMenu {
def render(in: NodeSeq): NodeSeq = {
val menuEntries =
@arashi01
arashi01 / gist:4054125
Created November 11, 2012 07:57
joundation js
<script src="javascripts/jquery.js"></script>
<script src="javascripts/jquery.foundation.mediaQueryToggle.js"></script>
<script src="javascripts/jquery.foundation.forms.js"></script>
<script src="javascripts/jquery.foundation.reveal.js"></script>
<script src="javascripts/jquery.foundation.orbit.js"></script>