Commits

Sam Hart committed 322c02a

add boolean phone

Comments (0)

Files changed (3)

 OUTPUT=output/index.html
 
 $(OUTPUT): $(START_SRC)
+	export USE_PHONE=Y
 	mkdir -p output/
 	$(BUILD) $(START_SRC) . $(ALL_INC_DIRS) > $(OUTPUT)
 
+nophone: $(START_SRC)
+	mkdir -p output/
+	$(BUILD) $(START_SRC) . $(ALL_INC_DIRS) > $(OUTPUT)
+
+
 test: $(OUTPUT)
 	./validate/html5check.py --encoding=utf-8 output/index.html
 

jinja_build/jinja_build.py

 #!/usr/bin/env python
 
-import sys, datetime
+import sys, datetime, os
 try:
     from jinja2 import Template
     from jinja2 import FileSystemLoader
 else:
     env.loader = FileSystemLoader(".")
 
+use_phone = False
+if os.environ.has_key('USE_PHONE'):
+    use_phone = True
+
 builder = {
             'date' : '%s' % datetime.datetime.now(),
             'id' : hg_id,
             'branch' : hg_branch,
-            'updated' : hg_update.date
+            'updated' : hg_update.date,
+            'use_phone' : use_phone
         }
 
 template = env.from_string(strTemplate)
   <h1 class="header_title">R&#233;sum&#233; for Sam Hart</h1>
   <p class="contact">Samuel Hart<br />
   <a href="mailto:hartsn@gmail.com">hartsn@gmail.com</a><br />
+  {% if builder.use_phone %}
+  <a href="tel:+1-317-603-2787</a>+1-317-603-2787</a>
+  {% endif %}
   <a class="url_only" href="http://j.mp/snhLinkedin" target="_blank">LinkedIn Profile</a><br />
   <a class="url_only" href="http://j.mp/snhOhloh" target="_blank">Ohloh Profile</a></p>
   <div class="quicklinks"><ul>