Skip to content

Commit d752c66

Browse files
committed
Merge branch 'release-2.2.0'
2 parents 18d9668 + ff0e8ff commit d752c66

File tree

15 files changed

+169
-31
lines changed

15 files changed

+169
-31
lines changed

CHANGELOG.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,38 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [v2.2.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v2.1.0...v2.2.0) - 2019-06-27
8+
9+
### Added
10+
- Module discopower: Add style rules and logos for the buttons of the IdPs:
11+
- OpenAIRE
12+
- OpenMinTeD
13+
- QQ
14+
- WeChat
15+
- Epos
16+
- Add info about compatiblity in README.
17+
- Enable/disable cookie banner functionality via setting in config file.
18+
19+
### Changed
20+
- Update instructions on module config file usage.
21+
- Update style of Google login button.
722

823
## [v2.1.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v2.0.0...v2.1.0) - 2018-10-18
924

1025
### Added
11-
- Add banner and an extra view for cookies options
12-
- Add corner ribbon that displays customisable text
13-
- Add this changelog file
26+
- Add banner and an extra view for cookies options.
27+
- Add corner ribbon that displays customisable text.
28+
- Add this changelog file.
1429
- Module discopower: Add style rules and logos for the buttons of the IdPs:
1530
- eduTEAMS
1631
- EGI
1732
- Aria
1833

1934
### Changed
20-
- Change vanilla logo and favicon
35+
- Change vanilla logo and favicon.
2136
- Move wording and links from the templates of several modules to the related
22-
definition file
23-
- Render header logo link url customisable
37+
definition file.
38+
- Render header logo link url customisable.
2439

2540
## [v2.0.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v1.0.0...v2.0.0) - 2018-04-17
2641

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ v1.0.0**.
6464
6565
"post-update-cmd": [
6666
"cp -r 'vendor/rciam/css' 'modules/themevanilla/www/resources'",
67-
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'"
67+
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'",
68+
"cp 'modules/themevanilla/config-example/module_themevanilla.php' 'config/module_themevanilla.php'"
6869
]
6970
},
7071
```
@@ -76,12 +77,16 @@ With the above configuration composer will do several operations:
7677
* It will copy the `css` and `js` directories from the `vendor/rciam` directory
7778
in the `themevanilla/www/resources` directory, where the static files of the
7879
theme should be placed.
80+
* It will place the configuration file `module_themevanilla.php` inside the
81+
`config` directory of the installation.
7982

8083
### Direct download
8184

8285
You can download `themevanilla.zip` from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases).
8386
Download the zip file of the preferred release and extract its contents in the
8487
`modules` directory of your SimpleSAMLphp installation.
88+
Finally, move `example-config/module_themevanilla.php` file to the `config` directory
89+
of your SimpleSAMLphp installation.
8590

8691
### Clone repository
8792

@@ -97,14 +102,8 @@ You'll need to download or produce them. You can download the compressed
97102
directories (`js.zip` and `css.zip`) from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases) and
98103
extract them under `modules/themevanilla/www/resources`. If you want to produce
99104
them, you may read the customisation instructions below.
100-
101-
### Cookie Policy
102-
103-
In order to use Cookie Policy page you must copy the configuration file
104-
from the `config-example` folder to core config directory.
105-
```
106-
cp <path-to-module>/config-example/module_themevanilla.php <path-to-simplesamlphp>/config
107-
```
105+
As a last step, move `example-config/module_themevanilla.php` file to the `config`
106+
directory of your SimpleSAMLphp installation.
108107

109108

110109
## Configuration
@@ -162,6 +161,16 @@ At the moment there are style rules for the IdPs:
162161
* IGTF
163162
* LinkedIn
164163
* ORCID
164+
* OpenAIRE
165+
* OpenMinTeD
166+
167+
### Cookie Policy
168+
169+
Cookie policy includes a banner at the bottom of each page that prompts the user to
170+
accept the cookies, along with a Cookies Policy page.
171+
The feature is disabled by default.
172+
To enable it, set `enable_cookies_banner` to `true` in the configuration file:
173+
`<path-to-simplesamlphp>/config/module_themevanilla.php`.
165174

166175

167176
## Customization
@@ -186,6 +195,7 @@ You can customise the url of the link of the logo in the header by changing
186195
the `logo_link_url` definition in `dictionaries/default.definition.json` file.
187196

188197
### Footer
198+
189199
If you want to make any changes in the footer you need to modify the template
190200
`footer.php` that is placed in: `themevanilla/themes/ssp/default/includes/`.
191201

@@ -235,8 +245,15 @@ compiling options.
235245
To modify the cookie banner and cookie policy page, you must edit the following files:
236246
`<path-to-module>/dictionaries/policy.definition.json`
237247
and to modify the table in cookie policy page:
238-
`<path-to-simplesamlphp>/config/module_themevanilla.php`
248+
`<path-to-simplesamlphp>/config/module_themevanilla.php`.
239249

250+
## Compatibility Note
251+
252+
If you want to use the theme with **SimpleSAMLphp version greater than 1.14**, you
253+
need to rename the template of the discopower module:
254+
```
255+
themes/ssp/discopower/disco-tpl.php -> themes/ssp/discopower/disco.tpl.php
256+
```
240257

241258
## About SimpleSAMLphp themes
242259

config-example/module_themevanilla.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
array('type' => 'Preferences', 'provider' => 'aai.rciam.eu', 'name' => 'rciam_co_registry_tz', 'thirdParty' => false, 'category' => 'Persistent', 'purpose' => 'Preserve preferred timezone selection for COmanage RCIAM Account Registry'),
1717
array('type' => 'Preferences', 'provider' => 'aai.rciam.eu', 'name' => 'i18next', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve preferred language for RCIAM AAI OpenID Connect Provider'),
1818
array('type' => 'Session State', 'provider' => 'aai.rciam.eu', 'name' => 'JSESSIONID', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user session ID to retrieve session information')
19-
)
19+
),
20+
'enable_cookies_banner' => false
2021
);
2122

2223
?>

themes/ssp/default/includes/footer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11

22
<?php
3+
$themeConfig = SimpleSAML_Configuration::getConfig('module_themevanilla.php');
4+
$enable_cookies_banner = $themeConfig->getValue('enable_cookies_banner');
5+
36
if(!empty($this->data['htmlinject']['htmlContentPost'])) {
47
foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
58
echo $c;
@@ -9,7 +12,7 @@
912
</div><!-- /container -->
1013
</div><!-- /ssp-container -->
1114

12-
<?php if(strpos($this->t('{themevanilla:discopower:cookies_text}'), 'not translated') === FALSE || strpos($this->t('{themevanilla:discopower:cookies_accept_btn_text}'), 'not translated') === FALSE) { ?>
15+
<?php if ($enable_cookies_banner) { ?>
1316
<!-- cookies popup -->
1417
<div id="cookies">
1518
<div id="cookies-wrapper">

themes/ssp/discopower/disco-tpl.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE);
3131

3232

33-
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/jquery.livesearch.js') . '"></script>';
33+
$this->data['head'] = '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/jquery.livesearch.js') . '"></script>';
3434
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/' . $this->data['score'] . '.js') . '"></script>';
3535

3636
$this->data['head'] .= '<script type="text/javascript">
@@ -65,7 +65,9 @@ function showEntry($t, $metadata, $favourite = FALSE, $withIcon = FALSE) {
6565

6666

6767
if($withIcon) {
68-
$label = $metadata['login_button']['label'];
68+
if(isset($metadata['login_button']['label']) && !isempty($metadata['login_button']['label'])) {
69+
$label = $metadata['login_button']['label'];
70+
}
6971
$filename = $metadata['login_button']['icon_filename'];
7072
$css_classname = $metadata['login_button']['css_classname'];
7173
$css_button_type = '';
@@ -80,7 +82,9 @@ function showEntry($t, $metadata, $favourite = FALSE, $withIcon = FALSE) {
8082

8183
$html = '<a class="metaentry ssp-btn ' . $css_button_type . ' ' . $css_classname . '" href="' . $basequerystring . urlencode($metadata['entityid']) . '">';
8284
$html .= '<img alt="Identity Provider" class="entryicon" src="' . SimpleSAML_Module::getModuleURL('themevanilla/resources/images/' . $filename ) . '" />';
83-
$html .= '<span>' . $label . '</span></a>';
85+
if (isset($label)) {
86+
$html .= '<span>' . $label . '</span></a>';
87+
}
8488
}
8589
else {
8690
$html = '<a class="metaentry " href="' . $basequerystring . urlencode($metadata['entityid']) . '">';

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
simplesamlphp-module-themevanilla
2-
version 2.1.0
2+
version 2.2.0

www/resources/images/epos.png

4.82 KB
Loading

www/resources/images/google.svg

Lines changed: 1 addition & 5 deletions
Loading

www/resources/images/openaire.png

10.5 KB
Loading

www/resources/images/openminted.png

3.76 KB
Loading

www/resources/images/qq.svg

Lines changed: 22 additions & 0 deletions
Loading

www/resources/images/wechat.svg

Lines changed: 1 addition & 0 deletions
Loading

www/resources/sass/_colors.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $table-border-color: transparent;
2222
$orcid: #a7cc46;
2323
$facebook: #3d5a96;
2424
$linkedin: #1178b3;
25-
$google: #da4b3e;
25+
$google: #4285f4;
26+
$google-font: #757575;
2627
$elixir: #ff7a03;
2728
$igtf: #2b2a29;
2829
$dariah-text: #414b7e;
@@ -34,4 +35,10 @@ $eduteams-yellow: #f1ccb3;
3435
$eduteams-yellow-dark: #e59959;
3536
$egi-gray: #b1b1b1;
3637
$egi-cyan: #a2c5df;
38+
$openaire-lightblue: #4686e6;
39+
$openaire-blue: #39378d;
40+
$openminted: #02bab4;
41+
$wechat: #2dc101;
42+
$qq: #4292FF;
43+
$epos: #10482A;
3744

www/resources/sass/_extra.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ h4 {
414414
.ssp-line-or-line__or {
415415
@extend h2;
416416
position: relative;
417-
background: $white;
417+
background: $body-bg;
418418
padding: 0 24px;
419419
bottom: -10px;
420420

www/resources/sass/_idps_buttons.scss

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
}
1111
&.elixir {
1212
background-color: $elixir;
13+
border: 1px solid $elixir;
1314
}
1415
&.igtf {
1516
color: $igtf;
@@ -25,7 +26,33 @@
2526
padding-bottom: 5px;
2627
}
2728
&.google {
29+
background-color: white;
30+
border-color: $google;
31+
color: $google-font;
32+
font: 500 14px 'Roboto', sans-serif;
33+
}
34+
&.google-dark {
35+
padding-bottom: 10px;
2836
background-color: $google;
37+
border-color: $google;
38+
color: white;
39+
font: 500 14px 'Roboto', sans-serif;
40+
letter-spacing: normal;
41+
span {
42+
display: inline-block;
43+
line-height: 20px;
44+
position: relative;
45+
top: 2px;
46+
}
47+
img {
48+
background: white;
49+
height: 34px;
50+
padding: 8px;
51+
margin-right: 24px;
52+
position: absolute;
53+
left: 1px;
54+
top: 1px;
55+
}
2956
}
3057
&.orcid {
3158
color: darken($orcid, 10%);
@@ -34,19 +61,22 @@
3461
}
3562
&.linkedin {
3663
background-color: $linkedin;
64+
border: 1px solid $linkedin;
3765
}
3866
&.facebook {
3967
background-color: $facebook;
68+
border: 1px solid $facebook;
4069
}
4170
&.aria {
4271
background-color: $aria;
72+
border: 1px solid $aria;
4373
img {
4474
height: 24px;
4575
margin: 6px 0;
4676
}
4777
}
4878
&.eduteams {
49-
background-color: transparent;
79+
background-color: $white;
5080
border: $eduteams-yellow 1px solid;
5181
&:hover {
5282
border-color: $eduteams-yellow-dark;
@@ -57,7 +87,7 @@
5787
}
5888
}
5989
&.egi {
60-
background-color: transparent;
90+
background-color: $white;
6191
border: $egi-gray 1px solid;
6292
color: $black;
6393
padding: 2px 6px;
@@ -75,4 +105,46 @@
75105
}
76106

77107
}
108+
&.openaire {
109+
background-color: $white;
110+
border: $openaire-lightblue 1px solid;
111+
&:hover {
112+
border-color: $openaire-blue;
113+
}
114+
img {
115+
height: 30px;
116+
margin: 2px 0 4px;
117+
}
118+
}
119+
&.openminted {
120+
background-color: $white;
121+
border: $openminted 1px solid;
122+
&:hover {
123+
border-color: darken($openminted, 20%);
124+
}
125+
img {
126+
height: 16px;
127+
margin: 10px 0;
128+
}
129+
}
130+
&.wechat {
131+
background-color: $white;
132+
border: $wechat 1px solid;
133+
color: $wechat;
134+
font-weight: bold;
135+
&:hover {
136+
color: darken($wechat, 10%);
137+
}
138+
}
139+
&.qq {
140+
background-color: $qq;
141+
}
142+
&.epos {
143+
border-color: $epos;
144+
background-color: $white;
145+
img {
146+
padding: 5px;
147+
margin-right: 0;
148+
}
149+
}
78150
}

0 commit comments

Comments
 (0)