Page MenuHomePhabricator

D676.id.diff
No OneTemporary

D676.id.diff

diff --git a/assets/js/banner.js b/assets/js/banner.js
deleted file mode 100644
--- a/assets/js/banner.js
+++ /dev/null
@@ -1,41 +0,0 @@
-(function () {
- var banner = document.getElementById('page-banner');
-
- if (!banner) { return; } //There's no banner.
-
- var img = banner.querySelector('img');
-
- var imgResize = function () {
- var sh = Math.max(banner.clientHeight, 400);
- var ih = img.clientHeight;
-
- img.style.marginTop = ((sh - ih) / 2) + 'px'; //This is always negative
- };
-
- var imgLoad = function () {
- imgResize();
- };
-
-
- img.addEventListener('load', imgLoad);
- window.addEventListener('resize', imgResize);
-
- if (img.complete) { imgLoad(); }
-
- //On scroll we do follow with the image
- document.addEventListener('scroll', function (e) {
- var scroll = e.pageY? e.pageY : window.pageYOffset;
- var offsetTop = 50;
- var top = scroll - offsetTop;
-
- if (top < 0) { top = 0; }
- img.style.top = ( top / 2) + 'px';
- });
-
- /*
- * By default we use the standard size to approximate the banner while loading.
- * Since these dimensions are better than anything we might get from the
- * user agent while loading.
- */
- imgResize();
-}());
\ No newline at end of file
diff --git a/bin/templates/people/following.php b/bin/templates/people/following.php
--- a/bin/templates/people/following.php
+++ b/bin/templates/people/following.php
@@ -80,5 +80,3 @@
<?= $pagination ?>
</div>
</div>
-
-<script type="text/javascript" src="<?= \spitfire\core\http\URL::asset('js/banner.js') ?>"></script>
diff --git a/bin/templates/people/follows.php b/bin/templates/people/follows.php
--- a/bin/templates/people/follows.php
+++ b/bin/templates/people/follows.php
@@ -80,5 +80,3 @@
<?= $pagination ?>
</div>
</div>
-
-<script type="text/javascript" src="<?= \spitfire\core\http\URL::asset('js/banner.js') ?>"></script>
\ No newline at end of file
diff --git a/bin/templates/user/show.php b/bin/templates/user/show.php
--- a/bin/templates/user/show.php
+++ b/bin/templates/user/show.php
@@ -99,7 +99,6 @@
</div>
</div>
-<script type="text/javascript" src="<?= \spitfire\core\http\URL::asset('js/banner.js') ?>"></script>
<script type="text/javascript" src="<?= \spitfire\core\http\URL::asset('js/follow_button.js') ?>"></script>
<script type="text/javascript">
(function () {

File Metadata

Mime Type
text/plain
Expires
Apr 11 2021, 8:43 AM (9 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7060
Default Alt Text
D676.id.diff (2 KB)

Event Timeline