Skip to content

Commit

Permalink
Merge pull request #66 from reactivemanifesto/rasummer/cookie-management
Browse files Browse the repository at this point in the history
Rasummer/cookie management
  • Loading branch information
jroper authored Jun 5, 2018
2 parents 3980e21 + 5421cc7 commit 8c4a38d
Show file tree
Hide file tree
Showing 15 changed files with 286 additions and 56 deletions.
22 changes: 22 additions & 0 deletions app/controllers/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,28 @@ class Application(components: ControllerComponents, implicit private val assetsF
)
}

val privacy = {
def render(lang: FullLang) = {
implicit val impLang = lang.lang
lang -> views.html.privacy.apply
}

cached(routes.Application.privacy,
render(en)
)
}

val cookie = {
def render(lang: FullLang) = {
implicit val impLang = lang.lang
lang -> views.html.cookie.apply
}

cached(routes.Application.cookie,
render(en)
)
}

/**
* The glossary page.
*/
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/index.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main("The Reactive Manifesto Admin") {
@optanonInsert = {}
@main("The Reactive Manifesto Admin", "ltr", optanonInsert) {
<main>
<header>
<h1>The <span>Reactive</span> Manifesto</h1>
Expand Down
4 changes: 3 additions & 1 deletion app/views/admin/list.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@(signatories: Seq[controllers.admin.FormattedSignatory])(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main("The Reactive Manifesto Admin") {
@optanonInsert = {}

@main("The Reactive Manifesto Admin", "ltr", optanonInsert) {
<main>
<header>
<h1>The <span>Reactive</span> Manifesto</h1>
Expand Down
4 changes: 3 additions & 1 deletion app/views/admin/login.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main("The Reactive Manifesto Admin") {
@optanonInsert = {}

@main("The Reactive Manifesto Admin", "ltr", optanonInsert) {
<main>
<header>
<h1>The <span>Reactive</span> Manifesto</h1>
Expand Down
46 changes: 46 additions & 0 deletions app/views/cookie.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@optanonInsert = {}

@main(s"${messages("cookie.title")} - ${messages("title")}", "ltr", optanonInsert) {
<main>
<header>
<a class="title-link" href="@routes.Application.index(lang.code)"><h1>@Html(messages("title.formatted", "<span>", "</span>"))</h1></a>
</header>
<article>
<h2>@messages("cookie.title")</h2>
<h3>Introduction</h3>
<p>This website ("<strong>Site</strong>") is owned and controlled by the Authors of the Reactive Manifesto ("<strong>Reactive Manifesto</strong>", "<strong>we</strong>", "<strong>us</strong>" or "<strong>our</strong>") .</p>
<p>Our Site uses technologies that enhance user friendliness and engagement, to keep the website operating as smoothly as possible and to provide web services and functionalities for each visitor. Examples of these technologies are cookies, pixel tags, local storage and scripts (hereinafter collectively referred to as "<strong>cookies</strong>").</p>
<p>Cookies may be either "persistent" cookies or "session" cookies. A persistent cookie consists of a text file sent by a web server to a web browser, which will be stored by the browser and will remain valid until its set expiry date (unless deleted by the visitor before the expiry date). A session cookie, on the other hand, will expire at the end of the visitor session, when the web browser is closed.</p>
<p>This cookie policy describes the options available to you how to manage your cookies, which cookies we use and for what purposes we use them.</p>

<h2>How To Manage Cookies</h2>
<p>If you do not want our websites to store cookies on your computer or mobile device, you can change your browser settings so that you receive a warning before certain cookies are stored. You can also adjust your settings so that your browser refuses most of our cookies or only certain cookies. You can also withdraw your consent to cookies by deleting the cookies that have already been stored.</p>
<p>Please be aware that if you do not want to accept any cookies, we cannot guarantee that our website will function properly. It may be that several functions will be unavailable to you or that you will even be unable to view certain parts of the website</p>
<p>Please note that you will have to change your settings for each browser and device you use. The procedures for changing your settings and cookies differ from browser to browser if necessary, use the help function on your browser or click on one of the links below to go directly to the use manual for your browser:<p>
<ul>
<li><a href="https://support.microsoft.com/en-us/help/17442/windows-internet-explorer-delete-manage-cookies" target="_blank">Internet Explorer</a></li>
<li><a href="https://support.mozilla.org/en-US/kb/delete-cookies-remove-info-websites-stored" target="_blank">Mozilla Firefox</a></li>
<li><a href="https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en" target="_blank">Google Chrome</a></li>
<li><a href="https://support.apple.com/kb/ph21411?locale=en_US" target="_blank">Safari</a></li>
<li><a href="https://www.opera.com/help/tutorials/security/privacy/" target="_blank">Opera</a></li>
<li><a href="https://www.adobe.com/privacy/cookies.html" target="_blank">Adobe (plug-in for flash cookies)</a></li>
</uL>
<p>There are also software products available that can manage cookies for you.</p>
<p>To find out more about cookies, including how to see what cookies have been set and how to manage or delete them, visit <a href="http://www.allaboutcookies.org/" target="_blank">All About Cookies.org</a>.</p>
<p>Because we respect your right to privacy, you <a class="optanon-toggle-display">can choose</a> not to allow some types of cookies. Below is a list of the cookies that get set on the reactivemanifesto.org domain. Blocking some types of cookies may impact your experience of the site and the services we are able to offer.</p>
<p><a class="optanon-toggle-display btn">Cookie Settings</a></p>
<hr>

<h2>Cookie Listing</h2>
<!-- OneTrust Cookies Policy start -->
<div id="optanon-cookie-policy"></div>
<!-- OneTrust Cookies Policy end -->
<br>
<h2>Policy Update</h2>
<p>We may change this cookie policy from time to time. If a fundamental change is involved that requires us to inform you about this, or if the change is in any other manner relevant to you, we will ensure that information is provided to you well in advance of the change actually taking effect.</p>
</article>
@footer.apply
</main>
}
1 change: 1 addition & 0 deletions app/views/footer.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
<br>
<p>@Html(messages("footer.ribbonSupport", "<a href='" + routes.Application.ribbons(lang.code) + "'>", "</a>"))</p>
<p class="copyright">&copy; @messages("footer.copyright")</p>
<p class="legal-links"><small><a href='/privacy'>Privacy Policy</a> | <a href="/cookie">Cookie Policy</a> | <a class="optanon-toggle-display">Cookie Settings</a></small></p>
</footer>
<a class="ribbon" href="@routes.Application.ribbons(lang.code)" style="right: 0; top:0; position: absolute;"><img src="@assetsFinder.path("images/ribbons/we-are-reactive-blue-right.png")"></a>
4 changes: 3 additions & 1 deletion app/views/glossary.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@(glossary: Html, dir: String)(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main(s"${messages("glossary.title")} - ${messages("title")}", dir) {
@optanonInsert = {}

@main(s"${messages("glossary.title")} - ${messages("title")}", dir, optanonInsert) {
<main>
<header>
<a class="title-link" href="@routes.Application.index(lang.code)"><h1>@Html(messages("title.formatted", "<span>", "</span>"))</h1></a>
Expand Down
55 changes: 33 additions & 22 deletions app/views/index.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@(manifesto: Html, fullLang: String, dir: String)(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main(messages("title"), dir) {

@optanonInsert = {
Optanon.InsertHtml('<a href="https://twitter.com/share" class="twitter-share-button" data-lang="@lang.code">Tweet</a><iframe src="//www.facebook.com/plugins/like.php?locale=@fullLang&href=http%3A%2F%2Freactivemanifesto.org&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21&amp;appId=17899947359" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe><div class="g-plus" data-action="share" data-annotation="bubble" data-href="http://reactivemanifesto.org"></div>', 'share-buttons', null, null, 4)
}

@main(messages("title"), dir, optanonInsert) {
<div id="sign">
<span class="close">×</span>
<div data-bind="with: loggedInUser">
Expand Down Expand Up @@ -80,10 +85,14 @@ <h1>@Html(messages("title.formatted", "<span>", "</span>"))</h1>
</div>

<article class="social">
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="@lang.code">Tweet</a>
<iframe src="//www.facebook.com/plugins/like.php?locale=@fullLang&href=http%3A%2F%2Freactivemanifesto.org&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21&amp;appId=17899947359" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
<div class="g-plus" data-action="share" data-annotation="bubble" data-href="http://reactivemanifesto.org"></div>
<script type="IN/Share" data-url="http://reactivemanifesto.org" data-counter="right"></script>
<section id="share-buttons">

</section>

<!-- Turning off this for now as it doesn't play nice with onetrust cookie tool
<script type="IN/Share" data-url="http://reactivemanifesto.org" data-counter="right"></script>
-->

<p>
<a class="" href="@routes.Application.glossary(lang.code)">@messages("glossary.title")</a>
</p>
Expand Down Expand Up @@ -152,23 +161,25 @@ <h1>@Html(messages("title.formatted", "<span>", "</span>"))</h1>
$("body").removeClass("opened");
};
}());
</script>


// SHARE BUTTONS
// Twitter
;(function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}
}(document, 'script', 'twitter-wjs'));

// Google
;(function() {
window.___gcfg = {
lang: '@lang.code'
};
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
}());
<script type="text/plain" class="optanon-category-4">

// SHARE BUTTONS
// Twitter
;(function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}
}(document, 'script', 'twitter-wjs'));

// Google
;(function() {
window.___gcfg = {
lang: '@lang.code'
};
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
}());
</script>
<script src="https://platform.linkedin.com/in.js" type="text/javascript">lang: @fullLang</script>
<script src="https://platform.linkedin.com/in.js" type="text/plain" class="optanon-category-4">lang: @fullLang</script>
}
4 changes: 3 additions & 1 deletion app/views/list.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

@main(s"${messages("list.title")} - ${messages("title")}") {
@optanonInsert = {}

@main(s"${messages("list.title")} - ${messages("title")}", "ltr", optanonInsert) {
<main>
<header>
<h1>@Html(messages("title.formatted", "<span>", "</span>"))</h1>
Expand Down
58 changes: 33 additions & 25 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
@(title: String, textDirection: String = "ltr")(content: Html)(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)
@(title: String, textDirection: String = "ltr", optanonInsert: Html)(content: Html)(implicit messages: MessagesApi, lang: Lang, assetsFinder: AssetsFinder)

<!DOCTYPE html>
<html lang="@lang.code" dir="@textDirection">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>@title</title>
<link rel="stylesheet" href="@assetsFinder.path("stylesheets/main.css")" />
<link rel="shortcut icon" href="@assetsFinder.path("images/favicon.ico")" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<script src="@assetsFinder.path("lib/jquery/jquery.js")" type="text/javascript"></script>
<script src="@assetsFinder.path("lib/knockout/knockout.js")" type="text/javascript"></script>
<script src="@assetsFinder.path("javascripts/main.js")" type="text/javascript"></script>
</head>
<body>
@content
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>@title</title>
<link rel="stylesheet" href="@assetsFinder.path("stylesheets/main.css")" />
<link rel="shortcut icon" href="@assetsFinder.path("images/favicon.ico")" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<!-- OneTrust Cookies Consent Notice (Production Standard, reactivemanifesto.org, en-GB) start -->
<script src="https://optanon.blob.core.windows.net/consent/6b6fabc7-9d0c-4c69-94aa-bf764de77319.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
function OptanonWrapper() {
@optanonInsert
}
</script>
<!-- OneTrust Cookies Consent Notice (Production Standard, reactivemanifesto.org, en-GB) end -->
<script src="@assetsFinder.path("lib/jquery/jquery.js")" type="text/javascript"></script>
<script src="@assetsFinder.path("lib/knockout/knockout.js")" type="text/javascript"></script>
<script src="@assetsFinder.path("javascripts/main.js")" type="text/javascript"></script>
</head>
<body>
@content

<script src="@assetsFinder.path("lib/retinajs/retina.js")" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-42352555-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
<script src="@assetsFinder.path("lib/retinajs/retina.js")" type="text/javascript"></script>
<script type="text/plain" class="optanon-category-2">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-42352555-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Loading

0 comments on commit 8c4a38d

Please sign in to comment.