Permalink
Browse files

Merge branch 'master' of https://github.com/MexicanVC/Fogata

  • Loading branch information...
2 parents 8434eba + e48077f commit 389375528a13a49a3b9a1008a057f5c31ae38393 @pedrogk pedrogk committed Mar 13, 2012
View
@@ -1,7 +1,7 @@
-Noticias Hacker
+**Fogata**
===============
-Este es un clon de hacker news con la intencion de tener un servicio similar para Iberoamerica y demas personas que hablen castellano.
+Este es un fork de noticias hacker con la intencion de tener un servicio de noticias sociales hecho en conjunto SG y Mexican.vc
Instalacion
-----------
@@ -34,28 +34,14 @@ base_url = '' # Esto es para que solo funcione en el dominio adecuado y no en el
base_url_custom_url = '' # Esto es si tienes un dominio diferente a appspot
-#index_tank
-indextank_public_key = ''
-indextank_private_key = ''
-indextank_name_key = ''
-indextank_name_key_prod = ''
-
-
CSS
---
Para modificar el css requieres compilar los archivos scss con [sass](http://sass-lang.com/)
-Estado actual:
---------------
-
-El codigo esta funcionando en [Noticias Hacker](http://noticiashacker.com) y aunque no esta perfectamente optimizado, esta consumiendo pocos recursos en el app engine y ha aguantado muchos usuarios de golpe(20k visitas en 24 horas gracias a un post en HN).
-Aun asi, seria bueno idea seguir optimizandolo para que funciona tan rapido como sea posible, aunque esto es un reto en el app engine, se puede conseguir si seguimos usando memcache para todo lo que sea posible y tratar de hacer operaciones agrupadas cuando se pueda.
-Las cosas que tenemos que trabajar en los proximos dias y semanas son:
+TODO
+----
-* Agregar una manera de recuperar el password(despues de poner tu correo en el perfil)
-* Agregar una manera de borrar mensajes y comentarios
-* Agregar un api publico
-* Seguir mejorando el estilo
+1) Remove IndexTank
View
@@ -1,4 +1,4 @@
-application: noticiashacker
+application: sgfogata
version: 5
runtime: python
api_version: 1
@@ -76,7 +76,7 @@ def post(self, post_id):
post.put()
#index with indextank
- helper.indextank_document(helper.base_url(self), post)
+ #helper.indextank_document(helper.base_url(self), post)
self.redirect('/noticia/' + str(post.key()))
else:
View
@@ -44,6 +44,7 @@
# Front page
class Handler(webapp.RequestHandler):
def get(self):
+ LINK_TO_COMMENT = True
page = helper.sanitizeHtml(self.request.get('pagina'))
perPage = 20
page = int(page) if page else 1
View
@@ -43,6 +43,7 @@
class Handler(webapp.RequestHandler):
def get(self):
+ LINK_TO_COMMENT = True
page = helper.sanitizeHtml(self.request.get('pagina'))
perPage = 20
page = int(page) if page else 1
View
@@ -67,9 +67,9 @@ def get(self):
))
rss = PyRSS2Gen.RSS2(
- title = "Noticias Hacker",
- link = "http://noticiashacker.com/",
- description = "Noticias Hacker",
+ title = "Fogata",
+ link = "http://www.fogata.co/",
+ description = "Fogata",
lastBuildDate = datetime.now(),
items = items
)
@@ -97,7 +97,7 @@ def post(self):
Post.remove_cached_count_from_memcache()
#index with indextank
- helper.indextank_document( helper.base_url(self), post)
+ #helper.indextank_document( helper.base_url(self), post)
self.redirect('/noticia/' + str(post.nice_url));
else:
@@ -123,7 +123,7 @@ def post(self):
vote.put()
#index with indextank
- helper.indextank_document( helper.base_url(self), post)
+ #helper.indextank_document( helper.base_url(self), post)
self.redirect('/noticia/' + post.nice_url);
else:
View
@@ -164,7 +164,7 @@ def calculate_karma(self):
delta = (datetime.now() - self.created)
seconds = delta.seconds + delta.days*86400
hours = seconds / 3600 + 1
- votes = self.sum_votes()
+ votes = self.sum_votes() + self.comments.count()
gravity = 1.8
karma = (votes - 1) / pow((hours + 2), gravity)
self.karma = karma
View
@@ -0,0 +1,52 @@
+@import "palette";
+
+@mixin box-shadow($value: 0px 1px 4px rgba(0,0,0,0.25)){
+ -moz-box-shadow: $value;
+ -webkit-box-shadow: $value;
+ box-shadow: $value;
+}
+
+@mixin round-corners($radius: 5px){
+ -webkit-border-radius: $radius;
+ -moz-border-radius: $radius;
+ -khtml-border-radius: $radius;
+ border-radius: $radius;
+}
+
+@mixin gradient($top: $brand, $mid: darken($brand,3), $bottom: darken($brand, 7)){
+ background: $top;
+ border: 1px solid $bottom;
+ background-image: linear-gradient(bottom, $bottom 17%, $mid 59%, $top 80%);
+ background-image: -o-linear-gradient(bottom, $bottom 17%, $mid 59%, $top 80%);
+ background-image: -moz-linear-gradient(bottom, $bottom 17%, $mid 59%, $top 80%);
+ background-image: -webkit-linear-gradient(bottom, $bottom 17%, $mid 59%, $top 80%);
+ background-image: -ms-linear-gradient(bottom, $bottom 17%, $mid 59%, $top 80%);
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.17, $bottom), color-stop(0.59, $mid), color-stop(0.8, $top) );
+ /* For Internet Explorer 5.5 - 7 */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$top}, endColorstr=#{$bottom});
+ /* For Internet Explorer 8 */
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$top}, endColorstr=#{$bottom})";
+}
+@mixin link_to_button($color: $brand){
+ display: block;
+ text-decoration: none;
+ color: white;
+ text-align: center;
+ padding: 0.75em 1.5em;
+ text-shadow: 0px -1px 1px rgba(0,0,0,0.35);
+ font-weight: 800;
+ @include box-shadow(inset 0 1px 0 rgba(255,255,255,0.5));
+ @include round-corners;
+ @include gradient(lighten($color,5), $color, darken($color,5));
+ &:hover{
+ @include gradient($color, darken($color,5), darken($color,10));
+ text-decoration: none;
+ cursor: pointer;
+ }
+}
+
+@mixin intuitive_box_sizing{
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+}
View
@@ -0,0 +1,11 @@
+$bright_color: #783C97;
+$brand: $bright_color;
+
+$alert_color: #FF4E27;
+$light-color: #F2E9E1;
+$dark_gray: #111;
+$soft_gray: #666;
+$mid_gray: #4F4649;
+$soft_white: white;
+$soft-red: #FFB5C7;
+$dark-red: #FF0A47;
View
@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
Oops, something went wrong.

0 comments on commit 3893755

Please sign in to comment.