Skip to content

Commit 783b2b5

Browse files
committed
Merge branch 'release-1.0.0'
2 parents fc0b9ea + de60934 commit 783b2b5

File tree

121 files changed

+11694
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+11694
-636
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2018 GRNET
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 193 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,195 @@
11
# simplesamlphp-module-themevanilla
22

3-
A customizable theme for SimpleSAMLphp.
3+
A customisable theme for SimpleSAMLphp based on Bootstrap.
4+
5+
## Installation
6+
7+
You can install the theme using any of the methods below.
8+
9+
### Composer
10+
11+
Add the following lines in the `composer.json` file that is located in your
12+
SimpleSAMLphp installation:
13+
14+
If you want to use [composer](https://getcomposer.org/) to install this theme
15+
you need to edit `composer.json` file that is located in your SimpleSAMLphp
16+
installation. Check the following example, that includes all the necessary
17+
additions for the installation of the **simplesamlphp-module-themevanilla v1.0.0**.
18+
19+
```
20+
"require": {
21+
22+
...
23+
24+
"rciam/simplesamlphp-module-themevanilla": "1.0.0",
25+
"rciam/css": "1.0.0",
26+
"rciam/js": "1.0.0"
27+
},
28+
"repositories": [
29+
30+
...
31+
32+
{
33+
"type": "vcs",
34+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla"
35+
},
36+
{
37+
"type": "package",
38+
"package": {
39+
"name": "rciam/css",
40+
"version": "1.0.0",
41+
:w
42+
"dist": {
43+
"type": "zip",
44+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla/releases/download/v1.0.0/css.zip"
45+
}
46+
}
47+
},
48+
{
49+
"type": "package",
50+
"package": {
51+
"name": "rciam/js",
52+
"version": "1.0.0",
53+
"dist": {
54+
"type": "zip",
55+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla/releases/download/v1.0.0/js.zip"
56+
}
57+
}
58+
}
59+
],
60+
"scripts": {
61+
62+
...
63+
64+
"post-update-cmd": [
65+
"cp -r 'vendor/rciam/css' 'modules/themevanilla/www/resources'",
66+
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'"
67+
]
68+
},
69+
```
70+
71+
With the above configuration composer will do several operations:
72+
- It will put the module `themevanilla` in the `modules` directory.
73+
- It will download and extract the compressed `css` and `js` directories that
74+
include the minified css and javascript files.
75+
- It will copy the `css` and `js` directories from the `vendor/rciam` directory
76+
in the `themevanilla/www/resources` directory, where the static files of the
77+
theme should be placed.
78+
79+
### Direct download
80+
81+
You can download `themevanilla.zip` from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases).
82+
Download the zip file of the preferred release and extract its contents in the
83+
`modules` directory of your SimpleSAMLphp installation.
84+
85+
### Clone repository
86+
87+
Clone this repository into the `modules` directory of your SimpleSAMLphp
88+
installation as follows:
89+
```
90+
cd /path/to/simplesamlphp/modules
91+
git clone https://github.com/rciam/simplesamlphp-module-themevanilla.git themevanilla
92+
```
93+
Note that the cloned repository will not include the css files or minified
94+
javascript files.
95+
You'll need to download or produce them. You can download the compressed
96+
directories (`js.zip` and `css.zip`) from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases) and
97+
extract them under `modules/themevanilla/www/resources`. If you want to produce
98+
them, you may read the customisation instructions below.
99+
100+
101+
## Configuration
102+
103+
### Basic usage
104+
105+
In order to use this module as theme you need to set in the
106+
`config/config.php`: `'theme.use' => 'themevanilla:ssp'`
107+
108+
### Using IdP login buttons with icons
109+
110+
The theme splits the discopower IdP discovery page into 2 sections.
111+
The first section contains all IdPs in a simple list of links, while the second
112+
one contains login buttons for a selected subset of the IdPs.
113+
114+
If you want to include an IdP in the second section, you need to attach the
115+
`idps_with_logos` tag to that IdP. The css class name, icon and label of the IdP login
116+
button can then be specified using the `login_button` configuration as follows:
117+
```
118+
'tags' => array(
119+
'idps_with_logos',
120+
),
121+
'login_button' => array(
122+
'css_classname' => 'orcid',
123+
'icon_filename' => 'orcid.svg',
124+
'label' => 'ORCID',
125+
)
126+
```
127+
To set style rules for the button, the configured css_classname value must be
128+
defined in the `idps_buttons.scss` file. See more information bellow.
129+
130+
131+
## Customization
132+
133+
### Wording
134+
135+
You can find definitions and dictionaries in the `dictionaries` directory.
136+
137+
### Images
138+
139+
Place your logo and favicon in the directory:
140+
`themevanilla/www/resources/images` If you name them `logo.png` and
141+
`favicon.ico` they will be loaded without any other modification. If you name
142+
them differently you need to modify the template `header.php` that is placed in:
143+
`themevanilla/themes/ssp/default/includes/`.
144+
145+
By default, the logo has height 60px. See below how you can modify it.
146+
147+
### Footer
148+
If you want to make any changes in the footer you need to modify the template
149+
`footer.php` that is placed in: `themevanilla/themes/ssp/default/includes/`.
150+
151+
### CSS
152+
153+
To produce the css files for this theme follow these steps:
154+
- Install sass ([installation guide](http://sass-lang.com/install))
155+
- Go to the directory `themevanilla/www/resources`
156+
- Run the cli sass: `sass --update sass:css`
157+
158+
After these steps the css files will be in the directory
159+
`themevanilla/www/resources/css`
160+
161+
You can change the settings of this theme from the files:
162+
* `themevanilla/www/resources/sass/_settings.scss`: Here you will see the
163+
following variables:
164+
- $btn-action: background color of primary button
165+
- $btn-warning: background color of warning button
166+
- $footer-bg: footer background color
167+
- $footer-text: color of the text in the footer
168+
- $footer-link: color of the links in the footer
169+
- $btn-footer-text: text color of button that is in the footer
170+
- $btn-footer-border: border color of button that is in the footer
171+
172+
* `themevanilla/www/resources/sass/_colors.scss`: Here you can add or change
173+
color settings.
174+
175+
* `themevanilla/www/resources/sass/_idps_buttons.scss`: Here you can add or
176+
modify settings that are related with the buttons of the selected subset of
177+
IdPs.
178+
179+
After you change any of these files you need to produce the css file that the
180+
browser will serve. You can do that by running: `sass --update sass:css`, as
181+
mentioned above.
182+
183+
Please, check the help page of the cli tool sass if you want to use more
184+
compiling options.
185+
186+
187+
## About SimpleSAMLphp themes
188+
189+
You can read more about themes in a SimpleSAMLphp installation from the
190+
[official documentation](https://simplesamlphp.org/docs/stable/simplesamlphp-theming).
191+
192+
193+
## License
194+
195+
Licensed under the Apache 2.0 license, for details see `LICENSE`.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "rciam/simplesamlphp-module-themevanilla",
3-
"description": "A customizable theme for SimpleSAMLphp",
3+
"description": "A customisable theme for SimpleSAMLphp based on Bootstrap",
44
"type": "simplesamlphp-module",
5-
"keywords": ["theme", "simplesamlphp"],
6-
"license": "Apache-2.0",
5+
"keywords": ["simplesamlphp", "module", "theme", "bootsrtap"],
6+
"license": "Apache License 2.0",
77
"authors": [
88
{
99
"name": "Athina Bekakou",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"header_title": {
3+
"en": "Identity Access Management for Research Communities"
4+
},
5+
"header_subtitle": {
6+
"en": "Use the same credentials for all our services"
7+
}
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"title": {
3+
"en": "Choose your academic/social account"
4+
},
5+
"or": {
6+
"en": "or"
7+
},
8+
"favourite_dialog_title": {
9+
"en": "Login"
10+
},
11+
"favourite_dialog_button_close": {
12+
"en": "Choose another account"
13+
}
14+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"friendly_title": {
3+
"en": "Missing data from"
4+
},
5+
"friendly_description": {
6+
"en": "Friendly description: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."
7+
},
8+
"details_title": {
9+
"en": "Error details"
10+
},
11+
"details_description": {
12+
"en": "Details description: It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English."
13+
},
14+
"contact_title": {
15+
"en": "How to get help"
16+
},
17+
"contact_description": {
18+
"en": "Contact description: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard."
19+
},
20+
"go2disco": {
21+
"en": "Choose another provider"
22+
}
23+
}

themes/ssp/authX509/X509error.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
$this->data['header'] = $this->t('{authX509:X509error:certificate_header}');
3+
4+
$this->includeAtTemplateBase('includes/header.php');
5+
6+
?>
7+
8+
<?php
9+
if ($this->data['errorcode'] !== NULL) {
10+
?>
11+
<div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
12+
<img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" />
13+
<h2><?php echo $this->t('{login:error_header}'); ?></h2>
14+
<p><b><?php echo $this->t('{errors:title_' . $this->data['errorcode'] . '}'); ?></b></p>
15+
<p><?php echo $this->t('{errors:descr_' . $this->data['errorcode'] . '}'); ?></p>
16+
</div>
17+
<?php
18+
}
19+
?>
20+
<h2 style="break: both"><?php echo $this->t('{authX509:X509error:certificate_header}'); ?></h2>
21+
22+
<p><?php echo $this->t('{authX509:X509error:certificate_text}'); ?></p>
23+
24+
<a href="<?php echo htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()); ?>">
25+
<?php echo $this->t('{login:login_button}'); ?>
26+
</a>
27+
28+
<?php
29+
30+
if(!empty($this->data['links'])) {
31+
echo '<ul class="links list-unstyled" style="margin-top: 2em">';
32+
foreach($this->data['links'] AS $l) {
33+
echo '<li><a href="' . htmlspecialchars($l['href']) . '">' . htmlspecialchars($this->t($l['text'])) . '</a></li>';
34+
}
35+
echo '</ul>';
36+
}
37+
38+
39+
40+
41+
$this->includeAtTemplateBase('includes/footer.php');
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Template which is shown when there is only a short interval since the user was last authenticated.
4+
*
5+
* Parameters:
6+
* - 'target': Target URL.
7+
* - 'params': Parameters which should be included in the request.
8+
*
9+
* @package SimpleSAMLphp
10+
*/
11+
12+
13+
$this->data['403_header'] = $this->t('{authorize:Authorize:403_header}');
14+
$this->data['403_text'] = $this->t('{authorize:Authorize:403_text}');
15+
16+
$this->includeAtTemplateBase('includes/header.php');
17+
?>
18+
<h2><?php echo $this->data['403_header']; ?></h2>
19+
<p><?php echo $this->data['403_text']; ?></p>
20+
<?php
21+
if (isset($this->data['LogoutURL'])) {
22+
?>
23+
<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p>
24+
<?php
25+
}
26+
?>
27+
<?php
28+
$this->includeAtTemplateBase('includes/footer.php');

0 commit comments

Comments
 (0)