Skip to content
Permalink
Browse files

First modifications to the template and new includes for images

  • Loading branch information
stefano-maggiolo committed Jan 21, 2015
1 parent 4bbbb6c commit e99079cb4390b11123c224278b847630320a4547
@@ -12,9 +12,7 @@ footer-links:
disqus: poormansmath
google_analytics: # UA-2077547-5

markdown: redcarpet
redcarpet:
extensions: ["smart", "no_intra_emphasis"]
markdown: kramdown
highlighter: pygments
permalink: /:title/

@@ -25,6 +23,8 @@ sass:
gems:
- jekyll-sitemap

excerpt_separator: <!--more-->

# Exclude these files from your production _site
exclude:
- Gemfile
@@ -0,0 +1,10 @@
<figure {% if include.float %} class="{{ include.float }}" {% endif %} {% if include.width %} style="width: {{ include.width }}px" {% endif %}>
<div class="figure-container">
<a href="{{ include.url }}" class="imgpopup">
<img src="{{ include.url }}">
</a>
<figcaption>
{{ include.caption }}
</figcaption>
</div>
</figure>
@@ -0,0 +1,14 @@
$(document).ready(function() {
$('.figure-container > a, .gallery-container > a').each(function() {
$(this).click(function(event) {
event.preventDefault();
$('body').hide().prepend('<div class="figure-bg"><figure class="figure-figure"><a class="figure-a"><img class="figure-img"></img></a></figure></div>').fadeIn(200);
$('.figure-img').attr('src', $(this).attr('href'));
$('.figure-bg').click(function() {
$('.figure-bg').fadeOut(
200,
function() { $(this).remove(); });
});
});
});
});
@@ -0,0 +1 @@
</gallery>
@@ -0,0 +1 @@
<gallery>
@@ -0,0 +1,8 @@
<div class="gallery-container" {% if include.width %} style="width: {{ include.width }}px" {% endif %}>
<a href="{{ include.url }}" class="imgpopup">
<img src="{{ include.url }}">
</a>
<figcaption>
{{ include.caption }}
</figcaption>
</div>
@@ -17,10 +17,20 @@
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/style.css" />
<link rel="alternate" type="application/rss+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />

<link href='http://fonts.googleapis.com/css?family=Ek+Mukta:200,700' rel='stylesheet' type='text/css'>
{% if page.latex %}
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{% endif %}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<link href='http://fonts.googleapis.com/css?family=Ek+Mukta:200,600' rel='stylesheet' type='text/css'>

<script type="text/javascript" src="http://apis.google.com/js/plusone.js?ver=4.1"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js?ver=4.1"></script>

<script>
{% include figure.js %}
</script>
</head>

<body>
@@ -12,7 +12,7 @@ <h1>{{ page.title }}</h1>
</div>

<div class="date">
Written on {{ page.date | date: "%B %e, %Y" }}
Written by {{ page.author }} on {{ page.date | date: "%B %e, %Y" }}
</div>

{% include disqus.html disqus_identifier=page.disqus_identifier %}
@@ -0,0 +1,41 @@
figure {
text-align: center;
margin: 25px auto;
}

figure.left {
float: left;
margin: 5px 25px 10px 0;
}

figure.right {
float: right;
margin: 5px 0 10px 25px;
}

.figure-container {
display: flex;
flex-direction: column;
}

figcaption {
font-size: smaller;
text-align: center;
}

.figure-bg {
z-index: 1000;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0.0, 0.0, 0.0, 0.8);
}

.figure-a {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
@@ -0,0 +1,16 @@
gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.gallery-container {
display: flex;
flex-direction: column;
justify-content: flex-start;
margin: 10px;
}

figcaption {
font-size: smaller;
}
@@ -0,0 +1,4 @@
.MathJax_Display {
text-align: left !important;
margin: 1em 0 1em 4ex !important;
}
@@ -0,0 +1,21 @@
table {
margin: 25px auto;
}

thead {
border-bottom: 2px solid black;
font-weight: bold;
margin-bottom: 2px;
}

tbody tr {
border-bottom: 1px solid #eee;
}

tbody tr:last-child {
border-bottom: 0
}

th, td {
padding: 2px 10px;
}
@@ -4,15 +4,15 @@

<div class="posts">
{% for post in site.posts %}
<article class="post">
<article class="post">

<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>

<div class="entry">
{{ post.content | truncatewords:40}}
{{ post.excerpt }}
</div>

<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endfor %}
</div>
</div>
@@ -37,7 +37,7 @@ h1, h2, h3, h4, h5, h6 {
font-weight: 700;

line-height: 1.7;
margin: 1em 0 15px;
margin: 0.5em 0 15px;
padding: 0;

@include mobile {
@@ -117,6 +117,9 @@ img {
}

.date {
border-top: 1px solid #eee;
margin-top: 25px;
padding: 10px 0;
font-style: italic;
color: $gray;
}
@@ -241,7 +244,7 @@ nav {
//

.posts > .post {
padding-bottom: 2em;
padding-bottom: 1em;
border-bottom: 1px solid $lightGray;
}

@@ -252,11 +255,11 @@ nav {

.post {
blockquote {
margin: 1.8em .8em;
margin: 1em .8em;
border-left: 2px solid $gray;
padding: 0.1em 1em;
color: $gray;
font-size: 22px;
font-size: 18px;
font-style: italic;
}

@@ -287,3 +290,7 @@ footer {
@import "_highlights";
@import "_svg-icons";
@import "_share";
@import "_figure";
@import "_table";
@import "_gallery";
@import "_math";

0 comments on commit e99079c

Please sign in to comment.
You can’t perform that action at this time.