Skip to content

Commit

Permalink
default images
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudipta Kar committed Sep 21, 2024
1 parent a7079ec commit 6af6f3c
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 97 deletions.
Binary file added img/april.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/august.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/july.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/june.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/november.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/october.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/september.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 57 additions & 71 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,83 +205,69 @@ <h1 class="my-3"><strong class="text-dark" href="#">2021</strong></h1>
return splits[0] + '-' + splits[1] + '-01'
}

for (let i = 0; i < months.length; i++) {
(function(i) {
const k = months[i][0];
const month = k.split('/')[1];
const year = k.split('/')[0];
const v = "iterations/" + k + "/banner.png";
const imgpath = "banner.png";
const dir = "iterations/";

$.ajax({
url: v,
type: 'HEAD',
error: function() {
const v = "img/" + month + ".png";
console.log(">>>" + v);
},
success: function() {}
});

console.log("<<<>>>," + v);

for (i=0; i < months.length; i++) {
var submissions = 0
var review_progress = 0
var meta_progress = 0
var k = months[i][0]
var month = k.split('/')[1]
var year = k.split('/')[0]
var v = months[i][1] //"iterations/"+k+"/banner.png"
var imgpath = "banner.png"
const dir = "iterations/"

$.ajax({
dataType: "json",
url: dir + k + '/dashboard_stats.json',
async: false,
success: function(data) {
const submissions = data['submissions'];
const resubmissions = data['resubmissions'];
const review_progress = data['rev-progress'];
const meta_progress = data['meta-progress'];
const iteration = data['iteration'];
const update_date = formatDate(parseDate(data['update-date']));
const sub_deadline = data['submission-deadline'];

total_subs.push({ 'submissions': submissions, 'month': parseDate(dtom(sub_deadline)) });
total_resubs.push({ 'submissions': resubmissions, 'month': parseDate(dtom(sub_deadline)) });

const ae_pool = data['ae-pool'];
const rev_pool = data['rev-pool'];
const ae_assigned = data['ae-assigned'];
const rev_assigned = data['rev-assigned'];
aes.push({ 'total': ae_pool, 'assigned': ae_assigned, 'month': parseDate(dtom(sub_deadline)) });
revs.push({ 'total': rev_pool, 'assigned': rev_assigned, 'month': parseDate(dtom(sub_deadline)) });

const requested_revs = data['requested-revs'];
const returned_revs = data['returned-revs'];
const requested_mrevs = data['requested-mrevs'];
const returned_mrevs = data['returned-mrevs'];
reviews.push({ 'requested': requested_revs, 'returned': returned_revs, 'month': parseDate(dtom(sub_deadline)) });
mreviews.push({ 'requested': requested_mrevs, 'returned': returned_mrevs, 'month': parseDate(dtom(sub_deadline)) });

const html = `
<div class="col-lg-4 col-md-12">
<a href="/${dir}${k}/">
<div class="card img-fluid flex-md-row mb-4 shadow h-md-250 monthcard">
<img class="card-img-top" src="${v}">
<div class="card-img-overlay">
<div class="card-body d-flex flex-column align-items-start align-self-end">
<h2 class="mb-0">
<strong class="text-dark" href="#">${iteration}</strong>
</h2>
<h6 class="mt-2 card-text text-dark mb-auto">Submissions: ${submissions}<br>Paper Progress: ${review_progress}%<br>Meta Review Progress: ${meta_progress}%</h6>
<p class="text-muted font-italic">(Updated on: ${update_date})</p>
</div>
</div>
</div>
</a>
</div>
`;

$(`#iterations-${year}`).append(html);
},
error: function(xhr, status, error) {
console.error("Error fetching dashboard_stats.json: " + error);
submissions = data['submissions']
resubmissions = data['resubmissions']
review_progress = data['rev-progress']
meta_progress = data['meta-progress']
iteration = data['iteration']
update_date = formatDate(parseDate(data['update-date']))

sub_deadline = data['submission-deadline']
total_subs.push({'submissions':submissions, 'month': parseDate(dtom(sub_deadline))})
total_resubs.push({'submissions':resubmissions, 'month': parseDate(dtom(sub_deadline))})

ae_pool = data['ae-pool']
rev_pool = data['rev-pool']
ae_assigned = data['ae-assigned']
rev_assigned = data['rev-assigned']
aes.push({'total': ae_pool, 'assigned': ae_assigned, 'month': parseDate(dtom(sub_deadline))})
revs.push({'total': rev_pool, 'assigned': rev_assigned, 'month': parseDate(dtom(sub_deadline))})

requested_revs = data['requested-revs']
returned_revs = data['returned-revs']
requested_mrevs = data['requested-mrevs']
returned_mrevs = data['returned-mrevs']
reviews.push({'requested': requested_revs, 'returned': returned_revs, 'month': parseDate(dtom(sub_deadline))})
mreviews.push({'requested': requested_mrevs, 'returned': returned_mrevs, 'month': parseDate(dtom(sub_deadline))})

$('#iterations' + '-' + year).append(`
<div class="col-lg-4 col-md-12">
<a href="/` + dir + k + `/">
<div class="card img-fluid flex-md-row mb-4 shadow h-md-250 monthcard">
<img class="card-img-top" src="` + v + `">
<div class="card-img-overlay">
<div class="card-body d-flex flex-column align-items-start align-self-end">
<h2 class="mb-0">
<strong class="text-dark" href="#">` + iteration + `</strong>
</h2>
<!-- <div class="mb-1 text-muted">Nov 12</div> -->
<h6 class="mt-2 card-text text-dark mb-auto">Submissions: ` + submissions + ` <br> Paper Progress: ` + review_progress + `% <br> Meta Review Progress: ` + meta_progress + `%</h6><p class="text-muted font-italic">(Updated on: ` + update_date + `)</p>
<!-- <a href="#">Continue reading</a> -->
</div>
</div>
</div>
</a>
</div>
`);
}
});
})(i);
}
};

$(function () {
$.each(document.images, function () {
Expand Down
52 changes: 26 additions & 26 deletions months.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"2024/june": "https://source.unsplash.com/mowl8OWbJmo",
"2024/april": "https://source.unsplash.com/mowl8OWbJmo",
"2024/february": "https://source.unsplash.com/mowl8OWbJmo",
"2023/december": "https://source.unsplash.com/UdWyfXgKOwA",
"2023/october": "https://source.unsplash.com/AYtup7uqimA",
"2023/august": "https://source.unsplash.com/JJotD38ZBTQ",
"2023/june": "https://source.unsplash.com/zWEwJjHmGJE",
"2023/april": "https://source.unsplash.com//TRhGEGdw-YY",
"2023/february": "https://source.unsplash.com/G_6kPyje9Lk",
"2022/december": "https://source.unsplash.com/6K_WE8FB3bE",
"2022/october": "https://source.unsplash.com/50hhiZf9vI0",
"2022/september": "https://source.unsplash.com/x8VBHZNmeEk",
"2022/july": "https://source.unsplash.com/R4_gzG6bjg8",
"2022/june": "https://source.unsplash.com/0nKRq0IknHw",
"2022/april": "https://source.unsplash.com/reU05EIlNCQ",
"2022/march": "https://source.unsplash.com/o9fQZdtbevE",
"2022/february": "https://source.unsplash.com/AvFmvIxdF14",
"2022/january": "https://source.unsplash.com/jxOl9hzHrME",
"2021/december": "https://source.unsplash.com/OsNQITphjQQ",
"2021/november": "https://source.unsplash.com/vLbtQEx64RU",
"2021/october": "https://source.unsplash.com/zeInZepl_Hw",
"2021/september": "https://source.unsplash.com/uN0bkEFyhJ8",
"2021/august": "https://source.unsplash.com/znT5MmTjASY",
"2021/july": "https://source.unsplash.com/FCxrLk4-WVY",
"2021/june": "https://source.unsplash.com/RWeO3t9FxG0",
"2021/may": "https://source.unsplash.com/BxT5oqgztNc"
"2024/june": "iterations/2024/june/banner.png",
"2024/april": "img/april.png",
"2024/february": "iterations/2024/february/banner.png",
"2023/december": "iterations/2024/december/banner.png",
"2023/october": "iterations/2024/october/banner.png",
"2023/august": "iterations/2024/august/banner.png",
"2023/june": "img/june.png",
"2023/april": "img/april.png",
"2023/february": "img/february.png",
"2022/december": "img/december.png",
"2022/october": "img/october.png",
"2022/september": "img/september.png",
"2022/july": "img/july.png",
"2022/june": "img/june.png",
"2022/april": "img/april.png",
"2022/march": "img/march.png",
"2022/february": "img/february.png",
"2022/january": "img/january.png",
"2021/december": "img/december.png",
"2021/november": "img/november.png",
"2021/october": "img/october.png",
"2021/september": "img/september.png",
"2021/august": "img/august.png",
"2021/july": "img/july.png",
"2021/june": "img/june.png",
"2021/may": "img/may.png"
}

0 comments on commit 6af6f3c

Please sign in to comment.