Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Add AdSense every 4 sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert221 committed Sep 2, 2017
1 parent 6ee62c3 commit 5e1375f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 20 deletions.
2 changes: 2 additions & 0 deletions _layouts/default.html
Expand Up @@ -14,6 +14,7 @@
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</head>
<body>
<header class="page-navbar">
Expand Down Expand Up @@ -57,5 +58,6 @@ <h2 class="page-navbar-nav--title">Nawigacja</h2>
</ul>
</div>
</footer>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</body>
</html>
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -4,7 +4,7 @@ const gulp = require('gulp'),
csso = require('gulp-csso');

gulp.task('default', () => {
return gulp.src(['node_modules/nastoletni-sass/src/style.scss'])
return gulp.src('style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer())
.pipe(csso())
Expand Down
22 changes: 22 additions & 0 deletions index.html
@@ -0,0 +1,22 @@
---
layout: default
---

<nav class="table-of-contents">
<h2>Spis treści</h2>
<ol>
{% for section in site.categories.section reversed %}
<li><a href="#{% if section.link %}{{ section.link }}{% else %}{{ section.title | strip_html | slugify }}{% endif %}">{{ section.title | strip_html }}</a></li>
{% endfor %}
</ol>
</nav>
{% for section in site.categories.section reversed %}
<section class="panel panel-content">
<h2 id="{% if section.link %}{{ section.link }}{% else %}{{ section.title | strip_html | slugify }}{% endif %}">{{ section.title }}</h2>
{{ section.content }}
</section>
{% assign moduled = forloop.index | modulo: 4 %}
{% if moduled == 0 %}
<ins class="adsbygoogle fullwidth-ad" data-ad-client="ca-pub-3857451114159786" data-ad-slot="3399170997" data-ad-format="auto"></ins>
{% endif %}
{% endfor %}
18 changes: 0 additions & 18 deletions index.md

This file was deleted.

2 changes: 1 addition & 1 deletion style.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions style.scss
@@ -0,0 +1,5 @@
@import 'node_modules/nastoletni-sass/src/style.scss';

.fullwidth-ad {
margin-bottom: 30px;
}

0 comments on commit 5e1375f

Please sign in to comment.