Skip to content

Commit

Permalink
changed overall file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
gciruelos committed Jul 28, 2016
1 parent 6c54860 commit 88e450f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 77 deletions.
5 changes: 4 additions & 1 deletion about.markdown
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: About
---
[github](https://github.com/gciruelos/)

* [**github**](https://github.com/gciruelos/)
* [**mail**](http://www.google.com/recaptcha/mailhide/d?k=01VSC76H1Q2FOxX3SjmjA4YQ==&c=TBRNdN5psejX_VxaV_iQveYnqDEWKK2i1bX4cqejVPI=)


19 changes: 19 additions & 0 deletions css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,25 @@ tr.odd {
background-color:#eeeeee;
}

span.reverse {
unicode-bidi: bidi-override;
direction: rtl;
}


a#back_to_top{
position:fixed;
top:0;
z-index:5;
background:#999;
display:block;
padding:0.5em;
text-align:center;
width:100%;
}



.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%}
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important}
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important}
Expand Down
20 changes: 20 additions & 0 deletions js/blogname.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var names = {
'en' : 'Right Wrong',
'es' : 'Bien Mal',
'fr' : 'Bien Mal',
'it' : 'Giusto Sbagliato',
'pt' : 'Certo Errado',
'ru' : 'Правильно Не Правильно',
};

var userLangs = navigator.languages.concat(['en']);
console.log(userLangs);
var blogName = '';
for (var i = 0; i < userLangs.length; i++) {
var possibleName = names[userLangs[i].substring(0,2)];
if (possibleName != undefined) {
blogName = possibleName;
break;
}
}
document.getElementById('blogname').innerHTML = blogName;
4 changes: 4 additions & 0 deletions site.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ main = hakyll $ do
route idRoute
compile compressCssCompiler

match "js/*" $ do
route idRoute
compile copyFileCompiler

match (fromList ["robots.txt"]) $ do
route idRoute
compile copyFileCompiler
Expand Down
112 changes: 45 additions & 67 deletions templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>$title$ - Right Wrong</title>
<link rel="stylesheet" type="text/css" href="/css/default.css" />
</head>
<meta name="description" content="Right Wrong: Blog" />
<body>
<div id="header">
<div id="logo">
<a href="/" id="blogname">Right Wrong</a>
</div>
<br/>
</div>
<div id="content">
<h1>$title$</h1>
$body$
</div>
<div id="footer">
Right Wrong by <a href="about.html">Gonzalo Ciruelos</a> |
<a href="https://github.com/gciruelos">github</a> |
Site proudly generated by
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
</div>
</body>
<script type="text/javascript">
var names = {
'en' : 'Right Wrong',
'es' : 'Bien Mal',
'fr' : 'Bien Mal',
'it' : 'Giusto Sbagliato',
'pt' : 'Certo Errado',
'ru' : 'Правильно Не Правильно',
};

var userLangs = navigator.languages.concat(['en']);
console.log(userLangs);
var blogName = '';
for (var i = 0; i < userLangs.length; i++) {
var possibleName = names[userLangs[i].substring(0,2)];
if (possibleName != undefined) {
blogName = possibleName;
break;
}
}
document.getElementById('blogname').innerHTML = blogName;
</script>


<script type="text/x-mathjax-config">
MathJax.Hub.Config({TeX:{extensions: ["AMSmath.js", "AMSsymbols.js"]},
extensions:["tex2jax.js"],
tex2jax: {
inlineMath: [ ["\\(","\\)"] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="Gonzalo Ciruelos" />
<title>$title$ - Right Wrong</title>
<link rel="stylesheet" type="text/css" href="/css/default.css" />
</head>
<body>
<div id="header">
<div id="logo">
<a href="/" id="blogname"></a>
<script type="text/javascript" src="js/blogname.js"></script>
</div>
<br/>
</div>
<div id="content">
<h1>$title$</h1>
$body$
</div>
<div id="footer">
Right Wrong by <a href="about.html">Gonzalo Ciruelos</a> |
<a href="https://github.com/gciruelos">github</a> |
Site proudly generated by <a href="http://jaspervdj.be/hakyll">Hakyll</a>
</div>
</body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX:{extensions: ["AMSmath.js", "AMSsymbols.js"]},
extensions:["tex2jax.js"],
tex2jax: {
inlineMath: [ ["\\(","\\)"] ],
displayMath: [ ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": {availableFonts: ["TeX"]}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-60347053-1', 'auto');
ga('send', 'pageview');
</script>
ga('create', 'UA-60347053-1', 'auto');
ga('send', 'pageview');
</script>
</html>
12 changes: 6 additions & 6 deletions templates/post-list.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section class="post_list">
$for(posts)$
<div class="un_post">
<a class="post_link" href="$url$">$title$</a> - $date$ </ br>
$teaser$
</div>
$endfor$
$for(posts)$
<div class="un_post">
<a class="post_link" href="$url$">$title$</a> - $date$ </ br>
$teaser$
</div>
$endfor$
</section>
4 changes: 1 addition & 3 deletions templates/post.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<div class="info">
Posted on $date$
</div>
<div class="info">Posted on $date$</div>
$body$

0 comments on commit 88e450f

Please sign in to comment.