Commit 26245951 authored by Jessé Vermeulen's avatar Jessé Vermeulen

Merge branch 'dev' into 'master'

Dev to master

See merge request bitsoffreedom/timetodisagree.eu!4
parents 06399fc3 ed5fb267
Pipeline #1493 passed with stage
in 1 second
/* Accordions */
-webkit-keyframes spinAround {
from {
-webkit-transform: rotate(0);
transform: rotate(0);
}
to {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spinAround {
from {
-webkit-transform: rotate(0);
transform: rotate(0);
}
to {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.accordions .accordion {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
padding: 20px;
}
/* .accordions .accordion:not(:last-child) {
margin-bottom: 1.5rem;
} */
.accordions .accordion strong {
}
/* .accordions .accordion a:not(.button):not(.tag) {
text-decoration: underline;
}
.accordions .accordion.is-small {
font-size: 0.75rem;
}
.accordions .accordion.is-medium {
font-size: 1.25rem;
}
.accordions .accordion.is-large {
font-size: 1.5rem;
}
.accordions .accordion:not(:first-child) .accordion-header {
border-radius: 0;
}
.accordions .accordion:not(:last-child) {
margin-bottom: 0;
}
.accordions .accordion:not(:last-child) .accordion-content {
border-radius: 0;
} */
.accordions .accordion .toggle,
.accordions .accordion [data-action='toggle'] {
cursor: pointer;
}
.accordions .accordion .accordion-header {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
/* background-color: #4a4a4a; */
/* border-radius: 3px 3px 0 0; */
/* color: #fff; */
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
/* line-height: 1.25; */
/* padding: 0.5em 0.75em; */
position: relative;
font-size: 16pt;
font-family: "Lato Bold", Helvetica, sans-serif;
text-transform: initial;
}
.accordions .accordion .accordion-header.toggle {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-moz-appearance: none;
-webkit-appearance: none;
/* background-color: rgba(10, 10, 10, 0.6); */
border: none;
/* border-radius: 4px; */
display: inline-block;
-webkit-box-flex: 0;
-ms-flex-positive: 0;
flex-grow: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
/* height: 20px;
width: 20px;
max-height: 20px;
max-width: 20px;
min-height: 20px;
min-width: 20px; */
outline: 0;
position: relative;
vertical-align: top;
background-image: url('/wp-content/images/icons/plus.png');
background-position: right 20px top 8px;
background-repeat: no-repeat;
/* font-size: 1.6em; */
}
.accordions .accordion.is-active .accordion-header.toggle {
background-image: url('/wp-content/images/icons/minus.png');
}
.accordions .accordion .accordion-header .toggle::before {
/* color: #fff; */
content: '\002B';
display: flex;
justify-content: space-around;
align-items: center;
}
.accordions .accordion .accordion-header .toggle::after {
display: none;
}
.accordions .accordion .accordion-header + .accordion-body {
overflow-y: hidden;
max-height: 0;
/* color: #4a4a4a; */
/* border: 1px solid #dbdbdb; */
border-radius: 3px;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: none;
-webkit-transition: max-height .5s ease;
transition: max-height .5s ease;
}
.accordions .accordion .accordion-header + .accordion-body .accordion-content {
padding: 1em 1.25em;
}
.accordions
.accordion
.accordion-header
+ .accordion-body
.accordion-content
code,
.accordions
.accordion
.accordion-header
+ .accordion-body
.accordion-content
pre {
background-color: #fff;
}
.accordions
.accordion
.accordion-header
+ .accordion-body
.accordion-content
pre
code {
background-color: transparent;
}
.accordions .accordion.is-active .accordion-header .toggle::before {
content: '\002D';
}
.accordions .accordion.is-active .accordion-body {
max-height: 100em;
/* max-height: intrinsic;
max-height: -moz-fit-content;
max-height: fit-content; */
-webkit-transition: max-height 1s ease;
transition: max-height 1s ease;
}
/* End Accordions */
......@@ -15,23 +15,37 @@ $questions = get_posts( array(
'suppress_filters' => true,
) );
?>
<ul class="filters button-group filters-button-group">
<?php
foreach ($audiences as $audience) {
?>
<button data-filter=".<?php echo $audience->slug ?>" class="filter button">
<?php echo $audience->name ?> (<?php echo $audience->description ?>)
</button>
<?php
}
?>
</ul>
<div class="site-description"><?php bloginfo( 'description' ); ?></div>
<div class="collapse-all-group">
<button class="expand-all button expand"><?php echo pll__('expand all') ?></button>
<button class="collapse-all button collapse" style="display: none;"><?php echo pll__('collapse all') ?></button>
<div class="site-search">
<div class="searchBox-label"><?php echo pll__('Find our what you want to know on the GDPR') ?></div>
<div class="searchBox">
<input type="text" id="searchText" class="input" placeholder="<?php echo pll__('Enter your term...') ?>">
</div>
<div class="filterBox">
<div class="filters button-group filters-button-group">
<?php
foreach ($audiences as $audience) {
?>
<button data-filter=".<?php echo $audience->slug ?>" class="filter button">
<?php echo $audience->name ?>
</button>
<?php
}
?>
</div>
</div>
</div>
<ul class="questions accordions">
<div class="collapse-all-group">
<button class="expand-all button expand"><?php echo pll__('expand all') ?></button>
<button class="collapse-all button collapse" style="display: none;"><?php echo pll__('collapse all') ?></button>
</div>
<div class="no-results" style="display: none;"><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'intergalactic' ); ?></div>
<?php
foreach ($questions as $question) {
......@@ -44,10 +58,16 @@ $questions = get_posts( array(
}
?>
<li id="<?php echo $question->ID ?>" class="accordion <?php echo implode(' ', $cat_class) ?>">
<h4 class="accordion-header toggle" data-action="toggle"><?php echo $question->post_title ?></h4>
<h4 class="accordion-header toggle title" data-action="toggle"><div><?php echo $question->post_title ?></div></h4>
<div class="accordion-body">
<div class="acordion-content"><?php echo $question->post_content ?></div>
</div>
</li>
<?php } ?>
</ul>
<div class="site-submit">
<div class="submitBox">
<?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
</div>
</div>
......@@ -11,14 +11,23 @@
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
<div class="site-info">
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'intergalactic' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'intergalactic' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
<?php printf( __( 'Theme: %1$s by %2$s.', 'intergalactic' ), 'Intergalactic', '<a href="http://wordpress.com/themes/intergalactic/" rel="designer">WordPress.com</a>' ); ?>
</div><!-- .site-info -->
<div class="coordinators-label"><?php echo pll__('Campaign coordinators') ?></div>
<div class="coordinators">
<a href="https://www.bof.nl/" target="_blank" title="Bits of Freedom"><img src="/wp-content/images/logos/bof.png" alt="Bits of Freedom"></a>
<a href="https://www.edri.org/" target="_blank" title="European Data Rights"><img src="/wp-content/images/logos/edri.png" alt="European Data Rights"></a>
<a href="https://panoptykon.org/" target="_blank" title="Fundacja Panoptykon"><img src="/wp-content/images/logos/panoptykon.png" alt="Fundacja Panoptykon"></a>
<?php if ( has_nav_menu( 'footer' ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'footer', 'depth' => 1, 'container_class' => 'footer-links' ) ); ?>
<?php endif; ?>
</div>
<div class="partners-label"><?php echo pll__('Campaign partners') ?></div>
</div>
<!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
......
......@@ -45,6 +45,7 @@ function intergalactic_setup() {
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'intergalactic' ),
'social' => __( 'Social Links Menu', 'intergalactic' ),
'footer' => __( 'Footer Menu', 'intergalactic' ),
) );
/*
......@@ -99,6 +100,8 @@ add_action( 'widgets_init', 'intergalactic_widgets_init' );
* Enqueue scripts and styles.
*/
function intergalactic_scripts() {
wp_enqueue_style( 'typography-style', get_template_directory_uri() . '/typography.css', array(), '0.0.1' );
wp_enqueue_style( 'intergalactic-style', get_stylesheet_uri() );
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
......@@ -107,16 +110,21 @@ function intergalactic_scripts() {
wp_enqueue_script( 'intergalactic-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_style( 'accordions-style', get_template_directory_uri() . '/accordions.css', array(), '0.0.1' );
wp_enqueue_style( 'gdpr-style', get_template_directory_uri() . '/gdpr.css', array(), '0.0.1' );
wp_enqueue_script( 'searcher-script', get_template_directory_uri() . '/js/searcher.js', array( 'jquery' ), '20182205', true );
wp_enqueue_script( 'gdpr-script', get_template_directory_uri() . '/js/gdpr.js', array( 'jquery' ), '20181905', true );
wp_enqueue_script( 'matomo-script', get_template_directory_uri() . '/js/matomo.js', array(), '20182405', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
wp_enqueue_style( 'intergalactic-lato', intergalactic_fonts_url(), array(), null );
}
add_action( 'wp_enqueue_scripts', 'intergalactic_scripts' );
......@@ -124,25 +132,25 @@ add_action( 'wp_enqueue_scripts', 'intergalactic_scripts' );
* Register Google Fonts
*/
function intergalactic_fonts_url() {
$fonts_url = '';
$fonts_url = get_site_url();
/* Translators: If there are characters in your language that are not
* supported by Lato, translate this to 'off'. Do not translate
* into your own language.
*/
$arimo = _x( 'on', 'Lato font: on or off', 'intergalactic' );
if ( 'off' !== $arimo ) {
$font_families = array();
$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic&subset=latin,latin-ext';
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
// $arimo = _x( 'on', 'Lato font: on or off', 'intergalactic' );
//
// if ( 'off' !== $arimo ) {
// $font_families = array();
// $font_families[] = 'Lato:300,400,700,300italic,400italic,700italic&subset=latin,latin-ext';
//
// $query_args = array(
// 'family' => urlencode( implode( '|', $font_families ) ),
// 'subset' => urlencode( 'latin,latin-ext' ),
// );
//
// $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
// }
return $fonts_url;
......@@ -178,6 +186,16 @@ add_action( 'admin_print_styles-appearance_page_custom-header', 'intergalactic_a
*/
pll_register_string('expand-all', 'expand all', $group, $multiline); // register 'expand all' button text
pll_register_string('collapse-all', 'collapse all', $group, $multiline); // register 'collapse all' button text
pll_register_string('search-box-title', 'Find our what you want to know on the GDPR', $group, $multiline); // register search box title text
pll_register_string('search-box-placeholder', 'Enter your term...', $group, $multiline); // register search box placeholder text
pll_register_string('filter-label', 'Filters', $group, $multiline); // register Filter label text
pll_register_string('question-label', 'Still got questions? send us one here', $group, $multiline); // register submit question label text
pll_register_string('question-placeholder', 'Enter your question', $group, $multiline); // register submit question placeholder text
pll_register_string('question-button', 'Send', $group, $multiline); // register submit question button text
pll_register_string('footer-coordinators', 'Campaign coordinators', $group, $multiline); // register footer texts
pll_register_string('footer-partners', 'Campaign partners', $group, $multiline); // register footer texts
/**
* Implement the Custom Header feature.
......
This diff is collapsed.
......@@ -31,27 +31,8 @@ $header = get_header_image();
pll_the_languages(array('dropdown' => 1));
?>
<div class="site-branding">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="/wp-content/images/logos/GDPR.png" title="GDPR" /></a></h1>
</div>
<button class="menu-toggle x">
<span class="lines"></span>
<span class="screen-reader-text"><?php _e( 'Primary Menu', 'intergalactic' ); ?></span>
</button>
<div class="slide-menu">
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
<?php if ( has_nav_menu( 'social' ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'social', 'depth' => 1, 'link_before' => '<span class="screen-reader-text">', 'link_after' => '</span>', 'container_class' => 'social-links' ) ); ?>
<?php endif; ?>
<?php if ( is_active_sidebar( 'sidebar-1' ) ) {
get_sidebar();
} ?>
</div>
</header><!-- #masthead -->
<div id="content" class="site-content">
......@@ -60,5 +60,29 @@
$('.expand').show();
}
});
// Question search
$('.accordions').searcher({
itemSelector: '.accordion',
textSelector: 'div',
inputSelector: '#searchText',
highlight: "<span class='highlight'>$1</span>",
toggle: function(item, containsText) {
if (containsText) $(item).slideDown();
else $(item).slideUp();
}
});
// show no results
$('#searchText').on('keyup', function() {
setTimeout(function() {
var count = $('.accordion:visible');
if (count.length == 0) {
$('.no-results').slideDown();
} else {
$('.no-results').slideUp();
}
}, 500);
});
});
})(jQuery);
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u = '//stats.bof.nl/';
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '22']);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
s.parentNode.insertBefore(g, s);
})();
/*! jQuery Searcher Plugin - v0.3.0 - 2016-01-29
* https://github.com/lloiser/jquery-searcher/
* Copyright (c) 2016 Lukas Beranek; Licensed MIT
*/
(function(){"use strict";function a(a){function b(b,c){this.element=b,this.options=a.extend({},f,c),this._create()}function c(a){return a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}var d="searcher",e="plugin_"+d,f={itemSelector:"tbody > tr",textSelector:"td",inputSelector:"",caseSensitive:!1,toggle:function(b,c){a(b).toggle(c)}};b.prototype={dispose:function(){this._$input.unbind("."+d);var a=this.options,b=a.toggle||f.toggle;this._$element.find(a.itemSelector).each(function(){b(this,!0)})},filter:function(b){this._lastValue=b;var d=this.options,e=d.textSelector,g=d.toggle||f.toggle,h="gm"+(d.caseSensitive?"":"i"),i=new RegExp("("+c(b)+")",h);this._$element.find(d.itemSelector).each(function(){var b=a(this),c=e?b.find(e):b,d=!1;c=c.each(function(){return d=d||!!a(this).text().match(i),!d}),g(this,d)})},_create:function(){var b=this.options;this._$element=a(this.element),this._fn=a.proxy(this._onValueChange,this);var c="input."+d+" change."+d+" keyup."+d;this._$input=a(b.inputSelector).bind(c,this._fn),this._lastValue=null;var e=b.toggle||f.toggle;this._$element.find(b.itemSelector).each(function(){e(this,!0)})},_onValueChange:function(){var a=this._$input.val();a!==this._lastValue&&this.filter(a)}},a.fn[d]=function(c){var d=Array.prototype.slice.call(arguments,1);return this.each(function(){var f=a.data(this,e),g=typeof c;"string"===g&&f?(f[c].apply(f,d),"dispose"===c&&a.removeData(this,e)):"object"===g&&(f?a.extend(f.options,c):a.data(this,e,new b(this,c)))})}}"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}).call(this);
\ No newline at end of file
/* Webfont: LatoLatin-Bold */
@font-face {
font-family: "Lato Bold";
src: url('/wp-content/fonts/LatoLatin-Bold.eot');
src:
url('/wp-content/fonts/LatoLatin-Bold.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-Bold.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-Bold.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-Bold.ttf') format('truetype');
font-style: normal;
font-weight: bold;
text-rendering: optimizeLegibility;
}
/* Webfont: LatoLatin-BoldItalic */
@font-face {
font-family: 'Lato Bold Italic';
src: url('/wp-content/fonts/LatoLatin-BoldItalic.eot');
src:
url('/wp-content/fonts/LatoLatin-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-BoldItalic.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-BoldItalic.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-BoldItalic.ttf') format('truetype');
font-style: italic;
font-weight: bold;
text-rendering: optimizeLegibility;
}
/* Webfont: LatoLatin-Italic */
@font-face {
font-family: 'Lato Italic';
src: url('/wp-content/fonts/LatoLatin-Italic.eot');
src:
url('/wp-content/fonts/LatoLatin-Italic.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-Italic.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-Italic.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-Italic.ttf') format('truetype');
font-style: italic;
font-weight: normal;
text-rendering: optimizeLegibility;
}
/* Webfont: LatoLatin-Light */
@font-face {
font-family: 'Lato Light';
src: url('/wp-content/fonts/LatoLatin-Light.eot');
src:
url('/wp-content/fonts/LatoLatin-Light.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-Light.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-Light.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-Light.ttf') format('truetype');
font-style: normal;
font-weight: normal;
text-rendering: optimizeLegibility;
}
/* Webfont: LatoLatin-LightItalic */
@font-face {
font-family: 'Lato Light Italic';
src: url('/wp-content/fonts/LatoLatin-LightItalic.eot');
src:
url('/wp-content/fonts/LatoLatin-LightItalic.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-LightItalic.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-LightItalic.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-LightItalic.ttf') format('truetype');
font-style: italic;
font-weight: normal;
text-rendering: optimizeLegibility;
}
/* Webfont: LatoLatin-Regular */
@font-face {
font-family: 'Lato';
src: url('/wp-content/fonts/LatoLatin-Regular.eot');
src:
url('/wp-content/fonts/LatoLatin-Regular.eot?#iefix') format('embedded-opentype'),
url('/wp-content/fonts/LatoLatin-Regular.woff2') format('woff2'),
url('/wp-content/fonts/LatoLatin-Regular.woff') format('woff'),
url('/wp-content/fonts/LatoLatin-Regular.ttf') format('truetype');
font-style: normal;
font-weight: normal;
text-rendering: optimizeLegibility;
}
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