Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- - page 'crawl' by skye southcodes.tumblr.com
- - modify as you please but please do not touch the credit
- - any errors? need help? have questions? let me know!
- southcodes.tumblr.com/inbox
- - normalize css by https://github.com/necolas
- - fonts by google
- - icon font by https://fontawesome.com/icons
- - isotope filteres by https://isotope.metafizzy.co/
- how to customzie filters: https://hendrixrph-blog.tumblr.com/post/131707989334/under-the-cut-is-a-tutorial-on-how-to-create-a
- -->
- <!DOCTYPE html>
- <html>
- <head>
- <title>{title}</title>
- <meta charset="UTF-8">
- <meta name="description" content="{MetaDescription}"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="shortcut icon" href="{favicon}">
- <link rel="alternate" type="application/rss+xml" href="{RSS}">
- <!-- 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=Karla:ital,wght@0,200..800;1,200..800&family=Montserrat+Underline:ital,wght@0,100..900;1,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
- <style>
- :root {
- --background:#f4f4f4;
- --boxes-background:#fff;
- --background-square:lightblue;
- --first-header-square:lightblue;
- --second-header-square:rgb(217, 242, 250);
- --text: rgba(0, 0, 0);
- --note-text:#555;
- --links: #6a89bb;
- --links-hover: rgb(23, 59, 80);
- --borders:#ccc;
- --accents:#aadde4;
- }
- * {margin:0;padding:0;box-sizing: border-box;}
- p {margin:1rem 0}
- html{font-size: 16px}
- body {font: 1rem 'Karla', sans-serif;color:var(--text);background-color: var(--background);letter-spacing: .05rem;}
- a {text-decoration: none;color:var(--links);transition-duration: .2s;}
- a:hover {color:var(--links-hover);}
- b {font-weight: 600}
- ol,ul,li {list-style-type:none;}
- hr {border:0;border-top:1px solid var(--borders);margin:auto;width: 100%;}
- ::-webkit-scrollbar-thumb:vertical {border-left:2px solid var(--accents);}
- ::-webkit-scrollbar {width:6px;height:0;background-color: transparent;}
- ::-webkit-scrollbar-track-piece{margin:5px 0;}
- #background-square {
- position: fixed;
- inset: auto 0 0 auto;
- width: 30vw;
- aspect-ratio: 1 / 1;
- z-index: -1;
- background-color: var(--background-square);
- }
- /* container */
- #container {display: flex;}
- /* filters */
- #hamburger-checkbox {display: none;}
- #hamburger-checkbox:checked~#filters-wrapper {
- transition: 2s ease;
- transform: translateX(0px);
- }
- .hamburger {
- display:none;
- position: fixed;
- inset:1rem auto auto 1rem;
- z-index: 9999!important;
- padding:.5rem .7rem;
- border: 1px solid var(--borders);
- border-radius: 5px;
- cursor: pointer;
- font-size: 1.5rem;
- color: var(--accents);
- background-color: var(--boxes-background);
- }
- #filters-wrapper {
- position: fixed;
- inset:0 auto 0 0;
- z-index: 9!important;
- width: 18rem;
- height: 100vh;
- border-right: 1px solid var(--borders);
- background-color: var(--boxes-background);
- }
- .filters-image {
- width: 100%;
- height: 10rem;
- object-fit:cover
- }
- #filters-content {
- height: calc(100vh - 10rem);
- overflow: auto;
- }
- #filters-title {
- margin: 3rem 0 3.5rem;
- padding:0 2rem;
- font-weight:400;
- }
- #filters-title span {
- box-shadow: inset 0 -10px var(--accents);
- padding:0 .3rem
- }
- #filters-title::first-letter {text-transform: uppercase;}
- #filters {padding:0 2rem 1.5rem 3rem}
- #filters .button-group-title {
- margin-bottom: 1rem;
- font-weight:500;
- font-size: 1rem;
- text-transform: uppercase;
- }
- .button-group {margin-bottom: 3rem;}
- #filters button {
- display: block;
- margin-bottom: .8rem;
- padding:0 .2rem .2rem;
- outline:none;
- border: 0;
- border-bottom: 2px solid var(--accents);
- font-family: inherit;
- font-size: .95rem;
- color:var(--text);
- background-color: transparent;
- text-align: left;
- transition-duration: .2s;
- cursor:pointer;
- }
- #filters button:hover {color:var(--links-hover)}
- #filters .is-checked:before {
- content: '';
- position: absolute;
- inset: 6px auto auto 0;
- width: .4rem;
- aspect-ratio: 1 / 1;
- border-radius: 100%;
- background-color: var(--accents);
- }
- #filters .is-checked{
- position: relative;
- margin-left: 1rem;
- padding-left: 1rem;
- border-bottom: 0;
- cursor: pointer;
- }
- #filters-rating span{
- color:var(--accents);
- }
- /* main */
- #main-wrapper {
- width: calc(100% - 18rem);
- margin-left: 18rem;
- }
- /* header */
- #main-header {
- padding:6rem 3rem;
- border-bottom: 1px solid var(--borders);
- background-color: var(--boxes-background);
- }
- #header-content {
- display: flex;
- justify-content: center;
- margin: auto;
- max-width: 35rem;
- }
- #header-aside {margin-right: 2rem;}
- .header-image {
- width: 3.3rem;
- aspect-ratio: 1 / 1;
- object-fit:cover;
- border-radius: 4px;
- }
- figure.header-image {margin-bottom: .5rem;}
- #squares-wrapper {
- display: flex;
- justify-content: space-between;
- }
- .color-square {
- width: 1.3rem;
- aspect-ratio: 1 / 1;
- border-radius: 4px;
- }
- .color-square:first-of-type {background-color:var(--first-header-square);}
- .color-square:nth-of-type(2) {
- background-color:var(--second-header-square);}
- #page-title {
- font:500 1.5rem 'montserrat underline', sans-serif;
- margin-bottom:1rem
- }
- #description {
- border: 1px solid var(--borders);
- padding: .5rem 1.5rem;
- font-style: italic;
- text-align: center;
- border-radius: 4px;
- }
- /* rec content */
- #rec-wrapper {
- width: 100%;
- margin:7rem auto 0;
- }
- /* rec boxes */
- .rec-item {
- width: calc(50% - 7rem);
- min-height: 11rem;
- margin:0 3rem 7rem;
- }
- /* rating */
- .rec-rating {
- font-size: 1.5rem;
- position: absolute;
- inset:0 -2rem auto auto
- }
- .rec-rating {color:#aaa}
- .one-star .rec-rating li:nth-of-type(1),
- .two-stars .rec-rating li:nth-of-type(-n+2),
- .three-stars .rec-rating li:nth-of-type(-n+3),
- .four-stars .rec-rating li:nth-of-type(-n+4),
- .five-stars .rec-rating li:nth-of-type(-n+5)
- {
- color: var(--accents);
- }
- .rec-title {
- position: relative;
- text-indent: 2.5rem;
- font:400 1.2rem 'karla', sans-serif;
- line-height: 130%;
- margin: 0;
- }
- .rec-title:before {
- content: '';
- position:absolute;
- inset:-.3rem auto auto 0;
- width: 1.5rem;
- aspect-ratio: 1 / 1;
- border-radius: 4px;
- background-color: var(--accents);
- }
- .rec-author {
- position: relative;
- margin:.5rem 0 0 2rem;
- padding-left: 1.3rem;
- font:400 .9rem 'karla', sans-serif;
- }
- .rec-author:before {
- content: '';
- position: absolute;
- inset:.35rem auto auto 0;
- width: .5rem;
- aspect-ratio: 1 / 1;
- border-radius: 100%;
- background-color: var(--accents);
- }
- .rec-description {
- margin-top: 2rem;
- padding:0 1rem;
- line-height: 140%;
- border: 1px solid var(--borders);
- border-bottom: 3px solid var(--accents);
- border-radius: 4px;
- background-color: var(--boxes-background);
- }
- .rec-details {margin-top: 2rem;max-width: 100%;}
- .rec-details ul {
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
- }
- .rec-details ul li {
- position: relative;
- margin: .2rem 0 .2rem 2.5rem ;
- }
- .rec-details ul li:after {
- content: '';
- position: absolute;
- inset: .45rem auto auto -1.5rem;
- width: .5rem;
- aspect-ratio: 1 / 1;
- border-radius: 100%;
- background-color: var(--accents);
- }
- .rec-details ul li:first-of-type {margin-left: 0;}
- .rec-details ul li:first-of-type:after {display: none}
- .rec-notes {
- margin-top: 2rem;
- padding:0 1rem;
- font-size: .95rem;
- line-height: 140%;
- font-style: italic;
- color: var(--note-text);
- border: 1px solid var(--borders);
- border-top: 4px solid var(--accents);
- border-radius: 4px;
- background-color: var(--boxes-background);
- }
- /* MEDIA */
- @media only screen and (min-width:0px) and (max-width:1200px) {
- #main-wrapper {
- width: 100%;
- margin:0
- }
- #filters-wrapper {
- transform: translateX(-18rem);
- transition: 2s ease;
- }
- .hamburger {
- display: block;
- }
- }
- </style>
- </head>
- </head>
- <body>
- <!-- background square -->
- <div id="background-square"></div>
- <!-- container -->
- <section id="container">
- <input type="checkbox" id="hamburger-checkbox">
- <label class="hamburger" for="hamburger-checkbox">☰</label>
- <!-- filters start -->
- <aside id="filters-wrapper">
- <!-- filters image -->
- <figure class="filters-image"><img src="IMAGE URL" alt="" class="filters-image"></figure>
- <!-- filters content -->
- <section id="filters-content">
- <h2 id="filters-title"><span>filters title</span></h2>
- <!-- filters -->
- <section id="filters">
- <div class="button-group" data-filter-group="one">
- <h3 class="button-group-title">filter title</h3>
- <button class="button is-checked" data-filter=""><span>all</span></button>
- <button class="button" data-filter=".filter-a"><span>filter a</span></button>
- <button class="button" data-filter=".filter-b"><span>filter b</span></button>
- </div>
- <div class="button-group" data-filter-group="one" id="filters-rating">
- <h3 class="button-group-title">rating</h3>
- <button class="button is-checked" data-filter="">all</button>
- <button class="button" data-filter=".three"><span>★</span></button>
- <button class="button" data-filter=".three"><span>★★</span></button>
- <button class="button" data-filter=".three"><span>★★★</span></button>
- <button class="button" data-filter=".three"><span>★★★★</span></button>
- <button class="button" data-filter=".three"><span>★★★★★</span></button>
- </div>
- </section><!--filters end-->
- </section> <!-- filters content -->
- </aside>
- <!-- filters wrapper end -->
- <!-- recs container -->
- <main id="main-wrapper">
- <!-- header start -->
- <header id="main-header">
- <!-- header -->
- <section id="header-content">
- <aside id="header-aside">
- <!-- header image -->
- <figure class="header-image"><img src="IMAGE URL" alt="" class="header-image"></figure>
- <!-- color squares -->
- <div id="squares-wrapper">
- <div class="color-square"></div>
- <div class="color-square"></div>
- </div>
- </aside>
- <!-- header content -->
- <section id="header-inside">
- <!-- page title -->
- <h1 id="page-title">page title</h1>
- <!-- page description -->
- <article id="description">
- <p>page description</p>
- </article>
- </section>
- <!-- header content end -->
- </section>
- <!-- header end -->
- </header>
- <!-- header end -->
- <!-- rec wrapper -->
- <section id="rec-wrapper">
- <!-- customize star rating:
- find: <article class="rec-item star-rating">
- change 'star-rating' to one of the below, depending on how many stars you want it to have:
- one-star
- two-stars
- three-stars
- four-stars
- five-stars
- example:
- <article class="rec-item four-stars">
- rec template:
- <article class="rec-item star-rating">
- <h2 class="rec-title"><a href="" target="_blank">rec title</a></h2>
- <h3 class="rec-author"><a href="" target="_blank">author</a></h3>
- <article class="rec-description">
- <p>rec description</p>
- </article>
- <article class="rec-details"><ul>
- <li>genre</li>
- <li>word count</li>
- <li>rating</li>
- </ul></article>
- <article class="rec-notes">
- <p>rec notes</p>
- </article>
- <article class="rec-rating">
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- </article>
- </article>
- -->
- <!-- rec item start -->
- <article class="rec-item star-rating">
- <!-- rec title -->
- <h2 class="rec-title"><a href="" target="_blank">rec title</a></h2>
- <!-- rec author -->
- <h3 class="rec-author"><a href="" target="_blank">author</a></h3>
- <!-- rec descrption -->
- <article class="rec-description">
- <p>rec description</p>
- </article>
- <!-- rec details -->
- <article class="rec-details"><ul>
- <li>genre</li>
- <li>word count</li>
- <li>rating</li>
- </ul></article>
- <!-- rec notes -->
- <article class="rec-notes">
- <p>rec notes</p>
- </article>
- <!-- rec star rating -->
- <article class="rec-rating">
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- </article>
- </article>
- <!-- rec item end -->
- <!-- rec item start -->
- <article class="rec-item star-rating">
- <!-- rec title -->
- <h2 class="rec-title"><a href="" target="_blank">rec title</a></h2>
- <!-- rec author -->
- <h3 class="rec-author"><a href="" target="_blank">author</a></h3>
- <!-- rec descrption -->
- <article class="rec-description">
- <p>rec description</p>
- </article>
- <!-- rec details -->
- <article class="rec-details"><ul>
- <li>genre</li>
- <li>word count</li>
- <li>rating</li>
- </ul></article>
- <!-- rec notes -->
- <article class="rec-notes">
- <p>rec notes</p>
- </article>
- <!-- rec star rating -->
- <article class="rec-rating">
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- </article>
- </article>
- <!-- rec item end -->
- <!-- rec item start -->
- <article class="rec-item star-rating">
- <!-- rec title -->
- <h2 class="rec-title"><a href="" target="_blank">rec title</a></h2>
- <!-- rec author -->
- <h3 class="rec-author"><a href="" target="_blank">author</a></h3>
- <!-- rec descrption -->
- <article class="rec-description">
- <p>rec description</p>
- </article>
- <!-- rec details -->
- <article class="rec-details"><ul>
- <li>genre</li>
- <li>word count</li>
- <li>rating</li>
- </ul></article>
- <!-- rec notes -->
- <article class="rec-notes">
- <p>rec notes</p>
- </article>
- <!-- rec star rating -->
- <article class="rec-rating">
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- </article>
- </article>
- <!-- rec item end -->
- <!-- rec item start -->
- <article class="rec-item star-rating">
- <!-- rec title -->
- <h2 class="rec-title"><a href="" target="_blank">rec title</a></h2>
- <!-- rec author -->
- <h3 class="rec-author"><a href="" target="_blank">author</a></h3>
- <!-- rec descrption -->
- <article class="rec-description">
- <p>rec description</p>
- </article>
- <!-- rec details -->
- <article class="rec-details"><ul>
- <li>genre</li>
- <li>word count</li>
- <li>rating</li>
- </ul></article>
- <!-- rec notes -->
- <article class="rec-notes">
- <p>rec notes</p>
- </article>
- <!-- rec star rating -->
- <article class="rec-rating">
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- <li>★</li>
- </article>
- </article>
- <!-- rec item end -->
- </section>
- <!-- rec wrapper end -->
- </main>
- <!-- recs container end -->
- </section><!-- container -->
- <!-- don't touch -->
- <div style="position: fixed;inset: auto 1rem 1rem auto;font-size: .9rem;"><a style="color:var(--text)" href="https://southcodes.tumblr.com" target="_blank">sc</a></div>
- <!-- query -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
- <!-- font awesome icons font -->
- <script src="https://kit.fontawesome.com/0993e30c04.js" crossorigin="anonymous"></script>
- <!-- isotope -->
- <script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
- <script type="text/javascript">
- $(document).ready( function() {
- // init Isotope
- var $grid = $('#rec-wrapper').isotope({
- itemSelector: '.rec-item'
- });
- // store filter for each group
- var filters = {};
- $('#filters').on( 'click', '.button', function() {
- var $this = $(this);
- // get group key
- var $buttonGroup = $this.parents('.button-group');
- var filterGroup = $buttonGroup.attr('data-filter-group');
- // set filter for group
- filters[ filterGroup ] = $this.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() {
- $buttonGroup.find('.is-checked').removeClass('is-checked');
- $( this ).addClass('is-checked');
- });
- });
- });
- // flatten object by concatting values
- function concatValues( obj ) {
- var value = '';
- for ( var prop in obj ) {
- value += obj[ prop ];
- }
- return value;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement