Skip to content

Commit 9e78dec

Browse files
committed
Enhance README
- Improve the composer section - Add info about the supported tags of IdPs - Unify bullet points - Fix typo - Fix indentation
1 parent f740643 commit 9e78dec

1 file changed

Lines changed: 78 additions & 57 deletions

File tree

README.md

Lines changed: 78 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,71 +8,68 @@ You can install the theme using any of the methods below.
88

99
### Composer
1010

11-
Add the following lines in the `composer.json` file that is located in your
12-
SimpleSAMLphp installation:
13-
1411
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
12+
you need to edit `composer.json`. The file is located in your SimpleSAMLphp
1613
installation. Check the following example, that includes all the necessary
17-
additions for the installation of the **simplesamlphp-module-themevanilla v1.0.0**.
14+
additions for the installation of the **simplesamlphp-module-themevanilla
15+
v1.0.0**.
1816

1917
```
2018
"require": {
2119
22-
...
20+
...
2321
24-
"rciam/simplesamlphp-module-themevanilla": "1.0.0",
25-
"rciam/css": "1.0.0",
26-
"rciam/js": "1.0.0"
22+
"rciam/simplesamlphp-module-themevanilla": "1.0.0",
23+
"rciam/css": "1.0.0",
24+
"rciam/js": "1.0.0"
2725
},
2826
"repositories": [
2927
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-
}
28+
...
29+
30+
{
31+
"type": "vcs",
32+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla"
33+
},
34+
{
35+
"type": "package",
36+
"package": {
37+
"name": "rciam/css",
38+
"version": "1.0.0",
39+
"dist": {
40+
"type": "zip",
41+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla/releases/download/v1.0.0/css.zip"
4642
}
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-
}
43+
}
44+
},
45+
{
46+
"type": "package",
47+
"package": {
48+
"name": "rciam/js",
49+
"version": "1.0.0",
50+
"dist": {
51+
"type": "zip",
52+
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla/releases/download/v1.0.0/js.zip"
5753
}
5854
}
59-
],
60-
"scripts": {
55+
}
56+
],
57+
"scripts": {
6158
62-
...
59+
...
6360
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-
},
61+
"post-update-cmd": [
62+
"cp -r 'vendor/rciam/css' 'modules/themevanilla/www/resources'",
63+
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'"
64+
]
65+
},
6966
```
7067

7168
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
69+
* It will put the module `themevanilla` in the `modules` directory.
70+
* It will download and extract the compressed `css` and `js` directories that
7471
include the minified css and javascript files.
75-
- It will copy the `css` and `js` directories from the `vendor/rciam` directory
72+
* It will copy the `css` and `js` directories from the `vendor/rciam` directory
7673
in the `themevanilla/www/resources` directory, where the static files of the
7774
theme should be placed.
7875

@@ -107,13 +104,27 @@ In order to use this module as theme you need to set in the
107104

108105
### Using IdP login buttons with icons
109106

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.
107+
The theme splits the discopower IdP discovery page into 2 sections, depending on
108+
the tags of the included IdPs:
109+
* The section that its IdPs have the tag `idps_in_searchable_list` contains all
110+
the IdPs in a list of links with a search box.
111+
* The section that its IdPs have the tag `idps_with_logos` contains login
112+
buttons with specified style rules for each IdP. Each button may have a logo
113+
icon, too.
114+
115+
Also, you need to define the order of the 2 sections. You can set this in the
116+
file `config/module_discopower.php` from the variable `taborder`.
117+
For example:
118+
```
119+
'taborder' => array(
120+
'idps_in_searchable_list',
121+
'idps_with_logos'
122+
)
123+
```
113124

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:
125+
Especially for the of the `idps_with_logos`, you need to specify the css class
126+
name, icon and label of the IdP login button using the `login_button`
127+
configuration as follows:
117128
```
118129
'tags' => array(
119130
'idps_with_logos',
@@ -124,8 +135,18 @@ button can then be specified using the `login_button` configuration as follows:
124135
'label' => 'ORCID',
125136
)
126137
```
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.
138+
To set style rules for the each button, the configured css_classname value must
139+
be defined in the `idps_buttons.scss` file. See more information bellow.
140+
141+
At the moment there are style rules for the IdPs:
142+
* B2ACCESS
143+
* DARIAH
144+
* Elixir
145+
* Facebook
146+
* Google
147+
* IGTF
148+
* LinkedIn
149+
* ORCID
129150

130151

131152
## Customization
@@ -151,9 +172,9 @@ If you want to make any changes in the footer you need to modify the template
151172
### CSS
152173

153174
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`
175+
* Install sass ([installation guide](http://sass-lang.com/install))
176+
* Go to the directory `themevanilla/www/resources`
177+
* Run the cli sass: `sass --update sass:css`
157178

158179
After these steps the css files will be in the directory
159180
`themevanilla/www/resources/css`

0 commit comments

Comments
 (0)