Commit aa1a82c7170429b940783f8ea35327fb9b76616b

Authored by Valessio Soares de Brito
1 parent 04530d34
Exists in master and in 1 other branch add_vagrant

fix bug server.py and small changes css

src/web/server.py
@@ -35,14 +35,14 @@ class About: @@ -35,14 +35,14 @@ class About:
35 def GET(self): 35 def GET(self):
36 return render.about() 36 return render.about()
37 37
  38 +class Support:
  39 + def GET(self):
  40 + return render.support()
  41 +
38 class Thanks: 42 class Thanks:
39 def POST(self): 43 def POST(self):
40 return render.thanks() 44 return render.thanks()
41 45
42 -class Support:  
43 - def POST(self):  
44 - return render.support()  
45 -  
46 class Package: 46 class Package:
47 def GET(self, pkg): 47 def GET(self, pkg):
48 json_source = "http://dde.debian.net/dde/q/udd/packages/all/%s?t=json" % pkg #FIXME: url goes to config 48 json_source = "http://dde.debian.net/dde/q/udd/packages/all/%s?t=json" % pkg #FIXME: url goes to config
src/web/static/css/apprec.css
@@ -24,6 +24,14 @@ color: gray; @@ -24,6 +24,14 @@ color: gray;
24 } 24 }
25 25
26 26
  27 +a.link-thumb img {
  28 +height: 100px;
  29 +margin: 5px;
  30 +border-radius: 4px;
  31 +box-shadow: 0 1px 2px gray;
  32 +}
  33 +
  34 +
27 35
28 /* 36 /*
29 * Package Box 37 * Package Box
@@ -47,11 +55,8 @@ margin-top: 20px; @@ -47,11 +55,8 @@ margin-top: 20px;
47 #debtags_box { 55 #debtags_box {
48 display: block; 56 display: block;
49 float: right; 57 float: right;
50 -background-color: #dfdfdf;  
51 -border-radius: 5px;  
52 width: 150px; 58 width: 150px;
53 font-size: 0.8em; 59 font-size: 0.8em;
54 -padding: 5px;  
55 } 60 }
56 61
57 #debtags_box h2 { 62 #debtags_box h2 {
@@ -84,6 +89,20 @@ margin-top: 20px; @@ -84,6 +89,20 @@ margin-top: 20px;
84 margin-bottom: 4px; 89 margin-bottom: 4px;
85 } 90 }
86 91
  92 +/* Details BOX */
  93 +
  94 +#details_box {
  95 +margin-top: 50px;
  96 +padding: 20px;
  97 +font-size: 0.8;
  98 +color: #545454;
  99 +}
  100 +
  101 +#details_box h2 {
  102 +margin: -5px 0 15px 0px;
  103 +color: #000;
  104 +}
  105 +
87 #details_box li { 106 #details_box li {
88 margin-bottom: 10px; 107 margin-bottom: 10px;
89 } 108 }
src/web/static/css/style.css
@@ -62,13 +62,14 @@ background-image: url('../images/pattern.gif'); @@ -62,13 +62,14 @@ background-image: url('../images/pattern.gif');
62 #wrap { 62 #wrap {
63 min-width: 470px; 63 min-width: 470px;
64 max-width: 960px; 64 max-width: 960px;
65 -margin-top: 40px;  
66 padding-top: 55px; 65 padding-top: 55px;
  66 +margin-top: 40px;
  67 +margin-bottom: 40px;
67 margin-right: auto; 68 margin-right: auto;
68 -margin-bottom: 0px;  
69 margin-left: auto; 69 margin-left: auto;
70 background-color: white; 70 background-color: white;
71 border-radius: 10px; 71 border-radius: 10px;
  72 +box-shadow: 0 0 20px #000000;
72 background: #e0e0e0; /* Old browsers: generate by http://www.colorzilla.com/gradient-editor/ */ 73 background: #e0e0e0; /* Old browsers: generate by http://www.colorzilla.com/gradient-editor/ */
73 background: -moz-linear-gradient(top, #e0e0e0 0%, #ffffff 46%); /* FF3.6+ */ 74 background: -moz-linear-gradient(top, #e0e0e0 0%, #ffffff 46%); /* FF3.6+ */
74 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e0e0e0), color-stop(46%,#ffffff)); /* Chrome,Safari4+ */ 75 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e0e0e0), color-stop(46%,#ffffff)); /* Chrome,Safari4+ */
@@ -87,6 +88,8 @@ margin-left: 50%; @@ -87,6 +88,8 @@ margin-left: 50%;
87 width: 620px; 88 width: 620px;
88 height: 60px; 89 height: 60px;
89 border-radius: 0 0 10px 10px; 90 border-radius: 0 0 10px 10px;
  91 +box-shadow: 0 -1px 5px #000000 inset, 0 1px 10px #000000 inset, 0 2px 20px #545454;
  92 +outline: medium none;
90 padding: 15px; 93 padding: 15px;
91 background: #000; 94 background: #000;
92 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#babdb6', endColorstr='#000000'); 95 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#babdb6', endColorstr='#000000');
@@ -108,9 +111,9 @@ float: left; @@ -108,9 +111,9 @@ float: left;
108 #navbar { 111 #navbar {
109 list-style: none; 112 list-style: none;
110 height: 20px; 113 height: 20px;
111 -width: 100%;  
112 padding:0; 114 padding:0;
113 -margin:10px; 115 +margin-bottom: 5px;
  116 +float: left;
114 } 117 }
115 118
116 #navbar li { 119 #navbar li {
@@ -128,7 +131,7 @@ margin-left: -1px; @@ -128,7 +131,7 @@ margin-left: -1px;
128 position: relative; 131 position: relative;
129 left: 1px; 132 left: 1px;
130 text-decoration: none; 133 text-decoration: none;
131 -border: 1px solid gray; 134 +border-right: 1px solid gray;
132 } 135 }
133 136
134 #navbar li a:hover { 137 #navbar li a:hover {
@@ -137,8 +140,9 @@ color: red; @@ -137,8 +140,9 @@ color: red;
137 140
138 #sidebar { 141 #sidebar {
139 width: 370px; 142 width: 370px;
140 -min-height: 450px; 143 +min-height: 475px;
141 float: right; 144 float: right;
  145 +padding-bottom: 20px;
142 } 146 }
143 147
144 #maincontent { 148 #maincontent {
@@ -256,13 +260,32 @@ padding:0; @@ -256,13 +260,32 @@ padding:0;
256 /* Gray Box */ 260 /* Gray Box */
257 261
258 .graybox { 262 .graybox {
259 -background-color: #dfdfdf; 263 +background: #dfdfdf;
260 border-radius: 5px; 264 border-radius: 5px;
261 -font-size: 0.8;  
262 padding: 5px; 265 padding: 5px;
263 -box-shadow: 0 1px 2px gray;  
264 } 266 }
265 267
  268 +.horiz-grad {
  269 +background: #dfdfdf; /* Old browsers */
  270 +background: -moz-linear-gradient(left, #dfdfdf 51%, #ffffff 100%); /* FF3.6+ */
  271 +background: -webkit-gradient(linear, left top, right top, color-stop(51%,#dfdfdf), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
  272 +background: -webkit-linear-gradient(left, #dfdfdf 51%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
  273 +background: -o-linear-gradient(left, #dfdfdf 51%,#ffffff 100%); /* Opera11.10+ */
  274 +background: -ms-linear-gradient(left, #dfdfdf 51%,#ffffff 100%); /* IE10+ */
  275 +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfdfdf', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 */
  276 +background: linear-gradient(left, #dfdfdf 51%,#ffffff 100%); /* W3C */
  277 +}
  278 +
  279 +.vert-grad {
  280 +background: #dfdfdf; /* Old browsers */
  281 +background: -moz-linear-gradient(top, #dfdfdf 51%, #ffffff 100%); /* FF3.6+ */
  282 +background: -webkit-gradient(linear, left top, left bottom, color-stop(51%,#dfdfdf), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */
  283 +background: -webkit-linear-gradient(top, #dfdfdf 51%,#ffffff 100%); /* Chrome10+,Safari5.1+ */
  284 +background: -o-linear-gradient(top, #dfdfdf 51%,#ffffff 100%); /* Opera11.10+ */
  285 +background: -ms-linear-gradient(top, #dfdfdf 51%,#ffffff 100%); /* IE10+ */
  286 +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfdfdf', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
  287 +background: linear-gradient(top, #dfdfdf 51%,#ffffff 100%); /* W3C */
  288 +}
266 289
267 /* Tip */ 290 /* Tip */
268 div.tip 291 div.tip
@@ -349,6 +372,7 @@ margin: 0; @@ -349,6 +372,7 @@ margin: 0;
349 outline: 0 none; 372 outline: 0 none;
350 padding: 3px; 373 padding: 3px;
351 background: none; 374 background: none;
  375 +text-align: center;
352 } 376 }
353 377
354 #pkgs_list:hover, #pkgs_list:active, #pkgs_list:focus { 378 #pkgs_list:hover, #pkgs_list:active, #pkgs_list:focus {
@@ -395,6 +419,8 @@ background: -webkit-gradient(linear, left top, left bottom, from(#d3d7cf), to(#d @@ -395,6 +419,8 @@ background: -webkit-gradient(linear, left top, left bottom, from(#d3d7cf), to(#d
395 background: -moz-linear-gradient(top, #d3d7cf, #d3d7cf); 419 background: -moz-linear-gradient(top, #d3d7cf, #d3d7cf);
396 } 420 }
397 421
  422 +/* Advance Query */
  423 +
398 #advanced-button { 424 #advanced-button {
399 color: #888a85; 425 color: #888a85;
400 font-size: 10px; 426 font-size: 10px;
@@ -414,8 +440,6 @@ cursor: pointer; @@ -414,8 +440,6 @@ cursor: pointer;
414 #advanced-button:hover { color: black; } 440 #advanced-button:hover { color: black; }
415 441
416 442
417 -/* Advance Query */  
418 -  
419 #advanced-slide { display: none; } 443 #advanced-slide { display: none; }
420 444
421 #advanced-slide legend { 445 #advanced-slide legend {
src/web/templates/about.html
@@ -7,16 +7,18 @@ $var jsfiles: @@ -7,16 +7,18 @@ $var jsfiles:
7 <div id="maincontent"> 7 <div id="maincontent">
8 <div class="innertube"> 8 <div class="innertube">
9 9
10 -<img style="float: right;" alt="AppRecommender logo" src="/static/images/logo.png" /> 10 +<img style="float: right;" alt="AppRecommender logo" src="/static/images/logo.png" width="150px" />
11 11
12 -<div class="graybox">  
13 - <h1>What is this?</h1>  
14 -<p>AppRecommender is a project in development that aims to provide solutions 12 +<h1>What is this?</h1>
  13 +
  14 +<p>
  15 +AppRecommender is a project in development that aims to provide solutions
15 for application recommendation at the GNU/Linux world. It was initially thought 16 for application recommendation at the GNU/Linux world. It was initially thought
16 as a Debian package recommender, but considering the multi-distro effort in 17 as a Debian package recommender, but considering the multi-distro effort in
17 providing platform independent solutions, it should also follow this 18 providing platform independent solutions, it should also follow this
18 -principle.</p>  
19 -</div> 19 +principle.
  20 +</p>
  21 +
20 22
21 23
22 </div><!-- id="innertube" --> 24 </div><!-- id="innertube" -->
src/web/templates/apprec.html
@@ -42,11 +42,10 @@ $$(document).ready(function() { @@ -42,11 +42,10 @@ $$(document).ready(function() {
42 </script> 42 </script>
43 43
44 44
45 -  
46 <div id="sidebar"> 45 <div id="sidebar">
47 <div class="innertube"> 46 <div class="innertube">
48 47
49 -<div id="details_box" class="graybox align-left"> 48 +<div id="details_box" class="graybox align-left vert-grad">
50 <h2>Recommendation strategy details</h2> 49 <h2>Recommendation strategy details</h2>
51 <ul class="toc"> 50 <ul class="toc">
52 $for key, value in request.get_details().items(): 51 $for key, value in request.get_details().items():
src/web/templates/layout.html
@@ -170,8 +170,9 @@ $:content @@ -170,8 +170,9 @@ $:content
170 <li><a href="http://github.com/tassia/AppRecommender">Development</a></li> 170 <li><a href="http://github.com/tassia/AppRecommender">Development</a></li>
171 </ul> 171 </ul>
172 </div><!-- id="navbar" --> 172 </div><!-- id="navbar" -->
173 -  
174 - Copyright © 2011 AppRecommender. Debian is a registered trademark of Software in the Public Interest, Inc. 173 + <p id="copyright">
  174 + Copyright © 2011 AppRecommender. Debian is a registered trademark of Software in the Public Interest, Inc.
  175 + </p>
175 </div><!-- id="footer" --> 176 </div><!-- id="footer" -->
176 177
177 178
src/web/templates/package.html
1 $def with (pkg) 1 $def with (pkg)
2 2
3 -<div id="debtags_box" class="graybox"> 3 +<div id="debtags_box" class="graybox horiz-grad">
4 <h2>Debtags</h2> 4 <h2>Debtags</h2>
5 <ul id="debtags_pkg"> 5 <ul id="debtags_pkg">
6 $for facet, tags in pkg['tag'].items(): 6 $for facet, tags in pkg['tag'].items():
@@ -51,7 +51,7 @@ $for facet, tags in pkg[&#39;tag&#39;].items(): @@ -51,7 +51,7 @@ $for facet, tags in pkg[&#39;tag&#39;].items():
51 51
52 </p> 52 </p>
53 53
54 -<div id="debresources_box" class="graybox"> 54 +<div id="debresources_box" class="graybox vert-grad">
55 <h2>Debian resources:</h2> 55 <h2>Debian resources:</h2>
56 <ul> 56 <ul>
57 <li><a href="http://packages.debian.org/$pkg['package']">Package page on debian.org</a></li> 57 <li><a href="http://packages.debian.org/$pkg['package']">Package page on debian.org</a></li>