1
Fork 0

Add basic contact page

This commit is contained in:
Jake Howard 2017-02-09 21:52:25 +00:00
parent f991723f78
commit c2b14808f8
7 changed files with 44 additions and 3 deletions

View file

@ -1,5 +1,4 @@
<head>
<meta name="slug" content="about" />
<meta name="title" content="About" />
<meta name="no_container" content="true" />
</head>

13
content/pages/contact.md Normal file
View file

@ -0,0 +1,13 @@
---
title: Contact Me
---
The fastest way to contact me is through twitter. Just tag me or send me a message and I'll respond as soon as possible!
<a class="btn btn-primary" href="{{ ACCOUNTS.twitter.url }}">View Twitter</a>
## Need something more formal?
If you need to contact me in a more formal capacity, send me an email! I aim to respond to all emails within 3 days.
<a data-value="{{ CONTACT_EMAIL|encode_text }}" class="btn btn-primary protected-mailto">Send me an email!</a>

View file

@ -25,7 +25,7 @@
<p>
I'm Jake. A software engineer with a passion for security and privacy. This is my website, a home for my projects, blog posts, and anything else for that matter.
</p>
<a href="/about/" class="btn btn-primary-dark btn-xl">More Info</a>
<a href="/contact/" class="btn btn-primary-dark btn-xl">Contact</a>
</div>
</section>

View file

@ -7,6 +7,7 @@ sys.path.insert(0, os.path.realpath('./'))
AUTHOR = "Jake Howard"
SITENAME = "TheOrangeOne"
SITEURL = "https://theorangeone.net"
CONTACT_EMAIL = "info@theorangeone.net"
PATH = 'content'
TIMEZONE = "Europe/London"
DEFAULT_LANG = "en"
@ -111,7 +112,8 @@ JINJA_FILTERS = {
"limit": filters.limit,
"get_title": filters.get_title,
"get_html_title": filters.get_html_title,
"get_image": filters.get_image
"get_image": filters.get_image,
"encode_text": filters.encode_text
}
JINJA_ENVIRONMENT = {

View file

@ -39,3 +39,7 @@ def get_html_title(instance):
def get_image(instance):
return get_attribute(instance, 'image') or (hasattr(instance, 'page') and get_attribute(instance.page, 'name')) or ''
def encode_text(text):
return " ".join([str(ord(c)) for c in text])

View file

@ -30,3 +30,22 @@ $('.navbar-brand').bind('click', function (event) {
}
event.preventDefault();
});
$('.panel-heading').bind('click', function () {
var ele = $(this);
if (ele.find('.panel-body').hasClass('ascii-hidden')) {
ele = ele.find('.panel-body');
var raw_code = ele.text().split(' ');
}
});
$('.protected-mailto').bind('click', function (evt) {
evt.preventDefault();
var char_codes = $(this).data('value').split(' ');
var plain_text = []
for(var i=0; i<char_codes.length; i++) {
plain_text.push(String.fromCharCode(parseInt(char_codes[i])));
}
window.location = 'mailto:' + plain_text.join('');
});

View file

@ -110,3 +110,7 @@ header#header {
.github-card-container > iframe {
max-width: 100%;
}
.protected-mailto {
cursor: pointer;
}