diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000..25175175 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Bash(git -C /home/sito/COFRE/CODERS/oasis_mobile add nodejs-project/nodejs-project/src/models/tribes_model.js nodejs-project/nodejs-project/src/models/main_models.js nodejs-project/nodejs-project/src/models/blockchain_model.js nodejs-project/nodejs-project/src/views/blockchain_view.js nodejs-project/nodejs-project/src/client/assets/styles/style.css)", + "Bash(git -C /home/sito/COFRE/CODERS/oasis_mobile commit -m ' *)" + ] + } +} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml new file mode 100644 index 00000000..54451c69 --- /dev/null +++ b/.idea/caches/deviceStreaming.xml @@ -0,0 +1,1630 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/nodejs_project.xml b/.idea/libraries/nodejs_project.xml new file mode 100644 index 00000000..09d5d84b --- /dev/null +++ b/.idea/libraries/nodejs_project.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..1945ce5f --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..5c337980 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/oasis_mobile.iml b/.idea/oasis_mobile.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/.idea/oasis_mobile.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/nodejs-project/nodejs-project/src/client/assets/styles/mobile.css b/nodejs-project/nodejs-project/src/client/assets/styles/mobile.css index f00828ff..2c307efc 100644 --- a/nodejs-project/nodejs-project/src/client/assets/styles/mobile.css +++ b/nodejs-project/nodejs-project/src/client/assets/styles/mobile.css @@ -469,11 +469,17 @@ footer div { gap: 8px !important; } -/* ---- Overrides de grid inline ---- */ +/* ---- Trending container: columna en movil ---- */ +.trending-container { + grid-template-columns: 1fr !important; +} + +/* ---- Overrides de grid inline (fallback para estilos inline que queden) ---- */ [style*="grid-template-columns: repeat(6"] { grid-template-columns: 1fr !important; } [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr !important; } [style*="grid-template-columns:repeat(6"] { grid-template-columns: 1fr !important; } [style*="grid-template-columns:repeat(3"] { grid-template-columns: 1fr !important; } [style*="grid-template-columns: repeat(auto-fit"] { grid-template-columns: 1fr !important; } [style*="grid-template-columns:repeat(auto-fit"] { grid-template-columns: 1fr !important; } +[style*="grid-template-columns:repeat(auto-fill"] { grid-template-columns: 1fr !important; } [style*="width:50%"] { width: 100% !important; } diff --git a/nodejs-project/nodejs-project/src/client/assets/styles/style.css b/nodejs-project/nodejs-project/src/client/assets/styles/style.css index 8b166ec0..8db0d46a 100644 --- a/nodejs-project/nodejs-project/src/client/assets/styles/style.css +++ b/nodejs-project/nodejs-project/src/client/assets/styles/style.css @@ -4308,3 +4308,10 @@ button, input[type="submit"], input[type="button"], .filter-btn { text-overflow: ellipsis; white-space: nowrap; } + +/* trending-container: grid responsive en desktop, columna en movil */ +.trending-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 20px; +} diff --git a/nodejs-project/nodejs-project/src/views/activity_view.js b/nodejs-project/nodejs-project/src/views/activity_view.js index 9c6c1977..93bd685d 100644 --- a/nodejs-project/nodejs-project/src/views/activity_view.js +++ b/nodejs-project/nodejs-project/src/views/activity_view.js @@ -1541,55 +1541,11 @@ exports.activityView = (actions, filter, userId, q = '') => { h2(i18n.activityList), p(desc) ), - form({ method: 'GET', action: '/activity' }, - div({ class: 'mode-buttons', style: 'display:grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px;' }, - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(0, 3).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) - ), - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(3, 8).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) - ), - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(8, 12).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) - ), - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(12, 17).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) - ), - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(17, 22).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) - ), - div({ style: 'display: flex; flex-direction: column; gap: 8px;' }, - activityTypes.slice(22, 27).map(({ type, label }) => - form({ method: 'GET', action: '/activity' }, - input({ type: 'hidden', name: 'filter', value: type }), - button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) - ) - ) + div({ class: 'mode-buttons' }, + ...activityTypes.map(({ type, label }) => + form({ method: 'GET', action: '/activity' }, + input({ type: 'hidden', name: 'filter', value: type }), + button({ type: 'submit', class: filter === type ? 'filter-btn active' : 'filter-btn' }, label) ) ) ), diff --git a/nodejs-project/nodejs-project/src/views/stats_view.js b/nodejs-project/nodejs-project/src/views/stats_view.js index abee8df6..52425197 100644 --- a/nodejs-project/nodejs-project/src/views/stats_view.js +++ b/nodejs-project/nodejs-project/src/views/stats_view.js @@ -77,7 +77,7 @@ exports.statsView = (stats, filter) => { h2(title), p(description) ), - div({ class: 'mode-buttons', style: 'display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:16px;margin-bottom:24px;' }, + div({ class: 'mode-buttons' }, modes.map(m => form({ method: 'GET', action: '/stats' }, input({ type: 'hidden', name: 'filter', value: m }), diff --git a/nodejs-project/nodejs-project/src/views/trending_view.js b/nodejs-project/nodejs-project/src/views/trending_view.js index 0ebcb78f..497a107f 100644 --- a/nodejs-project/nodejs-project/src/views/trending_view.js +++ b/nodejs-project/nodejs-project/src/views/trending_view.js @@ -261,26 +261,20 @@ exports.trendingView = (items, filter, categories = opinionCategories) => { title, section( header, - div( - { class: 'mode-buttons', style: 'display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:16px;margin-bottom:24px;' }, - generateFilterButtons(baseFilters, filter, '/trending'), - ...contentFilters.map(row => - div({ style: 'display:flex;flex-direction:column;gap:8px;' }, - row.map(mode => - form({ method: 'GET', action: '/trending' }, - input({ type: 'hidden', name: 'filter', value: mode }), - button( - { type: 'submit', class: filter === mode ? 'filter-btn active' : 'filter-btn' }, - i18n[mode + 'Button'] || mode - ) - ) + div({ class: 'mode-buttons' }, + ...[...baseFilters, ...contentFilters.flat()].map(mode => + form({ method: 'GET', action: '/trending' }, + input({ type: 'hidden', name: 'filter', value: mode }), + button( + { type: 'submit', class: filter === mode ? 'filter-btn active' : 'filter-btn' }, + i18n[mode + 'Button'] || mode ) ) ) ), section( cards.length - ? div({ class: 'trending-container', style: 'display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;' }, ...cards) + ? div({ class: 'trending-container' }, ...cards) : div({ class: 'no-results' }, p(i18n.trendingNoContentMessage)) ) )