Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Created By TheiPhoneFan on December 29, 2023 -->
- <!DOCTYPE html>
- <html>
- <head>
- <!-- External Font -->
- <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,700,900" rel="stylesheet" type="text/css">
- <!-- Stylesheet Links -->
- <link rel="stylesheet" href="../theme/style.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <!-- Page Title -->
- <title>Sidebar & Top Bar Navigaton</title>
- <!-- Favicon Image Link -->
- <link rel="icon" type="image/x-png" href="../logos/tif-logo.png">
- <!-- Scales Website Content -->
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Enables Unicode Characters To Be Displayed -->
- <meta charset="UTF-8">
- <style>
- body {
- background-color: black;
- }
- /* Top Bar CSS */
- .navbar {
- overflow: hidden;
- background-image: url(../theme/pinstripes-1x.png);
- border-radius: 13px;
- border: 1px solid #ccc;
- }
- @media (max-width: 750px) {
- .navbar {
- display: none;
- }
- }
- .navbar a {
- float: left;
- font-size: 16px;
- color: black;
- text-align: center;
- padding: 14px 16px;
- text-decoration: none;
- font-family: 'Roboto', sans-serif;
- font-weight: 300;
- color: gray;
- cursor: pointer;
- }
- .navbar a img {
- vertical-align: middle;
- }
- .dropdown {
- float: left;
- overflow: hidden;
- font-weight: 300;
- }
- .dropdown .dropbtn {
- font-size: 16px;
- border: none;
- outline: none;
- color: white;
- padding: 14px 16px;
- background-color: inherit;
- background-image: none;
- font-family: 'Roboto', sans-serif;
- font-weight: 300;
- margin: 0;
- color: gray;
- cursor: pointer;
- border-radius:0px;
- text-shadow: none;
- height:100%;
- }
- .navbar a:hover, .dropdown:hover, .navbar a:hover, .dropbtn:hover {
- background-color: #eeeeee;
- transition: 0.3s;
- color: #000000;
- }
- .dropdown-content {
- display: none;
- position: absolute;
- background-image: url('../theme/pinstripes-1x.png');
- min-width: 160px;
- z-index: 1;
- border-radius: 16px;
- border: 1px solid #ccc;
- max-width: 100%; /* Added to limit the width to 100% of the screen */
- box-sizing: border-box; /* Added to include padding and border in the width calculation */
- margin-bottom: 1px;
- }
- .dropdown-content a {
- float: none;
- color: black;
- padding: 12px 16px;
- text-decoration: none;
- display: block;
- max-height: 200px; /* Adjust the value as needed */
- overflow-x: hidden;
- text-align: left;
- cursor: pointer;
- }
- .dropdown-content a:hover {
- background-color: #eeeeee;
- }
- .dropdown-content p {
- color: black;
- font-size: 16px;
- }
- .dropdown:hover .dropdown-content {
- display: block;
- }
- /* Sidebar CSS */
- .sidebar {
- height: 100%;
- width: 310px;
- position: fixed;
- top: 0;
- left: -310px; /* Hide the sidebar off-screen by default */
- background-image: url('../theme/pinstripes-1x.png');
- padding-top: 20px;
- transition: left 0.3s; /* Add a smooth transition effect when the sidebar slides in/out */
- overflow-x: auto;
- overflow-y: auto;
- }
- @media (min-width: 750px) {
- .sidebar {
- display: none;
- }
- }
- .site-title {
- text-align: center;
- }
- @media (min-width: 750px) {
- .site-title {
- display: none;
- }
- }
- /* Define the CSS styles for the links in the sidebar */
- .sidebar a {
- padding: 12px 25px;
- text-decoration: none;
- font-size: 20px;
- color: black;
- display: block;
- font-family: 'Roboto', sans-serif;
- height:20px;
- }
- /* Change the color of the links when hovered over */
- .sidebar a:hover {
- background-color: #eeeeee;
- height:20px;
- border-radius: 10px;
- }
- details {
- padding: 12px 25px;
- cursor: pointer;
- }
- details hr {
- color:black;
- background-color:black;
- margin-top:5px;
- margin-bottom:5px;
- }
- summary {
- padding: 3px;
- text-decoration: none;
- font-size: 20px;
- color: black;
- font-weight:300;
- font-family: 'Roboto', sans-serif;
- height:20px;
- }
- summary:hover {
- background-color: #eeeeee;
- height:20px;
- border-radius:16px;
- }
- .openbtn {
- position: fixed;
- z-index: 1;
- margin-left: 10px;
- background-color: #333;
- color: white;
- border: none;
- cursor: pointer;
- width: 40px;
- height:40px;
- font-size:20px;
- margin-top:10px;
- font-size: 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- @media (min-width: 750px) {
- .openbtn {
- display: none;
- }
- }
- @keyframes details-show {
- from {
- opacity:0;
- transform: var(--details-translate, translateY(-0.5em));
- }
- }
- details[open] > *:not(summary) {
- animation: details-show 0.3s ease-in-out;
- }
- .rpc {
- color: white;
- font-size:20px;
- font-weight: 400;
- text-align: center;
- }
- .rpc-menu {
- text-align: center;
- }
- .choose, .result {
- color: black;
- text-align: center;
- }
- </style>
- </head>
- <body>
- <!-- Top Bar -->
- <div class="navbar">
- <!-- Site Title -->
- <a href="../index.html" style="background-color:transparent;cursor:pointer;color:black;"><b>TheiPhoneFan.com</b></a>
- <!-- Home -->
- <a href="../index.html">Home <img src="../previews/icons/home.png" height="15"></a>
- <!-- Channel Related Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Channel Related <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <a href="../channel-related.html" style="border-radius: 16px 16px 0px 0px;"><b>Channel Related</b> <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="https://www.youtube.com/@theiphonefan761/about">Channel Info <img src="../previews/icons/channel-info.png" height="15"></a>
- <a href="../music-i-use.html">Music I Use <img src="../previews/icons/music-i-use.png" height="15"></a>
- <a href="../my-playlists.html">My Playlists <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../my-top-5-vids.html">My Top 5 Vids <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../my-videos.html">My Videos <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../thumbnail-design.html" style="border-radius: 0px 0px 16px 16px;">Thumbnail Design <img src="../previews/icons/thumbnail-design.png" height="15"></a>
- </div>
- </div>
- <!-- Content Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Content <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <a href="../content.html" style="border-radius: 16px 16px 0px 0px;"><b>Content</b></a>
- <a href="../apple-archive.html">Apple Archive <img src="../previews/icons/apple.png" height="15"></a>
- <a href="../apple-concepts.html">Apple Concepts <img src="../previews/icons/apple.png" height="15"></a>
- <a href="../articles.html">Articles <img src="../previews/icons/articles.png" height="15"></a>
- <a href="../blog.html">Blog <img src="../previews/icons/blog.png" height="15"></a>
- <a href="../clipart.html">Clipart <img src="../previews/icons/clipart.png" height="15"></a>
- <a href="../my-photography.html">My Photography <img src="../previews/icons/my-photography.png" height="15"></a>
- <a href="../wallpapers.html" style="border-radius: 0px 0px 16px 16px;">Wallpapers <img src="../previews/icons/wallpapers.png" height="20"></a>
- </div>
- </div>
- <!-- Scam Avoidance Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Scam Avoidance <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <a href="../scam-avoidance.html" style="border-radius: 16px 16px 0px 0px;"><b>Scam Avoidance</b></a>
- <a href="../common-scams.html">Common Scams <img src="../previews/icons/common-scams.png" height="15"></a>
- <a href="../report-a-scam.html">Report a Scam <img src="../previews/icons/report.png" height="15"></a>
- <a href="../scam-avoidance-blog.html">Scam Avoidance Blog <img src="../previews/icons/blog.png" height="15"></a>
- <a href="../scam-avoidance-tips.html">Scam Avoidance Tips</a>
- <a href="../scam-avoidance-tips.html" style="border-radius: 0px 0px 16px 16px;">Scam Info Updates <img src="../previews/icons/updates.png" height="15"></a>
- </div>
- </div>
- <!-- Site Related Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Site Related <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <a href="../site-related.html" style="border-radius: 16px 16px 0px 0px;"><b>Site Related</b></a>
- <a href="../all-pages.html">All Pages <img src="../previews/icons/all-pages.png" height="12" style="vertical-align:baseline;"></a>
- <a href="../changelog.html">Changelog</a>
- <a href="../downloads.html">Downloads <img src="../previews/icons/downloads.png" height="15"></a>
- <a href="../get-help.html">Get Help <img src="../previews/icons/get-help.png" height="15"></a>
- <a href="../previews.html">Previews</a>
- <a href="../report-an-issue.html">Report an Issue <img src="../previews/icons/report.png" height="15"></a>
- <a href="../saved-site-revisions.html">Saved Site Revisions <img src="../previews/icons/floppy.png" height="15"></a>
- <a style="background-color:transparent;cursor:default;"><b>Site Options</b></a>
- <a href="https://the-iphone-fan.weebly.com">Old Site</a>
- <a href="https://sites.google.com/view/iphonefan/" style="border-radius: 0px 0px 16px 16px;">Even Older Site</a>
- </div>
- </div>
- <!-- Help & Contact Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Help & Contact <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <a href="../help-contact.html" style="border-radius: 16px 16px 0px 0px;"><b>Help & Contact</b></a>
- <a href="../contact-me.html">Contact Me <img src="../previews/icons/contact-me.png" height="15"></a>
- <a href="../website-survey.html">Site Survey <img src="../previews/icons/survey.png" height="15"></a>
-
- <a href="https://m.youtube.com/channel/UC_xMgHdzp5AWR7rVZ89-sYg">YouTube▶️</a>
- <a href="https://twitter.com/theiphonefan">𝕏</a>
- <a href="https://www.instagram.com/theiphonefan_/">Instagram📷</a>
- <a href="mailto:jordan.theiphonefan@gmail.com" style="border-radius: 0px 0px 16px 16px;">Mail✉️</a>
- </div>
- </div>
- <!-- Help & Contact Dropdown -->
- <div class="dropdown">
- <button class="dropbtn">Game <i class="fa fa-caret-down"></i></button>
- <div class="dropdown-content">
- <p class="choose">Choose your move:</p>
- <div class="rpc-menu">
- <button onclick="playGame('rock')" class="rpc">Rock🪨</button>
- <button onclick="playGame('paper')" class="rpc">Paper📄</button>
- <button onclick="playGame('scissors')" class="rpc">Scissors✂️</button>
- </div>
- <p id="result" class="result"></p>
- </div>
- </div>
- </div>
- </div>
- <!-- Sidebar Button -->
- <button class="openbtn" onclick="toggleSidebar()">☰</button>
- <div class="sidebar" id="mySidebar">
- <h3 style="color:black;margin-top:40px;">TheiPhoneFan.com</h3>
- <a href="../index.html">Home🏠</a>
- <details>
- <summary>Channel Related</summary>
- <a href="../channel-related.html"><b>Channel Related</b></a>
- <a href="https://www.youtube.com/@theiphonefan761/about">Channel Info <img src="../previews/icons/channel-info.png" height="15"></a>
- <a href="../music-i-use.html">Music I Use <img src="../previews/icons/music-i-use.png" height="15"></a>
- <a href="../my-playlists.html">My Playlists <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../my-top-5-vids.html">My Top 5 Vids <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../my-videos.html">My Videos <img src="../previews/icons/triangle.png" height="15"></a>
- <a href="../thumbnail-design.html">Thumbnail Design <img src="../previews/icons/thumbnail-design.png" height="15"></a>
- <hr>
- </details>
- <details>
- <summary>Content</summary>
- <a href="../content.html"><b>Content</b></a>
- <a href="../apple-archive.html">Apple Archive <img src="../previews/icons/apple.png" height="15"></a>
- <a href="../apple-concepts.html">Apple Concepts <img src="../previews/icons/apple.png" height="15"></a>
- <a href="../articles.html">Articles <img src="../previews/icons/articles.png" height="15"></a>
- <a href="../blog.html">Blog <img src="../previews/icons/blog.png" height="15"></a>
- <a href="../clipart.html">Clipart <img src="../previews/icons/clipart.png" height="15"></a>
- <a href="../my-photography.html">My Photography <img src="../previews/icons/my-photography.png" height="15"></a>
- <a href="../wallpapers.html">Wallpapers <img src="../previews/icons/wallpapers.png" height="20"></a>
- <hr>
- </details>
- <details>
- <summary>Scam Avoidance</summary>
- <a href="../scam-avoidance.html"><b>Scam Avoidance</b></a>
- <a href="../common-scams.html">Common Scams <img src="../previews/icons/common-scams.png" height="15"></a>
- <a href="../report-a-scam.html">Report a Scam <img src="../previews/icons/report.png" height="15"></a>
- <a href="../scam-avoidance-blog.html">Scam Avoidance Blog <img src="../previews/icons/blog.png" height="15"></a>
- <a href="../scam-avoidance-tips.html">Scam Avoidance Tips</a>
- <a href="../scam-info-updates.html">Scam Info Updates <img src="../previews/icons/updates.png" height="15"></a>
- <hr>
- </details>
- <details>
- <summary>Site Related</summary>
- <a href="../site-related.html"><b>Site Related</b></a>
- <a href="../all-pages.html">All Pages <img src="../previews/icons/all-pages.png" height="12" style="vertical-align:baseline;"></a>
- <a href="../changelog.html">Changelog</a>
- <a href="../downloads.html">Downloads <img src="../previews/icons/downloads.png" height="15"></a>
- <a href="../get-help.html">Get Help <img src="../previews/icons/get-help.png" height="15"></a>
- <a href="../previews.html">Previews</a>
- <a href="../report-an-issue.html">Report an Issue <img src="../previews/icons/report.png" height="15"></a>
- <a href="../saved-site-revisions.html">Saved Site Revisions <img src="../previews/icons/floppy.png" height="15"></a>
- <a style="cursor:default;"><b>Site Options</b></a>
- <a href="https://the-iphone-fan.weebly.com">Old Site</a>
- <a href="https://sites.google.com/view/iphonefan/">Even Older Site</a>
- <hr>
- </details>
- <details>
- <summary>Help & Contact</summary>
- <a href="../help-contact.html"><b>Help & Contact</b></a>
- <a href="../contact-me.html">Contact Me <img src="../previews/icons/contact-me.png" height="15"></a>
- <a href="../website-survey.html">Site Survey <img src="../previews/icons/survey.png" height="15"></a>
- <hr>
- </details>
- <div class="mydiv" style="margin-bottom:20px;">
- <a href="https://www.youtube.com/channel/UC_xMgHdzp5AWR7rVZ89-sYg" style="padding:0px;background-color:transparent;display:inline;">
- <img src="../theme/social-icons/youtube-social.png" alt="YouTube" width="40">
- </a>
- <a href="https://twitter.com/theiphonefan" style="padding:0px;background-color:transparent;display:inline;">
- <img src="../theme/social-icons/x-social.png" alt="X" width="40">
- </a>
- <a href="https://instagram.com/theiphonefan_/" style="padding:0px;background-color:transparent;display:inline;">
- <img src="../theme/social-icons/instagram-social.png" alt="Instagram" width="40">
- </a>
- <a href="mailto:jordan.theiphonefan@gmail.com" style="padding:0px;background-color:transparent;display:inline;">
- <img src="../theme/social-icons/mail-social.png" alt="Instagram" width="40">
- </a>
- </div>
- <p class="choose">Choose your move:</p>
- <div class="rpc-menu">
- <button onclick="playGame('rock')" class="rpc">Rock🪨</button>
- <button onclick="playGame('paper')" class="rpc">Paper📄</button>
- <button onclick="playGame('scissors')" class="rpc">Scissors✂️</button>
- </div>
- <p id="result" class="result"></p>
- </div>
- <noscript>
- <img src="../theme/critical-error.png" style="border-radius:4px;" width="30px">
- Your browser does not support JavaScript or it is disabled. To use all site features, please enable JavaScript or try another browser.
- </noscript>
- <div class="header">
- <div class="mydiv">
- <!-- Page Title & Info -->
- <h1>Sidebar/Top Bar Navigation</h1>
- <p>On this page, you can test two new methods of navigation, the sidebar & top bar.</p>
- <ul>
- <li>The <u>sidebar</u> is designed for mobile devices. It displays on screens/windows 750px or less (about 7.8 in).</li>
- <li>The <u>top bar</u> is designed for desktop devices. It displays on screens/windows 751px or more.</li>
- </ul>
- <p><b>Current Issues:</b> On touch devices, if you open a dropdown and try to exit it will not close. To exit it simply reload the page. Aka the top bar doesn't work properly on touch screens.</p>
- </div>
- </div>
- <script>
- // JavaScript function to toggle the sidebar //
- function toggleSidebar() {
- var sidebar = document.getElementById('mySidebar');
- if (sidebar.style.left === '0px') {
- sidebar.style.left = '-310px';
- document.getElementsByClassName('openbtn')[0].innerHTML = '☰';
- } else {
- sidebar.style.left = '0px';
- document.getElementsByClassName('openbtn')[0].innerHTML = '×';
- }
- }
- function playGame(userChoice) {
- // Array of possible moves
- const moves = ['rock', 'paper', 'scissors'];
- // Get a random move for the computer
- const computerChoice = moves[Math.floor(Math.random() * moves.length)];
- // Determine the winner
- const result = determineWinner(userChoice, computerChoice);
- // Display the result
- document.getElementById("result").innerHTML = `You chose ${userChoice}. Computer chose ${computerChoice}. ${result}`;
- }
- function determineWinner(user, computer) {
- if (user === computer) {
- return "It's a tie!";
- } else if ((user === 'rock' && computer === 'scissors') ||
- (user === 'paper' && computer === 'rock') ||
- (user === 'scissors' && computer === 'paper')) {
- return "You win!";
- } else {
- return "Computer wins!";
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement