Skip to content

Commit e1c8044

Browse files
committed
gist: add jQuery
1 parent 463ec9e commit e1c8044

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permalink: /
99
## Dashboard
1010

1111
<!-- pinned-gists -->
12-
<iframe src="https://gist.github.com/casperdcl/060c106a2b42d68d20b2e832971e5e04.pibb" width="520" height="80"></iframe>
12+
<div class="gist">060c106a2b42d68d20b2e832971e5e04</div>
1313

1414
<!-- Priority
1515
1. any issues may affect lots of people

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
theme: jekyll-theme-hacker
22
lang: en-GB
33
title: cdcl
4+
header_extra: |
5+
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
6+
<script type="text/javascript" src="js/main.js"></script>

_layouts/default.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: "en-US" }}">
3+
<head>
4+
<meta charset='utf-8'>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
8+
{{ site.header_extra }}
9+
10+
{% seo %}
11+
</head>
12+
13+
<body>
14+
15+
<header>
16+
<div class="container">
17+
<a id="a-title" href="{{ '/' | relative_url }}">
18+
<h1>{{ site.title | default: site.github.repository_name }}</h1>
19+
</a>
20+
<h2>{{ site.description | default: site.github.project_tagline }}</h2>
21+
22+
<section id="downloads">
23+
{% if site.show_downloads %}
24+
<a href="{{ site.github.zip_url }}" class="btn">Download as .zip</a>
25+
<a href="{{ site.github.tar_url }}" class="btn">Download as .tar.gz</a>
26+
{% endif %}
27+
<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
28+
</section>
29+
</div>
30+
</header>
31+
32+
<div class="container">
33+
<section id="main_content">
34+
{{ content }}
35+
</section>
36+
</div>
37+
38+
{% if site.google_analytics %}
39+
<script>
40+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
41+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
42+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
43+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
44+
ga('create', '{{ site.google_analytics }}', 'auto');
45+
ga('send', 'pageview');
46+
</script>
47+
{% endif %}
48+
</body>
49+
</html>

js/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$(function() {
2+
$('div.gist').each(function(){
3+
var gist = $(this);
4+
$.get("https://gist.github.com/casperdcl/" + gist.text() + "/raw", function(data){
5+
gist.text(data);
6+
});
7+
});
8+
});

0 commit comments

Comments
 (0)