wip
This commit is contained in:
parent
eb3f3aaee1
commit
8fddb3badc
22
Cargo.lock
generated
22
Cargo.lock
generated
@ -646,6 +646,12 @@ version = "0.3.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
|
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hex"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
version = "0.2.11"
|
version = "0.2.11"
|
||||||
@ -1133,7 +1139,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ovlach_data"
|
name = "ovlach_data"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://glpat-Ju_qUN9Yh8qa5rEnd6T7:glpat-Ju_qUN9Yh8qa5rEnd6T7@gitlab.nanobyte.cz/ondrej/ov-site-api-data.git?branch=add_missing_fields#c37450f5ea327f95325d4f2cc587a392e6e3bc9f"
|
source = "git+https://glpat-Ju_qUN9Yh8qa5rEnd6T7:glpat-Ju_qUN9Yh8qa5rEnd6T7@gitlab.nanobyte.cz/ondrej/ov-site-api-data.git?branch=add_missing_fields#c13748b039d812d3bf1aaa93312699da7b921868"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"rocket",
|
"rocket",
|
||||||
@ -1153,6 +1159,7 @@ dependencies = [
|
|||||||
"rocket_dyn_templates",
|
"rocket_dyn_templates",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
|
"sha256",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1766,6 +1773,19 @@ dependencies = [
|
|||||||
"digest",
|
"digest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sha256"
|
||||||
|
version = "1.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7895c8ae88588ccead14ff438b939b0c569cd619116f14b4d13fdff7b8333386"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"bytes",
|
||||||
|
"hex",
|
||||||
|
"sha2",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sharded-slab"
|
name = "sharded-slab"
|
||||||
version = "0.1.7"
|
version = "0.1.7"
|
||||||
|
@ -16,3 +16,4 @@ reqwest = { version = "0.11", features = ["json"] }
|
|||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
ovlach_data = { git = "https://glpat-Ju_qUN9Yh8qa5rEnd6T7:glpat-Ju_qUN9Yh8qa5rEnd6T7@gitlab.nanobyte.cz/ondrej/ov-site-api-data.git", branch = "add_missing_fields"}
|
ovlach_data = { git = "https://glpat-Ju_qUN9Yh8qa5rEnd6T7:glpat-Ju_qUN9Yh8qa5rEnd6T7@gitlab.nanobyte.cz/ondrej/ov-site-api-data.git", branch = "add_missing_fields"}
|
||||||
chrono = "0.4.31"
|
chrono = "0.4.31"
|
||||||
|
sha256 = "1.4.0"
|
@ -4,7 +4,7 @@ use std::collections::HashMap;
|
|||||||
use rocket::{*, fairing::AdHoc};
|
use rocket::{*, fairing::AdHoc};
|
||||||
use rocket_dyn_templates::{Template, tera::Value};
|
use rocket_dyn_templates::{Template, tera::Value};
|
||||||
use ::serde::Deserialize;
|
use ::serde::Deserialize;
|
||||||
use tools::tera::{static_filter, translate_filter, calculate_age, insert_space_every, lang_entity};
|
use tools::tera::{static_filter, translate_filter, calculate_age, insert_space_every, lang_entity, gravatar_link};
|
||||||
|
|
||||||
pub mod routes;
|
pub mod routes;
|
||||||
pub mod services;
|
pub mod services;
|
||||||
@ -34,6 +34,7 @@ pub fn rocket_builder() -> Rocket<Build> {
|
|||||||
engines.tera.register_filter("translate", translate_filter);
|
engines.tera.register_filter("translate", translate_filter);
|
||||||
engines.tera.register_filter("calculate_age", calculate_age);
|
engines.tera.register_filter("calculate_age", calculate_age);
|
||||||
engines.tera.register_filter("insert_space_every", insert_space_every);
|
engines.tera.register_filter("insert_space_every", insert_space_every);
|
||||||
|
engines.tera.register_filter("gravatar_link", gravatar_link);
|
||||||
// filters specific to API
|
// filters specific to API
|
||||||
engines.tera.register_filter("lang_entity", lang_entity);
|
engines.tera.register_filter("lang_entity", lang_entity);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -4,6 +4,7 @@ use chrono::{Utc, Datelike};
|
|||||||
use log::error;
|
use log::error;
|
||||||
use rocket_dyn_templates::tera::{Value, Error};
|
use rocket_dyn_templates::tera::{Value, Error};
|
||||||
use ovlach_data::cv::chrono::from_string;
|
use ovlach_data::cv::chrono::from_string;
|
||||||
|
use sha256::{digest, try_digest};
|
||||||
|
|
||||||
// TODO: tenhle modul je trochu prasacky..
|
// TODO: tenhle modul je trochu prasacky..
|
||||||
|
|
||||||
@ -26,7 +27,16 @@ pub fn lang_entity(
|
|||||||
value: &Value,
|
value: &Value,
|
||||||
args: &HashMap<String, rocket_dyn_templates::tera::Value>
|
args: &HashMap<String, rocket_dyn_templates::tera::Value>
|
||||||
) -> Result<Value, Error> {
|
) -> Result<Value, Error> {
|
||||||
return Ok(rocket_dyn_templates::tera::Value::String(format!("{}", value.as_str().unwrap()))); // TODO: fix-me here!
|
error!("{:?}", value); // TODO: rewrite me!!!
|
||||||
|
return Ok(rocket_dyn_templates::tera::Value::String(format!("{}", value["en"].as_str().unwrap()))); // TODO: fix-me here!
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn gravatar_link(
|
||||||
|
value: &Value,
|
||||||
|
args: &HashMap<String, rocket_dyn_templates::tera::Value>
|
||||||
|
) -> Result<Value, Error> {
|
||||||
|
let val = digest(value.as_str().unwrap());
|
||||||
|
return Ok(rocket_dyn_templates::tera::Value::String(format!("https://gravatar.com/avatar/{}", val))); // TODO: fix-me here!
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert_space_every(
|
pub fn insert_space_every(
|
||||||
|
@ -40,10 +40,6 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#education" title="Education"><span class="menu-title">Education</span></a>
|
<li class="nav-item"><a class="nav-link" href="#education" title="Education"><span class="menu-title">Education</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#portfolio" title="Portfolio"><span class="menu-title">Portfolio</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item"><a class="nav-link" href="#references" title="References"><span class="menu-title">References</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item"><a class="nav-link" href="#contact" title="Contact"><span class="menu-title">Contact</span></a>
|
<li class="nav-item"><a class="nav-link" href="#contact" title="Contact"><span class="menu-title">Contact</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -56,24 +52,17 @@
|
|||||||
<footer class="pt-4 pb-4 text-muted text-center d-print-none">
|
<footer class="pt-4 pb-4 text-muted text-center d-print-none">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<div class="h4">Walter Patterson</div>
|
<div class="h4">{{ cv.person.name }} {{ cv.person.surname }}</div>
|
||||||
<div class="footer-nav">
|
<div class="footer-nav">
|
||||||
<nav role="navigation">
|
<nav role="navigation">
|
||||||
<ul class="nav justify-content-center">
|
<ul class="nav justify-content-center">
|
||||||
<li class="nav-item"><a class="nav-link" href="https://twitter.com/templateflip" title="Twitter"><i class="fab fa-twitter"></i><span class="menu-title sr-only">Twitter</span></a>
|
{%block navlinks %} {% endblock navlinks %}
|
||||||
</li>
|
|
||||||
<li class="nav-item"><a class="nav-link" href="https://www.facebook.com/templateflip" title="Facebook"><i class="fab fa-facebook"></i><span class="menu-title sr-only">Facebook</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item"><a class="nav-link" href="https://www.instagram.com/templateflip" title="Instagram"><i class="fab fa-instagram"></i><span class="menu-title sr-only">Instagram</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item"><a class="nav-link" href="https://github.com/templateflip" title="Github"><i class="fab fa-github"></i><span class="menu-title sr-only">Github</span></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-small">
|
<div class="text-small">
|
||||||
<div class="mb-1">© Material Resume. All rights reserved.</div>
|
<div class="mb-1">© Material Resume. All rights reserved. TODO: remove me!</div>
|
||||||
<div>Design - <a href="https://templateflip.com/" target="_blank">TemplateFlip</a></div>
|
<div>Design - <a href="https://templateflip.com/" target="_blank">TemplateFlip</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<div class="cover bg-image"><img src="{{ "images/header-background.jpg" | static(static_host = static_host) }}" />
|
<div class="cover bg-image"><img src="{{ "images/header-background.jpg" | static(static_host = static_host) }}" />
|
||||||
<div class="mask" style="background-color: rgba(0, 0, 0, 0.7);backdrop-filter: blur(2px);">
|
<div class="mask" style="background-color: rgba(0, 0, 0, 0.7);backdrop-filter: blur(2px);">
|
||||||
<div class="text-center p-5">
|
<div class="text-center p-5">
|
||||||
<div class="avatar p-1"><img class="img-thumbnail shadow-2-strong" src="images/avatar.jpg" width="160" height="160"/></div>
|
<div class="avatar p-1"><img class="img-thumbnail shadow-2-strong" src="{{ cv.person.email | gravatar_link }}" width="160" height="160"/></div>
|
||||||
<div class="header-bio mt-3">
|
<div class="header-bio mt-3">
|
||||||
<div data-aos="zoom-in" data-aos-delay="0">
|
<div data-aos="zoom-in" data-aos-delay="0">
|
||||||
<h2 class="h1"> {{ cv.person.name }} {{ cv.person.surname }} </h2>
|
<h2 class="h1"> {{ cv.person.name }} {{ cv.person.surname }} </h2>
|
||||||
@ -19,6 +19,7 @@
|
|||||||
<div class="header-social mb-3 d-print-none" data-aos="zoom-in" data-aos-delay="200">
|
<div class="header-social mb-3 d-print-none" data-aos="zoom-in" data-aos-delay="200">
|
||||||
<nav role="navigation">
|
<nav role="navigation">
|
||||||
<ul class="nav justify-content-center">
|
<ul class="nav justify-content-center">
|
||||||
|
{% block navlinks %}
|
||||||
{% if cv.social.facebook %}
|
{% if cv.social.facebook %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ cv.social.facebook }}" title="Facebook"><i class="fab fa-facebook"></i><span class="menu-title sr-only">Facebook</span></a>
|
<a class="nav-link" href="{{ cv.social.facebook }}" title="Facebook"><i class="fab fa-facebook"></i><span class="menu-title sr-only">Facebook</span></a>
|
||||||
@ -44,6 +45,7 @@
|
|||||||
<a class="nav-link" href="{{ cv.social.mastodon }}" title="github"><i class="fab fa-mastodon"></i><span class="menu-title sr-only">Mastodon</span></a>
|
<a class="nav-link" href="{{ cv.social.mastodon }}" title="github"><i class="fab fa-mastodon"></i><span class="menu-title sr-only">Mastodon</span></a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock navlinks %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@ -61,7 +63,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h2 class="h2 fw-light mb-4">{{ "About Me" | translate }} </h2>
|
<h2 class="h2 fw-light mb-4">{{ "About Me" | translate }} </h2>
|
||||||
<p>LoremIPSUM chat gpt pomuze!</p>
|
<p>{{ cv.person.about | lang_entity }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 offset-lg-1">
|
<div class="col-md-5 offset-lg-1">
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
@ -142,7 +144,7 @@
|
|||||||
{% for job in cv.jobs %}
|
{% for job in cv.jobs %}
|
||||||
<div class="timeline-card timeline-card-info" data-aos="fade-in" data-aos-delay="{{ loop.index * 100 }}">
|
<div class="timeline-card timeline-card-info" data-aos="fade-in" data-aos-delay="{{ loop.index * 100 }}">
|
||||||
<div class="timeline-head px-4 pt-3">
|
<div class="timeline-head px-4 pt-3">
|
||||||
<div class="h5">{{ job.title | lang_entity }} <span class="text-muted h6">at {{ job.company }}</span></div>
|
<div class="h5">{{ job.title }} <span class="text-muted h6">at {{ job.company }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-body px-4 pb-4">
|
<div class="timeline-body px-4 pb-4">
|
||||||
<div class="text-muted text-small mb-3">May, 2015 - Present</div>
|
<div class="text-muted text-small mb-3">May, 2015 - Present</div>
|
||||||
@ -155,35 +157,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="shadow-1-strong bg-white my-5 p-5" id="education">
|
<div class="shadow-1-strong bg-white my-5 p-5" id="education">
|
||||||
<div class="education-section">
|
<div class="education-section">
|
||||||
<h2 class="h2 fw-light mb-4">Education</h2>
|
<h2 class="h2 fw-light mb-4">{{ "Education " | translate }}</h2>
|
||||||
<div class="timeline">
|
<div class="timeline">
|
||||||
|
{% for education in cv.education %}
|
||||||
<div class="timeline-card timeline-card-success" data-aos="fade-in" data-aos-delay="0">
|
<div class="timeline-card timeline-card-success" data-aos="fade-in" data-aos-delay="0">
|
||||||
<div class="timeline-head px-4 pt-3">
|
<div class="timeline-head px-4 pt-3">
|
||||||
<div class="h5">Masters in Information Technology <span class="text-muted h6">from International University</span> </div>
|
{% if education.degree %}
|
||||||
|
<div class="h5">{{ education.degree | lang_entity }} <span class="text-muted h6">{{ education.school }}</span> </div>
|
||||||
|
{% else %}
|
||||||
|
<div class="h5">{{ education.school }}</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-body px-4 pb-4">
|
<div class="timeline-body px-4 pb-4">
|
||||||
|
|
||||||
|
{% if education.description %}
|
||||||
<div class="text-muted text-small mb-3">2011 - 2013</div>
|
<div class="text-muted text-small mb-3">2011 - 2013</div>
|
||||||
<div>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.</div>
|
<div>{{ education.description | lang_entity }}</div>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
2011 - 2013
|
||||||
<div class="timeline-card timeline-card-success" data-aos="fade-in" data-aos-delay="200">
|
{% endif %}
|
||||||
<div class="timeline-head px-4 pt-3">
|
|
||||||
<div class="h5">Bachelor of Computer Science <span class="text-muted h6">from Regional College</span> </div>
|
|
||||||
</div>
|
|
||||||
<div class="timeline-body px-4 pb-4">
|
|
||||||
<div class="text-muted text-small mb-3">2007 - 2011</div>
|
|
||||||
<div>Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="timeline-card timeline-card-success" data-aos="fade-in" data-aos-delay="400">
|
|
||||||
<div class="timeline-head px-4 pt-3">
|
|
||||||
<div class="h5">Science and Mathematics <span class="text-muted h6">from Mt. High Scool</span> </div>
|
|
||||||
</div>
|
|
||||||
<div class="timeline-body px-4 pb-4">
|
|
||||||
<div class="text-muted text-small mb-3">1995 - 2007</div>
|
|
||||||
<div>User generated content in real-time will have multiple touchpoints for offshoring. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -192,12 +187,8 @@
|
|||||||
<h2 class="h2 fw-light text mb-4">Contact</h2>
|
<h2 class="h2 fw-light text mb-4">Contact</h2>
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="col-md-5" data-aos="fade-left" data-aos-delay="200">
|
<div class="col-md-5" data-aos="fade-left" data-aos-delay="200">
|
||||||
<div class="mt-1">
|
<div class="d-print-none">
|
||||||
<div class="h6"><i class="fas fa-phone pe-2 text-muted" style="width:24px;opacity:0.85;"></i> +0718-111-0011</div>
|
<form action="https://formspree.io/your@email.com" method="POST">
|
||||||
<div class="h6"><i class="far fa-envelope pe-2 text-muted" style="width:24px;opacity:0.85;"></i> walter@company.com</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 d-print-none"><form action="https://formspree.io/your@email.com"
|
|
||||||
method="POST">
|
|
||||||
<div class="form-outline mb-4">
|
<div class="form-outline mb-4">
|
||||||
<input type="text" id="name" class="form-control" required/>
|
<input type="text" id="name" class="form-control" required/>
|
||||||
<label class="form-label" for="name">Name</label>
|
<label class="form-label" for="name">Name</label>
|
||||||
@ -214,7 +205,11 @@ method="POST">
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7 d-print-none" data-aos="zoom-in" data-aos-delay="100"><iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d496.9774799129763!2d-73.98032087190995!3d40.765927126473905!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c258f9cfcb250d%3A0xdb570ddcb766e3a8!2sNew%20York%20City%20Center!5e0!3m2!1sen!2sin!4v1614183731149!5m2!1sen!2sin" width="500" height="400" style="border:0;width:100%;" allowfullscreen="" loading="lazy"></iframe></div>
|
|
||||||
|
<div class="col-md-7 d-print-none" data-aos="zoom-in" data-aos-delay="100">
|
||||||
|
<div class="h6"><i class="fas fa-phone pe-2 text-muted" style="width:24px;opacity:0.85;"></i>{{ cv.person.phone | insert_space_every(times=3) }}</div>
|
||||||
|
<div class="h6"><i class="far fa-envelope pe-2 text-muted" style="width:24px;opacity:0.85;"></i>{{ cv.person.email }}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user