Skip to content

Commit

Permalink
Remove typed section and its requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcoman committed Jan 5, 2016
1 parent 50cc532 commit c6c70d9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 97 deletions.
20 changes: 5 additions & 15 deletions _data/home/header.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
##############################
# Dynamic Text on the Header #
##############################
background-img: "../img/home-background.jpg"
dynamic-typing: True
shuffle: False
loop: True
# Set False for infinite loop, or set any number for finite loop.
loop-count: False
type-speed: 10
start-delay: 200
delete-delay: 2000
intro-text: ""
lines:
- text: "One machine can do the work of fifty ordinary men."
- text: "No machine can do the work of one extraordinary man."
- text: "~Elbert Hubbard"
- text: "Where’s your will to be weird?"
background-img: "/img/home-background.jpg"
intro-text: >
"Sometimes it's the journey that teaches you a lot about your destination."
~Drake
items:
- url: "/iasi/"
image: "img/labs_iasi.jpg"
Expand Down
5 changes: 1 addition & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- Custom CSS -->
<link href="{{site.baseurl}}/css/grayscale.css" rel="stylesheet">
{% if page.section-type == "index" %}
<link href="{{site.baseurl}}/css/timeline.css" rel="stylesheet">
{% endif %}
<link href="{{ "/css/main.css" | prepend: site.baseurl }}" rel="stylesheet">

<!-- Custom Fonts -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
Expand Down
6 changes: 2 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{% assign header = site.data[page.data].header %}
{% assign base = {{site.url}}{{site.baseurl}} %}
<!-- Intro Start -->
<header class="intro-{{ page.data }}">
<header class="intro" style="background-image: url('{{ site.baseurl }}{{ header.background-img }}')">
<div class="intro-body">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1 class="brand-heading">&nbsp;</h1>
<h1 class="brand-heading">&nbsp;</h1>
<span class="intro-text">{{ header.intro-text }}</span>
<h5>&nbsp;</h5>

{% for item in header.items %}
<div class="col-md-6 col-sm-6 col-xs-12 same-height cols-centered">
<a href="{{ item.url | prepend: site.baseurl}}">
<img class="img-me" src="{{ base }}{{ item.image }}" alt="{{ item.description }}">
<img class="img-me" src="{{ item.image | preped: site.baseurl}}" alt="{{ item.description }}">
<figcaption><h5>{{ item.description }}</h5></figcaption>
</a>
</div>
Expand Down
43 changes: 0 additions & 43 deletions _includes/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,49 +109,6 @@

{% endif %}

{% assign header = data.header %}
{% if header.dynamic-typing and page.section-type == "index"%}
<!-- Dynamic Typing Start -->
<script type="text/javascript" src="{{site.baseurl}}/js/typed.js"></script>
<script type="text/javascript">
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex ;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;

// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}

var myQuotes = new Array();
{% for line in header.lines %}
myQuotes.push("{{ line.text }}");
{% endfor %}

{% if header.shuffle %}
shuffle(myQuotes)
{% endif %}

$(".intro-text").typed({
strings: myQuotes,
typeSpeed: {{ header.type-speed }},
backDelay: {{ header.delete-delay }},
startDelay: {{ header.start-delay }},
loop: {{ header.loop }},
loopCount: {{ header.loop-count }},
cursorChar: "|"
});
</script>
<!-- Dynamic Typing End -->
{% endif %}

<script>
function addTohistory() {
if (!window.location.host.startsWith("127.0.0.1")) {
Expand Down
2 changes: 1 addition & 1 deletion _includes/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
{% if page.section-type == "index" %}
{% if page.section-type == "index" and page.permalink == "/" %}
<a class="navbar-brand page-scroll" href="#page-top">
{% else %}
<a class="navbar-brand" href="{{site.baseurl}}/">
Expand Down
30 changes: 0 additions & 30 deletions js/typed.js

This file was deleted.

0 comments on commit c6c70d9

Please sign in to comment.