layout.html 5.42 KB
$def with (content)
$ url_base = "http://localhost:8080/"

<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>
        AppRecommender - $content.title
    </title>

        <link href="/static/css/style.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="/static/css/local.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="/static/css/thickbox.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="/static/css/voting.css" media="screen" rel="stylesheet" type="text/css" />

        <script src="/static/js/jquery.js" type="text/javascript"></script>
        <script src="/static/js/jquery.autocomplete.js" type="text/javascript"></script>
        <script src="/static/js/jquery.flyout.js" type="text/javascript"></script>
        <script src="/static/js/jquery.jgrowl.js" type="text/javascript"></script>
        <script src="/static/js/jquery.tooltip.js" type="text/javascript"></script>
        <script src="/static/js/jquery.cycle.js" type="text/javascript"></script>
        <script src="/static/js/handlers.js" type="text/javascript"></script>
        <script src="/static/js/local.js" type="text/javascript"></script>

        <script type="text/javascript" src="/static/js/thickbox.js"></script>

        <script type="text/javascript" src="/static/js/jquery.livequery.js"></script>

<script type="text/javascript">
 $$(document).ready(function() {
        $$('.like_button').mouseenter(function(e) {
                $$('.tooltip').show();
                $$('.ilikethis').fadeIn(200);
        }).mouseleave(function(e) {
                $$('.ilikethis').fadeOut(200);
                $$('.tooltip').hide();
        });
        $$('.dislike_button').mouseenter(function(e) {
                $$('.tooltip2').show();
                $$('.idislikethis').fadeIn(200);
        }).mouseleave(function(e) {
           $$('.tooltip2').hide();
                $$('.idislikethis').fadeOut(200);
        });
        
        $$('.totalstatsbutton').livequery("mouseenter", function(e){
                $$('.greenBar').css("background-color","#AADA37");
                $$('.redbar').css("background-color","#CF362F");
                $$('.tooltip3').show();
                $$('.totalstats').fadeIn(200);
        }).livequery("mouseleave", function(e){
                $$('.tooltip3').hide();
                $$('.greenBar').css("background-color","#DDDDDD");
                $$('.redbar').css("background-color","#DDDDDD");
                $$('.totalstats').fadeOut(200);
        });
});

$$(document).ready(function(){   
        //$('#voting_result').fadeOut();
        $$('button').click(function(){
                var a = $$(this).attr("id");
                
                $$.post("voting.php?value="+a, {
                }, function(response){
                        $$('#voting_result').fadeIn();
                        $$('#voting_result').html($$(response).fadeIn('slow'));
                        // now update box bar                   
                        $$.post("update_box.php", {
                        }, function(update){
                                $$('#update_count').html(unescape(update));                              
                        });
                        ////////////
                        // now update tooltip count                     
                        $$.post("update_tooltip.php", {
                        }, function(updates){
                                $$('.tooltip3').html(unescape(updates));                         
                        });
                        ////////////
                });
        });     
});     
function hideMesg(){

        $$('.rating_message').fadeOut();
        $$.post("rating.php?show=1", {
        }, function(response){
                $$('#inner').html(unescape(response));
                $$('#inner').fadeIn('slow');
        });
}       
</script>


<!--
	<link rel="stylesheet" href="/static/cluetip/jquery.cluetip.css" type="text/css" />

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
	<script src="/static/cluetip/lib/jquery.hoverIntent.js" type="text/javascript"></script>
	<script src="/static/cluetip/lib/jquery.bgiframe.min.js" type="text/javascript"></script>
	<script src="/static/cluetip/jquery.cluetip.js" type="text/javascript"></script>

	<script type="text/javascript">
	$$(document).ready(function() {
	  $$('a.tips').cluetip();

	  $$('#houdini').cluetip({
	    splitTitle: '|', // use the invoking element's title attribute to populate the clueTip...
	                     // ...and split the contents into separate divs where there is a "|"
	    showTitle: false // hide the clueTip's heading
	  });
	});
	</script>
-->

    <link rel="shortcut icon" type="image/x-icon" href="$url_base/favicon.png">

  <body>
    <div id="page">
      <div id="header">
          <h1>AppRecommender</h1>
      </div>

      <div id="nav">
          <a href="$url_base">Home</a>
          |
          <a href="http://www.ime.usp.br/~tassia/apprec.html">About</a>
          |
          <a href="http://github.com/tassia/AppRecommender">Devel</a>
      </div>

      <div id="maincontent">


$:content


    <div id="footer">
        <a href="http://apprec.debian.net/about">About apprec.debian.net</a>
    </div>


<div style="display: none;" id="tooltip"><h3></h3><div class="body"></div><div class="url"></div></div></body></html>