From 91ff1848042fde54d1ece298cb3424047949b417 Mon Sep 17 00:00:00 2001 From: Meutel Date: Sat, 9 Sep 2017 12:28:46 +0200 Subject: [PATCH] Design provider page --- assets/css/bouquins.css | 14 ++++++++++++++ bouquins/github.go | 4 ++-- bouquins/google.go | 2 +- templates/header.html | 1 + templates/provider.html | 7 ++++--- 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 assets/css/bouquins.css diff --git a/assets/css/bouquins.css b/assets/css/bouquins.css new file mode 100644 index 0000000..1ac8b26 --- /dev/null +++ b/assets/css/bouquins.css @@ -0,0 +1,14 @@ +span.providericon { + display: inline-block; + vertical-align: middle; + background-size: 16px; + background-repeat: no-repeat; + width: 16px; + height: 16px; +} +.githubicon { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZ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cN5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTA4LTEwVDAyOjU2OjMzKzAwOjAwQ4h7xQAAAABJRU5ErkJggg==); +} diff --git a/bouquins/github.go b/bouquins/github.go index 2f81597..8b2622d 100644 --- a/bouquins/github.go +++ b/bouquins/github.go @@ -34,9 +34,9 @@ func (p GithubProvider) Label() string { return "Github" } -// Icon returns icon path for provider +// Icon returns icon CSS class for provider func (p GithubProvider) Icon() string { - return "" // TODO + return "githubicon" } func (p GithubProvider) Config(conf *BouquinsConf) *oauth2.Config { diff --git a/bouquins/google.go b/bouquins/google.go index ccd7da5..97fbb28 100644 --- a/bouquins/google.go +++ b/bouquins/google.go @@ -40,7 +40,7 @@ func (p GoogleProvider) Label() string { // Icon returns icon path for provider func (p GoogleProvider) Icon() string { - return "" // TODO + return "googleicon" } func (p GoogleProvider) Config(conf *BouquinsConf) *oauth2.Config { diff --git a/templates/header.html b/templates/header.html index 044e224..ce9d85e 100644 --- a/templates/header.html +++ b/templates/header.html @@ -5,6 +5,7 @@ + diff --git a/templates/provider.html b/templates/provider.html index 481e316..0cf2b33 100644 --- a/templates/provider.html +++ b/templates/provider.html @@ -1,10 +1,11 @@ {{ template "header.html" . }}
-

Veuillez sélectionner un mode d'authentification:

-