admin管理员组

文章数量:1126420

When someone lands on my blog homepage (blog-name.tumblr), I want them to see a fake restricted page with a hidden link. The link leads to blog-name.tumblr/page/1 and shows the true blog homepage. Every other blog link (/post, /tagged...) should also work.

I am thus working with two HTML scripts:

  1. Restricted blog
  2. Normal blog

My question: Is there a way to conditionally activate the one or the other HTML script based on the current URL (blog-name.tumblr or blog-name.tumblr/[anything])?

HTML for restricted blog:

<style>
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #36465d;
    color: white;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    text-align: center;
  }
  a {
    color: #36465d; /* hidden link, same color as background */
    text-decoration: none;
    font-size: 8px;
  }
  .gif-container {
    margin-top: 20px; /* space and then gif for distraction */
  }
  img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
  }
</style>

<div class="restricted-message">
  <p>This blog is private.</p>
  <p><a href=";>.</a></span></p> /* link to true blog */
  <div class="gif-container">
    <img src="gif.gif" alt="Private Page GIF">
  </div>
</div>

The HTML for my normal blog is much longer (ca. 2000 lines). Consider a normal custom Tumblr HTML.

本文标签: