Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uicardiodev/hugo-uilite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--exampleSite/data/experience.json1
-rw-r--r--layouts/partials/experience.html7
-rw-r--r--layouts/partials/sidebar.html2
-rw-r--r--static/js/main.js42
5 files changed, 38 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index e43b0f9..e6a1728 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
.DS_Store
+exampleSite/themes
diff --git a/exampleSite/data/experience.json b/exampleSite/data/experience.json
index dfb38d2..627a2a0 100644
--- a/exampleSite/data/experience.json
+++ b/exampleSite/data/experience.json
@@ -4,6 +4,7 @@
{
"timeperiod" : "May 2017 - Nov 2017",
"company" : "Uber",
+ "website": "https://www.uber.com",
"description" : "Nunc sapien nisi, maximus eleifend hendrerit sit amet, rutrum vel diam. Duis quam nibh, tincidunt eget nunc nec, suscipit pretium dolor. "
},
{
diff --git a/layouts/partials/experience.html b/layouts/partials/experience.html
index b344287..8807974 100644
--- a/layouts/partials/experience.html
+++ b/layouts/partials/experience.html
@@ -10,6 +10,13 @@
<div class="timeline-content {{ if eq (mod $index 2) 0 }} right {{ end }}">
<span class="date">{{ $element.timeperiod }}</span>
<h6 class="h3 my-2">{{ $element.company }}</h6>
+ {{ $website := $element.website }}
+ {{ if $website }}
+ <a target="_blank" href="{{ $website }}">
+ <i class="fas fa-link"></i>
+ {{ $website }}
+ </a>
+ {{ end }}
<p class="">{{ $element.description }}</p>
</div>
</div>
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 97c5c03..024f93d 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -13,7 +13,7 @@
<div class="social my-4">
{{ range $key, $value := $social }}
- <a target="_blank" href="{{ $value }}">
+ <a target="_blank" href="{{ $value }}" rel="me">
<i class="fab fa-{{ $key }}"></i>
</a>
{{ end }}
diff --git a/static/js/main.js b/static/js/main.js
index 41ca242..2f1d09b 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -16,40 +16,54 @@
let menuBtn = $("#menuBar");
-menuBtn.click(function(){
+menuBtn.click(function() {
$('.hamburger-menu').toggleClass('animate');
- if($(".secondaryMenu").hasClass("active")){
-
+ if ($(".secondaryMenu").hasClass("active")) {
+
$(".secondaryMenu").removeClass("active");
- setTimeout(function(){
+ setTimeout(function() {
$(".primaryMenu").addClass("active");
- },400);
+ }, 400);
+
-
} else {
$(".primaryMenu").removeClass("active");
-
- setTimeout(function(){
+
+ setTimeout(function() {
$(".secondaryMenu").addClass("active");
- },350);
+ }, 350);
}
});
-$(document).ready(function(){
+function scrollTo(target) {
+ const top = $(target).offset().top;
+ const duration = 500;
+ const changeHash = function() {
+ location.hash = target
+ };
+ $("html, body").animate({ scrollTop: top }, duration, changeHash);
+}
+
+$(document).ready(function() {
var elements = $(".sidebar > .main-info *");
console.log(elements);
- for(let i = 0; i < elements.length; i++){
- setTimeout(function(){
+ for (let i = 0; i < elements.length; i++) {
+ setTimeout(function() {
$(elements[i].tagName).addClass("bs");
- }, (400 * i) - 90 * i );
+ }, (400 * i) - 90 * i);
}
- setTimeout(function(){
+ setTimeout(function() {
$(".main-content").addClass("active");
}, 1900);
+ $("#sidebar a.btn[href='#contact']").on("click", function (event) {
+ event.preventDefault();
+
+ scrollTo($.attr(this, "href"));
+ });
}); \ No newline at end of file