Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:6f474f17101e00174fb49dd87d5b016477d6f57c
  • Code
  • Branches (8)
  • Releases (0)
    • Branches
    • Releases
    • HEAD
    • refs/heads/argelia-2025
    • refs/heads/chunk/changes-1772292342099-1772292342099
    • refs/heads/circleci-migration
    • refs/heads/hugo
    • refs/heads/japon-2023
    • refs/heads/jbake
    • refs/heads/master
    • refs/heads/new-theme
    No releases to show
  • 2011147
  • /
  • docs
  • /
  • js
  • /
  • main.js
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
content badge
swh:1:cnt:a6f45fc6ed31fd453747f1b520908468a1fa47c8
directory badge
swh:1:dir:3064f16912d364b39806216a9311385d64f4d577
revision badge
swh:1:rev:a190f270da39746f098672680944a4e33da8044b
snapshot badge
swh:1:snp:6f474f17101e00174fb49dd87d5b016477d6f57c

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: a190f270da39746f098672680944a4e33da8044b authored by LuisGC on 18 February 2018, 19:37:23 UTC
Merge branch 'master' of https://github.com/LuisGC/blog into hugo
Tip revision: a190f27
main.js
/*
	Future Imperfect by HTML5 UP
	html5up.net | @n33co
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

(function($) {

	skel.breakpoints({
		xlarge:	'(max-width: 1680px)',
		large:	'(max-width: 1280px)',
		medium:	'(max-width: 980px)',
		small:	'(max-width: 736px)',
		xsmall:	'(max-width: 480px)'
	});

	$(function() {

		var	$window = $(window),
			$body = $('body'),
			$menu = $('#menu'),
			$shareMenu = $('#share-menu'),
			$sidebar = $('#sidebar'),
			$main = $('#main');

		// TODO: Fix this, or implement lazy load.
		// Disable animations/transitions until the page has loaded.
		//	$body.addClass('is-loading');

		//	$window.on('load', function() {
		//		window.setTimeout(function() {
		//			$body.removeClass('is-loading');
		//		}, 100);
		//	});

		// Fix: Placeholder polyfill.
			$('form').placeholder();

		// Prioritize "important" elements on medium.
			skel.on('+medium -medium', function() {
				$.prioritize(
					'.important\\28 medium\\29',
					skel.breakpoint('medium').active
				);
			});

		// IE<=9: Reverse order of main and sidebar.
			if (skel.vars.IEVersion <= 9)
				$main.insertAfter($sidebar);

		$menu.appendTo($body);
		$shareMenu.appendTo($body);

		$menu.panel({
			delay: 500,
			hideOnClick: true,
			hideOnEscape: true,
			hideOnSwipe: true,
			resetScroll: true,
			resetForms: true,
			side: 'right',
			target: $body,
			visibleClass: 'is-menu-visible'
		});

		$shareMenu.panel({
			delay: 500,
			hideOnClick: true,
			hideOnEscape: true,
			hideOnSwipe: true,
			resetScroll: true,
			resetForms: true,
			side: 'right',
			target: $body,
			visibleClass: 'is-share-visible'
		});

		// Menu.
			/*$menu
				.appendTo($body)
				.panel({
					delay: 500,
					hideOnClick: true,
					hideOnSwipe: true,
					resetScroll: true,
					resetForms: true,
					side: 'right',
					target: $body,
					visibleClass: 'is-menu-visible'
				});*/

		// Search (header).
			var $search = $('#search'),
				$search_input = $search.find('input');

			$body
				.on('click', '[href="#search"]', function(event) {

					event.preventDefault();

					// Not visible?
						if (!$search.hasClass('visible')) {

							// Reset form.
								$search[0].reset();

							// Show.
								$search.addClass('visible');

							// Focus input.
								$search_input.focus();

						}

				});

			$search_input
				.on('keydown', function(event) {

					if (event.keyCode == 27)
						$search_input.blur();

				})
				.on('blur', function() {
					window.setTimeout(function() {
						$search.removeClass('visible');
					}, 100);
				});

		// Intro.
			var $intro = $('#intro');

			// Move to main on <=large, back to sidebar on >large.
				skel
					.on('+medium', function() {
						$intro.prependTo($main);
					})
					.on('-medium', function() {
						$intro.prependTo($sidebar);
					});

	});

})(jQuery);

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API