PageSourceSearch

https://deltami.edu.pl/static/js/article.js

js deltami.edu.pl collected 2026-10-02 07:07:23 UTC 3,430 bytes, 95 lines download raw bytes

1/* WERSJA 26.05.2026 */
2// po kliknięciu w obrazek na marginesie pojawia się fullscreen modal
3
4/* WERSJA 22.12.2023 */
5// plik z funkcjami do tresci artykulow (przesuwa blockquote na margines oraz chowa i robi chowalne wskazowki)
6
7$( document ).ready(function() {
8	  if ($(window).width() >= 1150) {
9	  	  var i=0;
10	  	  var bottom = 0;
11		  $('.article-input-main-text .span-blockquote-ref').each(function() {
12				var blockid = $(this).attr('id').substring(5);
13				var blockquote = $('blockquote#'+blockid);
14				$('.article-input-margin').append(blockquote);
15	  		    blockquote.hide();
16		  });
17
18  		  setTimeout(() => {
19			  	$('p').each(function() {
20					console.log("WINDA: "+$(window).width());
21					console.log("JA _ PRZED  "+$(this).width());
22					if ($(this).width() > $( window ).width()) $(this).width($(window).width());
23					console.log("JA _ PO "+$(this).width());
24				});
25			
26			    var bottom=0;
27		  	    $('span.span-blockquote-ref').each(function() {
28					var blockid = $(this).attr('id').substring(5);
29					var blockquote = $('blockquote#'+blockid);
30					var position = $(this).position();
31				  	var topik = position.top-25;
32				  	var where = (topik < bottom ? bottom : topik);
33				  	blockquote.css({position: "absolute", top: where});
34					blockquote.position(where);
35					blockquote.show();
36				    bottom = where + blockquote.outerHeight(true) + 10;
37				})
38	  		    $('.article-input-margin').show('slow');
39	  		    
40				if ($('.article-input-div').position().top + $('.article-input-div').outerHeight() < bottom+200)
41					if ($('.article-input-div').outerHeight() < bottom - $('.article-input-div').position().top)
42	  				    $('.article-input-div').height(bottom - $('.article-input-div').position().top);
43  		  },500)
44
45	  } else {
46		  	$('.article-input-main-text > p').each(function() {
47				if ($(this).width() > $( window ).width()-60) {
48					$(this).width($(window).width()-60);
49				}
50			});
51		  	$('.article-input-main-text blockquote').each(function() {
52				if ($(this).width() > $( window ).width()-120) {
53					$(this).width($(window).width()-120);
54				}
55			});
56		  	$('.article-input-main-text div').each(function() {
57				if ($(this).width() > $( window ).width()-60) {
58					$(this).width($(window).width()-60);
59				}
60			});
61	  }
62  
63	$(function() {
64		$('section.expandable > div.content-wrapper').hide();
65		$('section.expandable > header').click(function(){
66			$(this).parents('section.expandable').find('div.content-wrapper').toggle();});
67
68		$('div.exercise > div.answer-content').hide();
69		$('div.exercise > header.answer').click(function(){
70			console.log("KLIK!");
71			$(this).parents('div.exercise').find('div.answer-content').toggle('fast');});
72	});
73
74	// fullscreen lightbox dla wszystkich obrazkow w artykule (desktop only)
75	// wykluczamy img.math-inline (drobne rownania).
76	// uzywamy .click() + natywnego addEventListener bo strona dziala na
77	// starej jQuery (<1.7) bez .on()/.off()
78	if ($(window).width() >= 1150) {
79		$('.article-input img').not('.math-inline').click(function() {
80			var overlay = $('<div class="image-lightbox"></div>');
81			overlay.append($('<img>').attr('src', $(this).attr('src')));
82			function onKey(e) {
83				if (e.key === 'Escape') close();
84			}
85			function close() {
86				overlay.remove();
87				document.removeEventListener('keydown', onKey);
88			}
89			overlay.click(close);
90			document.addEventListener('keydown', onKey);
91			$('body').append(overlay);
92		});
93	}
94})
95

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.