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 35 def GET(self):
36 36 return render.about()
37 37  
  38 +class Support:
  39 + def GET(self):
  40 + return render.support()
  41 +
38 42 class Thanks:
39 43 def POST(self):
40 44 return render.thanks()
41 45  
42   -class Support:
43   - def POST(self):
44   - return render.support()
45   -
46 46 class Package:
47 47 def GET(self, pkg):
48 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 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 37 * Package Box
... ... @@ -47,11 +55,8 @@ margin-top: 20px;
47 55 #debtags_box {
48 56 display: block;
49 57 float: right;
50   -background-color: #dfdfdf;
51   -border-radius: 5px;
52 58 width: 150px;
53 59 font-size: 0.8em;
54   -padding: 5px;
55 60 }
56 61  
57 62 #debtags_box h2 {
... ... @@ -84,6 +89,20 @@ margin-top: 20px;
84 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 106 #details_box li {
88 107 margin-bottom: 10px;
89 108 }
... ...
src/web/static/css/style.css
... ... @@ -62,13 +62,14 @@ background-image: url('../images/pattern.gif');
62 62 #wrap {
63 63 min-width: 470px;
64 64 max-width: 960px;
65   -margin-top: 40px;
66 65 padding-top: 55px;
  66 +margin-top: 40px;
  67 +margin-bottom: 40px;
67 68 margin-right: auto;
68   -margin-bottom: 0px;
69 69 margin-left: auto;
70 70 background-color: white;
71 71 border-radius: 10px;
  72 +box-shadow: 0 0 20px #000000;
72 73 background: #e0e0e0; /* Old browsers: generate by http://www.colorzilla.com/gradient-editor/ */
73 74 background: -moz-linear-gradient(top, #e0e0e0 0%, #ffffff 46%); /* FF3.6+ */
74 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 88 width: 620px;
88 89 height: 60px;
89 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 93 padding: 15px;
91 94 background: #000;
92 95 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#babdb6', endColorstr='#000000');
... ... @@ -108,9 +111,9 @@ float: left;
108 111 #navbar {
109 112 list-style: none;
110 113 height: 20px;
111   -width: 100%;
112 114 padding:0;
113   -margin:10px;
  115 +margin-bottom: 5px;
  116 +float: left;
114 117 }
115 118  
116 119 #navbar li {
... ... @@ -128,7 +131,7 @@ margin-left: -1px;
128 131 position: relative;
129 132 left: 1px;
130 133 text-decoration: none;
131   -border: 1px solid gray;
  134 +border-right: 1px solid gray;
132 135 }
133 136  
134 137 #navbar li a:hover {
... ... @@ -137,8 +140,9 @@ color: red;
137 140  
138 141 #sidebar {
139 142 width: 370px;
140   -min-height: 450px;
  143 +min-height: 475px;
141 144 float: right;
  145 +padding-bottom: 20px;
142 146 }
143 147  
144 148 #maincontent {
... ... @@ -256,13 +260,32 @@ padding:0;
256 260 /* Gray Box */
257 261  
258 262 .graybox {
259   -background-color: #dfdfdf;
  263 +background: #dfdfdf;
260 264 border-radius: 5px;
261   -font-size: 0.8;
262 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 290 /* Tip */
268 291 div.tip
... ... @@ -349,6 +372,7 @@ margin: 0;
349 372 outline: 0 none;
350 373 padding: 3px;
351 374 background: none;
  375 +text-align: center;
352 376 }
353 377  
354 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 419 background: -moz-linear-gradient(top, #d3d7cf, #d3d7cf);
396 420 }
397 421  
  422 +/* Advance Query */
  423 +
398 424 #advanced-button {
399 425 color: #888a85;
400 426 font-size: 10px;
... ... @@ -414,8 +440,6 @@ cursor: pointer;
414 440 #advanced-button:hover { color: black; }
415 441  
416 442  
417   -/* Advance Query */
418   -
419 443 #advanced-slide { display: none; }
420 444  
421 445 #advanced-slide legend {
... ...
src/web/templates/about.html
... ... @@ -7,16 +7,18 @@ $var jsfiles:
7 7 <div id="maincontent">
8 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 16 for application recommendation at the GNU/Linux world. It was initially thought
16 17 as a Debian package recommender, but considering the multi-distro effort in
17 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 24 </div><!-- id="innertube" -->
... ...
src/web/templates/apprec.html
... ... @@ -42,11 +42,10 @@ $$(document).ready(function() {
42 42 </script>
43 43  
44 44  
45   -
46 45 <div id="sidebar">
47 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 49 <h2>Recommendation strategy details</h2>
51 50 <ul class="toc">
52 51 $for key, value in request.get_details().items():
... ...
src/web/templates/layout.html
... ... @@ -170,8 +170,9 @@ $:content
170 170 <li><a href="http://github.com/tassia/AppRecommender">Development</a></li>
171 171 </ul>
172 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 176 </div><!-- id="footer" -->
176 177  
177 178  
... ...
src/web/templates/package.html
1 1 $def with (pkg)
2 2  
3   -<div id="debtags_box" class="graybox">
  3 +<div id="debtags_box" class="graybox horiz-grad">
4 4 <h2>Debtags</h2>
5 5 <ul id="debtags_pkg">
6 6 $for facet, tags in pkg['tag'].items():
... ... @@ -51,7 +51,7 @@ $for facet, tags in pkg[&#39;tag&#39;].items():
51 51  
52 52 </p>
53 53  
54   -<div id="debresources_box" class="graybox">
  54 +<div id="debresources_box" class="graybox vert-grad">
55 55 <h2>Debian resources:</h2>
56 56 <ul>
57 57 <li><a href="http://packages.debian.org/$pkg['package']">Package page on debian.org</a></li>
... ...