Sunday, February 9, 2025

 


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>PDF Splitter & Combiner</title>

    <link rel="stylesheet" href="styles.css">

</head>

<body>

    <div class="container">

        <h1>PDF Splitter & Combiner</h1>

        <div class="mode-toggle">

            <label class="switch">

                <input type="checkbox" id="modeToggle">

                <span class="slider round"></span>

            </label>

            <span id="modeLabel">Dark Mode</span>

        </div>

        <div class="tool-options">

            <button id="splitBtn">Split PDF</button>

            <button id="combineBtn">Combine PDF</button>

        </div>

        <div class="info-boxes">

            <div class="info-box" id="infoBox1">

                <h2>Click Here for More Info</h2>

                <p>Learn more about how to split and combine PDFs efficiently.</p>

            </div>

            <div class="info-box" id="infoBox2">

                <h2>Click Here for More Info</h2>

                <p>Discover advanced features and tips for managing your PDFs.</p>

            </div>

        </div>

    </div>

    <script src="script.js"></script>

</body>

</html>

//////////////////////////////////////////////////////////////////////////////////

css

/* General Styles */

body {

    font-family: Arial, sans-serif;

    margin: 0;

    padding: 0;

    transition: background-color 0.3s, color 0.3s;

}


.container {

    max-width: 800px;

    margin: 50px auto;

    padding: 20px;

    text-align: center;

}


h1 {

    margin-bottom: 20px;

}


/* Dark/Light Mode Toggle */

.mode-toggle {

    position: absolute;

    top: 20px;

    right: 20px;

    display: flex;

    align-items: center;

}


.switch {

    position: relative;

    display: inline-block;

    width: 60px;

    height: 34px;

}


.switch input {

    opacity: 0;

    width: 0;

    height: 0;

}


.slider {

    position: absolute;

    cursor: pointer;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background-color: #ccc;

    transition: 0.4s;

    border-radius: 34px;

}


.slider:before {

    position: absolute;

    content: "";

    height: 26px;

    width: 26px;

    left: 4px;

    bottom: 4px;

    background-color: white;

    transition: 0.4s;

    border-radius: 50%;

}


input:checked + .slider {

    background-color: #2196F3;

}


input:checked + .slider:before {

    transform: translateX(26px);

}


/* Tool Options */

.tool-options {

    margin: 20px 0;

}


.tool-options button {

    padding: 10px 20px;

    margin: 10px;

    font-size: 16px;

    cursor: pointer;

    border: none;

    border-radius: 5px;

    background-color: #2196F3;

    color: white;

    transition: background-color 0.3s;

}


.tool-options button:hover {

    background-color: #0b7dda;

}


/* Info Boxes */

.info-boxes {

    display: flex;

    justify-content: space-between;

    margin-top: 40px;

}


.info-box {

    width: 45%;

    padding: 20px;

    border: 1px solid #ccc;

    border-radius: 10px;

    transition: background-color 0.3s, color 0.3s;

}


.info-box h2 {

    margin-bottom: 10px;

}


.info-box p {

    font-size: 14px;

    color: #666;

}


/* Dark Mode */

body.dark-mode {

    background-color: #121212;

    color: #ffffff;

}


body.dark-mode .info-box {

    background-color: #1e1e1e;

    border-color: #333;

}


body.dark-mode .info-box p {

    color: #ccc;

}


body.dark-mode .tool-options button {

    background-color: #333;

    color: #fff;

}


body.dark-mode .tool-options button:hover {

    background-color: #444;

}

///////////////////////////////////

jawa


// Dark/Light Mode Toggle

const modeToggle = document.getElementById('modeToggle');

const body = document.body;

const modeLabel = document.getElementById('modeLabel');


modeToggle.addEventListener('change', () => {

    body.classList.toggle('dark-mode');

    if (body.classList.contains('dark-mode')) {

        modeLabel.textContent = 'Light Mode';

    } else {

        modeLabel.textContent = 'Dark Mode';

    }

});


// Info Box Click Events

const infoBox1 = document.getElementById('infoBox1');

const infoBox2 = document.getElementById('infoBox2');


infoBox1.addEventListener('click', () => {

    alert('More information about splitting PDFs will be shown here.');

});


infoBox2.addEventListener('click', () => {

    alert('More information about combining PDFs will be shown here.');

});


// Tool Button Click Events

const splitBtn = document.getElementById('splitBtn');

const combineBtn = document.getElementById('combineBtn');


splitBtn.addEventListener('click', () => {

    alert('PDF Split functionality will be implemented here.');

});


combineBtn.addEventListener('click', () => {

    alert('PDF Combine functionality will be implemented here.');

});

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

INSTAHGRAMMA

//////

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Instagram Media Downloader</title>

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

  <style>

    body {

      font-family: 'Arial', sans-serif;

      background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);

      color: #fff;

      display: flex;

      justify-content: center;

      align-items: center;

      height: 100vh;

      margin: 0;

    }


    .container {

      background: rgba(255, 255, 255, 0.1);

      padding: 2rem;

      border-radius: 15px;

      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

      backdrop-filter: blur(10px);

      text-align: center;

      max-width: 500px;

      width: 100%;

    }


    h1 {

      font-size: 2rem;

      margin-bottom: 1rem;

    }


    input[type="text"] {

      width: 100%;

      padding: 0.75rem;

      border: none;

      border-radius: 8px;

      margin-bottom: 1rem;

      font-size: 1rem;

      background: rgba(255, 255, 255, 0.2);

      color: #fff;

    }


    input[type="text"]::placeholder {

      color: rgba(255, 255, 255, 0.7);

    }


    button {

      padding: 0.75rem 2rem;

      border: none;

      border-radius: 8px;

      background: #833ab4;

      color: #fff;

      font-size: 1rem;

      cursor: pointer;

      transition: background 0.3s ease;

    }


    button:hover {

      background: #fd1d1d;

    }


    .result {

      margin-top: 1.5rem;

    }


    .result img,

    .result video {

      max-width: 100%;

      border-radius: 8px;

      margin-bottom: 1rem;

    }


    .download-btn {

      display: inline-block;

      padding: 0.5rem 1rem;

      background: #fcb045;

      color: #000;

      text-decoration: none;

      border-radius: 8px;

      transition: background 0.3s ease;

    }


    .download-btn:hover {

      background: #fd1d1d;

      color: #fff;

    }


    .footer {

      margin-top: 2rem;

      font-size: 0.9rem;

      color: rgba(255, 255, 255, 0.8);

    }


    .footer a {

      color: #fcb045;

      text-decoration: none;

    }


    .footer a:hover {

      text-decoration: underline;

    }

  </style>

</head>

<body>

  <div class="container">

    <h1>Instagram Media Downloader</h1>

    <input type="text" id="urlInput" placeholder="Paste Instagram URL here...">

    <button onclick="fetchMedia()">Download</button>

    <div class="result" id="result"></div>

    <div class="footer">

      Made with <i class="fas fa-heart"></i> by <a href="#" target="_blank">Your Name</a>

    </div>

  </div>


  <script>

    async function fetchMedia() {

      const url = document.getElementById('urlInput').value.trim();

      const resultDiv = document.getElementById('result');


      if (!url) {

        alert('Please enter a valid Instagram URL.');

        return;

      }


      resultDiv.innerHTML = '<p>Loading...</p>';


      try {

        // Use a free API to fetch Instagram media

        const apiUrl = `https://api.instagram.com/scrape?url=${encodeURIComponent(url)}`;

        const response = await fetch(apiUrl);

        const data = await response.json();


        if (data.media_url) {

          if (data.media_type === 'image') {

            resultDiv.innerHTML = `

              <img src="${data.media_url}" alt="Instagram Image">

              <a href="${data.media_url}" class="download-btn" download>Download Image</a>

            `;

          } else if (data.media_type === 'video') {

            resultDiv.innerHTML = `

              <video controls>

                <source src="${data.media_url}" type="video/mp4">

                Your browser does not support the video tag.

              </video>

              <a href="${data.media_url}" class="download-btn" download>Download Video</a>

            `;

          }

        } else {

          resultDiv.innerHTML = '<p>No media found. Please check the URL.</p>';

        }

      } catch (error) {

        resultDiv.innerHTML = '<p>Error fetching media. Please try again.</p>';

        console.error(error);

      }

    }

  </script>

</body>

</html>

No comments:

Post a Comment

Free Advanced Image Compressor 🟡🟢🔵🟣⚫🔴 https://www.blogger.com/blog/posts/1376081463098408544

Free Advanced Image Compressor | Optimize Photos Without Quality Loss ...