Skeleton
Sublime project files
Use exec to open browser
Refactor
Sublime files should not be in git
POC for injecting sub-article into text. Currently line number is hard coded.
ignoring some files
refactoring, mostly
diff --git a/wiki/app.coffee b/wiki/app.coffee
index 8e12412..26e29f6 100644
--- a/wiki/app.coffee
+++ b/wiki/app.coffee
@@ -1,16 +1,45 @@
 $ ->

+	scalePixelsByScreenDensity = ->
+		meta = document.createElement("meta")
+		meta.setAttribute('name','viewport')
+		content = 'initial-scale='
+		content += 1 / window.devicePixelRatio * 2
+		content += ',user-scalable=no'
+		meta.setAttribute('content', content)
+		document.getElementsByTagName('head')[0].appendChild(meta)
+
+	scalePixelsByScreenDensity()
+
+
+	findTabLine = ->
+		tab = $($(".tab").get()[0])
+		y = tab.offset().top
+		parentOffset = tab.parent().offset().top
+		lineHeight = 27
+		centerY = y + $(tab).height() / 2 - parentOffset
+		line = Math.round(centerY / lineHeight) + 1
+		console.log "Tab on line: #{line}"
+		line
+
+
 	tabWrapper = $("<span class='tab'/>")
 	$("div a").
 		wrap(tabWrapper).
 		addClass("highlight")

+	setSpacerLine = (parent, line) ->
+		console.log "Placing spacer on line #{line}"
+		parent.find(".line-spacer").
+			css("line-height", (line * 1.5).toString() + "em")

 	explanation = '''
 	<div class='line-spacer'>&nbsp;</div>
 	<div class='sub'>The sine wave or sinusoid is a mathematical curve that describes a smooth repetitive oscillation.</div>
 	'''

+
+
 	injectSubAticle = (tab, line) ->
 		parent = $(tab).parent()
 		containerPar = parent.html()
@@ -19,11 +48,14 @@ $ ->
 			explanation +
 			containerPar.substr(injectIndex + 1)
 		parent.html(html)
-		parent.find(".line-spacer").
-			css("line-height", (line * 1.5).toString() + "em")
+
+		$(window).resize ->
+			setSpacerLine parent, findTabLine()
+
+
+

 		# (line * 1.5).toString() + "
 	$(".tab").each (i, tab) ->
-
-		injectSubAticle tab, 3
\ No newline at end of file
+		injectSubAticle tab, 3
diff --git a/wiki/index.jade b/wiki/index.jade
index f0693b4..24fd958 100644
--- a/wiki/index.jade
+++ b/wiki/index.jade
@@ -11,7 +11,7 @@ html
 			.site-wrapper-inner
 				.content

-					div In physics, the wavelength of a <a href="#">sinusoidal wave</a> is the spatial period of the wave—the distance over which the wave's shape repeats. It is usually determined by considering the distance between consecutive corresponding points of the same phase, such as crests, troughs, or zero crossings, and is a characteristic of both traveling waves and standing waves, as well as other spatial wave patterns. Wavelength is commonly designated by the Greek letter lambda (λ). The concept can also be applied to periodic waves of non-sinusoidal shape. The term wavelength is also sometimes applied to modulated waves, and to the sinusoidal envelopes of modulated waves or waves formed by interference of several sinusoids. The SI unit of wavelength is the meter.
+					div In physics, the wavelength of a sinusoidal wave is the spatial period of the wave—the distance over which the wave's shape <a href="#">repeats</a>. It is usually determined by considering the distance between consecutive corresponding points of the same phase, such as crests, troughs, or zero crossings, and is a characteristic of both traveling waves and standing waves, as well as other spatial wave patterns. Wavelength is commonly designated by the Greek letter lambda (λ). The concept can also be applied to periodic waves of non-sinusoidal shape. The term wavelength is also sometimes applied to modulated waves, and to the sinusoidal envelopes of modulated waves or waves formed by interference of several sinusoids. The SI unit of wavelength is the meter.

 					div Assuming a sinusoidal wave moving at a fixed wave speed, wavelength is inversely proportional to frequency of the wave: waves with higher frequencies have shorter wavelengths, and lower frequencies have longer wavelengths.

diff --git a/wiki/reset.sass b/wiki/reset.sass
new file mode 100644
index 0000000..acb2a43
--- /dev/null
+++ b/wiki/reset.sass
@@ -0,0 +1,46 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+   v2.0 | 20110126
+   License: none (public domain) */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video
+  margin: 0
+  padding: 0
+  border: 0
+  font-size: 100%
+  font: inherit
+  vertical-align: baseline
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section
+  display: block
+
+body
+  line-height: 1
+
+ol, ul
+  list-style: none
+
+blockquote, q
+  quotes: none
+
+blockquote:before, blockquote:after,
+q:before, q:after
+  content: ''
+  content: none
+
+table
+  border-collapse: collapse
+  border-spacing: 0
\ No newline at end of file
diff --git a/wiki/style.sass b/wiki/style.sass
index 6af16ac..65587db 100644
--- a/wiki/style.sass
+++ b/wiki/style.sass
@@ -1,35 +1,43 @@
+@import 'reset'
+
+
+
 body
+	font-size: 18px
 	font-family: courier
 	.content
 		width: 80%
-		margin: 10px auto
-		font-size: 1.3em
-
-
-a:link,
-a:visited
-	text-decoration: none
-
-div
-	line-height: 1.5em
-	a
-		white-space: nowrap
-
-.tab
-	background-color: #dddddd
-	padding: 0.5em
-	border-radius: 0.5em
-	border-bottom-right-radius: 0px
-	border-bottom-left-radius: 0px
-
-.sub
-	float: right
-	width: 100%
-	display: block
-	background-color: #dddddd
-	padding: 0.75em
-	border-radius: 0.5em
-
-.line-spacer
-	float: right
-	clear: left
\ No newline at end of file
+		margin: 2em auto
+		@media screen and (max-width: 650px)
+			width: 90%
+
+
+
+	a:link,
+	a:visited
+		text-decoration: none
+
+	div
+		line-height: 1.5em
+		a
+			white-space: nowrap
+
+	.tab
+		background-color: #dddddd
+		padding: 0.5em
+		border-radius: 0.5em
+		border-bottom-right-radius: 0px
+		border-bottom-left-radius: 0px
+		padding-top: 0.25em
+
+	.sub
+		float: right
+		width: 100%
+		display: block
+		background-color: #dddddd
+		padding: 0.75em
+		border-radius: 0.5em
+
+	.line-spacer
+		float: right
+		clear: left
\ No newline at end of file
refactoring
Update google analytics