]> BookStack Code Mirror - bookstack/commitdiff
Updated pagination to use theme colour
authorDan Brown <redacted>
Sun, 29 Jul 2018 14:44:10 +0000 (15:44 +0100)
committerDan Brown <redacted>
Sun, 29 Jul 2018 14:44:10 +0000 (15:44 +0100)
resources/assets/sass/_lists.scss
resources/views/vendor/pagination/default.blade.php [new file with mode: 0644]

index 748d473eb7fc6aecc88394c3608a9d2b1a8bccd0..3338b39383f4dd99ffbecc57bf910fe0aa039075 100644 (file)
@@ -266,22 +266,13 @@ ul.pagination {
     padding: $-xxs $-s;
     border: 1px solid #CCC;
     margin-left: -1px;
-    color: #888;
-    fill: #888;
     user-select: none;
     &.disabled {
       cursor: not-allowed;
     }
   }
   li.active span {
-    background-color: rgba($primary, 0.8);
-    color: #EEE;
-    fill: #EEE;
-    border-color: rgba($primary, 0.8);
-  }
-  a {
-    color: $primary;
-    fill: $primary;
+    color: #FFF;
   }
 }
 
diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php
new file mode 100644 (file)
index 0000000..de05410
--- /dev/null
@@ -0,0 +1,36 @@
+@if ($paginator->hasPages())
+    <ul class="pagination">
+        {{-- Previous Page Link --}}
+        @if ($paginator->onFirstPage())
+            <li class="disabled"><span>&laquo;</span></li>
+        @else
+            <li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
+        @endif
+
+        {{-- Pagination Elements --}}
+        @foreach ($elements as $element)
+            {{-- "Three Dots" Separator --}}
+            @if (is_string($element))
+                <li class="disabled"><span>{{ $element }}</span></li>
+            @endif
+
+            {{-- Array Of Links --}}
+            @if (is_array($element))
+                @foreach ($element as $page => $url)
+                    @if ($page == $paginator->currentPage())
+                        <li class="active primary-background"><span>{{ $page }}</span></li>
+                    @else
+                        <li><a href="{{ $url }}">{{ $page }}</a></li>
+                    @endif
+                @endforeach
+            @endif
+        @endforeach
+
+        {{-- Next Page Link --}}
+        @if ($paginator->hasMorePages())
+            <li><a href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
+        @else
+            <li class="disabled"><span>&raquo;</span></li>
+        @endif
+    </ul>
+@endif
Morty Proxy This is a proxified and sanitized view of the page, visit original site.