Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="icon" type="image/png" href="{Favicon}">
- <title>{title}</title>
- <style type="text/css">/*
- coded by @abicodes!
- please don't remove credit, claim as your own, or use as a base!
- - basic isotope combination filtering setup from: https://codepen.io/desandro/pen/eYNEpQ
- - metafizzy istotope
- - phosphor icons
- - google fonts + fontshare
- */
- /****************************************
- Variables
- *****************************************/
- :root{
- /*
- background colors
- - edit color1, color2, and color3 to change the gradient combination!
- - alternatively, edit only color1 and go to the background section for a mono-color background*/
- --color1: #e3b4b3;
- --color2: #b8cad6;
- --color3: #abd1cd;
- /* colors
- - edit light + dark to change the text + line colors
- - accent changes link hover color + button hover color*/
- --transparent: rgba(0,0,0,0);
- --light: #f0f0f0;
- --light-transparent:rgba(240, 240, 240, .4);
- --dark: #141414;
- --dark-transparent: rgba(20, 20, 20, .7);
- --accent:rgba(145, 181, 177, .5);
- /* fonts*/
- --headerfont:'Clash Grotesk', sans-serif;
- --bodyfont:'Montserrat', sans-serif;
- --accentfont: 'Inconsolata', monospace;
- /* font sizes*/
- --largest-font:2.3rem; /*large sidebar font*/
- --large-font:1.4rem; /*character name font*/
- --medium-font: .85rem; /*body font*/
- --small-font:.75rem; /*character blurb + buttons*/
- /* sidebar width*/
- --sidebar-width:260px;
- /* image height + width*/
- --height:430px;
- --width:230px;
- --gap:35px; /*gap between characters*/
- /*background gradients
- - i wouldn't recommend playing with the actual gradient code, if you can help it! however, if you want a solid background, replace the below with:
- "--background: "var(--background-texture), var(--color1);"
- and make sure to change the color1 variable to the color that you would like the background to be!*/
- --background:
- var(--background-texture),
- var(--color2-gradient),
- var(--color3-gradient2),
- var(--color2-gradient3),
- var(--color1-gradient2),
- var(--color2-gradient2),
- var(--color3-gradient),
- var(--color3-gradient3),
- var(--color1-gradient);
- --color1-gradient:
- linear-gradient(to right,
- var(--color1) 0%,
- var(--transparent) 100%);
- --color1-gradient2:
- radial-gradient(circle at bottom right,
- var(--color1),
- var(--transparent) 50%);
- --color2-gradient:
- radial-gradient(circle at bottom left,
- var(--color2) 0%,
- var(--transparent) 70%);
- --color2-gradient2:
- radial-gradient(circle at 60% center,
- var(--color2) 0%,
- var(--transparent) 55%);
- --color2-gradient3:
- radial-gradient(circle at 100% center,
- var(--color2) 0%,
- var(--transparent) 30%);
- --color3-gradient:
- radial-gradient(circle at top right,
- var(--color3),
- var(--transparent) 100%);
- --color3-gradient2:
- radial-gradient(circle at center left,
- var(--color3),
- var(--transparent) 25%);
- --color3-gradient3:
- radial-gradient(circle at 60% bottom,
- var(--color3),
- var(--transparent) 75%);
- --background-texture: url('https://img.nickpic.host/56Mk0X.png');
- }
- body{
- margin: 0px !important;
- background: var(--background);
- color: var(--dark);
- font: var(--medium-font) var(--bodyfont);
- text-size-adjust: none;
- position: relative;
- background-attachment: fixed;
- }
- a{
- text-decoration: none;
- color: inherit;
- transition: .3s ease;
- }
- a:hover{
- color: var(--accent);
- }
- /****************************************
- Sidebar
- *****************************************/
- .sidebar{
- width: var(--sidebar-width);
- height: calc(100vh - 80px);
- position: fixed;
- top: 40px;
- border-right: 1.5px solid var(--dark);
- padding: 20px 30px;
- box-sizing: border-box;
- }
- .sidebar span span{
- font-family: var(--headerfont);
- text-transform: lowercase;
- font-size: var(--largest-font);
- font-weight: bold;
- }
- .sidebar a{
- display: flex;
- align-items: center;
- text-transform: uppercase;
- letter-spacing: .5px;
- gap: 10px;
- font-size: var(--small-font);
- }
- /****************************************
- Button styling
- *****************************************/
- .button-set{
- text-align: right;
- margin-bottom: 20px;
- }
- .filter-title{
- text-transform: uppercase;
- font-weight: bold;
- letter-spacing: .5px;
- margin-bottom: 5px;
- font-size: var(--small-font);
- }
- .button {
- display: inline-block;
- padding: 0.5em 1.0em;
- background: var(--transparent);
- color: var(--dark);
- font-family: var(--accentfont);
- font-size: var(--small-font);
- cursor: pointer;
- border: 1px solid var(--dark);
- border-radius: 20px;
- margin-bottom: 3px;
- }
- .button:hover {
- background-color: var(--accent);
- }
- .button:active,
- .button.is-checked {
- background-color: var(--dark-transparent);
- color: var(--light);
- }
- .button:active {
- }
- /****************************************
- Main Section
- *****************************************/
- .grid{
- margin-left: calc(var(--sidebar-width) + 40px);
- margin-right: 35px;
- margin-top: 30px;
- margin-bottom: 30px;
- position: relative;
- }
- /****************************************
- Character Info
- *****************************************/
- .character-box{width: var(--width); height: calc(var(--height) + 45px); border-bottom: 1.5px solid var(--dark);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-right: var(--gap);
- margin-bottom: var(--gap);}
- .hover-container{
- height: var(--height);
- width: var(--width);
- overflow: hidden;
- position: relative;
- }
- .char-img{
- height: var(--height);
- width: var(--width);
- background-size: cover;
- transition: 1s ease;
- }
- .hover-container:hover .char-img{
- filter: blur(5px) grayscale(100%) brightness(70%);
- transition: 1s ease;
- }
- .char-name{
- text-transform: uppercase;
- font-family: var(--headerfont);
- font-size: var(--large-font);
- margin-bottom: 9px;
- font-weight: 800;
- letter-spacing: .5px;
- }
- /****************************************
- Character Info - Hover
- *****************************************/
- .char-hover{
- height: var(--height);
- width: var(--width);
- background: var(--background-texture), var(--dark-transparent);
- position: absolute;
- top: 0px;
- color: var(--light);
- display: grid;
- grid-template-rows: 45px 1fr 45px;
- transition: .5s ease;
- opacity: 0;
- }
- .hover-container:hover .char-hover{
- opacity: 1;
- transition: .5s ease;
- }
- .char-info{
- border-bottom: 1.5px solid var(--light-transparent);
- }
- .char-blurb{
- text-transform: uppercase;
- display: flex;
- padding: 20px 30px;
- letter-spacing: .5px;
- font-weight: 300;
- align-items: center;
- justify-content: center;
- font-size: var(--small-font);
- text-align: justify;
- text-align-last: center;
- line-height: 1.5;
- flex-direction: column;
- }
- .char-links{
- border-top: 1.5px solid var(--light-transparent);
- }
- .char-info, .char-links{
- padding: 0px 10px;
- display: flex;
- text-transform: uppercase;
- font-family: var(--accentfont);
- letter-spacing: .5px;
- align-items: center;
- justify-content: center;
- gap: 10px;
- }
- /****************************************
- Credit
- *****************************************/
- .credit{
- position: fixed;
- bottom: 20px;
- right: 20px;
- font-size: var(--large-font);
- }</style>
- <!-- scripts -->
- <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.5/isotope.pkgd.js"></script>
- <!-- fonts -->
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,900;1,400;1,600;1,700&family=Prata&display=swap" rel="stylesheet">
- <link href="https://api.fontshare.com/v2/css?f[]=clash-grotesk@1&display=swap" rel="stylesheet">
- <script src="https://unpkg.com/phosphor-icons"></script>
- <!-- beginning of code -->
- <div class = "sidebar">
- <!-- change title here -->
- <span><span>Abi's<br>muses</span><br><p>
- <!-- put link returning to blog here -->
- <a href = "/"><i class="ph-caret-left"></i> return home</a>
- </span>
- <div class="filters">
- <!-- TO ADD FILTER GROUPS
- - add filter groups by copying all text from the start to the end of the "button-set" div class. the start + end are also marked in the code!
- - make sure to change the initial filter to a new element
- ex: <div class="button-group js-radio-button-group" data-filter-group="status">
- ex: <div class="button-group js-radio-button-group" data-filter-group="role">
- TO ADD FILTER ITEMS IN GROUP
- - add filters within a group by copying text from <button> to </button> and then change "data-filter" to your filter name
- ex: <button class="button" data-filter=".hollow">hollow</button>
- <ex:button class="button" data-filter=".hallowed">hallowed</button>
- TO ADD FILTER CLASSES TO CHARACTERS
- - add filter tag to a character by adding it to the div class for character-box, where noted
- ex: <div class = "character-box hallowed knight open a">
- ex: ex: <div class = "character-box hollow pawn closed b">
- -->
- <!-- filter set start -->
- <div class="button-set">
- <div class = "filter-title">status</div>
- <div class="button-group js-radio-button-group" data-filter-group="status">
- <button class="button is-checked" data-filter="">all</button>
- <button class="button" data-filter=".open">open</button>
- <button class="button" data-filter=".closed">closed</button>
- </div></div>
- <!-- filter set end -->
- <!-- filter set start -->
- <div class="button-set">
- <div class = "filter-title">allegiance</div>
- <div class="button-group js-radio-button-group" data-filter-group="allegiance">
- <button class="button is-checked" data-filter="">all</button>
- <button class="button" data-filter=".hollow">hollow</button>
- <button class="button" data-filter=".hallowed">hallowed</button>
- </div>
- </div>
- <!-- filter set end -->
- <!-- filter set start -->
- <div class="button-set">
- <div class = "filter-title">role</div>
- <div class="button-group js-radio-button-group" data-filter-group="role">
- <button class="button is-checked" data-filter="">all</button>
- <button class="button" data-filter=".pawn">pawn</button>
- <button class="button" data-filter=".knight">knight</button>
- <button class="button" data-filter=".bishop">bishop</button>
- <button class="button" data-filter=".rook">rook</button>
- </div>
- </div>
- <!-- filter set end -->
- <!-- filter set start -->
- <div class="button-set">
- <div class = "filter-title">misc filter</div>
- <div class="button-group js-radio-button-group" data-filter-group="misc">
- <button class="button is-checked" data-filter="">all</button>
- <button class="button" data-filter=".a">one</button>
- <button class="button" data-filter=".b">two</button>
- <button class="button" data-filter=".c">three</button>
- <button class="button" data-filter=".d">four</button>
- <button class="button" data-filter=".e">five</button>
- </div>
- </div>
- <!-- filter set end -->
- </div>
- </div>
- <div class="grid">
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hollow pawn a">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/OEWF1FE.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the catabolist</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">I'll find the sacred buried in me And I will cut it while everyone is watching<p> (it will not be enough)</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">mordred</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hallowed knight b">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/W0j0lVR.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the honed</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">To the kindness of strangers and their kitchen floors.
- How the pain grows sweet and the blood dries burnt orange</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">lancelot</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hollow rook c">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/gQrZQcU.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the percipent</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Reason’s a tease,
- Drank up all that hemlock, here I am just reading the leaves</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">nimue</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hollow bishop d">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/oC1wJ9W.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the architect</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">It's a sacrificial violence, all those passed over in silence then cast out with the blame</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">merlin</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hallowed pawn e">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/WEqfFbC.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the attached</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">I know I said I would be Caesar Or else I would be nothing<p>
- But I will settle for being right</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">isolde</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hallowed knight a">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/h7cDzoa.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the seeker</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Oh what am I waiting for?<p>
- A spell to be cast or for it to be broken?<p>
- At the very last some wild ghost from my past come to split me wide open?</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">galahad</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hollow rook b">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/aOelDkp.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the wayward</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">We are alone in this together</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">elaine</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hallowed bishop c">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/NkIFknV.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the dying</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">every star is a possible death</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">the fisher king</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hollow knight d">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/sbdPvLx.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the telepresence</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Can we wait for the summer again?<p>
- Can we hold out for summer again?<p>Will we ever be whole again?</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">guinevere</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hollow pawn e">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/TvOiVrG.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the executive</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">I began hearing these voices in the dial tone<p>
- And they come to me now though I dismembered my phone</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">morgan</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hallowed pawn a">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/z0LthhG.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the empath</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Don't shake the nest, don't speak the lie</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">sir kay</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hallowed knight b">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/gOLUdAi.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the denotation</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">What goes up, goes up in flames</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">arthur</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box closed hollow knight c">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/eGTBkgy.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the mnemologist</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Hollowed out of all my fabled insides<p>
- Occam shave me down to primal truth— return me to the womb</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">gawain</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hollow knight d">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/ayA3shH.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the futurist</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">All that being and nothingness, on the same möbius strip</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">tristan</div>
- </div>
- <!-- end of character -->
- <!-- start of character -->
- <!-- here is where you edit the isotope filter classes -->
- <div class = "character-box open hallowed bishop e">
- <div class = "hover-container">
- <!-- change the url below to the image that you want! -->
- <div class = "char-img" style = "background-image: url('https://i.imgur.com/2xcz5BZ.png');">
- </div>
- <div class = "char-hover">
- <!-- place to put a short character description of some sort below! -->
- <div class = "char-info">the onomastic</div>
- <!-- you can put a blurb or a character quote into the class below; it'll take a lot, but don't go too long -->
- <div class = "char-blurb">Mirror to my left, and mirror to my right,
- A void stretching out on either side<p>
- Is it your face or mine?</div>
- <!-- this is where you can put links or another bit of info: add as little or as much as you want -->
- <div class = "char-links"><a href = "">link</a>-<a href = "">link</a></div>
- </div></div>
- <div class = "char-name">bedivere</div>
- </div>
- <!-- end of character -->
- </div>
- <div class = "credit"><a href = "https://abicodes.tumblr.com/" title = "© abi codes"><i class="ph-sparkle-fill"></i></a></div>
- <script>// init Isotope
- var $grid = $('.grid').isotope({
- itemSelector: '.character-box'
- });
- // store filter for each group
- var filters = {};
- $('.filters').on( 'click', '.button', function( event ) {
- var $button = $( event.currentTarget );
- // get group key
- var $buttonGroup = $button.parents('.button-group');
- var filterGroup = $buttonGroup.attr('data-filter-group');
- // set filter for group
- filters[ filterGroup ] = $button.attr('data-filter');
- // combine filters
- var filterValue = concatValues( filters );
- // set filter for Isotope
- $grid.isotope({ filter: filterValue });
- });
- // change is-checked class on buttons
- $('.button-group').each( function( i, buttonGroup ) {
- var $buttonGroup = $( buttonGroup );
- $buttonGroup.on( 'click', 'button', function( event ) {
- $buttonGroup.find('.is-checked').removeClass('is-checked');
- var $button = $( event.currentTarget );
- $button.addClass('is-checked');
- });
- });
- // flatten object by concatting values
- function concatValues( obj ) {
- var value = '';
- for ( var prop in obj ) {
- value += obj[ prop ];
- }
- return value;
- }</script>
Advertisement
Add Comment
Please, Sign In to add comment