Skip to content

Commit c8b0615

Browse files
committed
Update site, now load the README.md from github ORG
1 parent ae29388 commit c8b0615

File tree

9 files changed

+176
-42
lines changed

9 files changed

+176
-42
lines changed

configs/site/web/sitemap/sitemap.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

index.html

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,25 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Dev2Forge | Open Source Tools | Tools To DEVs</title>
6+
<meta name="keywords" content="Dev2Forge, tools, developers, everyday users, automation, problem-solving, workflow, software solutions, opensource, github-org, org, tutosrive, automating, software, dev, dev-tools, programming, coders, coding, coding-tools, coder-tools, ready-to-use" />
7+
<title>Dev2Forge: Tools for Developers & Everyday Users</title>
78

89
<!-- Primary Meta Tags -->
9-
<meta name="title" content="Dev2Forge | Open Source Tools | Tools To DEVs" />
10-
<meta
11-
name="description"
12-
content="Dev2Forge: Ready-to-use tools, modules and utilities that automate tasks, solve everyday problems, and streamline your workflow without the hassle. Dev2Forge is a community of developers passionate about innovation, collaboration, and open source. We are dedicated to turning ideas into amazing solutions, sharing knowledge, and supporting the growth of the tech community.
13-
Here, every line of code counts! 💻✨"
14-
/>
10+
<meta name="title" content="Dev2Forge: Tools for Developers & Everyday Users" />
11+
<meta name="description" content="Dev2Forge: Ready-to-use tools for automating tasks, solving problems, and streamlining workflows. Efficient software solutions for your business." />
1512

1613
<!-- Open Graph / Facebook -->
1714
<meta property="og:type" content="website" />
1815
<meta property="og:url" content="https://dev2forge.software/" />
19-
<meta property="og:title" content="Dev2Forge | Open Source Tools | Tools To DEVs" />
20-
<meta
21-
property="og:description"
22-
content="Dev2Forge: Ready-to-use tools, modules and utilities that automate tasks, solve everyday problems, and streamline your workflow without the hassle. Dev2Forge is a community of developers passionate about innovation, collaboration, and open source. We are dedicated to turning ideas into amazing solutions, sharing knowledge, and supporting the growth of the tech community.
23-
Here, every line of code counts! 💻✨"
24-
/>
16+
<meta property="og:title" content="Dev2Forge: Tools for Developers & Everyday Users" />
17+
<meta property="og:description" content="Dev2Forge: Ready-to-use tools for automating tasks, solving problems, and streamlining workflows. Efficient software solutions for your business." />
2518
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/metatag-dev2forge1.jpeg" />
2619

2720
<!-- Twitter -->
2821
<meta property="twitter:card" content="summary_large_image" />
2922
<meta property="twitter:url" content="https://dev2forge.software/" />
30-
<meta property="twitter:title" content="Dev2Forge | Open Source Tools | Tools To DEVs" />
31-
<meta
32-
property="twitter:description"
33-
content="Dev2Forge: Ready-to-use tools, modules and utilities that automate tasks, solve everyday problems, and streamline your workflow without the hassle. Dev2Forge is a community of developers passionate about innovation, collaboration, and open source. We are dedicated to turning ideas into amazing solutions, sharing knowledge, and supporting the growth of the tech community.
34-
Here, every line of code counts! 💻✨"
35-
/>
23+
<meta property="twitter:title" content="Dev2Forge: Tools for Developers & Everyday Users" />
24+
<meta property="twitter:description" content="Dev2Forge: Ready-to-use tools for automating tasks, solving problems, and streamlining workflows. Efficient software solutions for your business." />
3625
<meta property="twitter:image" content="https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/metatag-dev2forge1.jpeg" />
3726

3827
<!-- Meta Tags Generated with https://metatags.io -->
@@ -43,9 +32,10 @@
4332
<link rel="manifest" href="/public/favicons/site.webmanifest" />
4433
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
4534

35+
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js" integrity="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
4636
<script src="https://cdn.tailwindcss.com"></script>
47-
<script type="module" src="./src/assets/js/main.js" defer></script>
4837
<link rel="stylesheet" href="./src/assets/css/index.css" />
38+
<script type="module" src="./src/assets/js/main.js" defer></script>
4939

5040
<script async src="https://www.googletagmanager.com/gtag/js?id=G-74L9F7VNLD"></script>
5141
<script>
@@ -61,23 +51,22 @@
6151
<!-- Header -->
6252
<header class="w-full flex justify-between items-center p-6 flex-shrink-0">
6353
<div class="w-full text-center">
64-
<h1 class="text-3xl font-bold inline"><a href="https://github.com/dev2forge" target="_blank" class="no-decoration underline">Dev2Forge</a></h1>
65-
<sub class="text-sm inline"><small>org</small></sub>
54+
<!-- <h1 class="text-3xl font-bold inline"><a href="https://github.com/dev2forge" target="_blank" class="no-decoration underline" id="title-page"></a></h1> -->
55+
<a href="https://github.com/dev2forge" target="_blank" class="flex justify-center"><img id="thumbnail-dev2forge" class="thumbnail-dev2forge img-fluid" /></a>
6656
</div>
6757
<!-- Feature: Add "Toggle Theme" -->
6858
</header>
6959

7060
<!-- Main Content -->
7161
<main class="flex-1 flex flex-col items-center w-full px-6 pb-12">
72-
<!-- Description page -->
73-
<!-- Feature: Load README.md from repo -->
74-
<section id="description" class="my-4"></section>
75-
7662
<!-- Repos -->
7763
<section id="carrusel-repos" class="h-full grid grid-rows-1 auto-cols-max grid-flow-col gap-4 overflow-x-auto overflow-y-hidden snap-x snap-mandatory w-full py-4">
7864
<!-- Repos will be injected here -->
7965
</section>
8066

67+
<!-- Description page -->
68+
<section id="description" class="my-4"></section>
69+
8170
<hr class="border-gray-800 border-2 my-2 w-full" />
8271

8372
<!-- Followers Carousel -->

public/dev.png

80.7 KB
Loading

public/dev2forge-logo.png

-117 KB
Loading

public/thumbanil-dev2forge.png

86.4 KB
Loading

src/assets/css/index.css

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
@import './tables.css';
2+
hr {
3+
margin: 20px 0;
4+
}
5+
6+
h1 {
7+
text-align: center;
8+
font-size: xx-large;
9+
}
10+
11+
code {
12+
background-color: #2c2c2c;
13+
padding: 2px 4px;
14+
border-radius: 4px;
15+
font-family: 'Courier New', Courier, monospace;
16+
user-select: all;
17+
}
18+
19+
#description h2 {
20+
text-align: center;
21+
font-size: x-large;
22+
margin-bottom: 15px;
23+
}
24+
25+
#title-page::after {
26+
content: 'org';
27+
font-size: small;
28+
}
29+
30+
.thumbnail-dev2forge {
31+
width: 80vh;
32+
}
33+
134
#carrusel-repos::-webkit-scrollbar {
235
display: none;
336
}
@@ -13,10 +46,7 @@
1346
-ms-overflow-style: none;
1447
}
1548
.btn-repo-link {
16-
width: 100%;
17-
max-width: 100%;
18-
background-color: #e0e7ff;
19-
border-radius: 9999px;
49+
border-radius: 200px;
2050
padding: 5px 10px;
2151
color: #2563eb;
2252
text-decoration: none;

src/assets/css/tables.css

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/* Responsive styles for markdown tables */
2+
.markdown-table-wrapper {
3+
width: 100%;
4+
overflow-x: auto;
5+
-webkit-overflow-scrolling: touch;
6+
margin: 1rem 0;
7+
padding-bottom: 2px;
8+
/* Añade un fondo para distinguir el scroll en móvil */
9+
background: transparent;
10+
}
11+
12+
.markdown-table-wrapper > .markdown-table {
13+
border-collapse: collapse;
14+
min-width: 400px; /* Reduce el mínimo para móvil */
15+
width: 100%; /* Ocupa todo el ancho disponible */
16+
max-width: 100%;
17+
margin: 0;
18+
font-size: 1rem;
19+
background: transparent;
20+
table-layout: auto; /* Permite que las celdas se ajusten */
21+
}
22+
23+
.markdown-table-wrapper > .markdown-table th,
24+
.markdown-table-wrapper > .markdown-table td {
25+
border: 1px solid #374151;
26+
padding: 0.5rem 1rem;
27+
text-align: left;
28+
/* Elimina nowrap por defecto */
29+
white-space: normal;
30+
word-break: break-word;
31+
}
32+
33+
.markdown-table-wrapper > .markdown-table th {
34+
background-color: #1e293b;
35+
color: #fff;
36+
font-weight: 700;
37+
}
38+
39+
.markdown-table-wrapper > .markdown-table td {
40+
background-color: #111827;
41+
color: #e5e7eb;
42+
}
43+
44+
.markdown-table-wrapper > .markdown-table tr:nth-child(even) td {
45+
background-color: #1e293b22;
46+
}
47+
48+
@media (prefers-color-scheme: light) {
49+
.markdown-table-wrapper > .markdown-table th {
50+
background-color: #f3f4f6;
51+
color: #111827;
52+
}
53+
.markdown-table-wrapper > .markdown-table td {
54+
background-color: #fff;
55+
color: #1e293b;
56+
}
57+
.markdown-table-wrapper > .markdown-table th,
58+
.markdown-table-wrapper > .markdown-table td {
59+
border: 1px solid #d1d5db;
60+
}
61+
.markdown-table-wrapper > .markdown-table tr:nth-child(even) td {
62+
background-color: #f9fafb;
63+
}
64+
}
65+
66+
@media (max-width: 700px) {
67+
.markdown-table-wrapper > .markdown-table {
68+
font-size: 0.9rem;
69+
min-width: 350px;
70+
width: 100%;
71+
max-width: 100%;
72+
/* table-layout: fixed; // Si quieres columnas iguales, descomenta */
73+
}
74+
.markdown-table-wrapper > .markdown-table th,
75+
.markdown-table-wrapper > .markdown-table td {
76+
padding: 0.4rem 0.5rem;
77+
white-space: normal;
78+
word-break: break-word;
79+
font-size: 0.95em;
80+
}
81+
}

src/assets/js/main.js

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ document.addEventListener('DOMContentLoaded', () => {
66

77
async function loadDescription() {
88
const req = await fetch('https://api.github.com/users/dev2forge');
9-
const res = await req.json();
9+
// const res = await req.json();
10+
11+
// Markdown to HTML conversion
12+
const converter = new showdown.Converter({ tables: true });
13+
const readme = await fetch('https://raw.githubusercontent.com/Dev2Forge/.github/refs/heads/main/profile/README.md');
14+
const readmeText = await readme.text();
15+
const html_readme = converter.makeHtml(readmeText);
16+
1017
const description = document.querySelector('#description');
11-
description.textContent = res.bio || 'No description available';
18+
// description.innerHTML = res.bio || 'No description available';
19+
description.innerHTML = html_readme || '';
20+
__formatHTML(description);
1221
}
1322

1423
/**
@@ -72,3 +81,36 @@ async function loadConfigs() {
7281
const data = await req.json();
7382
return data;
7483
}
84+
85+
function __formatHTML(container) {
86+
// Set scrollable tables within the container
87+
__setScrollableTables(container);
88+
89+
// Add event listener to handle click events on links
90+
const titleMD = document.querySelector('#dev2forge');
91+
const thumbnail = document.querySelector('#thumbnail-dev2forge');
92+
// document.querySelector('#title-page').innerHTML = titleMD.innerHTML;
93+
titleMD.remove();
94+
container.querySelectorAll('img').forEach(async (img) => {
95+
const config = await loadConfigs();
96+
if (img.src === config.thumbnail1) {
97+
thumbnail.src = img.src;
98+
img.remove();
99+
}
100+
});
101+
}
102+
103+
/**
104+
* Set scrollable tables within a container.
105+
* @param {HTMLElement} container Container element where tables are located.
106+
*/
107+
function __setScrollableTables(container) {
108+
console.log(container);
109+
container.querySelectorAll('table').forEach((table) => {
110+
table.classList.add('markdown-table');
111+
const wrapper = document.createElement('div');
112+
wrapper.className = 'markdown-table-wrapper';
113+
table.parentNode.insertBefore(wrapper, table);
114+
wrapper.appendChild(table);
115+
});
116+
}

src/assets/json/configs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"ignoreRepos": ["discussions-about", "dev2forge.github.io", ".github", "docs"]
2+
"ignoreRepos": ["discussions-about", "dev2forge.github.io", ".github", "docs"],
3+
"thumbnail1": "https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/dev2forge/thumbanil-dev2forge.png"
34
}

0 commit comments

Comments
 (0)