Skip to content

Commit b87c7a7

Browse files
author
lijianguo
committed
chore(passport): modify authorization page
1 parent 5145bcd commit b87c7a7

3 files changed

Lines changed: 75 additions & 14 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2020
# SECURITY WARNING: don't run with debug turned on in production!
21-
DEBUG = bool(os.environ.get('DEBUG', True))
21+
DEBUG = bool(os.environ.get('DRYCC_DEBUG', True))
2222

2323
# If set to True, Django's normal exception handling of view functions
2424
# will be suppressed, and exceptions will propagate upwards
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{% extends "oauth2_provider/base.html" %}
22

33
{% load i18n %}
4+
{% load static %}
5+
6+
<link rel="stylesheet" href="{% static 'css/index.css' %}" type="text/css">
47
{% block content %}
5-
<div class="block-center">
8+
<div class="container">
9+
<h1 class="logo"><a href="https://www.heroku.com" title="Heroku">Heroku</a></h1>
10+
<div class="panel">
611
{% if not error %}
7-
<form id="authorizationForm" method="post">
8-
<h3 class="block-center-heading">{% trans "Authorize" %} {{ application.name }}?</h3>
12+
<h2 class="h3" style="font-weight: 200;">{% trans "Authorize" %} {{ application.name }}?</h2>
13+
<p style="padding: 40px 40px 0px 40px;">{% trans "Application requires the following permissions" %}</p>
14+
<form id="authorizationForm" method="post" style="margin-top: -20px">
915
{% csrf_token %}
1016

1117
{% for field in form %}
1218
{% if field.is_hidden %}
1319
{{ field }}
1420
{% endif %}
1521
{% endfor %}
16-
17-
<p>{% trans "Application requires the following permissions" %}</p>
1822
<ul>
1923
{% for scope in scopes_descriptions %}
2024
<li>{{ scope }}</li>
@@ -23,18 +27,16 @@ <h3 class="block-center-heading">{% trans "Authorize" %} {{ application.name }}?
2327

2428
{{ form.errors }}
2529
{{ form.non_field_errors }}
26-
27-
<div class="control-group">
28-
<div class="controls">
29-
<input type="submit" class="btn btn-large" value="{% trans 'Cancel' %}"/>
30-
<input type="submit" class="btn btn-large btn-primary" name="allow" value="{% trans 'Authorize' %}"/>
31-
</div>
32-
</div>
30+
<br>
31+
<input style="color: #79589f;background: #fff;border: 1px solid #79589f;width: 120px"
32+
type="submit" class="btn btn-large" value="{% trans 'Cancel' %}"/>
33+
<input style="color: #fff;background-color: #60467e;background-image: -webkit-linear-gradient(left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%);;width: 120px"
34+
type="submit" class="w-50 btn btn-large btn-primary" name="allow" value="{% trans 'Authorize' %}"/>
3335
</form>
34-
3536
{% else %}
3637
<h2>Error: {{ error.error }}</h2>
3738
<p>{{ error.description }}</p>
3839
{% endif %}
40+
</div>
3941
</div>
4042
{% endblock %}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{% load static %}
2+
3+
<link rel="stylesheet" href="{% static 'css/index.css' %}" type="text/css">
4+
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
<head>
8+
<meta charset="utf-8">
9+
<title>{% block title %}{% endblock title %}</title>
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
11+
<meta name="description" content="">
12+
<meta name="author" content="">
13+
14+
{% block css %}
15+
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
16+
{% endblock css %}
17+
18+
<style>
19+
body {
20+
font-family: benton-sans,'Helvetica Neue',helvetica,arial,sans-serif;
21+
font-size: 14px;
22+
line-height: 1.42857;
23+
color: #3f3f44;
24+
margin: 0;
25+
26+
padding-top: 60px;
27+
padding-bottom: 40px;
28+
background-image: linear-gradient(to bottom,#654a86,#534292);
29+
background-color: #534292;
30+
}
31+
.block-center {
32+
max-width: 500px;
33+
padding: 19px 29px 29px;
34+
margin: 0 auto 20px;
35+
background-color: #fff;
36+
border: 1px solid #e5e5e5;
37+
-webkit-border-radius: 5px;
38+
-moz-border-radius: 5px;
39+
border-radius: 5px;
40+
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
41+
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
42+
box-shadow: 0 1px 2px rgba(0,0,0,.05);
43+
}
44+
.block-center .block-center-heading {
45+
margin-bottom: 10px;
46+
}
47+
48+
</style>
49+
</head>
50+
51+
<body>
52+
53+
<div class="page-wrap gradient-primary">
54+
{% block content %}
55+
{% endblock content %}
56+
</div>
57+
58+
</body>
59+
</html>

0 commit comments

Comments
 (0)