タスク管理.html

<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>AIベースのタスク管理アプリ</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f9;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    h1 {
      color: #333;
    }
    .task-container {
      width: 90%;
      max-width: 1200px;
      padding: 20px;
    }
    .task-form {
      display: flex;
      flex-direction: column;
      margin-bottom: 20px;
    }
    .task-form input, .task-form textarea {
      margin-bottom: 10px;
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 5px;
    }
    .task-form button {
      padding: 10px;
      background-color: #28a745;
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
    .task-form button:hover {
      background-color: #218838;
    }
    .kanban-board {
      display: flex;
      justify-content: space-around;
    }
    .kanban-column {
      background-color: #f8f9fa;
      padding: 20px;
      width: 30%;
      border-radius: 10px;
      min-height: 300px;
    }
    .kanban-column h2 {
      text-align: center;
    }
    .task-list {
      margin-top: 10px;
    }
    .task-item {
      display: flex;
      justify-content: space-between;
      background-color: #e9ecef;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 5px;
    }
    .task-item.high {
      background-color: #ffcccc;
    }
    .task-item.medium {
      background-color: #fff3cd;
    }
    .task-item.low {
      background-color: #d4edda;
    }
    .task-item button {
      background-color: #dc3545;
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
    .task-item button:hover {
      background-color: #c82333;
    }
  </style>
</head>
<body>

  <h1>タスク管理</h1>
  <div class="task-container">
    <form class="task-form" id="taskForm">
      <input type="text" id="taskTitle" placeholder="タスクタイトル" required>
      <textarea id="taskDescription" placeholder="タスク詳細" rows="4"></textarea>
      <input type="date" id="taskDueDate" required>
      <button type="submit">タスクを追加</button>
    </form>

    <div class="kanban-board">
      <div class="kanban-column" id="notStarted">
        <h2>未着手</h2>
        <div class="task-list" id="notStartedList"></div>
      </div>
      <div class="kanban-column" id="inProgress">
        <h2>進行中</h2>
        <div class="task-list" id="inProgressList"></div>
      </div>
      <div class="kanban-column" id="completed">
        <h2>完了</h2>
        <div class="task-list" id="completedList"></div>
      </div>
    </div>
  </div>

  <script>
    let tasks = JSON.parse(localStorage.getItem('tasks')) || [];

    // 優先度予測(ルールベース)
    function predictPriority(taskDueDate) {
      const daysLeft = (new Date(taskDueDate) - new Date()) / (1000 * 60 * 60 * 24);
      if (daysLeft < 2) {
        return 'High';  // 緊急度が高い
      } else if (daysLeft < 7) {
        return 'Medium';  // 1週間以内
      } else {
        return 'Low';  // 余裕がある
      }
    }

    // タスクをローカルストレージに保存
    function saveTasks() {
      localStorage.setItem('tasks', JSON.stringify(tasks));
    }

    // タスク表示
    function loadTasks() {
      const notStartedList = document.getElementById('notStartedList');
      const inProgressList = document.getElementById('inProgressList');
      const completedList = document.getElementById('completedList');

      notStartedList.innerHTML = '';
      inProgressList.innerHTML = '';
      completedList.innerHTML = '';

      tasks.forEach(task => {
        const taskItem = document.createElement('div');
        taskItem.classList.add('task-item', task.priority.toLowerCase());
        taskItem.setAttribute('draggable', true);
        taskItem.innerHTML = `
          <div>
            <strong>${task.title}</strong>
            <p>${task.description}</p>
            <small>期限: ${new Date(task.dueDate).toLocaleDateString()}</small>
            <p>優先度: ${task.priority}</p>
          </div>
          <button onclick="deleteTask('${task.id}')">削除</button>
        `;

        taskItem.addEventListener('dragstart', (e) => {
          e.dataTransfer.setData('text/plain', task.id);
        });

        if (task.status === 'notStarted') {
          notStartedList.appendChild(taskItem);
        } else if (task.status === 'inProgress') {
          inProgressList.appendChild(taskItem);
        } else if (task.status === 'completed') {
          completedList.appendChild(taskItem);
        }
      });
    }

    // タスク追加
    document.getElementById('taskForm').addEventListener('submit', (e) => {
      e.preventDefault();
      const title = document.getElementById('taskTitle').value;
      const description = document.getElementById('taskDescription').value;
      const dueDate = document.getElementById('taskDueDate').value;

      const priority = predictPriority(dueDate);

      const newTask = {
        id: Date.now().toString(),
        title,
        description,
        dueDate,
        priority,
        status: 'notStarted'  // 初期状態は未着手
      };

      tasks.push(newTask);
      saveTasks();
      document.getElementById('taskForm').reset();
      loadTasks();
    });

    // タスク削除
    function deleteTask(taskId) {
      tasks = tasks.filter(task => task.id !== taskId);
      saveTasks();
      loadTasks();
    }

    // ドラッグ&ドロップの設定
    document.querySelectorAll('.kanban-column').forEach(column => {
      column.addEventListener('dragover', (e) => {
        e.preventDefault();
      });

      column.addEventListener('drop', (e) => {
        const taskId = e.dataTransfer.getData('text/plain');
        const newStatus = column.id;

        const task = tasks.find(task => task.id === taskId);
        task.status = newStatus;
        saveTasks();
        loadTasks();
      });
    });

    // ページ読み込み時にタスクを表示
    loadTasks();
  </script>

</body>
</html>

投稿者: chosuke

趣味はゲームやアニメや漫画などです

「タスク管理.html」への37件のフィードバック

  1. Reading this in pieces during a long afternoon and finding it consistently rewarding, and a stop at elitegoodsmarket fit naturally into the same fragmented reading pattern, sites whose posts can be read in segments without losing the thread are well suited to how I actually read these days and this one is built well.

  2. Thanks for keeping things clear and to the point, that is honestly hard to find online these days, and after reading through goldensprucegoods the message stayed consistent which makes me trust the information being shared more than I usually do on similar pages that cover this same kind of topic.

  3. Different feel from the algorithmically optimised posts that dominate the topic, and a stop at urbantrendzone reinforced that human touch, you can tell when a site is being run by someone who reads what they publish versus someone just hitting submit and moving on quickly to the next assignment without checking the result.

  4. If you scroll past this site without looking carefully you will miss something, and a stop at mysticoakmarket extended that mild warning, the surface of the site does not advertise its quality loudly which means careful attention is required to recognise what is being offered here which is itself a kind of editorial signal.

  5. Reading this in a quiet hour and finding it suited the quiet, and a stop at digitaltrendstation extended the quiet reading mood, content that matches its own optimal reading conditions rather than fighting them is content that has been thoughtfully calibrated and this site reads as having a particular reading mood in mind throughout.

  6. Generally my attention drifts on long posts but this one held it through the end, and a stop at goldenhorizonmarket earned the same sustained focus, content that defeats my drift tendency is content with substantive pulling power and this site has demonstrated that pulling power across multiple pieces in a session that has now run quite long actually.

  7. The pacing of the post was just right, never rushed and never dragged out unnecessarily, and a look at mysticbaystore maintained the same rhythm, you can tell the writer has experience because the difficult skill of pacing is something only practiced writers manage to handle well in long form content over time and across formats.

  8. Looking for similar voices elsewhere has come up empty in my recent searches, and a stop at goldensproutgoods extended the search frustration, the rare site that does what no other does in quite the same way is precious and this one has clearly developed a particular approach that I have not been able to find duplicates of.

  9. Most blog writing on this subject reaches for the same handful of arguments and this post avoided them, and a look at royalcartcorner continued the original treatment, content that finds its own path through territory other writers have flattened is content with real authorial energy and this site has plenty of that distinctive energy.

  10. Skipped a meeting reminder to finish the post, and a stop at buyloopshop held me past another reminder, when content beats meetings the writer is doing something extraordinary because meetings have institutional support behind them and yet good writing can still occasionally win that competition for attention which I find heartening today.

  11. However many similar pages I have read this one taught me something new, and a stop at velvetharborgoods added more new material, content that contributes genuinely fresh information rather than recycling what is already widely available is content with real informational value and this site is providing that informational freshness at a notable rate.

  12. A well calibrated piece that knew its scope and stayed inside it, and a look at swifttrendhub maintained the same scope discipline, scope creep is one of the failure modes of long blog posts and this site has clearly invested in the editorial discipline to prevent it which shows up in tightly contained pieces.

  13. Even on a quick first read the substance of the post comes through, and a look at trustedbuyerszone reinforced that immediate quality, content that does not require a slow careful read to demonstrate value but rewards one anyway is content with real depth and this site has produced work of that demanding depth class.

  14. Looking at this from the perspective of someone tired of generic content the contrast is striking, and a look at silverhorizonstore maintained that distinctive feel, sites with strong editorial identity stand out against the bland background of algorithmic content and this one has clearly developed an identity worth recognising through careful attention.

  15. Worth every minute of the time spent reading, and a stop at freshcartcorner extends that value across more pages, in a media environment where most content is engineered to waste attention this site stands out by treating reader time as something valuable rather than something to be exploited and stretched as far as possible.

  16. Closed the tab feeling I had spent the time well, and a stop at premiumpickzone extended that feeling across more pages, the test of whether time on a site was well spent is one I apply silently after closing tabs and very few sites pass it but this one passed it cleanly today afternoon clearly.

  17. Picked up two new ideas that I expect will come up in conversations this week, and a look at dreamwovenbazaar added another, content that arms me with talking points rather than just filling time is the kind that provides ongoing value beyond the moment of reading and this site is generating that kind of ongoing value.

  18. Glad I gave this fifteen minutes rather than the usual three minute skim, and a look at copperwindessentials earned the same investment, time spent on quality content is rarely wasted but the reverse is also true and learning which sites deserve which kind of attention is part of being a careful online reader.

  19. Bookmark folder created specifically for this site, and a look at epiccartcenter confirmed the dedicated folder was the right call, dedicated folders for individual sites are a level of organisation I rarely deploy and this site has earned that level of dedicated tracking based on the consistency I have seen so far across sessions.

  20. A piece that read smoothly because the writer understood how readers actually move through prose, and a look at silversproutstore maintained the same reader awareness, writers who think about the reading experience as much as the writing experience produce better work and this site has clearly made that shift in editorial approach.

  21. Picked this for my morning read because the topic seemed worth the time, and a look at infinitybuyhub confirmed the choice was right, my morning reading slot is precious and giving it to this site felt like a good investment rather than a waste which is a higher endorsement than I usually offer for content.

  22. Reading this confirmed a small detail I had been uncertain about, and a stop at perfectbuycorner provided the source for further checking, content that supports verification through citations or links rather than just asserting facts is more trustworthy and this site has clearly built its credibility through that kind of verifiable approach consistently.

  23. A piece that was confident enough to leave some questions open rather than forcing closure, and a look at neonpickmarket continued that intellectual honesty, content that admits the limits of its scope is more trustworthy than content that pretends to total understanding and this site has the right calibration on certainty consistently.

  24. Going to share this with a friend who has been asking the same questions for a while now, and a stop at crystalbloommarket added a few more pages I will pass along too, this is the kind of generous information that earns a small thank you from me right now and again later this week.

  25. A piece that brought a sense of order to a topic I had been finding chaotic, and a look at windspirecollective continued that organising effect, content that imposes useful structure on messy subjects is doing genuine intellectual work and this site is providing that organisational function across multiple posts I have read recently here.

  26. Now considering whether the post would translate well into a different form, and a look at goodslinkstore suggested similar versatility, content that could move into other media without losing its substance is content that has been built around ideas rather than around format and this site reads as idea first throughout posts.

  27. Reading this in the morning set a good tone for the day, and a quick visit to frostharbormarket kept that good tone going, content can do that sometimes when it hits the right notes and finding sites that consistently strike that tone is something I have learned to recognise and reward with regular visits.

  28. Took a few notes from this post, the points are easy to remember without needing to come back and check, and a look at infinitydealcenter added a couple more, the kind of place that sticks in the memory long after the browser tab has been closed for the day which says a lot really.

  29. Now adjusting my expectations upward for the topic based on this post, and a stop at nextcartstation continued that bar raising effect, content that resets what I think is possible on a subject is doing real work in shaping my standards and this site is providing those bar raising experiences at a notable rate during sessions.

  30. Now adding this to a list of sites I want to see flourish, and a stop at stylishgoodszone reinforced that wish, the few sites I actively root for are sites that produce the kind of work I want more of in the world and this one has joined that small list based on what I have read so far.

  31. Speaking from the perspective of a fairly demanding reader the writing here clears the bar consistently, and a look at globalgoodszone continued clearing that bar, the calibration of demanding reader is something I apply to all sources and this site has been one of the few that handles the demanding reading well across pieces sampled.

  32. A clear cut above the usual noise on the subject, and a look at crystalmeadowgoods only made that gap wider in my view, the kind of place that earns its visitors through quality rather than through aggressive marketing or sponsored placements which is increasingly the only way most sites stay afloat across the modern web.

  33. Worth saying that the post fit naturally into a rhythm of careful reading, and a stop at qualitytrendzone extended the same rhythm, content that pairs well with how I actually read rather than demanding a different mode is content well calibrated to its likely audience and this site has clearly thought about that consistently.

  34. Clean writing, easy to read, and never tries too hard to impress, that combination is harder to find than people think, and after my time on urbanbaygoods I am sure this site treats its readers well, no flashy tricks just useful content done right which is honestly all I want online.

  35. Cuts through the usual marketing fluff that dominates this topic online, and a stop at vividcartcorner kept the same clean approach going, this is the kind of writing that respects the reader’s time rather than wasting it on repetitive setups before finally getting to the point at hand which is what most sites do.

  36. Closed the laptop and walked away thinking about the post for a good twenty minutes, and a stop at trendycartstation produced similar lingering thoughts, content that survives the closing of the browser tab is content that has actually entered the mind rather than just decorating the screen for the duration of the reading.

  37. A piece that brought a sense of order to a topic I had been finding chaotic, and a look at stylishgoodsstation continued that organising effect, content that imposes useful structure on messy subjects is doing genuine intellectual work and this site is providing that organisational function across multiple posts I have read recently here.

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です