Commit 2f360959 authored by sajolida's avatar sajolida

Merge branch 'web/17821-openpgp-pidgin-survey'

parents 8858dd0d 818402b5
......@@ -75,8 +75,20 @@ span.highlight {
/* Survey message */
#survey {
.survey {
background: #b49cd3 url('lib/survey.png') no-repeat top 50% left 2em !important;
border: none !important;
padding-left: 9em !important;
font-size: 16px;
}
.survey .answer {
background: #53b351;
color: black !important;
font-weight: bold;
border-radius: 0.5em;
padding: 0.5em 0.25em;
text-align: center;
box-shadow: 1px 1px 5px #222;
width: 100%;
}
......@@ -11,6 +11,27 @@
</a>
</div>
<style>
#online-privacy {
background: #b49cd3 url('home/online-privacy.svg') no-repeat top 50% right 2em !important;
padding-left: 1em !important;
padding-right: 400px !important;
}
</style>
<a id="online-privacy" class="random-message survey" href="https://survey.tails.boum.org/index.php/229366?lang=en" data-display-probability="0.05" data-display-offset="1">
<h2>Survey on <strong>ease of use and online privacy tools</strong></h2>
<p><b>Contribute to Tails by answering these few questions!</b> (2&ndash;5 minutes)<br/>
To improve Tails we need to learn how people use it but, unlike others,
we don't track you against your will. Your answers are anonymous and
only our team can access the data.</p>
<p class="answer">Answer the survey</p>
</a>
<div>
[[!inline pages="home/donate.inline" raw="yes" sort="age"]]
</div>
......
......@@ -2,14 +2,13 @@ document.addEventListener('DOMContentLoaded', function() {
document.title = "Tails";
var date = Date.now()
var randomMessages = document.getElementsByClassName('random-message');
for (let i = 0; i < randomMessages.length; i++) {
var message = randomMessages[i]
if(Math.floor(1/message.dataset.displayProbability * Math.random()) == 0) {
var offset = (message.dataset.displayOffset == null) ? 0 : Number(message.dataset.displayOffset);
if((Math.round(date / 1000 / 60 / 5) + offset) % Math.round(1 / message.dataset.displayProbability) == 0) { // divide time since epoch by slots of 5 minutes
message.style.display = "block";
if(message.id == "donate") {
document.documentElement.dataset.hideSidebarDonate = "true";
}
}
}
......
This diff is collapsed.
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