Skip to content

Instantly share code, notes, and snippets.

@Dev-Dipesh
Forked from alialo/_config.yml
Created September 1, 2013 03:03
Show Gist options
  • Save Dev-Dipesh/6402076 to your computer and use it in GitHub Desktop.
Save Dev-Dipesh/6402076 to your computer and use it in GitHub Desktop.

Revisions

  1. @alialo alialo revised this gist Apr 3, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -51,7 +51,7 @@ <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
    {% endfor %}
    {% if paginator.next_page %}
    <li>
    <a href="/page{{paginator.next_page}}">»</a>
    <a href="/page{{paginator.next_page}}">&raquo;</a>
    </li>
    {% else %}
    <li class="disabled">
  2. @alialo alialo revised this gist Mar 30, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions style.css
    Original file line number Diff line number Diff line change
    @@ -50,6 +50,7 @@
    color: #999;
    cursor: default;
    }

    .disabled a:hover {
    background-color: transparent;
    }
  3. @alialo alialo revised this gist Mar 30, 2012. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions style.css
    Original file line number Diff line number Diff line change
    @@ -41,13 +41,15 @@
    border-left-width: 0;
    }

    .pagination a:hover {
    .pagination a:hover, .active a {
    background-color: whiteSmoke;
    }

    .disabled a, .active a,
    .disabled a:hover, .active a:hover {
    .disabled a, .disabled a:hover,
    .active a, .active a:hover {
    color: #999;
    background-color: transparent;
    cursor: default;
    }
    .disabled a:hover {
    background-color: transparent;
    }
  4. @alialo alialo revised this gist Mar 30, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,9 @@ <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
    <aside class="details">posted on the <time>{{ post.date | date_to_string }}</time></aside>
    {% endfor %}

    <!-- pagination (a page1 folder isn't created by Jekyll. To avoid 404s when going to the first page it must be specified separately) -->
    <!-- pagination (a page1 folder isn't created by Jekyll.
    To avoid 404s when going to the first page it must be
    specified separately) -->

    <div class="pagination">
    <ul>
  5. @alialo alialo created this gist Mar 30, 2012.
    1 change: 1 addition & 0 deletions _config.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    paginate: 10
    60 changes: 60 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    <!-- post styling -->

    {% for post in paginator.posts %}
    <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
    <div class="content">
    {{ post.content }}
    </div>
    <aside class="details">posted on the <time>{{ post.date | date_to_string }}</time></aside>
    {% endfor %}

    <!-- pagination (a page1 folder isn't created by Jekyll. To avoid 404s when going to the first page it must be specified separately) -->

    <div class="pagination">
    <ul>
    {% if paginator.previous_page %}
    {% if paginator.previous_page == 1 %}
    <li>
    <a href="/">&laquo;</a>
    </li>
    {% else %}
    <li>
    <a href="/page{{paginator.previous_page}}">&laquo;</a>
    </li>
    {% endif %}
    {% else %}
    <li class="disabled">
    <a href="#">&laquo;</a>
    </li>
    {% endif %}
    {% if paginator.page == 1 %}
    <li class="active">
    <a href="#">1</a>
    </li>
    {% else %}
    <li>
    <a href="/">1</a>
    </li>
    {% endif %}
    {% for count in (2..paginator.total_pages) %}
    {% if count == paginator.page %}
    <li class="active">
    <a href="#">{{count}}</a>
    </li>
    {% else %}
    <li>
    <a href="/page{{count}}">{{count}}</a>
    </li>
    {% endif %}
    {% endfor %}
    {% if paginator.next_page %}
    <li>
    <a href="/page{{paginator.next_page}}">»</a>
    </li>
    {% else %}
    <li class="disabled">
    <a href="#">&raquo;</a>
    </li>
    {% endif %}
    </ul>
    </div>
    53 changes: 53 additions & 0 deletions style.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    /* ------- pagination -------- */

    .pagination {
    height: 36px;
    }

    .pagination ul {
    display: inline-block;
    margin: 0;
    padding: 0;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .pagination li {
    display: inline;
    }

    .pagination li:first-child a {
    border-left-width: 1px;
    -webkit-border-radius: 3px 0 0 3px;
    -moz-border-radius: 3px 0 0 3px;
    border-radius: 3px 0 0 3px;
    }

    .pagination li:last-child a {
    -webkit-border-radius: 0 3px 3px 0;
    -moz-border-radius: 0 3px 3px 0;
    border-radius: 0 3px 3px 0;
    }

    .pagination a {
    float: left;
    padding: 0 14px;
    line-height: 34px;
    border: 1px solid #DDD;
    border-left-width: 0;
    }

    .pagination a:hover {
    background-color: whiteSmoke;
    }

    .disabled a, .active a,
    .disabled a:hover, .active a:hover {
    color: #999;
    background-color: transparent;
    cursor: default;
    }