Commit 1a273a97 authored by Sven Franck's avatar Sven Franck

erp5_ci_slideshow: add handler and theme for no-product OSOE

parent f4d21262
......@@ -32,7 +32,11 @@ def removeSlidesWithoutDetailsFromNotes(content):
def removeEmptyDetails(content):
return content.replace('<details open="open"></details>', '')
def getThemeFromFirstFollowUpProduct():
def getThemeFromFirstFollowUpProduct(reference):
theme = None
osoe_match_string = "osoe"
# first try to theme to Software
follow_up_list = context.getFollowUpValueList(
portal_type="Product",
checked_permission='View'
......@@ -40,7 +44,22 @@ def getThemeFromFirstFollowUpProduct():
if len(follow_up_list) > 0:
full_title = follow_up_list[0].getTitle()
return full_title.split(" Software")[0].lower()
theme = full_title.split(" Software")[0].lower()
# then to OSOE extra for Klaus
# XXX this should be relative to the website the presentation is being
# viewed from. from OSOE => osoe theme, from ERP5 => erp5 theme
category_list = context.getCategoryList()
if len(category_list) > 0:
for category in category_list:
if category.find(osoe_match_string) > 1:
theme = osoe_match_string
#3 fallback to Nexedi
if theme is not None:
return theme
return "nexedi"
document = context
......@@ -48,8 +67,9 @@ document = context
# wkhtmltopdf
document_output_type = document.REQUEST.form.get("output", default=None)
document_reference = document.getReference()
document_content = removeEmptyDetails(document.getTextContent())
document_theme = getThemeFromFirstFollowUpProduct()
document_theme = getThemeFromFirstFollowUpProduct(document_reference)
document_title = document.getTitle()
document_description = document.getDescription()
document_creation_year = document.getCreationDate().strftime('%Y')
......@@ -110,7 +130,7 @@ if document_output_type == "footer":
<body class="ci-presentation" onload="setPlaceholdersWithUrlParameters()">
<div class="ci-presentation-footer">
<div class="ci-presentation-container-left">
<img src="NXD-Media.Logo.Nexedi?format=png" alt="Nexedi Logo" />
<img src="NXD-Media.Logo.Nexedi?format=png&display=xsmall" alt="Nexedi Logo" />
</div>
<div class="ci-presentation-container-center">%s</div>
<div class="ci-presentation-container-right">
......@@ -150,8 +170,7 @@ if document_output_type == "cover":
<style type="text/css">
html .ci-presentation-intro.present:before {
content: "%s";
background: #FFF url("%s?format=png") center no-repeat;
background-size: 300px;
background: #FFF url("%s?format=png&display=small") center no-repeat;
}
</style>
</head>
......
......@@ -43,9 +43,9 @@ html .ci-presentation img {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
max-width: 100%;
width: auto;
max-height: 80%;
width: 100%;
min-width: 80%;
}
/* margin on no-image-slides */
......@@ -93,8 +93,15 @@ html .ci-presentation details {
html .ci-presentation details ul {
margin-top: 5%;
}
html .ci-presentation details ul li {
font-size: 100%;
html .ci-presentation details p + ul {
margin-top: 0;
}
html .ci-presentation details ul li,
html .ci-presentation details p {
font-size: 75%;
}
html .ci-presentation summary::-webkit-details-marker {
display: none;
}
/* footer */
......@@ -118,6 +125,7 @@ html .ci-presentation .ci-presentation-footer > div {
html .ci-presentation .ci-presentation-header > div img,
html .ci-presentation .ci-presentation-footer > div img {
max-width: 8em;
min-width: initial;
}
/* move side elements to edges */
......@@ -172,6 +180,85 @@ html .ci-presentation .ci-presentation-intro.present + .ci-presentation-header {
/* =============================== Themes =============================== */
/* ------------------------- OSOE THEME (Default) ------------------------- */
/* colors: #b2cd39, #03446a, #ffffff, #969696 */
/* presentation themed css */
/* grey header/footer/intro font color */
.ci-osoe .ci-presentation-header h2,
.ci-osoe .ci-presentation-footer,
.ci-osoe .ci-presentation-intro.present > h2,
.ci-osoe .ci-presentation-intro.present:before,
.ci-osoe h1,
.ci-osoe ul li,
.ci-osoe p,
.ci-osoe div {
color: #969696;
}
/* background logo size */
.ci-osoe .ci-presentation-intro.present:before {
background-size: 90%;
}
/* intro slide background */
.ci-osoe .ci-presentation-intro.present {
/* background: linear-gradient(180deg, #b2cd39 80%, white 0px); */
background: #b2cd39;
color: #fff;
}
.ci-osoe .ci-presentation-intro.present > h2 {
background: #fff;
}
/* override reveal.js colors */
.ci-osoe .slide-number {
background-color: #b2cd39;
}
.ci-osoe .slide-number span {
color: #fff;
}
.ci-osoe .reveal .controls .navigate-left,
.ci-osoe .reveal .controls .navigate-left.enabled {
border-right-color: #b2cd39;
}
.ci-osoe .reveal .controls .navigate-right,
.ci-osoe .reveal .controls .navigate-right.enabled {
border-left-color: #b2cd39;
}
.ci-osoe .reveal .controls .navigate-up,
.ci-osoe .reveal .controls .navigate-up.enabled {
border-bottom-color: #b2cd39;
}
.ci-osoe .reveal .controls .navigate-down,
.ci-osoe .reveal .controls .navigate-down.enabled {
border-top-color: #b2cd39;
}
.ci-osoe .reveal .controls .navigate-left.enabled:hover {
border-right-color: #03446a;
}
.ci-osoe .reveal .controls .navigate-right.enabled:hover {
border-left-color: #03446a;
}
.ci-osoe .reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #03446a;
}
.ci-osoe .reveal .controls .navigate-down.enabled:hover {
border-top-color: #03446a;
}
/* progress bar */
.ci-osoe .reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.ci-osoe .reveal .progress span {
background: #b2cd39;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
/* ------------------------- NEXEDI THEME (Default) ------------------------- */
/* colors: #2B2B5D, #1C76BB, #ffffff, #969696 */
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66677513.65</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>custom.css</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>15186</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -131,4 +131,3 @@ details {
.ci-presentation pre {
font-size: 10pt !important;
}
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66677539.09</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>custom_pdf.css</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2611</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66433760.5</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>reveal_custom.css</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>52021</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66503151.54</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>white_custom.css</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6160</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66435709.18</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>reveal_custom.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>131737</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428563.32</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>zenburn.css</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>946</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428457.18</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>classList.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1582</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428483.12</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>head.min.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>9677</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428506.35</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>html5shiv.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>235</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66426261.86</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>highlight.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>449493</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427809.54</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>example.html</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4170</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427764.51</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>markdown.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>12248</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427853.81</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>markdown.md</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>229</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427786.02</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>marked.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>15764</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427894.64</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>math.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1687</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427952.15</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>client.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>368</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66427976.67</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>index.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1795</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428005.01</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>master.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>819</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428065.67</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>package.json</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>393</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428170.85</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>client.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1879</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428141.49</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>index.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1849</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428116.9</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>notes.html</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>9504</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428209.51</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>notes.html</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>10126</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428232.69</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>notes.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4094</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428273.61</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>print-pdf.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1214</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428325.17</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>search.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7150</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
......@@ -6,10 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66428356.71</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>zoom.js</string> </value>
......@@ -22,10 +18,6 @@
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7988</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment