Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <!--
- MEDIA I
- by alydae
- released: april 28, 2017
- last updated: november 19, 2024
- - do not steal any part of this code
- - do not even TOUCH the credit
- - direct questions to enchantedthemes.tumblr.com
- thank you for using!!!
- -->
- <title>bookshelf</title>
- <link rel="shortcut icon" href="{Favicon}">
- <!-- scripts - DO NOT TOUCH -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script src="https://static.tumblr.com/rzl30kg/eAxm7a751/jquery.style-my-tooltips.js"></script>
- <script>
- (function($){
- $(document).ready(function(){
- $("[title]").style_my_tooltips({
- tip_follows_cursor:true,
- tip_delay_time:200,
- tip_fade_speed:300
- }
- );
- });
- })(jQuery);
- </script>
- <script src="https://npmcdn.com/[email protected]/dist/masonry.pkgd.min.js"></script>
- <script>
- $(window).load(function () {
- $('#content').masonry({
- itemSelector : ".media",
- horizontalOrder: true
- });
- });
- </script>
- <!-- custom font -->
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic|Karla:300,400,600,400italic' rel='stylesheet' type='text/css'>
- <link href=“//use.fontawesome.com/releases/v6.5.1/css/all.css” rel=“stylesheet”>
- <link rel="stylesheet" href="https://cdn.linearicons.com/free/1.0.0/icon-font.min.css">
- <style type="text/css">
- @keyframes fadein {
- from { opacity:0; }
- to { opacity:1; }
- }
- @-moz-keyframes fadein {
- from { opacity:0; }
- to { opacity:1; }
- }
- @-webkit-keyframes fadein {
- from { opacity:0; }
- to { opacity:1; }
- }
- @-ms-keyframes fadein {
- from { opacity:0; }
- to { opacity:1; }
- }
- @-o-keyframes fadein {
- from { opacity:0; }
- to { opacity:1; }
- }
- /*-- selection --*/
- ::-moz-selection { background:var(--accent); color:var(--title); }
- ::selection { background:var(--accent); color:var(--title); }
- /*-- scrollbar --*/
- ::-webkit-scrollbar {
- width:1px;
- height:2px;
- }
- ::-webkit-scrollbar-thumb { background-color:var(--text); }
- /*-- tooltips --*/
- #s-m-t-tooltip {
- color:var(--text);
- background-color:var(--accent);
- font-size:calc(var(--font-size) - 2px);
- font-family:'Open Sans', helvetica, sans-serif;
- letter-spacing:1px;
- text-transform:uppercase;
- text-align:center;
- position:absolute;
- padding:0px 5px 0px 5px;
- margin-top:30px;
- border:1px solid var(--borders);
- z-index:9999;
- }
- /*-- tumblr controls --*/
- .tmblr-iframe, .iframe-controls–desktop {
- display:none!important;
- }
- /*-- change all variables here --*/
- :root {
- --background:#fff;
- --accent:#fafafa;
- --text:#666;
- --links:#444;
- --links-hover:#bad1e7;
- --title:#222;
- --borders:#eee;
- --font-size:10px;
- }
- /*-- general customisation --*/
- body {
- color:var(--text);
- background-color:var(--background);
- font-style:normal;
- font-family:'Open Sans', helvetica, sans-serif;
- font-size:var(--font-size);
- font-weight:400;
- text-decoration:none;
- line-height:180%;
- -moz-osx-font-smoothing: grayscale;
- -webkit-font-smoothing: antialiased;
- font-smoothing: antialiased;
- -webkit-animation: fadein 1.5s;
- -moz-animation: fadein 1.5s;
- -o-animation: fadein 1.5s;
- animation: fadein 1.5s;
- }
- a {
- text-decoration:none;
- color:var(--links);
- transition-duration: 0.6s;
- -moz-transition-duration: 0.6s;
- -webkit-transition-duration: 0.6s;
- -o-transition-duration: 0.6s
- }
- a:hover {
- color:var(--links-hover);
- cursor:pointer;
- transition-duration: 0.6s;
- -moz-transition-duration: 0.6s;
- -webkit-transition-duration: 0.6s;
- -o-transition-duration: 0.6s
- }
- b, strong { font-weight:700; color:var(--title); }
- i, em { font-style:italic; }
- h1, h2, h3 {
- margin:0;
- font-size:10px;
- line-height:150%;
- }
- /*-- header --*/
- #header {
- position:fixed;
- margin:0;
- top:0;
- left:0;
- z-index:9999;
- }
- .info {
- margin:0;
- top:0;
- left:0;
- width:100vw;
- height:50px;
- padding:15px;
- background:var(--background);
- }
- .info img {
- position:relative;
- height:50px;
- width:50px;
- border-radius:50%;
- }
- .t {
- position:relative;
- margin:-50px 70px;
- text-transform:uppercase;
- font-size:calc(var(--font-size) + 4px);
- font-weight:700;
- letter-spacing:1px;
- color:var(--title);
- }
- .l { position:absolute; margin:55px 70px; }
- .l a { margin-right:10px; }
- .l i { margin-right:5px; }
- .d {
- position:relative;
- float:right;
- text-align:right;
- top:12px;
- right:15px;
- margin:15px;
- width:400px;
- line-height:160%;
- max-height:50px;
- overflow:auto;
- padding-right:10px;
- padding-bottom:0px;
- }
- /*--filters--*/
- #sort {
- position:relative;
- width:100vw;
- top:0;
- left:0;
- padding-top:10px;
- padding-bottom:10px;
- text-align:center;
- background:var(--accent);
- border:1px solid var(--borders);
- }
- #sort ul {
- display:block;
- list-style:none;
- padding-left:0px;
- margin-top:0;
- margin-bottom:0;
- }
- #sort a {
- display:inline;
- margin-right:10px;
- }
- #sort li { display:inline; list-style:none; }
- #sort li a.selected { font-weight:600; color:var(--title); }
- #sort li:before { content:'#'; margin-right:2px; }
- /*-- media --*/
- #content {
- height:100%;
- position:relative;
- margin:200px auto 100px auto;
- width:calc((133px + 30px + 2px) * 6);
- /* ((media width + 2*margin + 2*border) * number of columns) */
- }
- .media {
- margin:15px;
- height:auto;
- width:133px;
- float:left;
- background-color:var(--accent);
- border:1px solid var(--borders);
- }
- .media img {
- width:133px;
- height:200px;
- margin-bottom:-5px;
- object-fit:cover;
- }
- .media h1 {
- padding:10px 10px 5px;
- text-transform:uppercase;
- text-align:left;
- font-weight:600;
- font-size:calc(var(--font-size) + 0.5px);
- color:var(--title);
- }
- .media h2 {
- width:calc((133px/2) - 10px);
- padding-left:10px;
- padding-bottom:10px;
- text-transform:lowercase;
- text-align:left;
- font-weight:400;
- font-style:italic;
- color:var(--title);
- }
- .media h3 {
- width:calc((133px/2) - 10px);
- float:right;
- margin-top:-25px;
- padding-right:10px;
- text-align:right;
- font-weight:400;
- }
- .overlay {
- position:absolute;
- top:0;
- left:0;
- width:133px;
- height:200px;
- opacity:0;
- background:rgba(255,255,255,0.95);
- z-index:99;
- overflow-y:scroll;
- overflow-x:hidden;
- transition:0.6s ease;
- -o-transition:0.6s ease;
- -moz-transition:0.6s ease;
- -webkit-transition:0.6s ease;
- }
- .media:hover .overlay { opacity:1; }
- .desc {
- position:relative;
- top:0;
- left:0;
- width:113px;
- max-height:180px;
- margin:5px;
- padding:5px;
- overflow-y:scroll;
- overflow-x:hidden;
- }
- /*-- credit - DO NOT TOUCH --*/
- .credit a {
- font-size:10px;
- bottom:15px;
- right:20px;
- position:fixed;
- text-transform:uppercase;
- }
- </style>
- </head>
- <body>
- <div id="header">
- <div class="info">
- <!-- the default is your icon. if you want to change it, remove {PortraitURL-128} and replace it with the image url of the one you want. -->
- <img src="{PortraitURL-128}"/>
- <div class="t">bookshelf</div><!-- title -->
- <div class="l">
- <!-- these are your header links. feel free to add more. to change the icon, go to https://fontawesome.com/icons. -->
- <a href="/"><i class="fas fa-home"></i>index</a>
- <a href="/ask"><i class="fas fa-envelope"></i>message</a>
- <a href="/"><i class="fas fa-heart"></i>link</a>
- <a href="/"><i class="fas fa-bars"></i>link</a>
- </div>
- <!-- delete this section if you don't want a description -->
- <div class="d">
- this page can be used for books, movies, tv shows, fic recs etc.
- <br>you can filter by anything you like!
- <br>there are instructions to delete this description, which will automatically scroll, if you don't want it.
- </div>
- <!-- up to here! -->
- </div>
- <!-- HOW TO CUSTOMISE THE FILTERS
- template for new filter groups:
- <ul class="filter option-set" data-filter-group="group1">
- <b>category:</b>
- <li><a href="#" data-filter-value="" class="selected">all</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- </ul>
- template for new filters:
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- in order to make your filters match your books/tv shows/fic/whatever, you only need to change the '.filter' and 'filter name' part. the 'category' line is optional.
- for example, if I wanted to make my media filter by favourites only, my code would look like this
- <li><a href="#" data-filter-value=".fave">favourites</a></li>
- note the areas where it's been changed.
- it is essential that you do not change any other part, including the 'exclusive' in the first filter group, as well as the first filter in every group.
- <li><a href="#" data-filter-value="" class="selected">all</a></li>
- -->
- <div id="sort">
- <ul class="filter option-set exclusive" data-filter-group="group1">
- <b>category:</b>
- <li><a href="#" data-filter-value="" class="selected">all</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- </ul>
- <ul class="filter option-set" data-filter-group="group2">
- <b>category:</b>
- <li><a href="#" data-filter-value="" class="selected">all</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- <li><a href="#" data-filter-value=".filter">filter name</a></li>
- </ul>
- </div>
- </div><!-- end header -->
- <div id="content" class="clearfix">
- <!-- HOW TO ADD FILTERS TO EACH BOX
- template:
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- to add the filters, add the same name that you used above in the '.filter' but without the dot in front. you can add as many as you want but the 'media' in the beginning MUST stay there.
- for example, if you wanted to have the filters 'fave' and 'new' together for one box, the filters should look like this
- <div class="media fave new">
- note how media is still there in front.
- if you do not want the text on hover, just delete these lines from the book/tv show/fic/whatever in question.
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- if you do not want an image and overlay, delete these lines from the book/tv/show/fic/whatever in question
- <img src=""/>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- -->
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- <div class="media">
- <img src=""/>
- <h1>title</h1>
- <h2>author</h2>
- <h3><a href="">link</a></h3>
- <div class="overlay">
- <div class="desc">desc</div>
- </div>
- </div>
- </div><!-- end content -->
- <!-- credit - DO NOT TOUCH -->
- <div class="credit">
- <a href="https://enchantedthemes.tumblr.com" title="alydae">A.</a>
- </div>
- </body>
- <!-- scripts - DO NOT TOUCH -->
- <!-- combination filters by @magnusthemes -->
- <script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
- <script src="https://static.tumblr.com/p0knose/FpAp5c11c/magnusthemes.combofilters.js"></script>
- <script>
- $(document).ready(function() {
- var $container = $("#content");
- var filters = {};
- var $grid = $container.isotope({
- itemSelector: ".media",
- percentPosition: false,
- masonry: {
- horizontalOrder: true
- }
- });
- $(".option-set a").click(function(e) {
- var $this = $(this); // cache the clicked link
- var filterAttr = "data-filter-value";
- var filterValue = $this.attr(filterAttr); // cache the filter
- var $optionSet = $this.parents(".option-set"); // cache the parent element
- var group = $optionSet.attr("data-filter-group"); // cache the parent filter group
- var filterGroup = filters[group];
- if (!filterGroup) {
- filterGroup = filters[group] = [];
- }
- var $selectAll = $optionSet.find('a['+filterAttr+'=""]'); // the 'select all' button in the current group
- var activeClass = "selected", // the class for active links
- exclClass = "exclusive"; // the class for exclusive groups
- comboFiltering($this,filters,filterAttr,filterValue,$optionSet,group,$selectAll,activeClass,exclClass);
- var comboFilter = getComboFilter(filters);
- $grid.isotope({
- filter: comboFilter
- });
- $this.toggleClass(activeClass);
- e.preventDefault();
- });
- });
- </script>
- <!-- end filter scripts -->
- </html>
Advertisement
Add Comment
Please, Sign In to add comment