/scalate-website/src/WEB-INF/scalate/layouts/default.jade
http://github.com/scalate/scalate · Jade · 120 lines · 108 code · 12 blank · 0 comment · 7 complexity · b50d1e609ff3a6619e4607628963bae4 MD5 · raw file
- -#
- -# Copyright (C) 2009-2010 the original author or authors.
- -# See the notice.md file distributed with this work for additional
- -# information regarding copyright ownership.
- -#
- -# Licensed under the Apache License, Version 2.0 (the "License");
- -# you may not use this file except in compliance with the License.
- -# You may obtain a copy of the License at
- -#
- -# http://www.apache.org/licenses/LICENSE-2.0
- -#
- -# Unless required by applicable law or agreed to in writing, software
- -# distributed under the License is distributed on an "AS IS" BASIS,
- -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- -# See the License for the specific language governing permissions and
- -# limitations under the License.
- -#
- - response.setContentType("text/html")
- -@ var title : String = ""
- -@ var body: String = null
- -@ var overview: String = null
- -@ var spot: String = null
- -@ var blog: String = null
- -@ var head: String = null
- - val include_console = engine.isDevelopmentMode && engine.resourceLoader.exists("/org/fusesource/scalate/console/console_head.scaml")
- -
- def templates: List[String] = attributes.get("scalateTemplates") match {
- case Some(list: List[String]) => list.map(_.stripPrefix("/")).distinct.reverse
- case _ => Nil
- }
- def layouts: List[String] = attributes.get("scalateLayouts") match {
- case Some(list: List[String]) => list.map(_.stripPrefix("/")).distinct.reverse
- case _ => Nil
- }
- !!! Basic
- html(lang="en")
- head
- meta(content="text/html; charset=utf-8" http-equiv="Content-Type")
- meta(content="scala template engine implementing HAML, JSP, Erb style templates" name="description")
- meta(content="scalate,scala,template engine,haml,erb,jsp" name="keywords")
- meta(content="Scalate" name="author")
- script(src={uri("/scripts/jquery.js")})
- :javascript
- $(function() {
- $("#navigation div.edit img").click(function() {
- $("#files_popup").toggle("slow");
- return false;
- });
- });
- -# link(type="text/css" rel="stylesheet" href={uri("/styles/bootstrap-1.2.0.min.css")})
- link(type="text/css" rel="stylesheet" href={uri("/styles/impact/css/pygmentize.css")})
- link(type="text/css" rel="stylesheet" href={uri("/styles/impact/css/site.css")})
- - if (head!=null)
- !~~ head
- -#
- - if (include_console)
- - include("/org/fusesource/scalate/console/console_head.scaml")
- link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
-
- title= title
- body
-
- #navigation
- .edit
- img(src={uri("/images/edit.png")})
- .wrapper
- - include("/_navigation.ssp.md")
- #files_popup.popover.top
- .inner
- h3.title Fork this page on GitHub
- .content
- ul
- - for( file <- templates)
- li
- a(href={git_edit_page_base+"/"+file}) = file
- - for( file <- layouts)
- li
- a(href={git_edit_page_base+"/"+file}) = file
-
- - if (overview!=null)
- div#overview
- div.wrapper
- -if ( project_logo!=null )
- div.logo
- img(src="#{uri(project_logo)}" alt="#{project_name} logo")
- div.message
- !~~ overview
-
- - if (spot!=null)
- div#spot
- div.wrapper
- !~~ spot
- - if (body!=null)
- div#content
- div.wrapper
- !~~ body
-
- - if (blog!=null)
- div#blog
- div.wrapper
- !~~ blog
-
- -#
- - if (include_console)
- = include("/org/fusesource/scalate/console/console.scaml")
- :javascript
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try {
- var pageTracker = _gat._getTracker("UA-1347593-12");
- pageTracker._trackPageview();
- } catch(err) {}