Browse Source

Missing URL Validator on otherWebsites form field

Improve responsive mode on homepage
Get rid of useless CSS
Gu1 11 years ago
parent
commit
e1d519745e
3 changed files with 17 additions and 54 deletions
  1. 2 1
      ffdnispdb/forms.py
  2. 14 52
      ffdnispdb/static/css/style.css
  3. 1 1
      ffdnispdb/templates/index.html

+ 2 - 1
ffdnispdb/forms.py

@@ -75,7 +75,8 @@ class CoveredArea(InsecureForm):
 
 class OtherWebsites(InsecureForm):
     name = TextField(_(u'name'), widget=partial(TextInput(), class_='input-small', placeholder=_(u'Name')))
-    url  = TextField(_(u'url'), widget=partial(TextInput(), class_='input-medium', placeholder=_(u'URL')))
+    url  = TextField(_(u'url'), widget=partial(TextInput(), class_='input-medium', placeholder=_(u'URL')),
+                     validators=[Optional(), URL(require_tld=True)])
 
 
 class ProjectForm(Form):

+ 14 - 52
ffdnispdb/static/css/style.css

@@ -22,6 +22,10 @@
     display: inline;
 }
 
+#main-container .span3 {
+    margin-left: 15px;
+}
+
 input#search-input {
     position: relative;
     padding-left: 23px;
@@ -68,67 +72,25 @@ input#search-input {
     }
 }
 
-/*.brand:hover #ffdn-header span:nth-child(1) {
-    animation-duration: 0.6s;
-    animation-name: lulz2A;
-}
-
-.brand:hover #ffdn-header span:nth-child(2) {
-    animation-duration: 0.6s;
-    animation-name: lulz2B;
-}
-
-.brand:hover #ffdn-header span:nth-child(3) {
-    animation-duration: 0.6s;
-    animation-name: lulz2C;
-}
-
-.brand:hover #ffdn-header span:nth-child(4) {
-    animation-duration: 0.6s;
-    animation-name: lulz2D;
-}
-
-@keyframes lulz2A {
-    0% {
-        transform: scaleY(1.5);
-    }
-    37% {
-        transform: scaleX(1.0);
-    }
-}
-
-@keyframes lulz2B {
-    25% {
-        transform: scaleY(1.5);
-    }
-    62% {
-        transform: scaleX(1.0);
-    }
+#map {
+    height: 600px;
 }
 
-@keyframes lulz2C {
-    50% {
-        transform: scaleY(1.5);
-    }
-    87% {
-        transform: scaleX(1.0);
+@media (min-width: 768px) and (max-width: 979px) {
+    #map {
+        height: 500px;
     }
 }
 
-@keyframes lulz2D {
-    75% {
-        transform: scaleY(1.5);
+@media (max-width: 767px) {
+    #map {
+        height: 400px;
     }
-    100% {
-        transform: scaleX(1.0);
+    #main-container .span3 {
+        margin: 15px 0 0;
     }
-}*/
-
-#map {
-    height: 600px;
 }
 
-
 .project-choice {
     padding: 30px;
     background-color: #dddddd;

File diff suppressed because it is too large
+ 1 - 1
ffdnispdb/templates/index.html