diff --git a/fixture.json b/fixture.json index ceacf1829..ef66f3e48 100644 --- a/fixture.json +++ b/fixture.json @@ -1146,7 +1146,7 @@ "user": [ "admin" ], - "content_json": "{\"photo\": \"[]\", \"search_description\": \"\", \"owner\": 1, \"position_at_new_america\": \"President and CEO\", \"long_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York. She is also the Bert G. Kerstetter '66 University Professor Emerita of Politics and International Affairs at Princeton University. From 2009\\u20132011 she served as director of Policy Planning for the United States Department of State, the first woman to hold that position. Upon leaving the State Department she received the Secretary\\u2019s Distinguished Service Award for her work leading the Quadrennial Diplomacy and Development Review, as well as meritorious service awards from USAID and the Supreme Allied Commander for Europe. Prior to her government service, Dr. Slaughter was the Dean of Princeton\\u2019s Woodrow Wilson School of Public and International Affairs from 2002\\u20132009 and the J. Sinclair Armstrong Professor of International, Foreign, and Comparative Law at Harvard Law School from 1994-2002.\\r\\n\\r\\nDr. Slaughter has written or edited seven books, including Unfinished Business: Women, Men, Work, Family (2015), A New World Order (2004), and The Idea That Is America: Keeping Faith with Our Values in a Dangerous World (2007), and over 100 scholarly articles. She was the convener and academic co-chair, with Professor John Ikenberry, of the Princeton Project on National Security, a multi-year research project aimed at developing a new, bipartisan national security strategy for the United States. In 2012 she published the article \\u201cWhy Women Still Can\\u2019t Have It All,\\u201d in The Atlantic, which quickly became the most read article in the history of the magazine and helped spawn a renewed national debate on the continued obstacles to genuine full male-female equality.\\r\\n\\r\\nDr. Slaughter writes a monthly column for Project Syndicate. She provides frequent commentary for both mainstream and new media and curates foreign policy news for over 80,000 followers on Twitter. Foreign Policy magazine named her to their annual list of the Top 100 Global Thinkers in 2009, 2010, 2011, and 2012. She received a B.A. from Princeton, an M.Phil and D.Phil in international relations from Oxford, where she was a Daniel M. Sachs Scholar, and a J.D. from Harvard. She is married to Professor Andrew Moravcsik; they live in Princeton with their two sons.\", \"latest_revision_created_at\": null, \"go_live_at\": null, \"social_media\": \"[]\", \"expert\": true, \"title\": \"Anne-Marie Slaughter\", \"seo_title\": \"\", \"slug\": \"anne-marie-slaughter\", \"live\": true, \"belongs_to_program\": null, \"role\": \"Board Member\", \"location\": \"\", \"has_unpublished_changes\": false, \"email\": \"anne@newamerica.org\", \"numchild\": 0, \"content_type\": 14, \"show_in_menus\": false, \"path\": \"0001000100050001\", \"url_path\": \"/new-america/our-people/anne-marie-slaughter/\", \"expired\": false, \"pk\": 38, \"locked\": false, \"name\": \"Anne-Marie Slaughter\", \"depth\": 4, \"short_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York.\", \"first_published_at\": null, \"expire_at\": null}", + "content_json": "{\"photo\": \"[]\", \"search_description\": \"\", \"owner\": 1, \"position_at_new_america\": \"President and CEO\", \"long_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York. She is also the Bert G. Kerstetter '66 University Professor Emerita of Politics and International Affairs at Princeton University. From 2009\\u20132011 she served as director of Policy Planning for the United States Department of State, the first woman to hold that position. Upon leaving the State Department she received the Secretary\\u2019s Distinguished Service Award for her work leading the Quadrennial Diplomacy and Development Review, as well as meritorious service awards from USAID and the Supreme Allied Commander for Europe. Prior to her government service, Dr. Slaughter was the Dean of Princeton\\u2019s Woodrow Wilson School of Public and International Affairs from 2002\\u20132009 and the J. Sinclair Armstrong Professor of International, Foreign, and Comparative Law at Harvard Law School from 1994-2002.\\r\\n\\r\\nDr. Slaughter has written or edited seven books, including Unfinished Business: Women, Men, Work, Family (2015), A New World Order (2004), and The Idea That Is America: Keeping Faith with Our Values in a Dangerous World (2007), and over 100 scholarly articles. She was the convener and academic co-chair, with Professor John Ikenberry, of the Princeton Project on National Security, a multi-year research project aimed at developing a new, bipartisan national security strategy for the United States. In 2012 she published the article \\u201cWhy Women Still Can\\u2019t Have It All,\\u201d in The Atlantic, which quickly became the most read article in the history of the magazine and helped spawn a renewed national debate on the continued obstacles to genuine full male-female equality.\\r\\n\\r\\nDr. Slaughter writes a monthly column for Project Syndicate. She provides frequent commentary for both mainstream and new media and curates foreign policy news for over 80,000 followers on Twitter. Foreign Policy magazine named her to their annual list of the Top 100 Global Thinkers in 2009, 2010, 2011, and 2012. She received a B.A. from Princeton, an M.Phil and D.Phil in international relations from Oxford, where she was a Daniel M. Sachs Scholar, and a J.D. from Harvard. She is married to Professor Andrew Moravcsik; they live in Princeton with their two sons.\", \"latest_revision_created_at\": null, \"go_live_at\": null, \"social_media\": \"[]\", \"expert\": true, \"title\": \"Anne-Marie Slaughter\", \"seo_title\": \"\", \"slug\": \"anne-marie-slaughter\", \"live\": true, \"role\": \"Board Member\", \"location\": \"\", \"has_unpublished_changes\": false, \"email\": \"anne@newamerica.org\", \"numchild\": 0, \"content_type\": 14, \"show_in_menus\": false, \"path\": \"0001000100050001\", \"url_path\": \"/new-america/our-people/anne-marie-slaughter/\", \"expired\": false, \"pk\": 38, \"locked\": false, \"name\": \"Anne-Marie Slaughter\", \"depth\": 4, \"short_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York.\", \"first_published_at\": null, \"expire_at\": null}", "approved_go_live_at": null } }, @@ -9266,7 +9266,7 @@ "user": [ "admin" ], - "content_json": "{\"photo\": \"[]\", \"search_description\": \"\", \"owner\": 1, \"position_at_new_america\": \"President and CEO\", \"long_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York. She is also the Bert G. Kerstetter '66 University Professor Emerita of Politics and International Affairs at Princeton University. From 2009\\u20132011 she served as director of Policy Planning for the United States Department of State, the first woman to hold that position. Upon leaving the State Department she received the Secretary\\u2019s Distinguished Service Award for her work leading the Quadrennial Diplomacy and Development Review, as well as meritorious service awards from USAID and the Supreme Allied Commander for Europe. Prior to her government service, Dr. Slaughter was the Dean of Princeton\\u2019s Woodrow Wilson School of Public and International Affairs from 2002\\u20132009 and the J. Sinclair Armstrong Professor of International, Foreign, and Comparative Law at Harvard Law School from 1994-2002.\\r\\n\\r\\nDr. Slaughter has written or edited seven books, including Unfinished Business: Women, Men, Work, Family (2015), A New World Order (2004), and The Idea That Is America: Keeping Faith with Our Values in a Dangerous World (2007), and over 100 scholarly articles. She was the convener and academic co-chair, with Professor John Ikenberry, of the Princeton Project on National Security, a multi-year research project aimed at developing a new, bipartisan national security strategy for the United States. In 2012 she published the article \\u201cWhy Women Still Can\\u2019t Have It All,\\u201d in The Atlantic, which quickly became the most read article in the history of the magazine and helped spawn a renewed national debate on the continued obstacles to genuine full male-female equality.\\r\\n\\r\\nDr. Slaughter writes a monthly column for Project Syndicate. She provides frequent commentary for both mainstream and new media and curates foreign policy news for over 80,000 followers on Twitter. Foreign Policy magazine named her to their annual list of the Top 100 Global Thinkers in 2009, 2010, 2011, and 2012. She received a B.A. from Princeton, an M.Phil and D.Phil in international relations from Oxford, where she was a Daniel M. Sachs Scholar, and a J.D. from Harvard. She is married to Professor Andrew Moravcsik; they live in Princeton with their two sons.\", \"latest_revision_created_at\": \"2016-01-12T19:09:16.775Z\", \"go_live_at\": null, \"social_media\": \"[]\", \"expert\": true, \"title\": \"Anne-Marie Slaughter\", \"seo_title\": \"\", \"slug\": \"anne-marie-slaughter\", \"live\": true, \"belongs_to_program\": null, \"role\": \"Board Member\", \"location\": \"\", \"has_unpublished_changes\": false, \"email\": \"anne@anne.com\", \"numchild\": 0, \"content_type\": 14, \"show_in_menus\": false, \"path\": \"0001000100050001\", \"url_path\": \"/new-america/our-people/anne-marie-slaughter/\", \"expired\": false, \"pk\": 38, \"locked\": false, \"name\": \"Anne-Marie Slaughter\", \"depth\": 4, \"short_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York.\", \"first_published_at\": \"2016-01-12T19:09:16.786Z\", \"expire_at\": null}", + "content_json": "{\"photo\": \"[]\", \"search_description\": \"\", \"owner\": 1, \"position_at_new_america\": \"President and CEO\", \"long_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York. She is also the Bert G. Kerstetter '66 University Professor Emerita of Politics and International Affairs at Princeton University. From 2009\\u20132011 she served as director of Policy Planning for the United States Department of State, the first woman to hold that position. Upon leaving the State Department she received the Secretary\\u2019s Distinguished Service Award for her work leading the Quadrennial Diplomacy and Development Review, as well as meritorious service awards from USAID and the Supreme Allied Commander for Europe. Prior to her government service, Dr. Slaughter was the Dean of Princeton\\u2019s Woodrow Wilson School of Public and International Affairs from 2002\\u20132009 and the J. Sinclair Armstrong Professor of International, Foreign, and Comparative Law at Harvard Law School from 1994-2002.\\r\\n\\r\\nDr. Slaughter has written or edited seven books, including Unfinished Business: Women, Men, Work, Family (2015), A New World Order (2004), and The Idea That Is America: Keeping Faith with Our Values in a Dangerous World (2007), and over 100 scholarly articles. She was the convener and academic co-chair, with Professor John Ikenberry, of the Princeton Project on National Security, a multi-year research project aimed at developing a new, bipartisan national security strategy for the United States. In 2012 she published the article \\u201cWhy Women Still Can\\u2019t Have It All,\\u201d in The Atlantic, which quickly became the most read article in the history of the magazine and helped spawn a renewed national debate on the continued obstacles to genuine full male-female equality.\\r\\n\\r\\nDr. Slaughter writes a monthly column for Project Syndicate. She provides frequent commentary for both mainstream and new media and curates foreign policy news for over 80,000 followers on Twitter. Foreign Policy magazine named her to their annual list of the Top 100 Global Thinkers in 2009, 2010, 2011, and 2012. She received a B.A. from Princeton, an M.Phil and D.Phil in international relations from Oxford, where she was a Daniel M. Sachs Scholar, and a J.D. from Harvard. She is married to Professor Andrew Moravcsik; they live in Princeton with their two sons.\", \"latest_revision_created_at\": \"2016-01-12T19:09:16.775Z\", \"go_live_at\": null, \"social_media\": \"[]\", \"expert\": true, \"title\": \"Anne-Marie Slaughter\", \"seo_title\": \"\", \"slug\": \"anne-marie-slaughter\", \"live\": true, \"role\": \"Board Member\", \"location\": \"\", \"has_unpublished_changes\": false, \"email\": \"anne@anne.com\", \"numchild\": 0, \"content_type\": 14, \"show_in_menus\": false, \"path\": \"0001000100050001\", \"url_path\": \"/new-america/our-people/anne-marie-slaughter/\", \"expired\": false, \"pk\": 38, \"locked\": false, \"name\": \"Anne-Marie Slaughter\", \"depth\": 4, \"short_bio\": \"Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York.\", \"first_published_at\": \"2016-01-12T19:09:16.786Z\", \"expire_at\": null}", "approved_go_live_at": null } }, @@ -15794,7 +15794,6 @@ "email": "anne@anne.com", "short_bio": "Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York.", "long_bio": "Anne-Marie Slaughter is currently the President and CEO of New America, a think tank and civic enterprise with offices in Washington and New York. She is also the Bert G. Kerstetter '66 University Professor Emerita of Politics and International Affairs at Princeton University. From 2009\u20132011 she served as director of Policy Planning for the United States Department of State, the first woman to hold that position. Upon leaving the State Department she received the Secretary\u2019s Distinguished Service Award for her work leading the Quadrennial Diplomacy and Development Review, as well as meritorious service awards from USAID and the Supreme Allied Commander for Europe. Prior to her government service, Dr. Slaughter was the Dean of Princeton\u2019s Woodrow Wilson School of Public and International Affairs from 2002\u20132009 and the J. Sinclair Armstrong Professor of International, Foreign, and Comparative Law at Harvard Law School from 1994-2002.\r\n\r\nDr. Slaughter has written or edited seven books, including Unfinished Business: Women, Men, Work, Family (2015), A New World Order (2004), and The Idea That Is America: Keeping Faith with Our Values in a Dangerous World (2007), and over 100 scholarly articles. She was the convener and academic co-chair, with Professor John Ikenberry, of the Princeton Project on National Security, a multi-year research project aimed at developing a new, bipartisan national security strategy for the United States. In 2012 she published the article \u201cWhy Women Still Can\u2019t Have It All,\u201d in The Atlantic, which quickly became the most read article in the history of the magazine and helped spawn a renewed national debate on the continued obstacles to genuine full male-female equality.\r\n\r\nDr. Slaughter writes a monthly column for Project Syndicate. She provides frequent commentary for both mainstream and new media and curates foreign policy news for over 80,000 followers on Twitter. Foreign Policy magazine named her to their annual list of the Top 100 Global Thinkers in 2009, 2010, 2011, and 2012. She received a B.A. from Princeton, an M.Phil and D.Phil in international relations from Oxford, where she was a Daniel M. Sachs Scholar, and a J.D. from Harvard. She is married to Professor Andrew Moravcsik; they live in Princeton with their two sons.", - "belongs_to_program": null, "expert": true, "location": "", "photo": "[]", @@ -15811,7 +15810,6 @@ "email": "kevin@kevin.com", "short_bio": "Kevin Bankston is the Director of New America\u2019s Open Technology Institute, where he works in the public interest to promote policy and regulatory reforms to strengthen communities by supporting open communications networks, platforms, and technologies. He previously served as OTI's Policy Director.", "long_bio": "Kevin Bankston is the Director of New America\u2019s Open Technology Institute, where he works in the public interest to promote policy and regulatory reforms to strengthen communities by supporting open communications networks, platforms, and technologies. He previously served as OTI's Policy Director.\r\n\r\nPrior to leading OTI\u2019s policy team, Kevin was a Senior Counsel and the Director of the Free Expression Project at the Center for Democracy & Technology, a Washington, DC-based non-profit organization dedicated to promoting democratic values and constitutional liberties in the digital age. From that position, he spent two years advocating on a wide range of Internet and technology policy issues both international and domestic, most recently organizing a broad coalition of companies and civil society organizations to demand greater transparency around the US government\u2019s surveillance practices. He also has served since 2005 on the board of the First Amendment Coalition, a non-profit public interest organization dedicated to advancing free speech and a more open and accountable government, and previously was a nonresidential fellow at the Stanford Law School\u2019s Center for Internet & Society.\r\n\r\nPrior to joining CDT, he worked for nearly a decade at the Electronic Frontier Foundation, specializing in free speech and privacy law with a focus on government surveillance, Internet privacy, and location privacy. As a Senior Staff Attorney at EFF, he regularly litigated issues surrounding free expression and electronic surveillance, and was a lead counsel in EFF\u2019s lawsuits against the National Security Agency and AT&T, challenging the legality of the NSA warrantless wiretapping program first revealed in 2005. He originally joined EFF as an Equal Justice Works/Bruce J. Ennis First Amendment Fellow, studying the impact of post-9/11 anti-terrorism surveillance initiatives on online privacy and free expression. Before joining EFF, he litigated Internet-related free speech cases at the national office of the American Civil Liberties Union in New York City as a Justice William Brennan First Amendment Fellow. He received his JD at the University of Southern California Law School after receiving his BA at the University of Texas at Austin.", - "belongs_to_program": 87, "expert": true, "location": "", "photo": "[]", diff --git a/home/templates/tags/side_menu.html b/home/templates/tags/side_menu.html new file mode 100644 index 000000000..3262279b1 --- /dev/null +++ b/home/templates/tags/side_menu.html @@ -0,0 +1,40 @@ +{% load side_menu wagtailcore_tags static %} + +
+ +
+

INTERNATIONAL SECURITY

+
+
+ +
+ + + +
+ +
+

INTERNATIONAL SECURITY

+
+
+ +
diff --git a/home/templates/tags/top_menu.html b/home/templates/tags/top_menu.html index 0106256c9..81608fe97 100644 --- a/home/templates/tags/top_menu.html +++ b/home/templates/tags/top_menu.html @@ -1,5 +1,4 @@ {% load top_menu wagtailcore_tags static %} -{% get_site_root as site_root %}
@@ -44,9 +43,6 @@

New America

  • {% include 'ui_elements/svg/award.html' %}
  • -
  • - {% include 'ui_elements/svg/heart.html' %} -
  • {% include 'ui_elements/svg/magnifying-glass.html' %}
  • @@ -163,10 +159,6 @@

    By Location

    -
  • - Donate -
  • - diff --git a/home/templatetags/side_menu.py b/home/templatetags/side_menu.py new file mode 100644 index 000000000..9fae86007 --- /dev/null +++ b/home/templatetags/side_menu.py @@ -0,0 +1,56 @@ +from datetime import date +from django import template +from django.conf import settings + +from programs.models import Program, AbstractProgram +from event.models import AllEventsHomePage +from home.models import Post + +register = template.Library() + + +@register.assignment_tag(takes_context=True) +def needs_sidebar(context): + """ Checks if the page is an AbstractProgram descendant """ + use_side_bar = False + if isinstance(context['self'], AbstractProgram): + use_side_bar = True + elif isinstance(context['self'], Post): + use_side_bar = True + elif 'programs.Program' in context['self'].parent_page_types: + use_side_bar = True + return use_side_bar + +# Retrieves the top menu items - the immediate children of the parent page +@register.inclusion_tag('tags/side_menu.html', takes_context=True) +def side_menu(context, parent, calling_page=None): + # # programs = Program.objects.in_menu().order_by("title").exclude(location=True) + # programs = [] + # location_programs = [] + # all_programs = Program.objects.in_menu().order_by("title") + # for program in all_programs: + # if program.location == True: + # location_programs.append(program) + # else: + # programs.append(program) + # return { + # 'calling_page': calling_page, + # # 'programs': programs, + # # 'location_programs': location_programs, + # # required by the pageurl tag that we want to use within this template + # 'request': context['request'], + # } + return {} + + +# Retrieves the children of the top menu items for the drop downs +# @register.inclusion_tag('tags/top_menu_children.html', takes_context=True) +# def top_menu_children(context, parent): +# subprograms = parent.subprogram_set.all() + +# return { +# 'parent': parent, +# 'subprograms': subprograms, +# # required by the pageurl tag that we want to use within this template +# 'request': context['request'], +# } diff --git a/mysite/assets/js/modules/index.js b/mysite/assets/js/modules/index.js index f7b0688a8..4b7ba5b21 100644 --- a/mysite/assets/js/modules/index.js +++ b/mysite/assets/js/modules/index.js @@ -1,2 +1,3 @@ import './border-panel/index.js' import './header/index.js' +import './sidemenu/index.js' diff --git a/mysite/assets/js/modules/sidemenu/index.js b/mysite/assets/js/modules/sidemenu/index.js new file mode 100644 index 000000000..a298ed61e --- /dev/null +++ b/mysite/assets/js/modules/sidemenu/index.js @@ -0,0 +1,41 @@ +import $ from 'jquery' + +import getJQueryObjects from './../../utilities/get_jquery_objects.js' + +var clicked = false; + +function addSidemenuInteractivity() { + $(".mobile-sidemenu__toggle").on("click", function() { + clicked = !clicked; + console.log("clicked!"); + $(".sidemenu").toggle(); + $(".content-container").toggle(); + $("footer").toggle(); + }) +} + +$(addSidemenuInteractivity) + +var $window = $( window ); // so you have a "cached" reference +var breakpoint = 640; + +$window.resize ( function () { + console.log("calling resize"); + if ($window.width() > breakpoint ) { + // if (clicked == true ) { + console.log("width is greater"); + $(".sidemenu").css("display", "block"); + $(".content-container").css("display", "block"); + $("footer").css("display", "block"); + clicked = false; + + } else { + if (!clicked) { + $(".sidemenu").css("display", "none"); + } + } + + // $(".sidemenu-container").css("height", function() { + // return $(".content-container").css("height"); + // }) +}); \ No newline at end of file diff --git a/mysite/assets/scss/base/layout/_containers.scss b/mysite/assets/scss/base/layout/_containers.scss new file mode 100644 index 000000000..1d9aca75f --- /dev/null +++ b/mysite/assets/scss/base/layout/_containers.scss @@ -0,0 +1,23 @@ +.sidemenu-container { + width:100%; + /*min-height:100%;*/ + + @include desktop-sidemenu { + float:left; + width: $max-sidemenu-width; + } +} + +.content-container { + width: 100%; + /*height: 100%;*/ + + &.has-sidemenu { + /*padding-top:$mobile-header-height;*/ + + @include desktop-sidemenu { + padding-left: $max-sidemenu-width; + padding-top: 0px; + } + } +} diff --git a/mysite/assets/scss/base/layout/_manifest.scss b/mysite/assets/scss/base/layout/_manifest.scss index 12a260d5a..5f52d37eb 100644 --- a/mysite/assets/scss/base/layout/_manifest.scss +++ b/mysite/assets/scss/base/layout/_manifest.scss @@ -1,2 +1,3 @@ @import 'wrapper'; @import 'section'; +@import 'containers'; diff --git a/mysite/assets/scss/base/layout/_wrapper.scss b/mysite/assets/scss/base/layout/_wrapper.scss index 20a931bbf..3c052770b 100644 --- a/mysite/assets/scss/base/layout/_wrapper.scss +++ b/mysite/assets/scss/base/layout/_wrapper.scss @@ -1,6 +1,7 @@ .wrapper { display: block; width: 100%; + /*position:absolute;*/ margin: auto; overflow-x: hidden; &__clear-header { diff --git a/mysite/assets/scss/mixins/_breakpoints.scss b/mysite/assets/scss/mixins/_breakpoints.scss index 57a980d3d..5a86f3ecb 100644 --- a/mysite/assets/scss/mixins/_breakpoints.scss +++ b/mysite/assets/scss/mixins/_breakpoints.scss @@ -16,3 +16,9 @@ @content; } } + +@mixin desktop-sidemenu() { + @include breakpoint(medium) { + @content; + } +} diff --git a/mysite/assets/scss/modules/_manifest.scss b/mysite/assets/scss/modules/_manifest.scss index ec94debcc..4e3c10554 100644 --- a/mysite/assets/scss/modules/_manifest.scss +++ b/mysite/assets/scss/modules/_manifest.scss @@ -11,3 +11,4 @@ @import 'hero-grid/manifest'; @import 'page-header/manifest'; @import 'subscribe/main'; +@import 'sidemenu/manifest'; diff --git a/mysite/assets/scss/modules/header/_main.scss b/mysite/assets/scss/modules/header/_main.scss index dcd1743af..85079faab 100644 --- a/mysite/assets/scss/modules/header/_main.scss +++ b/mysite/assets/scss/modules/header/_main.scss @@ -8,7 +8,7 @@ position: fixed; @include desktop-header { position: fixed; - border-bottom: $thick-border-width solid palette-get(na-black-10); + border-bottom: $thick-border-width solid palette-get(na-turquoise); } @include expanded-header { padding-top: 8px; diff --git a/mysite/assets/scss/modules/sidemenu/_main.scss b/mysite/assets/scss/modules/sidemenu/_main.scss new file mode 100644 index 000000000..096958fa7 --- /dev/null +++ b/mysite/assets/scss/modules/sidemenu/_main.scss @@ -0,0 +1,100 @@ +$left-pad: 20px; +$right-pad: 200px; + +.mobile-sidemenu { + background-color: palette-get(na-black); + width: 100%; + height:$mobile-header-height; + z-index: 1000; + font-color:palette-get(na-white); + + @include desktop-sidemenu { + display:none; + } + + &__program-title { + margin-top: 10px; + margin-left: $left-pad; + width: $max-sidemenu-width / 2; + background-color: palette-get(na-white); + padding: 7px 7px 1.5px 7px; + float:left; + &__title { + font-size:13px; + font-color:palette-get(na-black); + /*padding-left: $left-pad;*/ + } + } + + &__toggle { + float:right; + margin-right: $right-pad; + margin-top: 30px; + z-index: 1100; + color:white; + font-weight:bold; + } +} + + +.sidemenu { + top: 0; + background-color: palette-get(na-black); + width: 100%; + height:100%; + z-index: 1000; + font-color:palette-get(na-white); + + display:none; + /*padding-left: 20px;*/ + + @include desktop-sidemenu { + display:block; + padding-top: 20px; + } + + &__program-title { + margin-left: $left-pad; + width: $max-sidemenu-width / 2; + background-color: palette-get(na-white); + padding: 7px 7px 1.5px 7px; + display:none; + + @include desktop-sidemenu { + display:block; + } + + &__title { + font-size:15px; + font-color:palette-get(na-black); + /*padding-left: $left-pad;*/ + } + } + + &__link-group { + color: white; + + &__title { + padding-left: $left-pad; + font-size:20px; + } + + &__link { + padding-left: $left-pad; + + &:hover { + background-color: palette-get(na-turquoise); + } + + & > a { + color: grey; + + &:hover { + color: white; + } + } + } + + } + +} \ No newline at end of file diff --git a/mysite/assets/scss/modules/sidemenu/_manifest.scss b/mysite/assets/scss/modules/sidemenu/_manifest.scss new file mode 100644 index 000000000..5b4f1be14 --- /dev/null +++ b/mysite/assets/scss/modules/sidemenu/_manifest.scss @@ -0,0 +1 @@ +@import 'main'; \ No newline at end of file diff --git a/mysite/assets/scss/variables/_base.scss b/mysite/assets/scss/variables/_base.scss index 3977957ce..af8e13e1d 100644 --- a/mysite/assets/scss/variables/_base.scss +++ b/mysite/assets/scss/variables/_base.scss @@ -1,8 +1,9 @@ -$max-site-width: 1150px; +$max-site-width: 1350px; $max-body-width: 650px; +$max-sidemenu-width: 300px; $thick-border-width: 4px; -$mobile-header-height: 60px; +$mobile-header-height: 70px; $mobile-padding: 10px; diff --git a/mysite/assets/scss/variables/_foundation.scss b/mysite/assets/scss/variables/_foundation.scss index 93418be1b..4bc4eb180 100644 --- a/mysite/assets/scss/variables/_foundation.scss +++ b/mysite/assets/scss/variables/_foundation.scss @@ -71,4 +71,7 @@ $blockquote-color: palette-get(na-black); $blockquote-border: 4px solid palette-get(na-black); $primary-color: palette-get(na-black); -$secondary-color: palette-get(na-turquoise); \ No newline at end of file +$secondary-color: palette-get(na-turquoise); + +$menu-margin: 0px; +$menu-item-padding: 14px 0px; \ No newline at end of file diff --git a/mysite/assets/scss/vendor/_foundation.scss b/mysite/assets/scss/vendor/_foundation.scss index 2b5979002..2f46cff31 100644 --- a/mysite/assets/scss/vendor/_foundation.scss +++ b/mysite/assets/scss/vendor/_foundation.scss @@ -11,7 +11,7 @@ @include foundation-typography; @include foundation-button; @include foundation-forms; -// @include foundation-visibility-classes; +@include foundation-visibility-classes; @include foundation-float-classes; // @include foundation-accordion; // @include foundation-accordion-menu; @@ -26,21 +26,21 @@ // @include foundation-flex-video; // @include foundation-label; // @include foundation-media-object; -// @include foundation-menu; +@include foundation-menu; // @include foundation-off-canvas; // @include foundation-orbit; // @include foundation-pagination; // @include foundation-progress-bar; // @include foundation-slider; // @include foundation-sticky; -// @include foundation-reveal; +@include foundation-reveal; // @include foundation-switch; // @include foundation-table; // @include foundation-tabs; // @include foundation-thumbnail; // @include foundation-title-bar; // @include foundation-tooltip; -// @include foundation-top-bar; +@include foundation-top-bar; // Overrides. Use very sparingly - modify Foundation variables instead. .button { font-weight: bold; diff --git a/mysite/templates/base.html b/mysite/templates/base.html index 150d1f851..10105be94 100644 --- a/mysite/templates/base.html +++ b/mysite/templates/base.html @@ -1,6 +1,7 @@ {% load static wagtailuserbar %} {% load top_menu %} -{% load wagtailcore_tags %} +{% load side_menu %} +{% load wagtailcore_tags %} @@ -34,27 +35,45 @@ {% get_site_root as site_root %} {% top_menu parent=site_root calling_page=self %} {% endblock %} - {% if self.get_ancestors|length > 2 %} - + {% endif %} + + {% block content %} + {% endblock %} + + + {% include 'ui_elements/footer.html' %} + {% block extra_js %} diff --git a/press_release/models.py b/press_release/models.py index c53e5abb6..dbcc368d4 100644 --- a/press_release/models.py +++ b/press_release/models.py @@ -29,13 +29,14 @@ class PressRelease(Post): FieldPanel('headline'), FieldPanel('sub_headline'), StreamFieldPanel('attachment'), - ] + Post.content_panels + ] + Post.content_panels + class AllPressReleasesHomePage(Page): """ A page which inherits from the abstract Page model and returns every Press Release in the PressRelease model - for the organization-wide Press Release Homepage + for the organization-wide Press Release Homepage """ parent_page_types = ['home.Homepage'] subpage_types = [] @@ -49,6 +50,7 @@ def get_context(self, request): class Meta: verbose_name = "Homepage for all Press Releases" + class ProgramPressReleasesPage(Page): """ A page which inherits from the abstract Page model and diff --git a/programs/templates/programs/program.html b/programs/templates/programs/program.html index 78c8a145a..8f8a2b814 100644 --- a/programs/templates/programs/program.html +++ b/programs/templates/programs/program.html @@ -7,7 +7,6 @@ {% block content %}
    -