necrophcodr.me  Check-in [b9d5ccf2cf]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove json related code.
Timelines: family | ancestors | descendants | both | develop
Files: files | file ages | folders
SHA1:b9d5ccf2cf5c7aa531f2eb3a47de2dc468bd1aab
User & Date: necrophcodr 2015-10-10 21:16:33
Context
2015-10-10
21:17
Remove reference to json bin. check-in: fb3c2cef67 user: necrophcodr tags: develop
21:16
Remove json related code. check-in: b9d5ccf2cf user: necrophcodr tags: develop
2015-08-17
11:48
Fix header not displaying menu. check-in: 3fc2b7487b user: necrophcodr tags: develop
Changes

Changes to Tupfile.

1
2
3
4
5
6
7
8
9
10
11
12
: foreach *.md | header.html footer.html |> sh markdown.sh %f |> \
	dist/%B.html dist/%B.jtml {dist}

: foreach *.md | {dist} |> sh json.sh %f > %o |> dist/%B.json {json}
: *.md |> sh json.sh %f > %o |> dist/sites.json {sites}

: foreach css/* |> cp -a %f %o |> dist/css/%b {css}
: foreach js/* |> cp -a %f %o |> dist/js/%b {js}

: foreach favicon.png ipv6.svg |> cp -a %f %o |> dist/%f {dist}
: {js} {json} {sites} {css} {dist} \
	|> cd dist; tar cf ../%o * |> dist.tar



<
<
<






1
2
3



4
5
6
7
8
9
: foreach *.md | header.html footer.html |> sh markdown.sh %f |> \
	dist/%B.html dist/%B.jtml {dist}




: foreach css/* |> cp -a %f %o |> dist/css/%b {css}
: foreach js/* |> cp -a %f %o |> dist/js/%b {js}

: foreach favicon.png ipv6.svg |> cp -a %f %o |> dist/%f {dist}
: {js} {json} {sites} {css} {dist} \
	|> cd dist; tar cf ../%o * |> dist.tar

Deleted js/app.js.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
var sites = [];
var site = "";

site = "index.md"
/*
function changeSite( site ) {
	console.log( site );
	$.ajax({
		type: 'GET',
		url: site+'.json',
		success: function( data ) {
			$(".page").empty();
			document.title = data.title + " - " + document.domain;
			$(".page").append( data.content );
			console.log( data );
		}
	});
}
*/
function addNavBtn( item ) {
	var li = $("<li />" );
	var navbtn = $("<a />", {
		href: item + ".html",
		id: "site-" + item,
		text: item
	});
	/*
	navbtn.on("click", function(e) {
		changeSite( item );
	});
	*/
	li.append( navbtn );
	$("ul").append( li );
}

$.ajax({
	type: 'GET',
	url: 'sites.json',
	success: function( data ) {
		sites = data.sites;
		addNavBtn( "index" );
		$.each( sites, function( index, item ) {
			if( item == "index" ) { return; }
			addNavBtn( item );
		});
		/*
	$(document).ready(function(){
		$("#site-index").click();
	});
	*/
	}
});



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted json.sh.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if [ "$#" -gt 1 ]; then
	SITES=""
	printf "{ \"sites\":["
	for f in $@; do
		if [ "x$SITES" = "x" ]; then
			SITES="\"${f%%.md}\""
		else
			SITES="$SITES, \"${f%%.md}\""
		fi
	done
	printf "${SITES}]}"
else
	CONTENT=$(cat dist/${1%%.md}.jtml | sed "s|^#.*||g" | sed "s|\"|'|g" | sed ':a;N;$!ba;s/\n/ /g')
	TITLE="${1%%.md}"
	cat << EOF
{ "title": "${TITLE}", "content":"${CONTENT}" }
EOF
fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<