<!DOCTYPE html>
<html lang="zh-Hant">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>納啟科技-開發小工具-CleanmacNasir</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-p6H9eH3j3z2mXbxqGIdl0u4i3s3G4B6cXX8tK6Xj6xJ8bF4lK2o5j4Q5m9B6j6h6d5k5j6j7k7l8m9n0p1q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css" rel="stylesheet">
  <link href="../source/css/blogcontent.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700&family=Exo+2:wght@500;700&display=swap" rel="stylesheet">
  <script src="https://www.gstatic.com/firebasejs/9.22.1/firebase-app-compat.js"></script>
  <script src="https://www.gstatic.com/firebasejs/9.22.1/firebase-database-compat.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-286HZQTWFH"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-286HZQTWFH');
  </script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
  <style>
    *, *::before, *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    :root {
      --primary-color: #333;
      --secondary-color: #555;
      --accent-color: #ae7d2f;
      --background-color: #f9f9f9;
      --header-height: 70px;
      --transition-speed: 0.3s;
      --font-family-primary: 'Noto Sans TC', sans-serif;
      --font-family-secondary: 'Exo 2', sans-serif;
      --line-height: 1.8;
      --paragraph-indent: 2em;
    }
    body {
      font-family: var(--font-family-primary);
      color: var(--primary-color);
      background-color: #fff;
      line-height: var(--line-height);
      overflow-x: hidden;
      padding-top: var(--header-height); 
    }
    a {
      color: var(--primary-color);
      text-decoration: none;
      transition: color var(--transition-speed) ease;
    }
    a:hover {
      color: var(--secondary-color);
    }
    img {
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: rgba(255, 255, 255, 0.95);
      padding: 15px 0;
      z-index: 1000;
      transition: background var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    header.scrolled {
      background: #fff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .container {
      width: 90%;
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    header h1 {
      font-family: var(--font-family-secondary);
      font-size: 1.8em;
      color: var(--primary-color);
      transition: color var(--transition-speed) ease;
    }
    nav ul {
      list-style: none;
      display: flex;
      gap: 20px;
      align-items: center;
    }
    nav ul li a {
      font-size: 1em;
      font-weight: 600;
      position: relative;
      padding: 5px 0;
      color: var(--primary-color);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    nav ul li a::after {
      content: '';
      position: absolute;
      width: 0%;
      height: 2px;
      background: var(--primary-color);
      left: 0;
      bottom: -2px;
      transition: width var(--transition-speed) ease;
    }
    nav ul li a:hover::after {
      width: 100%;
    }
    .menu-toggle {
      display: none;
      flex-direction: column;
      justify-content: space-between;
      width: 25px;
      height: 20px;
      cursor: pointer;
    }
    .menu-toggle div {
      width: 100%;
      height: 3px;
      background: var(--primary-color);
      border-radius: 1.5px;
      transition: all var(--transition-speed) ease;
    }
    .menu-toggle.active div:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active div:nth-child(2) {
      opacity: 0;
    }
    .menu-toggle.active div:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }
    section {
      padding: 60px 20px;
      position: relative;
      overflow: hidden;
    }
    .section-title {
      text-align: center;
      margin-bottom: 40px;
    }
    .section-title h2 {
      font-family: var(--font-family-secondary);
      font-size: 2.5em;
      margin-bottom: 10px;
      color: var(--primary-color);
      position: relative;
      display: inline-block;
    }
    .section-title h2::after {
      content: '';
      width: 50px;
      height: 3px;
      background: var(--accent-color);
      display: block;
      margin: 10px auto 0;
      border-radius: 1.5px;
    }
    .section-title p {
      color: #777;
      font-size: 1.1em;
      max-width: 700px;
      margin: 10px auto 0;
    }
    #blog-post {
      background: var(--background-color);
    }
    .blog-post-container {
      display: flex;
      gap: 40px;
      margin-top: 20px;
      align-items: flex-start;
    }
    .blog-content {
      flex: 3;
      max-width: 800px;
    }
    .blog-content article {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      overflow: hidden;
      transition: box-shadow var(--transition-speed) ease;
      padding: 30px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .blog-content article:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    .blog-content h1 {
      font-family: var(--font-family-secondary);
      font-size: 2.5em;
      color: var(--primary-color);
      margin-bottom: 15px;
      line-height: 1.2;
    }
    .blog-meta {
      font-size: 0.9em;
      color: #777;
      margin-bottom: 25px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .blog-meta span {
      margin-right: 15px;
    }
    .blog-image {
      width: 100%;
      height: auto;
      margin-bottom: 25px;
      border-radius: 8px;
    }
    .blog-body {
      font-size: 1.1em;
      color: #555;
      line-height: var(--line-height);
      text-indent: var(--paragraph-indent);
      margin-bottom: 30px;
    }
    .blog-body p {
      margin-bottom: 20px;
    }
    .blog-body h2 {
      font-family: var(--font-family-secondary);
      font-size: 1.8em;
      color: var(--primary-color);
      margin: 30px 0 15px;
    }
    .blog-body ol, .blog-body ul {
      margin-left: 2em;
      margin-bottom: 20px;
    }
    .tags {
      margin-top: 20px;
    }
    .tags h3 {
      margin-bottom: 10px;
      color: var(--primary-color);
      font-family: var(--font-family-secondary);
    }
    .tags .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .tags .tag-list a {
      background: #f0f0f0;
      padding: 5px 12px;
      border-radius: 20px;
      font-size: 0.9em;
      color: var(--primary-color);
      transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
    }
    .tags .tag-list a:hover {
      background: var(--accent-color);
      color: #fff;
    }
    #sidebar {
      flex: 1;
      max-width: 300px;
    }
    .sidebar-section {
      margin-bottom: 30px;
    }
    .sidebar-section h3 {
      font-family: var(--font-family-secondary);
      font-size: 1.8em;
      color: var(--primary-color);
      margin-bottom: 15px;
      border-bottom: 2px solid var(--accent-color);
      padding-bottom: 5px;
    }
    .recent-posts ul,
    .categories ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .recent-posts ul li,
    .categories ul li {
      margin-bottom: 10px;
    }
    .recent-posts ul li a,
    .categories ul li a {
      color: var(--primary-color);
      transition: color var(--transition-speed) ease;
      font-size: 1em;
    }
    .recent-posts ul li a:hover,
    .categories ul li a:hover {
      color: var(--secondary-color);
    }
    footer {
      background: var(--primary-color);
      padding: 30px 20px;
      text-align: center;
      color: #fff;
    }
    footer .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }
    footer p {
      margin-bottom: 10px;
      font-size: 0.9em;
    }
    footer a {
      color: #fff;
      margin: 0 10px;
      font-size: 0.9em;
      transition: color var(--transition-speed) ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    footer a:hover {
      color: #ddd;
    }
    @media (max-width: 1024px) {
      .blog-post-container {
        flex-direction: column;
      }
      #sidebar {
        max-width: 100%;
      }
    }
    @media (max-width: 768px) {
      .section-title h2 {
        font-size: 2em;
      }
      .section-title p {
        font-size: 1em;
      }
      .blog-body {
        font-size: 1em;
      }
      .blog-content h1 {
        font-size: 2em;
      }
      .sidebar-section h3 {
        font-size: 1.5em;
      }
      .sidebar-section ul li a {
        font-size: 0.95em;
      }
      .tags .tag-list {
        gap: 5px;
      }
      .tags .tag-list a {
        padding: 5px 8px;
      }
    }
    @media (max-width: 480px) {
      nav ul {
        flex-direction: column;
        gap: 15px;
        display: none;
        background: rgba(255, 255, 255, 0.95);
        position: absolute;
        top: var(--header-height);
        right: 0;
        width: 200px;
        padding: 20px 0;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      }
      nav ul.active {
        display: flex;
      }
      .menu-toggle {
        display: flex;
      }
    }
    .button-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 20px;
      width: 100%;
    }
    .button, .back-button {
      border-radius: 12px;
      padding: 10px 20px;
      background-color: #008080;
      color: #FFFFFF;
      border: 2px solid #006666;
      cursor: pointer;
      transition: all 0.3s ease;
      font-family: 'Roboto Mono', monospace;
      font-size: 0.85rem;
      text-align: center;
      overflow: hidden;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
      position: relative;
    }
    .button::after, .back-button::after {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: rgba(0, 128, 128, 0.3);
      transition: all 0.3s ease;
      z-index: -1;
    }
    .button:hover, .back-button:hover {
      background-color: #006666;
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    }
    .button:hover::after, .back-button:hover::after {
      left: 0;
    }
  </style>
</head>
<body>
  <header>
    <div class="container">
      <h1>NasifyTech</h1>
      <nav>
        <ul id="nav-links">
          <li><a href="../index.html"><i class="fas fa-home"></i> 官網</a></li>
          <li><a href="../member/index.html"><i class="fas fa-user"></i> 線上服務</a></li>
          <li><a href="../about.html" target="_blank" rel="noopener noreferrer"><i class="fas fa-user-tie"></i> 關於創辦人</a></li>
        </ul>
      </nav>
      <div class="menu-toggle" id="mobile-menu" aria-label="導航選單切換" aria-expanded="false" role="button" tabindex="0">
        <div></div>
        <div></div>
        <div></div>
      </div>
    </div>
  </header>
  <main>
    <div class="container main-content">
      <section id="blog-post" aria-labelledby="post-title">
        <div class="blog-post-container">
          <div class="blog-content" data-aos="fade-up">
            <article>
              <h1 id="post-title" style="color: #000000f6; margin-bottom: 20px;">納啟科技開發小工具 - CleanmacNasir</h1>
              <div class="blog-meta">
                <span>發布日期：2024-12-01</span>
                <span>作者：Nasir</span>
              </div>
              <img src="https://i.imgur.com/gtyQwND.png" alt="CleanmacNasir 專案截圖" class="blog-image">
              <div class="blog-body">
                <p class="post-meta">📌 清清清POPO 清清POPO：「這是一個簡易型，同時也可將MAC空間清出超過1GB以上的免費最佳化工具，幫助您清除已經刪除陳年已久的APP DATA」</p>
                <h2>🖼️ 預覽</h2>
                <img src="https://i.imgur.com/gtyQwND.png" alt="專案截圖" style="max-width: 100%; height: auto;">
                <hr>
                <h2>✨ 功能特色</h2>
                <h3>清清期POPO 清清期POPO ，你今天清垃圾了嗎！</h3>
                <ul>
                  <li>🚀 <strong>特點一</strong>：網路上許多付費的MAC清理工具往往無法進行MAC深度清理，所以經常會遺留下許多不常用的APP DATA，造成系統空間逐漸變大！</li>
                  <li>🎯 <strong>特點二</strong>：iCLOUD暫存檔案往往佔據許多空間，藉由此工具，可以將佔存檔案進行刪除！</li>
                  <li>💡 <strong>特點三</strong>：免費使用！！！雖然是深度清理，但還是建議重要文件要把它備份好ㄛ！ 避免檔案遺失！如果icloud 有尚未同步上去雲端的檔案，請先同步完，再執行此程式！否則檔案會遺失！！這很重要！</li>
                </ul>
                <hr>
                <h2>📂 專案結構</h2>
                <pre><code>專案名稱/
├── CleanmacNasir.sh    # 原始碼
</code></pre>
                <hr>
                <h2>🚀 如何使用</h2>
                <ol>
                  <li>點擊下面的按鈕直接下載 CleanmacNasir.sh：（按下右鍵進行另存！）
                    <a id="downloadLink" download="CleanmacNasir.sh">
                      <button class="back-button">下載 CleanmacNasir.sh</button>
                    </a>
                  </li>
                  <li>要把程式放到 HOME 底下！
                    <pre><code>拖曳到user的home底下</code></pre>
                  </li>
                  <li>給他可以清理系統的權限(提權)
                    <pre><code>chmod +x CleanmacNasir.sh</code></pre>
                  </li>
                  <li>接著最後一步就是執行啦啦啦！
                    <pre><code>./CleanmacNasir.sh</code></pre>
                  </li>
                </ol>
              </div>
              <div class="tags">
                <h3>相關標籤</h3>
                <div class="tag-list">
                  <a href="#">CleanmacNasir</a>
                  <a href="#">系統優化</a>
                  <a href="#">MAC 清理</a>
                  <a href="#">免費工具</a>
                  <a href="#">開源碼</a>
                </div>
              </div>
            </article>
          </div>
          <aside id="sidebar" data-aos="fade-up" data-aos-delay="200">
            <div class="sidebar-section recent-posts">
              <h3>最新發佈</h3>
              <ul>
                <li><a href="CleanmacNasir.html">納啟科技開發小工具 - CleanmacNasir</a></li>
              </ul>
            </div>
            <div class="sidebar-section categories">
              <h3>主題分類</h3>
              <ul>
                <li><a href="#">技術文章</a></li>
                <li><a href="#">公司新聞</a></li>
              </ul>
            </div>
            <div class="sidebar-section tags">
              <h3>相關標籤</h3>
              <div class="tag-list">
                <a href="#">CleanmacNasir</a>
                <a href="#">班費管理</a>
                <a href="#">LINE API</a>
                <a href="#">Google Drive</a>
              </div>
            </div>
          </aside>
        </div>
      </section>
    </div>
  </main>
  <footer>
    <div class="container">
      <p>&copy; 2025 NasifyTech 納啟科技</p>
      <p>
        <a href="https://www.instagram.com/hayashiiii__" target="_blank" aria-label="Instagram">
          <i class="fab fa-instagram"></i> Instagram
        </a> |
        <a href="#" target="_blank" aria-label="LINE">
          <i class="fab fa-line"></i> LINE
        </a>
      </p>
    </div>
  </footer>
  <script>
    AOS.init({
      duration: 800,
      easing: 'ease-in-out',
      once: true,
      mirror: false
    });
    
    const menuToggle = document.getElementById('mobile-menu');
    const navLinks = document.getElementById('nav-links');
    menuToggle.addEventListener('click', () => {
      navLinks.classList.toggle('active');
      menuToggle.classList.toggle('active');
    });
    navLinks.querySelectorAll('a').forEach(link => {
      link.addEventListener('click', () => {
        navLinks.classList.remove('active');
        menuToggle.classList.remove('active');
      });
    });
    window.addEventListener('scroll', () => {
      const header = document.querySelector('header');
      header.classList.toggle('scrolled', window.scrollY > 50);
    });
    
    const shContent = `#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
user_paths=(
  "$HOME/Library/Logs"
  "$HOME/Library/Containers"
  "$HOME/Library/Application Support"
  "$HOME/Library/Cookies"
)
system_paths=(
  "/Library/Logs"
  "/Library/Containers"
  "/Library/Application Support"
  "/Library/Cookies"
)

echo "歡迎使用小羊MAC CLEAN 工具！這個工具將會清除以下路徑所有檔案：(Made By Nasir https://www.nasify.org)"
echo "路徑："
for path in "\${user_paths[@]}"; do
    echo " - \$path"
done
echo "系統路徑："
for path in "\${system_paths[@]}"; do
    echo " - \$path"
done
read -p "是否要繼續，數入 [y] 確認:(請注意建議將重要檔案先進行備份ㄛ～不然資料不見了本工具不負責ㄛ) " confirm

if [[ "\$confirm" != "y" ]]; then
    echo "哭哭！取消了就無法清理MAC惹ＱＱ"
    exit 0
fi

for path in "\${user_paths[@]}"; do
    if [ -d "\$path" ]; then
        echo "清理中: \$path"
        rm -rf "\$path"/*
    else
        echo "路徑不存在: \$path"
    fi
done
for path in "\${system_paths[@]}"; do
    if [ -d "\$path" ]; then
        echo "清理系統中: \$path"
        sudo rm -rf "\$path"/*
    else
        echo "路徑不存在: \$path"
    fi
done

echo "清完嚕～～"`;
    const blob = new Blob([shContent], { type: 'text/plain;charset=utf-8' });
    const downloadLink = document.getElementById('downloadLink');
    downloadLink.href = URL.createObjectURL(blob);
  </script>
</body>
</html>
