Commits

Joel Rivera  committed 060502f

Add contact form and the mailer dependency.

  • Participants
  • Parent commits 09ae6a4

Comments (0)

Files changed (6)

File joelmx/static/css/main.css

 #links {
     float: left;
     width: 100%;
-    margin-bottom: 40px;
 }
 
 #links > p {
 #languages {
     width: 100%;
     float: left;
-    margin-bottom: 20px;
+    padding-right: 12px;
+    margin-bottom: 12px;
+
     
 }
 #languages ul {
 
 #twitter {
     width: 100%;
-}
+    float: left;
+    margin-top: 36px;
+}
+
+
+#showcontact {
+    float:left; 
+    width: 100%;
+    padding: 6px 0;
+    margin: 18px 0 12px;
+}
+
+#contactme {
+    display: none;
+    float: left;
+    width: 90%;
+    text-align: left;
+
+}
+#contactme label{
+    width: 30%;
+    float: left;
+    text-align: right;
+    margin-right: 12px;
+    display: inline-block;
+}
+#contactme input{
+    display: block;
+}
+
+.formfield {
+    margin-bottom: 12px;
+}
+
+

File joelmx/static/favicon.ico

Old
Old image
New
New image

File joelmx/static/js/main.js

 
+function show_contactme(){
+    $('#contactme').slideToggle(1000);
+}

File joelmx/templates/home.mako

     </div>
   </div>
   
+  
+  <a href="javascript:show_contactme()" id="showcontact">
+    ${_("Contact me")}
+  </a>
+
+  <div id="contactme" class="hide">
+    <div class="formfield">
+      <label for="name">${_("Name")}</label>
+      <input type="text" id="name"  name="name" style="width: 10em;" value="">
+    </div> 
+    <div class="formfield">
+      <label for="email">${_("Email")}</label>
+    <input type="text" id="email" name="email" style="width: 10em;" value="" >
+    </div> 
+    <div class="formfield">
+      <label for="message">${_("Message")}</label>
+      <textarea style="width: 60%;" name="message" rows="5"></textarea>
+      
+    </div> 
+    
+    <input type="submit" value="${_('Send')}" style="float: right; margin-right: 20px;"/>
+  </div>
+
   <div id="twitter">
     <%include file="_tw_widget.mako" />
   </div>

File joelmx/views.py

 
 @view_config(route_name='home', renderer='home.mako')
 def homepage(request):
-    return {'project': 'joelmx'}
+    return {}
+
+
+#@view_config(route_name='contactme')
+#def contact_me(request):
+#    pass
+    
+
+
     'Babel',
     'pyramid',
     'pyramid_debugtoolbar',
+    'pyramid_mailer',
     'waitress',
     ]