-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enhance/CMD-182-design-tokens
- Loading branch information
Showing
4 changed files
with
61 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Utilities for Portal | ||
""" | ||
|
||
def reverse_slugify(slug): | ||
""" | ||
:param str slug: A name that is lowercase and uses hyphens instead of spaces | ||
:rtype: str | ||
..note:: Usage: | ||
``` | ||
slug = "and-hello-world-this-is-a-slug" | ||
original_text = reverse_slugify(slug) | ||
print(original_text) # Output: "And Hello World This is a Slug" | ||
``` | ||
""" | ||
|
||
words_to_exclude = {'a', 'is', 'to', 'of', 'for', 'and', 'or', 'in'} | ||
words = slug.split('-') | ||
words_for_title = [ word if word.lower() in words_to_exclude else word.capitalize() for word in words ] | ||
text = ' '.join(words_for_title) | ||
|
||
return text |
49 changes: 29 additions & 20 deletions
49
apps/tup-cms/src/taccsite_cms/templates/snippets/js-epic-data-dashboard.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
<!-- Tableau Snippet: Start --> | ||
<!-- TACC: For responsiveness, added class `embed-responsive` --> | ||
<div class="tableauPlaceholder embed-responsive" id="viz1669848991031" style="position: relative"> | ||
<noscript><a href="#"><img alt="LandingPage " src="https://public.tableau.com/static/images/EP/EPICDashboard/LandingPage/1_rss.png" style="border: none" /></a></noscript><object class="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="EPICDashboard/LandingPage" /><param name="tabs" value="no" /><param name="toolbar" value="yes" /><param name="static_image" value="https://public.tableau.com/static/images/EP/EPICDashboard/LandingPage/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" /><param name="language" value="en-US" /></object></div> | ||
<script type="text/javascript"> | ||
var divElement = document.getElementById("viz1669848991031"); | ||
var vizElement = divElement.getElementsByTagName("object")[0]; | ||
if (divElement.offsetWidth > 800) { | ||
vizElement.style.width = "1140px"; | ||
vizElement.style.height = "795px"; | ||
} else if (divElement.offsetWidth > 500) { | ||
vizElement.style.width = "1140px"; | ||
vizElement.style.height = "795px"; | ||
} else { | ||
vizElement.style.width = "100%"; | ||
vizElement.style.height = "1227px"; | ||
} | ||
/* TACC: 100% width prevents overflow */ vizElement.style.width = "100%"; | ||
var scriptElement = document.createElement("script"); | ||
scriptElement.src = "https://public.tableau.com/javascripts/api/viz_v1.js"; | ||
vizElement.parentNode.insertBefore(scriptElement, vizElement); | ||
</script><!-- Tableau Snippet: End --> | ||
<div class='tableauPlaceholder embed-responsive' id='viz1723091620076' style='position: | ||
relative'><noscript><a href='#'><img alt='LandingPage ' | ||
src='https://public.tableau.com/static/images/EP/EPICDas | ||
hboard3_0/LandingPage/1_rss.png' style='border: none' | ||
/></a></noscript><object class='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='EPICDashboard3_0/LandingPage' /><param name='tabs' | ||
value='no' /><param name='toolbar' value='yes' /><param name='static_image' | ||
value='https://public.tableau.com/static/images/EP/EPIC | ||
Dashboard3_0/LandingPage/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' /><param name='language' value='en-US' | ||
/><param name='filter' value='publish=yes' /></object></div> | ||
<script type='text/javascript'> | ||
var divElement = document.getElementById('viz1723091620076'); | ||
var vizElement = divElement.getElementsByTagName('object')[0]; | ||
if ( divElement.offsetWidth > 800 ) { | ||
vizElement.style.width='1140px';vizElement.style.height='795px';} else if ( | ||
divElement.offsetWidth > 500 ) { | ||
vizElement.style.width='1140px';vizElement.style.height='795px';} else { | ||
vizElement.style.width='100%';vizElement.style.height='2427px';} | ||
/* TACC: 100% width prevents overflow */ vizElement.style.width = "100%"; | ||
var scriptElement = document.createElement('script'); | ||
scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; | ||
vizElement.parentNode.insertBefore(scriptElement, vizElement); | ||
</script> | ||
<!-- Tableau Snippet: End --> |