Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--CSS carousel tabs credit: https://yeolithm.com/carousel/tutorial-->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="light">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
- <script>
- const storedTheme = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
- if (storedTheme) {
- document.documentElement.setAttribute("data-theme", storedTheme);
- }
- </script>
- <title>{Title}</title>
- <link rel="shortcut icon" href="{Favicon}">
- <link rel="altertnate" type="application/rss+xml" href="{RSS}">
- <meta http-equiv="x-dns-prefetch-control" content="off"/>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
- <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=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
- <style type="text/css">
- :root {
- --body-font: 1.5rem;
- --line-height: 1.6;
- --normal-font-weight: 400;
- --medium-font-weight: 500;
- --semi-bold-font-weight: 600;
- --bold-font-weight: 700;
- --gap1: 1.2rem;
- --gap2: 1.5rem;
- --gap3: 2.5rem;
- --gap4: 3.5rem;
- --gap-top-bottom: 12rem;
- --gap-post-margin: 10rem;
- --text-margin: 1.8rem;
- --round1: 0.5rem;
- --round2: 0.7rem;
- --round3: 1rem;
- --circle: 100%;
- }
- :root, html[data-theme='light'] {
- --light-on: block;
- --light-off: none;
- --color-accent: 77,100,141;
- --color-accent-text: 255,255,255;
- --color-background: 244,244,244;
- --color-text: 31,43,62;
- --color-link: 15,28,46;
- --color-link-hover: 31,58,95;
- --color-post-background: 255,255,255;
- --color-post-borders: 225,225,225;
- --color-post-accent: 250,250,250;
- --color-post-accent-text: 0,0,0;
- }
- html[data-theme='dark'] {
- --light-on: none;
- --light-off: block;
- --color-accent: 172,194,239;
- --color-accent-text: 0,0,0;
- --color-background: 15,28,46;
- --color-text: 224,224,224;
- --color-link: 206,232,255;
- --color-link-hover: 125,155,208;
- --color-post-background: 31,43,62;
- --color-post-borders: 55,67,87;
- --color-post-accent: 55,67,87;
- --color-post-accent-text: 255,255,255;
- }
- html.theme-transition,
- html.theme-transition *,
- html.theme-transition *:before,
- html.theme-transition *:after {
- transition: 0s !important;
- transition-delay: 0 !important;
- }
- /*----------TUMBLR CONTROLS----------*/
- *,*::before,*::after {
- -webkit-font-smoothing: antialiased;
- text-rendering: optimizeLegibility;
- -moz-osx-font-smoothing: grayscale;
- box-sizing: border-box;
- }
- * {
- margin: 0;
- scrollbar-width: thin; /* firefox scrollbar */
- scrollbar-color: rgb(var(--color-accent)) rgb(var(--main-background));
- }
- html {
- height: 100%;
- font-size: 62.5%;
- scrollbar-width: thin;
- }
- button,
- textarea,
- select {
- font: inherit;
- }
- button {
- outline: none;
- border: 0;
- background: transparent;
- padding: 0;
- cursor: pointer;
- color: inherit;
- }
- input{
- font: inherit;
- border: none;
- outline: 0;
- padding: 0;
- background-color: transparent;
- color: rgb(var(--color-text));
- }
- p,h1,h2,h3,h4,h5,h6 {
- overflow-wrap: break-word;
- }
- .tmblr-iframe-pushdown {
- padding-top: 0!important;
- }
- .iframe-controls--phone-mobile {
- display: none!important;
- }
- /* ------------------------------------- tooltips */
- .tippy-box[data-theme~='custom'] {
- font-size: var(--body-font);
- font-weight: 400;
- text-align:center;
- padding: 0;
- color: rgb(var(--color-accent-text));
- border: 0px solid rgb(var(--borders));
- border-radius: var(--round1);
- background-color: rgb(var(--color-accent));
- text-transform: lowercase;
- margin: 1.5rem;
- z-index: 9999999;
- }
- ::-moz-selection {
- background-color: rgb(var(--color-accent));
- color:rgb(var(--color-text));
- }
- ::selection {
- background-color: rgb(var(--color-accent));
- color:rgb(var(--color-text));
- }
- /* ------------------------------------- scrollbar (not firefrox) */
- ::-webkit-scrollbar {
- width: 8px;
- background-color: rgb(var(--color-background));
- }
- ::-webkit-scrollbar-thumb {
- background: rgb(var(--color-accent));
- border-radius: var(--round1);
- }
- ::-webkit-scrollbar-track {
- background-color: rgb(var(--color-background));
- }
- iframe.tmblr-iframe, .tmblr-iframe {
- display: none;
- }
- body {
- font-size: var(--body-font);
- line-height: var(--line-height);
- font-family: "Poppins", sans-serif;
- font-weight: var(--normal-font-weight);
- background-color: rgb(var(--color-background));
- color: rgb(var(--color-text));
- }
- a {
- text-decoration: none;
- font-weight: var(--medium-font-weight);
- color: rgb(var(--color-link));
- }
- a:hover {
- color: rgb(var(--color-link-hover));
- transition: .4s;
- }
- .buttons {
- display: inline-flex;
- align-items: center;
- gap: 0.5rem;
- position: fixed;
- left: 1rem;
- top: 1rem;
- z-index: 99;
- }
- .toggle-menu {
- display: none;
- }
- button.theme-toggle, .toggle-menu {
- color: rgb(var(--color-link));
- font-size: 2.5rem;
- }
- .light-on {
- display: var(--light-on);
- }
- .light-off {
- display: var(--light-off);
- }
- #container {
- display: flex;
- justify-content: center;
- align-items: center;
- min-height: 100vh;
- }
- #carousel {
- flex: initial;
- display: block;
- }
- #carousel {
- overflow: hidden;
- width: 100%;
- height: 100vh;
- height: 100dvh;
- }
- .cage {
- overflow-y: auto;
- overflow-x: hidden;
- }
- .p-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- transition: transform 0.4s ease-in-out;
- }
- #button_a:checked ~ #carousel .p-wrapper {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
- #button_b:checked ~ #carousel .p-wrapper {
- -webkit-transform: translateY(-100%);
- transform: translateY(-100%);
- }
- #button_c:checked ~ #carousel .p-wrapper {
- -webkit-transform: translateY(-200%);
- transform: translateY(-200%);
- }
- #button_d:checked ~ #carousel .p-wrapper {
- -webkit-transform: translateY(-300%);
- transform: translateY(-300%);
- }
- [class^="panel_"] {
- overflow: auto;
- position: relative;
- width: inherit;
- height: inherit;
- padding: 48px;
- }
- #navigation {
- position: fixed;
- top: 1rem;
- right: 1rem;
- z-index: 99;
- display: flex;
- justify-content: center;
- align-items: center;
- gap: var(--gap1)
- }
- [class^="label_"] {
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- margin: 8px 0;
- width: 32px;
- height: 32px;
- border-radius: 4px;
- color: rgb(var(--color-link));
- background-color: rgb(var(--color-post-background));
- transition: all 0.3s ease;
- }
- [class^="label_"]:hover {
- color: rgb(var(--color-accent-text));
- background-color: rgb(var(--color-accent));
- }
- #button_a:checked ~ #navigation .label_a,
- #button_b:checked ~ #navigation .label_b,
- #button_c:checked ~ #navigation .label_c,
- #button_d:checked ~ #navigation .label_d {
- cursor: default;
- color: rgb(var(--color-accent-text));
- background-color: rgb(var(--color-accent));
- }
- @media screen and (max-width: 1100px) {
- }
- @media screen and (max-width: 850px) {
- }
- </style>
- </head>
- <body>
- <div class="buttons">
- <button class="theme-toggle" aria-label="toggle dark or light mode" type="button">
- <i class="ti ti-sun light-on"></i>
- <i class="ti ti-moon light-off"></i>
- </button>
- <button class="toggle-menu" aria-label="toggle menu" type="button" id="menu-button">
- <i class="ti ti-menu-deep"></i>
- </button>
- </div>
- <div id="container">
- <input hidden type="radio" name="carousel-control" id="button_a" checked/>
- <input hidden type="radio" name="carousel-control" id="button_b"/>
- <input hidden type="radio" name="carousel-control" id="button_c"/>
- <input hidden type="radio" name="carousel-control" id="button_d"/>
- <div id="navigation">
- <label for="button_a" class="label_a"> <span> a </span> </label>
- <label for="button_b" class="label_b"> <span> b </span> </label>
- <label for="button_c" class="label_c"> <span> c </span> </label>
- <label for="button_d" class="label_d"> <span> d </span> </label>
- </div> <!-- // #navigation -->
- <div id="carousel">
- <div class="p-wrapper">
- <section class="panel_a cage">
- <h2> Panel a </h2>
- </section>
- <section class="panel_b cage">
- <h2> Panel b </h2>
- </section>
- <section class="panel_c cage">
- <h2> Panel c </h2>
- </section>
- <section class="panel_d cage">
- <h2> Panel d </h2>
- </section>
- </div> <!-- // .p-wrapper -->
- </div> <!-- // #carousel -->
- </div> <!-- // #container -->
- <!-- TOOLTIP: tippy.js -->
- <script src="https://unpkg.com/@popperjs/core@2"></script>
- <script src="https://unpkg.com/tippy.js@6"></script>
- <script>
- // ------------------- tooltip
- const commonOptions = {
- theme: "custom",
- arrow: false,
- followCursor: true,
- placement: "top",
- touch: "hold",
- };
- tippy("[title]", {
- ...commonOptions,
- content(reference) {
- const title = reference.getAttribute("title");
- reference.removeAttribute("title");
- return title;
- },
- });
- // ------------------- toggle menu
- const menu = document.getElementById("nav-container");
- const button = document.getElementById("menu-button");
- const buttonOpen = button.querySelector("i");
- button.addEventListener("click", () => {
- menu.classList.toggle("open");
- const isOpen = menu.classList.contains("open");
- if(isOpen) {
- buttonOpen.setAttribute("class", "ti ti-x");
- } else {
- buttonOpen.setAttribute("class", "ti ti-menu-deep");
- }
- });
- // ------------------- toggle dark/light by @mournstera
- const themeToggleButtons = document.querySelectorAll(".theme-toggle");
- themeToggleButtons.forEach((btn) => {
- const storedTheme = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
- const initialTooltipText = storedTheme === "dark" ? "Toggle light mode" : "Toggle dark mode";
- tippy(btn, {
- ...commonOptions,
- content: initialTooltipText,
- });
- btn.addEventListener("click", function () {
- document.documentElement.classList.add("theme-transition");
- let currentTheme = document.documentElement.getAttribute("data-theme");
- let targetTheme = (currentTheme === "light") ? "dark" : "light";
- window.setTimeout(function () {
- document.documentElement.classList.remove("theme-transition");
- }, 50);
- document.documentElement.setAttribute("data-theme", targetTheme);
- localStorage.setItem("theme", targetTheme);
- });
- });
- </script>
- </body>
- </html> <!---------------------------END--------------------------->
Advertisement
Add Comment
Please, Sign In to add comment