"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7874],{3905:function(e,t,a){a.d(t,{Zo:function(){return u},kt:function(){return m}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?s(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},s=Object.keys(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=l(a),m=r,b=d["".concat(c,".").concat(m)]||d[m]||p[m]||s;return a?n.createElement(b,o(o({ref:t},u),{},{components:a})):n.createElement(b,o({ref:t},u))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:r,o[1]=i;for(var l=2;l<s;l++)o[l]=a[l];return n.createElement.apply(null,o)}return n.createElement.apply(null,a)}d.displayName="MDXCreateElement"},2695:function(e,t,a){a.d(t,{Z:function(){return i}});var n=a(7462),r=a(3366),s=a(7294),o=["isBad","isGood","children","disableFullscreen","limitWidth"];function i(e){var t=e.isBad,a=e.isGood,i=e.children,c=e.disableFullscreen,l=e.limitWidth,u=(0,r.Z)(e,o),p=(0,s.useState)(!1),d=p[0],m=p[1];return s.createElement("div",{className:"preview-box-wrapper",style:l?{width:l,display:"table",margin:"0 auto"}:{}},!c&&s.createElement("button",{"aria-label":d?"Minimize the example":"Fullscreen the example",className:"preview-box-fullscreen-toggle",onClick:function(e){var t=e.target.closest(".preview-box-wrapper");d?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen(),m(!d)}},d?s.createElement("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 24 24"},s.createElement("path",{d:"M19.707 18.293a1 1 0 01-1.414 1.414L16 17.414V18a1 1 0 01-2 0v-3a1 1 0 011-1h3a1 1 0 010 2h-.586zM9 14H6a1 1 0 000 2h.586l-2.293 2.293a1 1 0 001.414 1.414L8 17.414V18a1 1 0 002 0v-3a1 1 0 00-1-1zm0-9a1 1 0 00-1 1v.586L5.707 4.293a1 1 0 00-1.414 1.414L6.586 8H6a1 1 0 000 2h3a1 1 0 001-1V6a1 1 0 00-1-1zm6 5h3a1 1 0 000-2h-.586l2.293-2.293a1 1 0 00-1.414-1.414L16 6.586V6a1 1 0 00-2 0v3a1 1 0 001 1z"})):s.createElement("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"26 26 48 48"},s.createElement("path",{d:"M54.347 57.882A8.96 8.96 0 0150 59a8.96 8.96 0 01-4.347-1.118L40.736 62.8c-.38.38-.257.701.29.701h.98A2.503 2.503 0 0144.5 66c0 1.39-1.122 2.5-2.507 2.5h-7.986a2.505 2.505 0 01-2.507-2.507v-7.986A2.502 2.502 0 0134 55.5a2.49 2.49 0 012.5 2.493v.98c0 .547.314.678.7.29l4.918-4.916A8.96 8.96 0 0141 50a8.96 8.96 0 011.118-4.347L37.2 40.736c-.38-.38-.701-.257-.701.29v.98A2.503 2.503 0 0134 44.5c-1.39 0-2.5-1.122-2.5-2.507v-7.986a2.505 2.505 0 012.507-2.507h7.986A2.502 2.502 0 0144.5 34a2.49 2.49 0 01-2.493 2.5h-.98c-.547 0-.678.314-.29.7l4.916 4.918A8.96 8.96 0 0150 41a8.96 8.96 0 014.347 1.118l4.917-4.917c.38-.38.257-.701-.29-.701h-.98A2.503 2.503 0 0155.5 34c0-1.39 1.122-2.5 2.507-2.5h7.986a2.505 2.505 0 012.507 2.507v7.986A2.502 2.502 0 0166 44.5a2.49 2.49 0 01-2.5-2.493v-.98c0-.547-.314-.678-.7-.29l-4.918 4.916A8.96 8.96 0 0159 50a8.96 8.96 0 01-1.118 4.347l4.917 4.917c.38.38.701.257.701-.29v-.98A2.503 2.503 0 0166 55.5c1.39 0 2.5 1.122 2.5 2.507v7.986a2.505 2.505 0 01-2.507 2.507h-7.986A2.502 2.502 0 0155.5 66a2.49 2.49 0 012.493-2.5h.98c.547 0 .678-.314.29-.7l-4.916-4.918zM50 54a4 4 0 100-8 4 4 0 000 8z"}))),t&&s.createElement("div",{className:"is-bad-example style-red"},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"2 2 12 12"},s.createElement("path",{d:"M3.3 12.7c.2.2.4.3.7.3s.5-.1.7-.3L8 9.4l3.3 3.3c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L9.4 8l3.3-3.3c.4-.4.4-1 0-1.4s-1-.4-1.4 0L8 6.6 4.7 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4L6.6 8l-3.3 3.3c-.4.4-.4 1 0 1.4z"}))),a&&s.createElement("div",{className:"is-good-example style-green"},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 18 18"},s.createElement("path",{d:"M5.056 15.04a1.5 1.5 0 002.217-.119l10.17-12.476A1.5 1.5 0 0015.118.55L6.007 11.758l-3.453-3.41a1.5 1.5 0 10-2.109 2.133l4.611 4.56"}))),s.createElement("iframe",(0,n.Z)({width:"100%",className:"docus-preview-box"+(d?" is-fullscreen":""),srcDoc:i},u)))}},6508:function(e,t,a){a.r(t),a.d(t,{frontMatter:function(){return c},contentTitle:function(){return l},metadata:function(){return u},toc:function(){return p},default:function(){return m}});var n=a(7462),r=a(3366),s=(a(7294),a(3905)),o=a(2695),i=["components"],c={title:"Pagination"},l=void 0,u={unversionedId:"components/pagination",id:"components/pagination",isDocsHomePage:!1,title:"Pagination",description:"In fact, paginations are button groups that are customized for their special purpose: showing page numbers.",source:"@site/docs/components/pagination.mdx",sourceDirName:"components",slug:"/components/pagination",permalink:"/docs/components/pagination",editUrl:"https://github.com/amir2mi/flatifycss/tree/master/website/docs/components/pagination.mdx",tags:[],version:"current",frontMatter:{title:"Pagination"},sidebar:"tutorialSidebar",previous:{title:"Navigation bar",permalink:"/docs/components/navbar"},next:{title:"Popovers",permalink:"/docs/components/popover"}},p=[],d={toc:p};function m(e){var t=e.components,a=(0,r.Z)(e,i);return(0,s.kt)("wrapper",(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"In fact, paginations are button groups that are customized for their special purpose: showing page numbers.",(0,s.kt)("br",{parentName:"p"}),"\n","So before continue first read about ",(0,s.kt)("a",{parentName:"p",href:"/docs/components/buttons/button"},"buttons")," and ",(0,s.kt)("a",{parentName:"p",href:"/docs/components/buttons/button-group"},"button groups"),"."),(0,s.kt)(o.Z,{height:"310px",children:'\n<!DOCTYPE html>\n<html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatifycss/dist/css/flatify.min.css" /> <title>Pagination</title> </head> <body> <div class="flex-center"> <div class="button-group"> <a href="#" class="button">First</a> <a href="#" class="button">12</a> <a href="#" class="button active style-accent">13</a> <a href="#" class="button">14</a> <a href="#" class="button">Last</a> </div> </div> <br> <div class="flex-center"> <div class="button-group"> <a class="button disabled">Previous</a> <a href="#" class="button">1</a> <a href="#" class="button">2</a> <a href="#" class="button">3</a> <a href="#" class="button">Next</a> </div> </div> <br> <div class="flex-center"> <div class="button-group"> <a href="#" class="button">1</a> <a href="#" class="button active style-orange">2</a> <a href="#" class="button">3</a> <span class="button static">...</span> <a href="#" class="button">97</a> <a href="#" class="button">98</a> <a href="#" class="button">99</a> </div> </div> <br> <div class="flex-center"> <span class="push-left">1 from 99</span> <div class="button-group"> <a href="#" class="button active">1</a> <a href="#" class="button">2</a> <a href="#" class="button">3</a> <span class="button static">...</span> <a href="#" class="button">97</a> <a href="#" class="button">98</a> <a href="#" class="button">99</a> </div> </div> </body>\n</html>\n',mdxType:"PreviewBox"}),(0,s.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,s.kt)("div",{parentName:"div",className:"admonition-heading"},(0,s.kt)("h5",{parentName:"div"},(0,s.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,s.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,s.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"Active and static buttons")),(0,s.kt)("div",{parentName:"div",className:"admonition-content"},(0,s.kt)("p",{parentName:"div"},"To indicate active page number add the ",(0,s.kt)("inlineCode",{parentName:"p"},".active")," class to the ",(0,s.kt)("inlineCode",{parentName:"p"},".button"),".",(0,s.kt)("br",{parentName:"p"}),"\n","Sometimes there are parts of the pagination that should not be clickable/focusable however they are like buttons, ",(0,s.kt)("inlineCode",{parentName:"p"},".static")," class will help you have this kind of element inside pagination."))),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-html",metastring:'{4,11} title="index.html"',"{4,11}":!0,title:'"index.html"'},'<div class="button-group">\n  <a href="#" class="button bordered">First</a>\n  <a href="#" class="button bordered">12</a>\n  <a href="#" class="button bordered active style-accent">13</a>\n  <a href="#" class="button bordered">14</a>\n  <a href="#" class="button bordered">Last</a>\n</div>\n\n<div class="button-group">\n  <a class="button disabled">Previous</a>\n  <a href="#" class="button">1</a>\n  <a href="#" class="button">2</a>\n  <a href="#" class="button">3</a>\n  <a href="#" class="button">Next</a>\n</div>\n\n<div class="button-group">\n  <a href="#" class="button">1</a>\n  <a href="#" class="button active">2</a>\n  <a href="#" class="button">3</a>\n  <span class="button static">...</span>\n  <a href="#" class="button">97</a>\n  <a href="#" class="button">98</a>\n  <a href="#" class="button">99</a>\n</div>\n\n<div class="flex-center">\n  <span class="push-left">1 from 99</span>\n  <div class="button-group">\n    <a href="#" class="button active">1</a>\n    <a href="#" class="button">2</a>\n    <a href="#" class="button">3</a>\n    <span class="button static">...</span>\n    <a href="#" class="button">97</a>\n    <a href="#" class="button">98</a>\n    <a href="#" class="button">99</a>\n  </div>\n</div>\n')))}m.isMDXComponent=!0}}]);