diff --git a/assets/stylesheets/globals/_base.scss b/assets/stylesheets/globals/_base.scss index 8adcae5..7cacbc0 100644 --- a/assets/stylesheets/globals/_base.scss +++ b/assets/stylesheets/globals/_base.scss @@ -38,3 +38,15 @@ input[type="number"]::-webkit-outer-spin-button { } +form input[type="text"] { + width: 99%; + font-size: 15px; + line-height: 1.5em; + @include border-radius(5px); + @include box-shadow(inset -1px -1px 1px #eee) +} + +form select { + max-width: 99%; + font-size: 17px; +} diff --git a/assets/stylesheets/main.scss b/assets/stylesheets/main.scss index 3fd2ee1..f5bc881 100644 --- a/assets/stylesheets/main.scss +++ b/assets/stylesheets/main.scss @@ -25,4 +25,7 @@ @import "pages/_home.scss"; // News pages -@import "pages/news/_tts.scss"; \ No newline at end of file +@import "pages/news/_news.scss"; +@import "pages/news/_tts.scss"; +@import "pages/news/_tts_agenda.scss"; +@import "pages/news/_tts_registration.scss"; \ No newline at end of file diff --git a/assets/stylesheets/pages/news/_news.scss b/assets/stylesheets/pages/news/_news.scss new file mode 100644 index 0000000..434b87d --- /dev/null +++ b/assets/stylesheets/pages/news/_news.scss @@ -0,0 +1,19 @@ +.mw_news { + #bread { + font-size: 12px; + + a { + color: $dark_red; + } + + .mw_chevron { + color: $dark_grey; + } + } + + .mw_title { + color: $dark_grey; + font-size: 16px; + font-weight: bold; + } +} \ No newline at end of file diff --git a/assets/stylesheets/pages/news/_tts.scss b/assets/stylesheets/pages/news/_tts.scss index d6f91f8..2836357 100644 --- a/assets/stylesheets/pages/news/_tts.scss +++ b/assets/stylesheets/pages/news/_tts.scss @@ -6,24 +6,6 @@ overflow: hidden; } - #bread { - font-size: 12px; - - a { - color: $dark_red; - } - - .mw_chevron { - color: $dark_grey; - } - } - - .mw_title { - color: $dark_grey; - font-size: 16px; - font-weight: bold; - } - .mw_register { @include box-shadow(-2px 2px 6px #333333); @include border-radius(5px); diff --git a/assets/stylesheets/pages/news/_tts_agenda.scss b/assets/stylesheets/pages/news/_tts_agenda.scss new file mode 100644 index 0000000..e69de29 diff --git a/assets/stylesheets/pages/news/_tts_registration.scss b/assets/stylesheets/pages/news/_tts_registration.scss new file mode 100644 index 0000000..3d0e2de --- /dev/null +++ b/assets/stylesheets/pages/news/_tts_registration.scss @@ -0,0 +1,53 @@ +.mw_tts_register { + + .mw_content { + padding: 10px; + // background-color: $dark_grey; + overflow: hidden; + } + + .mw_special_needs { + border: 1px solid #494949; + padding: 5px; + margin: 10px 0px; + font-size: 12px; + color: #494949; + } + + .mw_form_row { + overflow: hidden; + margin: 5px 0px; + + .mw_label { + vertical-align: middle; + width: 30%; + display: inline-block; + } + + .mw_input { + vertical-align: middle; + padding-left: 5px; + width: 66%; + display: inline-block; + } + + textarea { + height: 65px; + width: 99%; + margin: 5px 0px; + @include border-radius(3px); + } + } + + .mw_radio_labels { + display: inline; + padding-left: 2px; + padding-right: 10px; + } + + .mw_side_note { + font-size: 11px; + color: $dark_red; + text-align: right; + } +} \ No newline at end of file diff --git a/scripts/mappings.ts b/scripts/mappings.ts index 1d7a073..90f20e2 100644 --- a/scripts/mappings.ts +++ b/scripts/mappings.ts @@ -25,10 +25,26 @@ match($status) { @import "pages/home.ts" } + log("PAGE TYPE IS ", $page_type) # News pages - with("tts") { - log("--> Importing pages/news/tts.ts in mappings.ts") - @import "pages/news/tts.ts" + with(/news/) { + @import "pages/news/news.ts" + + # TTS pages + with(/tts_agenda/) { + log("--> Importing pages/news/tts_agenda.ts in mappings.ts") + @import "pages/news/tts_agenda.ts" + } + + with(/tts_registration/) { + log("--> Importing pages/news/tts_registration.ts in mappings.ts") + @import "pages/news/tts_registration.ts" + } + + with(/tts/) { + log("--> Importing pages/news/tts.ts in mappings.ts") + @import "pages/news/tts.ts" + } } } } diff --git a/scripts/page_type.ts b/scripts/page_type.ts index 4c9642f..f3f5f9e 100644 --- a/scripts/page_type.ts +++ b/scripts/page_type.ts @@ -11,7 +11,20 @@ match($path) { $page_type = "news" with(/technology-summit/) { - $page_type = "tts" + $page_type { + append("_tts") + } + + with(/tts-registration/) { + $page_type { + append("_registration") + } + } + with(/agenda/) { + $page_type { + append("_agenda") + } + } } } else() { diff --git a/scripts/pages/news/news.ts b/scripts/pages/news/news.ts new file mode 100644 index 0000000..2fa1109 --- /dev/null +++ b/scripts/pages/news/news.ts @@ -0,0 +1,17 @@ +$("./body") { + // News pages + add_class("mw_news") + + $("./div[@class='mw_content']") { + move_here("./ancestor::body//div[starts-with(@id, 'innerWrapper')]/div[starts-with(@id, 'centerCol')]/div[@id='bread']") { + wrap_text_children("span", class: "mw_chevron") { + text() { + replace(/>>/, "»") + } + } + } + move_here("./ancestor::body//div[starts-with(@id, 'innerWrapper')]/div[starts-with(@id, 'centerCol')]//h1") { + add_class("mw_title") + } + } +} \ No newline at end of file diff --git a/scripts/pages/news/tts.ts b/scripts/pages/news/tts.ts index b42cdef..475e028 100644 --- a/scripts/pages/news/tts.ts +++ b/scripts/pages/news/tts.ts @@ -3,17 +3,6 @@ $("./body") { add_class("mw_tts_home") $("./div[@class='mw_content']") { - move_here("./ancestor::body//div[@id='innerWrapper']/div[@id='centerCol']/div[@id='bread']") { - wrap_text_children("span", class: "mw_chevron") { - text() { - replace(/>>/, "»") - } - } - } - move_here("./ancestor::body//div[@id='innerWrapper']/div[@id='centerCol']//h1") { - add_class("mw_title") - } - move_here("./ancestor::body//div[@id='innerWrapper']/div[@id='centerCol']//td[@class='ttsMtxt']") { name("div") add_class("mw_tts_info") diff --git a/scripts/pages/news/tts_agenda.ts b/scripts/pages/news/tts_agenda.ts new file mode 100644 index 0000000..e69de29 diff --git a/scripts/pages/news/tts_registration.ts b/scripts/pages/news/tts_registration.ts new file mode 100644 index 0000000..72a3d74 --- /dev/null +++ b/scripts/pages/news/tts_registration.ts @@ -0,0 +1,98 @@ +$("./body") { + // TTS Register Page + add_class("mw_tts_register") + + $("./div[@class='mw_content']") { + // Special Needs box - lets put this at the top so that its notable + move_here("./ancestor::body//div[@id='pageContentWrapper']/div") { + remove("./@style") + add_class("mw_special_needs") + } + + move_here("./ancestor::body//div[@id='pageContentWrapper']/form") { + $("./table[1]//td[1]") { + name("div") + add_class("mw_registration_info") + move_to("./ancestor::table", "before") + } + + $("./table[2]/tr") { + name("div") + add_class("mw_form_row") + + // The first row of this table has a table with one row of information we want + $(".//table//tr[1]//strong") { + add_class("mw_form_label") + wrap("div", class: "mw_form_info") { + move_here("./ancestor::table/following-sibling::strong") + move_to("./ancestor::body//div[contains(@class, 'mw_registration_info')]", "after") + } + } + + remove(".//table/ancestor::div[contains(@class, 'mw_form_row')]") + + $("./td[1]") { + name("div") + add_class("mw_label") + remove("./@valign | ./@align") + + inner() { + replace(/
/, " ") + } + + $("./span") { + remove("./@style") + add_class("mw_side_note") + move_to("./ancestor::div[contains(@class, 'mw_form_row')]", "bottom") + } + + $("./self::div[input]") { + attributes(class: "mw_hidden_info") + move_to("./ancestor::form", "bottom") + } + } + + $("./td") { + name("div") + add_class("mw_input") + remove("./br") + + $("./self::div[input[@type='radio']]") { + wrap_text_children("div", class: "mw_radio_labels") { + text() { + replace(/\s*$/, "") + } + + remove("./self::div[text()='']") + } + $("./input") { + $value = fetch("./@value") + move_here("./following-sibling::div[text() = "+$value+"]", "after") + log("//div[text() = "+$value+"]") + } + } + + $("./textarea") { + remove("./@rows | ./@cols") + } + + $("./span") { + remove("./@style") + add_class("mw_side_note") + move_to("./ancestor::div[contains(@class, 'mw_form_row')]", "bottom") + } + + inner() { + replace(/ /, "") + } + } + + move_to("./ancestor::table", "before") + } + + remove("./table") + } + } + + remove(".//div[@id='pageContainer']") +} \ No newline at end of file