Skip to content

Commit

Permalink
news and tts pages
Browse files Browse the repository at this point in the history
  • Loading branch information
megan07 committed Mar 12, 2013
1 parent 8381bbb commit ccb62e2
Show file tree
Hide file tree
Showing 12 changed files with 236 additions and 34 deletions.
12 changes: 12 additions & 0 deletions assets/stylesheets/globals/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 4 additions & 1 deletion assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@
@import "pages/_home.scss";

// News pages
@import "pages/news/_tts.scss";
@import "pages/news/_news.scss";
@import "pages/news/_tts.scss";
@import "pages/news/_tts_agenda.scss";
@import "pages/news/_tts_registration.scss";
19 changes: 19 additions & 0 deletions assets/stylesheets/pages/news/_news.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
18 changes: 0 additions & 18 deletions assets/stylesheets/pages/news/_tts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Empty file.
53 changes: 53 additions & 0 deletions assets/stylesheets/pages/news/_tts_registration.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
22 changes: 19 additions & 3 deletions scripts/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion scripts/page_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
17 changes: 17 additions & 0 deletions scripts/pages/news/news.ts
Original file line number Diff line number Diff line change
@@ -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")
}
}
}
11 changes: 0 additions & 11 deletions scripts/pages/news/tts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Empty file.
98 changes: 98 additions & 0 deletions scripts/pages/news/tts_registration.ts
Original file line number Diff line number Diff line change
@@ -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(/<br>/, " ")
}

$("./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']")
}

0 comments on commit ccb62e2

Please sign in to comment.