diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fe0251 Binary files /dev/null and b/.gitignore differ diff --git a/alt.css b/alt.css new file mode 100644 index 0000000..999c2db --- /dev/null +++ b/alt.css @@ -0,0 +1,121 @@ +body { + font-family: Ubuntu; + font-size: 12px; + background-color: #663399; +} +.divPageBody { + width: 60%; + margin-top: 90px; + margin-left: auto; + margin-right: auto; +} +.divBackgroundImage { + position: absolute; + width: 100%; + height: 400px; + margin-left: 0; + margin-top: 0; + border-top: 1px solid silver; + z-index: 10; + + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} +.divPageTopText { + width: 70%; + margin-left: auto; + margin-right: auto; + margin-top: 160px; +} +.divPageTopText a { + color: white; +} +.divPageTitle { + font-size: 50px; + letter-spacing: -0.02em; + font-weight: 700; + font-style: normal; + letter-spacing: -0.04em; + line-height: 1.1; + margin-bottom: 8px; + color: white; + text-shadow: 1px 1px black; +} +.divPageByline { + font-size: 18px; + color: white; + margin-bottom: .5em; + text-shadow: 1px 1px black; +} +.divPageDescription { + font-size: 24px; + color: white; + margin-top: .5em; + height: 3em; + text-shadow: 1px 1px black; +} +.divEssayText { + font-family: "Georgia"; + font-size: 24px; + line-height: 145%; + width: 55%; + margin-top: 125px; + margin-left: auto;; + margin-right: auto; + margin-bottom: 400px; +} +.divSubhead { + font-family: "Ubuntu"; + font-weight: bold; + margin-top: 1em; + margin-bottom: .15em; +} +.divMarkdownText h4 { + font-size: 24px; + margin-top: 1.25em; + margin-bottom: .75em; +} +.divVersionNumber { + position: absolute; + top: 0; + right:0; + font-size: 13px; + padding: 5px; + color: white; + z-index: 20; +} +.divVersionNumber a { + color: white; +} + + /* styles for phone */ +@media only screen +and (min-device-width : 320px) +and (max-device-width : 480px) { + .divPageTopText { + width: 80%; + margin-top: 110px; + } + .divPageTitle { + font-size: 44px; + } + .divPageDescription { + font-size: 18px; + line-height: 110%; + } + .divEssayText { + width: 80%; + margin-top: 125px; + margin-left: auto;; + margin-right: auto; + margin-bottom: 400px; + } + .divVersionNumber { + position: absolute; + padding: 2px; + } +} diff --git a/essay.css b/essay.css new file mode 100644 index 0000000..05e89e7 --- /dev/null +++ b/essay.css @@ -0,0 +1,121 @@ +body { + font-family: Ubuntu; + font-size: 18px; + background-color: whitesmoke; +} +.divPageBody { + width: 60%; + margin-top: 90px; + margin-left: auto; + margin-right: auto; +} +.divBackgroundImage { + position: absolute; + width: 100%; + height: 400px; + margin-left: 0; + margin-top: 0; + border-top: 1px solid silver; + z-index: 10; + + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} +.divPageTopText { + width: 70%; + margin-left: auto; + margin-right: auto; + margin-top: 160px; +} +.divPageTopText a { + color: white; +} +.divPageTitle { + font-size: 50px; + letter-spacing: -0.02em; + font-weight: 700; + font-style: normal; + letter-spacing: -0.04em; + line-height: 1.1; + margin-bottom: 8px; + color: white; + text-shadow: 1px 1px black; +} +.divPageByline { + font-size: 18px; + color: white; + margin-bottom: .5em; + text-shadow: 1px 1px black; +} +.divPageDescription { + font-size: 24px; + color: white; + margin-top: .5em; + height: 3em; + text-shadow: 1px 1px black; +} +.divEssayText { + font-family: "Georgia"; + font-size: 24px; + line-height: 145%; + width: 55%; + margin-top: 125px; + margin-left: auto;; + margin-right: auto; + margin-bottom: 400px; +} +.divSubhead { + font-family: "Ubuntu"; + font-weight: bold; + margin-top: 1em; + margin-bottom: .15em; +} +.divMarkdownText h4 { + font-size: 24px; + margin-top: 1.25em; + margin-bottom: .75em; +} +.divVersionNumber { + position: absolute; + top: 0; + right:0; + font-size: 13px; + padding: 5px; + color: white; + z-index: 20; +} +.divVersionNumber a { + color: white; +} + + /* styles for phone */ +@media only screen +and (min-device-width : 320px) +and (max-device-width : 480px) { + .divPageTopText { + width: 80%; + margin-top: 110px; + } + .divPageTitle { + font-size: 44px; + } + .divPageDescription { + font-size: 18px; + line-height: 110%; + } + .divEssayText { + width: 80%; + margin-top: 125px; + margin-left: auto;; + margin-right: auto; + margin-bottom: 400px; + } + .divVersionNumber { + position: absolute; + padding: 2px; + } +} diff --git a/index.html b/index.html index 62aaffc..3950af2 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,8 @@ - + + @@ -49,13 +50,17 @@ } function startup () { var urlparam = decodeURIComponent (getURLParameter ("url")), urlEssay = "essay.json", jstruct, imgurl = defaultImageUrl;; + var cssparam = decodeURIComponent (getURLParameter ("css")), urlCSS = "essay.css"; var markdown = new Markdown.Converter (), now = new Date (), flmarkdown; - console.log ("startup"); + console.log ("startup"); $("#idVersionNumber").html ("v" + appConsts.version + ""); initGoogleAnalytics (); if (urlparam != "null") { urlEssay = urlparam; } + if (cssparam != "null") { + urlCSS = cssparam; + } readHttpFile (urlEssay, function (s) { try { jstruct = JSON.parse (s); @@ -137,135 +142,13 @@ console.log ("startup: essay text before Markdown processing == " + essaytext); essaytext = "