Imanuel's website

FWD? – Functional WebDoc language

Have you ever tried making a good looking web page from scratch? If you have, you might already have come to know that besides HTML, there are more languages you need to learn... At some point you'll need to learn how to use HTML, CSS, JavaScript and PHP. That's a lot of languages!

That made me ask myself this question, "Why isn't there just one language to get all things done? Wouldn't that make things much easier?" So then I started designing a new language. In fact, the page you're reading right now is written in FWD (pronounce as 'forward').

7 June 2020 – I just found this documentation I had made for the language, before I had even started developing the real thing! Concept Language (Introduction)


Appendix

Here is the source for this page (fwd-intro.fwd):

"Imanuel's website"
	(→ site-title →)
"FWD?"
	(→ page-title-short →)
"Functional WebDoc language"
	(→ page-title →)
"wide"
	(→ page-class →)

[
	[	
		[	
			"Have you ever tried making a good looking web page from scratch? If you have, you might already have come to know that besides HTML, there are more languages you need to learn... At some point you'll need to learn how to use HTML, CSS, JavaScript and PHP. That's a lot of languages!"
			"That made me ask myself this question, \"Why isn't there just one language to get all things done? Wouldn't that make things much easier?\" So then I started designing a new language. In fact, the page you're reading right now is written in FWD (pronounce as 'forward')."
			[ "7 June 2020 – " (i) "I just found this documentation I had made for the language, before I had even started developing the real thing! " "Concept Language (Introduction)" (a href "/concept-language/Introduction" a) ] (font-size ".85em"; font-weight "bold")
		] (p multi)
	]
		(section margin-bottom "10em" section)
	
	hr
	[	
		"Appendix" (h3)
		"Here is the source for this page (fwd-intro.fwd):" (p)
		fwd_source (pre "data-fwd" pre)
		"And here is the template, which contains the layout and the looks of the website (template.fwd):" (p)
		"template.fwd" (file) (pre "data-fwd" pre)
	]
		(section)
]
	(→ page-content →)

"template.fwd" (include)

And here is the template, which contains the layout and the looks of the website (template.fwd):

[	
	site-title (a href site-home (is_set) (ifte site-home; "/" ifte) a) (h1)
	"" (div)
	12 (repeat "" repeat) (div iterate) (div class "sk-circle" div)
	[	
		[ "nl-NL" "en-US" ] (a
			class "lang lang-" (+ [ "nl" "en" ]; " region region-"; [ "nl" "us" ] +);
			href [ "/nl/" "/en/" ] (+ link +);
		a)
	]
		(div class "language-select" div)
	page-title (= "" =) (ifte page-title-short; [page-title-short " – " page-title] (concat) ifte) (h2)
	page-content (concat)
	hr
	[	
		["Copyright © ""Y" (date)" Imanuel Habekotté"] (concat)
		["Page rendered on " (gettext) "d-m-Y \\a\\t H:i:s" (gettext) (date) ", it took " (gettext) execution_time " seconds" (gettext)] (concat)
	] (p multi)
		(section)
]
	(div id "content" div) (div id "wrapper"; class page-class (is_set) (ifte page-class; "" ifte) div) (document
		title [page-title-short " ⋄ " site-title " ⋄"] (join);
		favicon;
		stylesheets [
			page-stylesheets
			"/css/default.css"
			"/css/im-new.css"
			"/css/theme-number-5.css"
			"/css/common.css"
		];
		scripts [
			page-scripts
			"	window.addEventListener('scroll',function() {
					var elements = Array.prototype.slice.call(document.getElementsByTagName('pre'));
					document.body.style.backgroundPosition='calc('+(-.3*window.scrollX+window.innerWidth/2)+'px) calc('+(-.3*window.scrollY-document.body.offsetTop+window.innerHeight/2)+'px), center center';
					for(var i=0;i<elements.length;i+=1) {
						elements[i].style.backgroundPosition='calc('+(-.15*window.scrollX+window.innerWidth/2)+'px) calc('+(-.15*window.scrollY-elements[i].offsetTop+window.innerHeight/2)+'px)';
					}
				});
			" (script)
		];
		viewport "width=device-width, initial-scale=1.0";
	document)

Copyright © 2021 Imanuel Habekotté

Page rendered on 22-06-2021 at 12:55:27, it took 0.443717 seconds