Skip to content

Commit 5c18a41

Browse files
committed
adding html layout overrides and anayltics
1 parent 381c5e6 commit 5c18a41

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
theme: jekyll-theme-cayman
1+
theme: jekyll-theme-cayman
2+
show_downloads: "true"
3+
google_analytics: UA-11075253-1

_layouts/default.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>{{ page.title | default: site.title }}</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta name="theme-color" content="#157878">
8+
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
9+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
10+
</head>
11+
<body>
12+
<section class="page-header">
13+
<a href="http://ahmadassaf.com" class="logo "><img alt="logo" src="http://ahmadassaf.com/images/logo.svg"></a>
14+
<h1 class="project-name">{{ site.title | default: site.github.repository_name }}</h1>
15+
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
16+
{% if site.github.is_project_page %}
17+
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
18+
{% endif %}
19+
{% if site.show_downloads %}
20+
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
21+
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
22+
{% endif %}
23+
</section>
24+
25+
<section class="main-content">
26+
{{ content }}
27+
28+
<footer class="site-footer">
29+
{% if site.github.is_project_page %}
30+
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
31+
{% endif %}
32+
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
33+
</footer>
34+
</section>
35+
36+
{% if site.google_analytics %}
37+
<script type="text/javascript">
38+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
39+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
40+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
41+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
42+
43+
ga('create', '{{ site.google_analytics }}', 'auto');
44+
ga('send', 'pageview');
45+
</script>
46+
{% endif %}
47+
</body>
48+
</html>

assets/css/style.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
background-image:none !important;
1111
}
1212

13+
.logo {
14+
position: absolute;
15+
left: 15px;
16+
width: 80px;
17+
}
18+
1319
.btn {
1420
color: #fff !important;
1521
background-color: #399f62 !important;

0 commit comments

Comments
 (0)