openfree commited on
Commit
3d373a6
·
verified ·
1 Parent(s): f51e426

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +3 -23
index.html CHANGED
@@ -118,13 +118,12 @@
118
  <script>
119
  // 1. 프로젝트 URL 목록: 프로젝트 이름 -> URL
120
  const projectList = {
121
-
122
  "ginigen/Design": "https://huggingface.co/spaces/ginigen/Design",
123
  "ginigen/Diagram": "https://huggingface.co/spaces/ginigen/Diagram",
124
  "ginigen/Mockup": "https://huggingface.co/spaces/ginigen/Mockup",
125
  "ginigen/Infographic": "https://huggingface.co/spaces/ginigen/Infographic",
126
  "ginigen/Flowchart": "https://huggingface.co/spaces/ginigen/Flowchart",
127
-
128
  "aiqcamp/FLUX-Vision": "https://huggingface.co/spaces/aiqcamp/FLUX-Vision",
129
  "ginigen/VoiceClone-TTS": "https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
130
  "fantos/Panorama": "https://huggingface.co/spaces/fantos/Panorama",
@@ -241,9 +240,9 @@
241
  "aiqtech/flxgif": "https://huggingface.co/spaces/aiqtech/flxgif",
242
  "aiqtech/imaginpaint": "https://huggingface.co/spaces/aiqtech/imaginpaint"
243
  };
244
-
245
  // 2. 별도 객체: 프로젝트의 개별 카테고리 지정 (없으면 기본값 "Image Gen" 사용)
246
  const customCategories = {
 
247
  "ginigen/Design": "Productivity",
248
  "ginigen/Diagram": "Productivity",
249
  "ginigen/Mockup": "Productivity",
@@ -368,9 +367,7 @@
368
  "aiqtech/flxgif": "Image Gen",
369
  "aiqtech/imaginpaint": "Image Edit"
370
 
371
-
372
  };
373
-
374
  const newProjects = [
375
  "ginigen/Design",
376
  "ginigen/Diagram",
@@ -441,8 +438,8 @@ const newProjects = [
441
  "ginigen/cartoon",
442
  "ginigen/Book-Cover"
443
  ];
444
-
445
  const bestProjects = [
 
446
  "ginigen/VoiceClone-TTS",
447
  "openfree/VisionOCR-Chat",
448
  "ginigen/3D-LLAMA",
@@ -477,8 +474,6 @@ const bestProjects = [
477
  "ginigen/FLUXllama-Multilingual",
478
  "ginipick/FitGen"
479
  ];
480
-
481
-
482
  // 4. URL 변환 함수
483
  function transformUrl(url) {
484
  const prefix = "https://huggingface.co/spaces/";
@@ -488,7 +483,6 @@ const bestProjects = [
488
  }
489
  return url;
490
  }
491
-
492
  // 5. 프로젝트 배열 생성
493
  const keys = Object.keys(projectList);
494
  const projects = keys.map(key => {
@@ -497,14 +491,12 @@ const bestProjects = [
497
 
498
  if (newProjects.includes(key)) categories.push("NEW");
499
  if (bestProjects.includes(key)) categories.push("BEST");
500
-
501
  return {
502
  name: primaryCategory + "/" + key.split("/")[1],
503
  url: transformUrl(projectList[key]),
504
  categories: categories
505
  };
506
  });
507
-
508
  // 6. 카테고리별 그룹화
509
  const grouped = {};
510
  projects.forEach(proj => {
@@ -513,17 +505,14 @@ const bestProjects = [
513
  grouped[cat].push(proj);
514
  });
515
  });
516
-
517
  // 7. 필터 버튼 생성
518
  const fixedGroups = ["NEW", "BEST", "Text", "Image Gen", "Image Edit", "Audio", "Video", "Productivity", "Utility", "Vision"];
519
  const filterGroupDiv = document.getElementById("filter-group");
520
-
521
  const allButton = document.createElement("button");
522
  allButton.className = "toggle-button active";
523
  allButton.setAttribute("data-filter", "all");
524
  allButton.textContent = "All";
525
  filterGroupDiv.appendChild(allButton);
526
-
527
  fixedGroups.forEach(category => {
528
  const btn = document.createElement("button");
529
  btn.className = "toggle-button";
@@ -531,7 +520,6 @@ const bestProjects = [
531
  btn.textContent = category;
532
  filterGroupDiv.appendChild(btn);
533
  });
534
-
535
  // 8. 사이드바 갱신 함수
536
  function updateSidebar(filter) {
537
  const sidebar = document.getElementById("sidebar");
@@ -539,16 +527,13 @@ const bestProjects = [
539
  let items = (filter === "all")
540
  ? projects
541
  : projects.filter(p => p.categories.includes(filter));
542
-
543
  const ul = document.createElement("ul");
544
  items.forEach(item => {
545
  const li = document.createElement("li");
546
-
547
  // 이름 표시
548
  const nameSpan = document.createElement("span");
549
  nameSpan.textContent = item.name;
550
  li.appendChild(nameSpan);
551
-
552
  // "링크 클릭" 버튼
553
  const linkButton = document.createElement("button");
554
  linkButton.textContent = "링크 클릭";
@@ -557,23 +542,19 @@ const bestProjects = [
557
  window.open(item.url, "_blank"); // 새 탭(창) 열기
558
  });
559
  li.appendChild(linkButton);
560
-
561
  // li 자체 클릭하면 iframe 변경
562
  li.addEventListener("click", () => {
563
  document.getElementById("embed-frame").src = item.url;
564
  });
565
-
566
  ul.appendChild(li);
567
  });
568
  sidebar.appendChild(ul);
569
-
570
  if (items.length > 0) {
571
  document.getElementById("embed-frame").src = items[0].url;
572
  } else {
573
  document.getElementById("embed-frame").src = "";
574
  }
575
  }
576
-
577
  // 9. 버튼 클릭 이벤트
578
  document.querySelectorAll(".toggle-button").forEach(button => {
579
  button.addEventListener("click", function() {
@@ -582,7 +563,6 @@ const bestProjects = [
582
  updateSidebar(this.getAttribute("data-filter"));
583
  });
584
  });
585
-
586
  // 10. 페이지 로드 시 All 필터
587
  updateSidebar("all");
588
  </script>
 
118
  <script>
119
  // 1. 프로젝트 URL 목록: 프로젝트 이름 -> URL
120
  const projectList = {
121
+ "ginigen/Workflow-Canvas": "https://huggingface.co/spaces/ginigen/Workflow-Canvas",
122
  "ginigen/Design": "https://huggingface.co/spaces/ginigen/Design",
123
  "ginigen/Diagram": "https://huggingface.co/spaces/ginigen/Diagram",
124
  "ginigen/Mockup": "https://huggingface.co/spaces/ginigen/Mockup",
125
  "ginigen/Infographic": "https://huggingface.co/spaces/ginigen/Infographic",
126
  "ginigen/Flowchart": "https://huggingface.co/spaces/ginigen/Flowchart",
 
127
  "aiqcamp/FLUX-Vision": "https://huggingface.co/spaces/aiqcamp/FLUX-Vision",
128
  "ginigen/VoiceClone-TTS": "https://huggingface.co/spaces/ginigen/VoiceClone-TTS",
129
  "fantos/Panorama": "https://huggingface.co/spaces/fantos/Panorama",
 
240
  "aiqtech/flxgif": "https://huggingface.co/spaces/aiqtech/flxgif",
241
  "aiqtech/imaginpaint": "https://huggingface.co/spaces/aiqtech/imaginpaint"
242
  };
 
243
  // 2. 별도 객체: 프로젝트의 개별 카테고리 지정 (없으면 기본값 "Image Gen" 사용)
244
  const customCategories = {
245
+ "ginigen/Workflow-Canvas": "Productivity",
246
  "ginigen/Design": "Productivity",
247
  "ginigen/Diagram": "Productivity",
248
  "ginigen/Mockup": "Productivity",
 
367
  "aiqtech/flxgif": "Image Gen",
368
  "aiqtech/imaginpaint": "Image Edit"
369
 
 
370
  };
 
371
  const newProjects = [
372
  "ginigen/Design",
373
  "ginigen/Diagram",
 
438
  "ginigen/cartoon",
439
  "ginigen/Book-Cover"
440
  ];
 
441
  const bestProjects = [
442
+ "ginigen/Workflow-Canvas",
443
  "ginigen/VoiceClone-TTS",
444
  "openfree/VisionOCR-Chat",
445
  "ginigen/3D-LLAMA",
 
474
  "ginigen/FLUXllama-Multilingual",
475
  "ginipick/FitGen"
476
  ];
 
 
477
  // 4. URL 변환 함수
478
  function transformUrl(url) {
479
  const prefix = "https://huggingface.co/spaces/";
 
483
  }
484
  return url;
485
  }
 
486
  // 5. 프로젝트 배열 생성
487
  const keys = Object.keys(projectList);
488
  const projects = keys.map(key => {
 
491
 
492
  if (newProjects.includes(key)) categories.push("NEW");
493
  if (bestProjects.includes(key)) categories.push("BEST");
 
494
  return {
495
  name: primaryCategory + "/" + key.split("/")[1],
496
  url: transformUrl(projectList[key]),
497
  categories: categories
498
  };
499
  });
 
500
  // 6. 카테고리별 그룹화
501
  const grouped = {};
502
  projects.forEach(proj => {
 
505
  grouped[cat].push(proj);
506
  });
507
  });
 
508
  // 7. 필터 버튼 생성
509
  const fixedGroups = ["NEW", "BEST", "Text", "Image Gen", "Image Edit", "Audio", "Video", "Productivity", "Utility", "Vision"];
510
  const filterGroupDiv = document.getElementById("filter-group");
 
511
  const allButton = document.createElement("button");
512
  allButton.className = "toggle-button active";
513
  allButton.setAttribute("data-filter", "all");
514
  allButton.textContent = "All";
515
  filterGroupDiv.appendChild(allButton);
 
516
  fixedGroups.forEach(category => {
517
  const btn = document.createElement("button");
518
  btn.className = "toggle-button";
 
520
  btn.textContent = category;
521
  filterGroupDiv.appendChild(btn);
522
  });
 
523
  // 8. 사이드바 갱신 함수
524
  function updateSidebar(filter) {
525
  const sidebar = document.getElementById("sidebar");
 
527
  let items = (filter === "all")
528
  ? projects
529
  : projects.filter(p => p.categories.includes(filter));
 
530
  const ul = document.createElement("ul");
531
  items.forEach(item => {
532
  const li = document.createElement("li");
 
533
  // 이름 표시
534
  const nameSpan = document.createElement("span");
535
  nameSpan.textContent = item.name;
536
  li.appendChild(nameSpan);
 
537
  // "링크 클릭" 버튼
538
  const linkButton = document.createElement("button");
539
  linkButton.textContent = "링크 클릭";
 
542
  window.open(item.url, "_blank"); // 새 탭(창) 열기
543
  });
544
  li.appendChild(linkButton);
 
545
  // li 자체 클릭하면 iframe 변경
546
  li.addEventListener("click", () => {
547
  document.getElementById("embed-frame").src = item.url;
548
  });
 
549
  ul.appendChild(li);
550
  });
551
  sidebar.appendChild(ul);
 
552
  if (items.length > 0) {
553
  document.getElementById("embed-frame").src = items[0].url;
554
  } else {
555
  document.getElementById("embed-frame").src = "";
556
  }
557
  }
 
558
  // 9. 버튼 클릭 이벤트
559
  document.querySelectorAll(".toggle-button").forEach(button => {
560
  button.addEventListener("click", function() {
 
563
  updateSidebar(this.getAttribute("data-filter"));
564
  });
565
  });
 
566
  // 10. 페이지 로드 시 All 필터
567
  updateSidebar("all");
568
  </script>