fixed ranking issue

This commit is contained in:
Abhishek Sinha 2020-01-27 14:48:34 +05:30
parent a66a30892c
commit e53dc99003

View File

@ -1,14 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Content Collaboration</title> <title>Content Collaboration</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="keywords" content="blockchain,ContentCollaboration,RanchiMall"> <meta name="keywords" content="blockchain,ContentCollaboration,RanchiMall">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="This web app can be used to collaborate between various teams using blockchain technology."> <meta name="description"
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,700|Roboto:300,400,500,700&display=swap" rel="stylesheet"> content="This web app can be used to collaborate between various teams using blockchain technology.">
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,700|Roboto:300,400,500,700&display=swap"
rel="stylesheet">
<!--<link rel="stylesheet" href="css/main.css">--> <!--<link rel="stylesheet" href="css/main.css">-->
<style>html { <style>
html {
scroll-behavior: smooth; scroll-behavior: smooth;
font-size: 16px; font-size: 16px;
} }
@ -48,7 +52,13 @@ body {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
} }
h1, h2, h3, h4, h5, span, p { h1,
h2,
h3,
h4,
h5,
span,
p {
font-family: 'Quicksand', sans-serif; font-family: 'Quicksand', sans-serif;
} }
@ -81,7 +91,9 @@ h1, h2, h3, h4, h5, span, p {
stroke-width: 0.5rem !important; stroke-width: 0.5rem !important;
} }
.no-fill svg, .no-fill path, .no-fill polyline { .no-fill svg,
.no-fill path,
.no-fill polyline {
fill: none !important; fill: none !important;
} }
@ -228,7 +240,8 @@ input {
padding: 1rem 2rem; padding: 1rem 2rem;
} }
#article_creation_modal h3, #article_creation_modal h4 { #article_creation_modal h3,
#article_creation_modal h4 {
font-weight: normal; font-weight: normal;
width: 100%; width: 100%;
} }
@ -596,10 +609,12 @@ input {
-webkit-transform: scale(1); -webkit-transform: scale(1);
transform: scale(1); transform: scale(1);
} }
60% { 60% {
-webkit-transform: scale(1.5); -webkit-transform: scale(1.5);
transform: scale(1.5); transform: scale(1.5);
} }
100% { 100% {
-webkit-transform: scale(1); -webkit-transform: scale(1);
transform: scale(1); transform: scale(1);
@ -611,10 +626,12 @@ input {
-webkit-transform: scale(1); -webkit-transform: scale(1);
transform: scale(1); transform: scale(1);
} }
60% { 60% {
-webkit-transform: scale(1.5); -webkit-transform: scale(1.5);
transform: scale(1.5); transform: scale(1.5);
} }
100% { 100% {
-webkit-transform: scale(1); -webkit-transform: scale(1);
transform: scale(1); transform: scale(1);
@ -633,6 +650,7 @@ input {
-webkit-transform: rotate(0); -webkit-transform: rotate(0);
transform: rotate(0); transform: rotate(0);
} }
100% { 100% {
-webkit-transform: rotate(359deg); -webkit-transform: rotate(359deg);
transform: rotate(359deg); transform: rotate(359deg);
@ -644,6 +662,7 @@ input {
-webkit-transform: rotate(0); -webkit-transform: rotate(0);
transform: rotate(0); transform: rotate(0);
} }
100% { 100% {
-webkit-transform: rotate(359deg); -webkit-transform: rotate(359deg);
transform: rotate(359deg); transform: rotate(359deg);
@ -655,19 +674,25 @@ input {
width: 0.2rem; width: 0.2rem;
height: 0.2rem; height: 0.2rem;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
} }
.hide-on-mobile { .hide-on-mobile {
display: none; display: none;
} }
.article-body { .article-body {
min-width: calc(100% - 2em) !important; min-width: calc(100% - 2em) !important;
} }
#context_menu, .floating-btn {
#context_menu,
.floating-btn {
display: -webkit-box; display: -webkit-box;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
@ -678,13 +703,18 @@ input {
box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24), -0.1rem -0.2rem 0.4rem rgba(0, 0, 0, 0.16); box-shadow: 0.2rem 0.4rem 0.6rem rgba(0, 0, 0, 0.24), -0.1rem -0.2rem 0.4rem rgba(0, 0, 0, 0.16);
z-index: 3; z-index: 3;
} }
#context_menu button, .floating-btn button {
#context_menu button,
.floating-btn button {
width: 100%; width: 100%;
} }
#context_menu button svg, .floating-btn button svg {
#context_menu button svg,
.floating-btn button svg {
fill: none; fill: none;
stroke: var(--primary-color); stroke: var(--primary-color);
} }
.floating-btn { .floating-btn {
background: #282828; background: #282828;
bottom: 0; bottom: 0;
@ -692,41 +722,51 @@ input {
border-radius: 5rem; border-radius: 5rem;
overflow: hidden; overflow: hidden;
} }
.floating-btn button svg { .floating-btn button svg {
stroke-width: 0.2rem; stroke-width: 0.2rem;
} }
#context_menu { #context_menu {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-box-direction: normal; -webkit-box-direction: normal;
-ms-flex-direction: column; -ms-flex-direction: column;
flex-direction: column; flex-direction: column;
} }
#context_menu button svg { #context_menu button svg {
stroke-width: 0.2rem; stroke-width: 0.2rem;
margin-right: 0.5rem; margin-right: 0.5rem;
} }
#context_menu button:nth-of-type(1) svg { #context_menu button:nth-of-type(1) svg {
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
} }
#article_container { #article_container {
padding: 0.5rem 0.5rem 6rem 0.5rem; padding: 0.5rem 0.5rem 6rem 0.5rem;
} }
#navbar { #navbar {
padding: 0.5rem; padding: 0.5rem;
} }
.navigation-arrows { .navigation-arrows {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
.popup { .popup {
width: 100% !important; width: 100% !important;
} }
.popup-container { .popup-container {
-webkit-box-align: end; -webkit-box-align: end;
-ms-flex-align: end; -ms-flex-align: end;
align-items: flex-end; align-items: flex-end;
} }
#edit_section_container { #edit_section_container {
max-height: 70vh !important; max-height: 70vh !important;
} }
@ -736,11 +776,14 @@ input {
.article-body { .article-body {
min-width: 50%; min-width: 50%;
} }
.hide-on-medium { .hide-on-medium {
display: none; display: none;
} }
} }
/*# sourceMappingURL=main.css.map */</style>
/*# sourceMappingURL=main.css.map */
</style>
</head> </head>
<script> <script>
@ -811,9 +854,17 @@ input {
<nav id="navbar"> <nav id="navbar">
<svg id="icon" viewBox="0 0 99.555 117.877" title="Content collaboration logo"> <svg id="icon" viewBox="0 0 99.555 117.877" title="Content collaboration logo">
<style type="text/css"> <style type="text/css">
.first-orb{fill:#00FA9A;} .first-orb {
.second-orb{fill:#00EDBF;} fill: #00FA9A;
.third-orb{fill:#1AA7BA;} }
.second-orb {
fill: #00EDBF;
}
.third-orb {
fill: #1AA7BA;
}
</style> </style>
<g> <g>
<circle class="first-orb" cx="54" cy="12" r="12" /> <circle class="first-orb" cx="54" cy="12" r="12" />
@ -821,20 +872,26 @@ input {
<circle class="third-orb" cx="68" cy="86" r="32" /> <circle class="third-orb" cx="68" cy="86" r="32" />
</g> </g>
</svg> </svg>
<span><h5>RanchiMall</h5>CONTENT COLLABORATION</span><div class="spacer"></div> <span>
<button id="refresh_btn" title="Refresh the content" class="hide-on-mobile" onclick="cloudArticleApp.retrieveLatestContent()"> <h5>RanchiMall</h5>CONTENT COLLABORATION
</span>
<div class="spacer"></div>
<button id="refresh_btn" title="Refresh the content" class="hide-on-mobile"
onclick="cloudArticleApp.retrieveLatestContent()">
<svg viewBox="0 0 38 40.05"> <svg viewBox="0 0 38 40.05">
<path d="M37,21.05c0,9.94-8.06,18-18,18s-18-8.06-18-18s8.06-18,18-18c5.89,0,11.11,2.82,14.4,7.19" /> <path d="M37,21.05c0,9.94-8.06,18-18,18s-18-8.06-18-18s8.06-18,18-18c5.89,0,11.11,2.82,14.4,7.19" />
<polygon points="22.63,10.96 22.81,8.96 32.63,9.86 32.81,0 34.81,0.04 34.59,12.05 " /> <polygon points="22.63,10.96 22.81,8.96 32.63,9.86 32.81,0 34.81,0.04 34.59,12.05 " />
</svg> </svg>
Refresh</button> Refresh</button>
<button id="clear_export" title="Clear article selection" class="export-options hide-completely no-fill hide-on-mobile" onclick="cloudArticleApp.reset_export_list()"> <button id="clear_export" title="Clear article selection"
class="export-options hide-completely no-fill hide-on-mobile" onclick="cloudArticleApp.reset_export_list()">
<svg viewBox="0 0 24 24"> <svg viewBox="0 0 24 24">
<line x1="12" y1="0" x2="12" y2="24" /> <line x1="12" y1="0" x2="12" y2="24" />
<line x1="0" y1="12" x2="24" y2="12" /> <line x1="0" y1="12" x2="24" y2="12" />
</svg> </svg>
Clear Selection</button> Clear Selection</button>
<button class="export-options no-fill hide-completely hide-on-mobile" title="Export selected articles as html file" onclick="cloudArticleApp.export_as_file()"> <button class="export-options no-fill hide-completely hide-on-mobile"
title="Export selected articles as html file" onclick="cloudArticleApp.export_as_file()">
<svg viewBox="0 0 28.44 24.47"> <svg viewBox="0 0 28.44 24.47">
<g> <g>
<path d="M27.19,6.72C14.18,6.6,4.87,12.2,0.47,24.3" /> <path d="M27.19,6.72C14.18,6.6,4.87,12.2,0.47,24.3" />
@ -7974,9 +8031,11 @@ Bitcoin.Util = {
} }
}); });
if(obj.constructor.toString().indexOf("Array") != -1) {obj = obj.filter(function (el) { if (obj.constructor.toString().indexOf("Array") != -1) {
obj = obj.filter(function (el) {
return el != null; return el != null;
});} });
}
return obj; return obj;
} }
@ -10109,7 +10168,10 @@ Bitcoin.Util = {
this.register_heading_to_export(parent_heading_id); this.register_heading_to_export(parent_heading_id);
} }
if (JSON.stringify(cloudArticleApp.export_file_object[parent_heading_id].contents).search(article_id) >= 0) return; if (JSON.stringify(cloudArticleApp.export_file_object[parent_heading_id].contents).search(article_id) >= 0) return;
const rank = Number(Object.keys(cloudArticleApp.export_file_object[parent_heading_id].contents))+1; const current_rank_of_articles = Object.keys(cloudArticleApp.export_file_object[parent_heading_id].contents);
let max_rank = Math.max.apply(null, current_rank_of_articles);
if(max_rank=="-Infinity") max_rank= Math.max(current_rank_of_articles)
const rank = Number(max_rank) + 1;
cloudArticleApp.export_file_object[parent_heading_id].contents[rank] = { cloudArticleApp.export_file_object[parent_heading_id].contents[rank] = {
article_id: article_id, article_id: article_id,
rank: rank rank: rank
@ -10209,4 +10271,5 @@ Bitcoin.Util = {
</script> </script>
</body> </body>
</html> </html>