From f6011034ccdecf9384ef4188bc8eb44b35374921 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Wed, 4 Dec 2019 21:13:35 +0530 Subject: [PATCH 01/14] Update source-browser.html Adding sticky headings --- source-browser.html | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/source-browser.html b/source-browser.html index 75cf389..264abbd 100644 --- a/source-browser.html +++ b/source-browser.html @@ -1,3 +1,4 @@ + @@ -39,6 +40,17 @@ max-width: 200px; width: max-content; } + .sticky { + width: 100%; + background-color: white; + z-index: 1; + } + +.sticky.stick { + position: fixed; + top: 80px; + z-index: 10000; +} @@ -131,13 +143,14 @@

$('#topics').append( $('
').append( - $('
').append( + $('
'), + $('
').append( $('

').text(name), $('🔗', { href: repoUrl, }), - ), $('
'), + ), repoList, ), ); @@ -180,7 +193,7 @@

.removeClass('display-none') .focus(); } - + $(document).ready(() => { $('#github-link').attr('href', `https://github.com/${ORGANIZATION}`); $('#refresh').click(({ currentTarget }) => { @@ -204,6 +217,20 @@

setInterval(refreshTopics, EXPIRY_MILLIS * 2); showTopics(); + function sticky_relocate() { + var window_top = $(window).scrollTop(); + var div_top = $('#sticky-anchor').offset().top; + if (window_top + 76 > div_top) { + $('.sticky').addClass('stick'); + } else { + $('.sticky').removeClass('stick'); + } + } + +$(function() { + $(window).scroll(sticky_relocate); + sticky_relocate(); +}); }); From 8de001dd6c1e5d6f2ebf9200686e880e47ec6241 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Thu, 5 Dec 2019 19:48:29 +0530 Subject: [PATCH 02/14] Fixed Issue Made a side menu bar containing topics --- source-browser.html | 471 ++++++++++++++++++++++++-------------------- 1 file changed, 257 insertions(+), 214 deletions(-) diff --git a/source-browser.html b/source-browser.html index 264abbd..4adee5a 100644 --- a/source-browser.html +++ b/source-browser.html @@ -1,237 +1,280 @@ - - + + Apertium Source Browser - - + + - - + + +
-

-
+

+ +
+
+
+
🔄 - + - + + From b0ef292e3fc169e30c14d571ddbfe838fd0e50e0 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Fri, 6 Dec 2019 12:17:50 +0530 Subject: [PATCH 03/14] Fixed the issue Topics hidden can be seen in bottom now. and further more developments are done. --- source-browser.html | 478 +++++++++++++++++++++----------------------- 1 file changed, 229 insertions(+), 249 deletions(-) diff --git a/source-browser.html b/source-browser.html index 4adee5a..e47172d 100644 --- a/source-browser.html +++ b/source-browser.html @@ -1,280 +1,260 @@ + - - + Apertium Source Browser - - + + + + + +
+

+
+
+ 🔄 - #logo-text { - color: #808080; - font-family: 'DejaVu Sans', 'DejaVu Sans Fallback', 'Arial #000', Arial; - font-size: 2.25em; - margin-left: -10px; - } + + + + + - - + $('#topics, #loading').toggleClass('display-none'); + + } + + function refreshTopics() { + localStorage.clear(); + showTopics(); + } + + function showSearchInput() { + $('#search') + .removeClass('display-none') + .focus(); + } + + $(document).ready(() => { + $('#github-link').attr('href', `https://github.com/${ORGANIZATION}`); + $('#refresh').click(({ currentTarget }) => { + currentTarget.blur(); + refreshTopics(); + }); + + $('#search').on('input', showTopics); + $(document.body).keypress(({ target, altKey, ctrlKey, metaKey, key }) => { + if (target === document.body && !altKey && !ctrlKey && !metaKey) { + showSearchInput(); + } + }); + $(window).keydown(event => { + const { keyCode, ctrlKey, metaKey } = event; + if (keyCode === 114 || ((ctrlKey || metaKey) && keyCode === 70)) { + event.preventDefault(); + showSearchInput(); + } + }); + + setInterval(refreshTopics, EXPIRY_MILLIS * 2); + showTopics(); + + }); + + From a39f693dcfaab7acd2b9380a66fcf54e82f8935d Mon Sep 17 00:00:00 2001 From: Maathavan Date: Fri, 6 Dec 2019 19:37:04 +0530 Subject: [PATCH 04/14] Fixed hidden refresh button! --- source-browser.html | 254 ++++++++++++++++++++++---------------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/source-browser.html b/source-browser.html index e47172d..aceb61e 100644 --- a/source-browser.html +++ b/source-browser.html @@ -17,7 +17,7 @@ height: 78vh; } #logo-text { - color: #808080; + color: #a71313; font-family: 'DejaVu Sans', 'DejaVu Sans Fallback', 'Arial #000', Arial; font-size: 2.25em; margin-left: -10px; @@ -46,7 +46,6 @@ top: 85px; z-index: 100; background-color: white; - width: 100%; } .stickyb { position: fixed; @@ -55,6 +54,9 @@ background-color: white; width: 100%; } + #refresh { + z-index: 1000; + } @@ -92,7 +94,7 @@

}, 100); setInterval(function(){ $( ".repos" ).each(function(index) { - var h = $( window ).height() + 20; + var h = $( window ).height() + 10; if ($( this ).position().top < 140) { $( this ).prev().addClass("sticky"); } @@ -110,151 +112,149 @@

From 1c48c272ffcbd1b9b72892d8e864b0ac027a7e56 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Fri, 6 Dec 2019 19:41:00 +0530 Subject: [PATCH 05/14] Update source-browser.html --- source-browser.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source-browser.html b/source-browser.html index aceb61e..0e2fd4d 100644 --- a/source-browser.html +++ b/source-browser.html @@ -46,6 +46,7 @@ top: 85px; z-index: 100; background-color: white; + width:100%; } .stickyb { position: fixed; @@ -186,7 +187,7 @@

href: repoUrl, }), - $('
'), + $('
'), ), repoList, ), From 3b5f2323ece8c37bb95a2dde4335471807b7c6bd Mon Sep 17 00:00:00 2001 From: Maathavan Date: Fri, 6 Dec 2019 19:45:54 +0530 Subject: [PATCH 06/14] Change to old style Changed to old coding style removed spaces --- source-browser.html | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source-browser.html b/source-browser.html index 0e2fd4d..1347ced 100644 --- a/source-browser.html +++ b/source-browser.html @@ -1,4 +1,3 @@ - @@ -84,28 +83,28 @@

- + + - - From e5a4b86403f87b1bc4dc3357b73faba9252fd807 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Fri, 6 Dec 2019 21:13:32 +0530 Subject: [PATCH 08/14] More fixes --- source-browser.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source-browser.html b/source-browser.html index e87be99..69bbbd8 100644 --- a/source-browser.html +++ b/source-browser.html @@ -53,6 +53,7 @@ z-index: 100; background-color: rgb(235, 235, 235); opacity: 0.75; + height: fit-content; width: 20%; } #refresh { @@ -95,19 +96,24 @@

$(this).removeClass('sticky'); } }); - }, 10); + }, 50); setInterval(function(){ $('.repos').each(function(index) { - var h = $(window).height() + 10; if ($(this).position().top < 140) { $(this).prev().addClass('sticky'); } - else if ($(this).position().top > h) { + else { + $(this).prev().removeClass('sticky'); + } + }); + }, 10); + setInterval(function(){ + $('.repos').each(function(index) { + var h = $(window).height() + 10; + if ($(this).position().top > h) { $(this).prev().addClass('stickyb'); } else { - $(this).prev().removeClass('sticky'); - $(this).prev().removeClass('stickyb'); } }); @@ -176,7 +182,7 @@

$('🔗', { href: repoUrl, }), - $('
'), + $('
'), ), repoList, ), From af66e1717cc185f6af57ce39546daad6c150cff4 Mon Sep 17 00:00:00 2001 From: Maathavan Date: Sat, 7 Dec 2019 07:24:11 +0530 Subject: [PATCH 09/14] Further more fixes --- source-browser.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source-browser.html b/source-browser.html index 69bbbd8..dc42403 100644 --- a/source-browser.html +++ b/source-browser.html @@ -13,7 +13,6 @@ #content { margin-top: 130px; overflow-x: hidden; - height: 78vh; } #logo-text { color: #808080; @@ -54,7 +53,7 @@ background-color: rgb(235, 235, 235); opacity: 0.75; height: fit-content; - width: 20%; + width: 23%; } #refresh { z-index: 1000; @@ -66,7 +65,7 @@ -
+