From 27770a8ed7029e8018af85c8b470a93163b933cf Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Tue, 22 Sep 2020 03:27:11 +0530 Subject: [PATCH] Change in CSS and Icon --- index.html | 95 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/index.html b/index.html index 63d6dba..31ce56c 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ + Content Collaboration @@ -10764,7 +10765,7 @@ const cloudArticleApp = { - SUBJECT: null, + SUBJECT: null, numberOfSections: 100, @@ -10886,7 +10887,7 @@ const article_data = secObj[iterKey]; const gen_div_id = this.unique_id(); const content_hash = Crypto.SHA256(article_data.content.trim()); - if(!hashes_box.includes(content_hash)) { + if (!hashes_box.includes(content_hash)) { hashes_box.push(content_hash); } else continue; let vc = article_data.vectorClock || ""; @@ -11228,7 +11229,7 @@ if (previous_content_hash === updated_content_hash) return; let detail_block = document.getElementById(_id).getAttribute('data-value'); let separate_data = detail_block.trim().split('__'); - + if (separate_data.length !== 2) return; cloudArticleApp.addArticleContent(separate_data[0], separate_data[1], updated_content, myFloID); @@ -11360,7 +11361,7 @@ option.classList.add('hide-completely') }) }, - + logout: function () { askConfirmation("Do you want to logout?").then(result => { floDapps.clearCredentials() @@ -11378,8 +11379,8 @@ console.log(error) }) }, - - html_template: function(mid_section='') { + + html_template: function (mid_section = '') { let t = ``; t += ` @@ -11579,31 +11580,36 @@ } .topnav a img { - width: 4rem; + width: 8rem; } } - @media all and (min-width: 640px){ - #bodydiv{ + @media all and (min-width: 640px) { + #bodydiv { margin: 0 12vw; } - .columns{ + + .columns { margin: 0 2vw; } } - @media all and (min-width: 1280px){ - #bodydiv{ + + @media all and (min-width: 1280px) { + #bodydiv { margin: 0 20vw; } - .columns{ + + .columns { margin: 0 2vw; } } - @media all and (min-width: 1920px){ - #bodydiv{ + + @media all and (min-width: 1920px) { + #bodydiv { margin: 0 32vw; } - .columns{ + + .columns { margin: 0 4vw; } } @@ -11612,9 +11618,12 @@
- -
+ + + + +
@@ -11623,29 +11632,29 @@
Exported by RanchiMall Content Collaboration on FLO Blockchain
`; - t += `${mid_section}`; - t += `
+ t += `${mid_section}`; + t += `
`; return t; }, - determine_contributions: function() { + determine_contributions: function () { try { const contributions_by_sections = {}; const contributions_by_floid = {}; const data = Object.values(floGlobals.appObjects[cloudArticleApp.SUBJECT])[0].data; const content_data = Object.values(data); - for (const sections_list of content_data) { - for(const sec_iters in sections_list.section_iters) { + for (const sections_list of content_data) { + for (const sec_iters in sections_list.section_iters) { const section_contributors = sections_list.section_iters[sec_iters]; - if(typeof contributions_by_sections[sections_list.section_details.section_name] !== "object") { - contributions_by_sections[sections_list.section_details.section_name]=[]; + if (typeof contributions_by_sections[sections_list.section_details.section_name] !== "object") { + contributions_by_sections[sections_list.section_details.section_name] = []; } - if(typeof contributions_by_floid[section_contributors.content_creator] !== "object") { - contributions_by_floid[section_contributors.content_creator]=[]; + if (typeof contributions_by_floid[section_contributors.content_creator] !== "object") { + contributions_by_floid[section_contributors.content_creator] = []; } contributions_by_sections[sections_list.section_details.section_name].push({ content_creator: section_contributors.content_creator, @@ -11669,24 +11678,26 @@ } }, - determine_scores_by_id: function() { + determine_scores_by_id: function () { try { - const get_contributions = cloudArticleApp.determine_contributions(); - - const report_card = Object.keys(get_contributions.contributions_by_floid) - .map(m=>{ - let get_contributions_data = get_contributions.contributions_by_floid[m]; - let total_score = get_contributions_data.reduce((acc, cv)=>acc+cv.score, 0); - let total_contributions = get_contributions_data.length; - let avg_score = total_score/total_contributions; + const get_contributions = cloudArticleApp.determine_contributions(); - return {[m]: { - total_score, avg_score, total_contributions - }} - }); + const report_card = Object.keys(get_contributions.contributions_by_floid) + .map(m => { + let get_contributions_data = get_contributions.contributions_by_floid[m]; + let total_score = get_contributions_data.reduce((acc, cv) => acc + cv.score, 0); + let total_contributions = get_contributions_data.length; + let avg_score = total_score / total_contributions; + + return { + [m]: { + total_score, avg_score, total_contributions + } + } + }); console.log(report_card); - + return report_card; // for(rc of report_card) {