All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.metreeca.mark.files.index.pug Maven / Gradle / Ivy

doctype html

- var organizationURL = project ? project.organization.url : ""
- var organizationName = project ? project.organization.name : ""

- var package = project ? project.name : ""
- var version = project ?  project.version.replace("-SNAPSHOT", "-*") : ""
- var summary = project ?  project.description.replaceFirst("\\.$", "") : ""

- var title = page.title
- var label = page.title ? page.title :  page.path == "index.html" ? summary : ""

- var logo = `background-image: url(${page.root}/index.svg)`

- var prism = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0" //- select from https://cdnjs.com/libraries/prism


html(lang="en")

	if page.canonical

		head

			title Redirecting… #{package ? " | " : ""} #{package}

			meta(name="viewport" content="width=device-width,initial-scale=1")
			meta(http-equiv="Content-Type" content="text/html; charset=UTF-8")
			meta(http-equiv="Refresh" content=`0; url=${page.canonical.0}`)

			link(rel="shortcut icon" href=`${page.root}/index.svg`)
			link(rel="canonical" href=page.canonical.0)

	else

		head

			title #{title} #{title && package ? " | " : ""} #{package}

			meta(name="viewport" content="width=device-width,initial-scale=1")
			meta(http-equiv="Content-Type" content="text/html; charset=UTF-8")

			link(rel="shortcut icon" href=`${page.root}/index.svg`)

			//- default stylesheet after prism.js to override it

			link(rel="stylesheet" href=`${prism}/themes/prism.min.css`)
			link(rel="stylesheet" type="text/css" href=`${page.root}/index.css`)

			script(type="text/javascript" src=`${prism}/components/prism-core.min.js`)
			script(type="text/javascript" src=`${prism}/plugins/autoloader/prism-autoloader.min.js`)
			script(type="text/javascript" src=`${page.root}/index.js`)

	body

		input(id="toggle" type="checkbox")

		nav

			header

				a(href=organizationURL title=organizationName style=logo)

				span
					a(href=page.root) #{package}

				label(for="toggle")

			section

				if label
					button(title="Scroll to Top" onclick="document.querySelector('main').scrollTo(0, 0); location.hash=''") #{label}

				for heading in page.headings
					#{"h"+heading.level}
						a(href="#"+heading.id) #{heading.text}

			footer

				if project.groupId == "com.metreeca"
					a(class="logo" href=organizationURL title=organizationName style=logo)

		main

			header

				nav
					include sections

				if version

					a(href=project.url) v#{version}

				label(for="toggle")

			section !{page.body}

			footer

				if project.groupId == "com.metreeca"
					| © #{page.date.substring(0, 4)} Metreeca srl. This work is licensed under the
					= ' '
					| #[a(href="https://creativecommons.org/licenses/by-nc-sa/4.0/") Creative Commons BY-NC-SA 4.0 License]




© 2015 - 2025 Weber Informatics LLC | Privacy Policy