Skip to content

Commit

Permalink
Merge pull request #19962 from code-dot-org/advocacy-map-hidden
Browse files Browse the repository at this point in the history
Advocacy map: show new map behind URL parameter
  • Loading branch information
breville committed Jan 12, 2018
2 parents 1b8bcb9 + f01aef7 commit c5db8e5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pegasus/sites.v3/code.org/public/advocacy/index.md
Expand Up @@ -2,13 +2,19 @@
title: Code.org Advocacy Coalition
theme: responsive
---

<link href="/css/interactive_map.css", rel="stylesheet"></link>

# Code.org Advocacy Coalition
The Code.org Advocacy Coalition is a non-partisan group that believes computer science should be part of the core curriculum in education, and that we must increase participation and access for female students and underrepresented minority students. Download a description of the coalition [here](http://code.org/files/CoalitionOnePager.pdf).


<%= view :interactive_map, use_url: false %>
<%=
if request.params["map_preview"]
view :advocacy_map
else
view :interactive_map, use_url: false
end
%>

<div style="clear:both"></div>

Expand Down
24 changes: 24 additions & 0 deletions pegasus/sites.v3/code.org/views/advocacy_map.haml
@@ -0,0 +1,24 @@
#viz1515704526398.tableauPlaceholder{:style => "position: relative"}
%noscript
%a{:href => "#"}
%img{:alt => " ", :src => "https://public.tableau.com/static/images/Co/Code/PriorityBills/1_rss.png", :style => "border: none"}/
%object.tableauViz{:style => "display:none;"}
%param{:name => "host_url", :value => "https%3A%2F%2Fpublic.tableau.com%2F"}/
%param{:name => "embed_code_version", :value => "3"}/
%param{:name => "site_root", :value => ""}/
%param{:name => "name", :value => "Code/PriorityBills"}/
%param{:name => "tabs", :value => "yes"}/
%param{:name => "toolbar", :value => "yes"}/
%param{:name => "static_image", :value => "https://public.tableau.com/static/images/Co/Code/PriorityBills/1.png"}/
%param{:name => "animate_transition", :value => "yes"}/
%param{:name => "display_static_image", :value => "yes"}/
%param{:name => "display_spinner", :value => "yes"}/
%param{:name => "display_overlay", :value => "yes"}/
%param{:name => "display_count", :value => "yes"}/
:javascript
var divElement = document.getElementById('viz1515704526398');
var vizElement = divElement.getElementsByTagName('object')[0];
if ( divElement.offsetWidth > 800 ) { vizElement.style.width='966px';vizElement.style.height='850px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.width='966px';vizElement.style.height='850px';} else { vizElement.style.width='100%';vizElement.style.height='950px';}
var scriptElement = document.createElement('script');
scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js';
vizElement.parentNode.insertBefore(scriptElement, vizElement);

0 comments on commit c5db8e5

Please sign in to comment.