cleaned up variables everywhere to slim down web routes functions and reduce clutter

This commit is contained in:
JesseBot 2017-07-16 01:17:03 +00:00
parent ad2beb0338
commit 6122551c72
3 changed files with 25 additions and 25 deletions

View file

@ -6,9 +6,9 @@ Globals:
# domain name, or whatever you want the tab in the browser to say
website_title: 'example.com'
# the default image shown at the front of the page
profile_image: 'my_picture.png'
image: './my_picture.png'
# Your name
profile_name: 'Bob Smith'
name: 'Bob Smith'
# Job Title
occupation: 'professional basket weaver'
# Skills - what you're good at.
@ -20,7 +20,7 @@ Globals:
# Full URL to your linkedin public profile
linkedin_URL: 'https://www.linkedin.com/in/jesse-hitch-8b5b023a/'
# complete google doc sharing URL, assuming this is public
resume_google_doc: 'https://docs.google.com/document/d/blahblahblah'
resume_live_doc_URL: 'https://docs.google.com/document/d/blahblahblah'
# in your google doc, you can go to download as and right click copy that
# URL, or you can host a live copy at another URL
resume_pdf_URL: 'https://docs.google.com/document/d/blahblahblah/export?format=pdf'

View file

@ -3,17 +3,17 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Resume website for {{name}}">
<meta name="description" content="Resume website for {{globals['name']}}">
<meta name="author" content="Jesse Hitch">
<meta name="theme-color" content="#1f1f1f" />
<link rel="icon" type="image/x-icon" href="/images/{{favicon}}">
<link rel="icon" type="image/x-icon" href="/images/{{globals['favicon']}}">
<meta property="og:image" content="/images/{{main_pic}}">
<meta property="og:title" content="{{browser_tab_title}}">
<meta property="og:description" content="Resume website for {{name}}">
<meta property="og:image" content="/images/{{globals['image']}}">
<meta property="og:title" content="{{globals['website_title']}}">
<meta property="og:description" content="Resume website for {{globals['name']}}">
<meta property="og:type" content="profile">
<title>{{browser_tab_title}}</title>
<title>{{globals['website_title']}}</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
@ -22,6 +22,6 @@
</head>
<body>
% if fork_me:
<a href="https://github.com/jessebot/tiny_personal_website" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#1f1f1f; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
% if globals['fork_me']:
<a href="https://github.com/jessebot/tiny_personal_website" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#1f1f1f; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)']}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out']}}</style>
% end

View file

@ -3,14 +3,14 @@
<div class="row justify-content-center">
<div class="col-xl-8 col-lg-9 col-md-11 col-sm-12">
<div class="card mx-auto" style="width: 475px;">
<img class="img-fluid" src="/images/{{main_pic}}" alt="What I look like.">
<img class="img-fluid" src="/images/{{globals['image']}}" alt="What I look like.">
<!-- overlay -->
<pre class="top-desc">
{{name.upper()}} = {'occupation': '{{occupation}}',
% final_item = len(skills) - 1
% for i, skill in enumerate(skills):
{{globals['name'].upper()}} = {'occupation': '{{globals['occupation']}}',
% final_item = len(globals['skills']) - 1
% for i, skill in enumerate(globals['skills']):
% if i == 0:
'skills': ['{{skill}}',
'skills': [{{skill}}',
% end
% if i == final_item:
'{{skill}}'],
@ -19,8 +19,8 @@
'{{skill}}',
% end
% end
% final_item = len(likes) - 1
% for i, like in enumerate(likes):
% final_item = len(globals['likes']) - 1
% for i, like in enumerate(globals['likes']):
% if i == 0:
'likes': ['{{like}}',
% end
@ -43,31 +43,31 @@
<img src="/images/googledocs.svg" class="img-fluid docs-img">Resume
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="menu-drop-item" target="_blank" href="{{gdoc_URL}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Go to Google doc, or download directly">Live Doc</a>
<a class="menu-drop-item" target="_blank" href="{{globals['resume_live_doc_URL']}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Go to Google doc, or download directly">Live Doc</a>
<h6 class="dropdown-header">Direct Downloads</h6>
<a class="menu-drop-item" href="{{resume_pdf_URL}}">Download .PDF</a>
<a class="menu-drop-item" href="{{resume_docx_URL}}">Download .Docx</a>
<a class="menu-drop-item" href="{{globals['resume_pdf_URL']}}">Download .PDF</a>
<a class="menu-drop-item" href="{{globals['resume_docx_URL']}}">Download .Docx</a>
</div>
</div>
</li>
</ul>
</div> <!-- card header -->
<div class="card-block">
<h4 class="card-title"><span class="text-muted">Hi, I'm</span> {{name}}.</h4>
<h4 class="card-title"><span class="text-muted">Hi, I'm</span> {{globals['name']}}.</h4>
<p class="card-text">
{{blurb}}
{{globals['profile_blurb']}}
</p>
</div> <!-- card block -->
<div class="card-footer">
<div class="row justify-content-between">
<div class="col-6">
<a target="_blank" href="{{github_URL}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Check out my GitHub">
<a target="_blank" href="{{globals['github_URL']}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Check out my GitHub">
<img src="/images/github-cat.svg" class="img-fluid" style="height: 48px";>
</a>
</div> <!-- col -->
<div class="col-6">
<div class="circle">
<a target="_blank" href="{{linkedin_URL}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Connect with me on Linkedin">
<a target="_blank" href="{{globals['linkedin_URL']}}" role="button" data-toggle="tooltip" data-placement="bottom" title="Connect with me on Linkedin">
<img src="/images/linkedin.svg" class="img-fluid" style="height: 48px";>
</a>
</div><!-- circle -->