Skip to content

Commit cca4b2d

Browse files
committed
chore(web): remove vant package
1 parent 8beae9e commit cca4b2d

31 files changed

Lines changed: 382 additions & 624 deletions

rootfs/api/static/css/main.css

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
--ui-space-5: 20px;
2929
--ui-space-6: 24px;
3030
--ui-space-7: 32px;
31+
}
3132

32-
--ui-breakpoint-xs: 320px;
33-
--ui-breakpoint-sm: 576px;
34-
--ui-breakpoint-md: 768px;
35-
--ui-breakpoint-lg: 992px;
36-
--ui-breakpoint-xl: 1200px;
33+
*, *::before, *::after {
34+
box-sizing: border-box;
3735
}
3836

3937
html,body {
@@ -50,7 +48,7 @@ body {
5048
}
5149

5250
.privacy {
53-
text-align: justify!important;
51+
text-align: justify;
5452
}
5553

5654
.page-wrap {
@@ -97,7 +95,8 @@ h1.logo a:before {
9795
}
9896

9997
.panel {
100-
min-width: 490px;
98+
min-width: 0;
99+
width: 100%;
101100
max-width: 520px;
102101
margin: 0 auto;
103102
border-radius: var(--ui-radius-lg);
@@ -158,10 +157,6 @@ input:-webkit-autofill {
158157
box-shadow: inset 0 1px 2px rgba(203,203,210,0.4), inset 0 0 10px 1000px #fffedb;
159158
}
160159

161-
.form-control {
162-
padding-right: 8px;
163-
}
164-
165160
.form-control {
166161
display: block;
167162
width: 100%;
@@ -172,7 +167,6 @@ input:-webkit-autofill {
172167
border-radius: var(--ui-radius-sm);
173168
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
174169
background-color: var(--ui-color-surface);
175-
box-sizing: border-box;
176170
}
177171

178172
.form-control:focus {
@@ -252,9 +246,7 @@ form .btn {
252246

253247
@media (max-width: 576px) {
254248
.panel {
255-
min-width: auto;
256-
width: 100%;
257-
max-width: 520px;
249+
max-width: 100%;
258250
}
259251

260252
.panel .h3 {
@@ -272,6 +264,36 @@ form .btn {
272264
flex: 1 0 100%;
273265
width: 100%;
274266
}
267+
268+
.panel-footer {
269+
font-size: 15px;
270+
padding: 16px;
271+
}
272+
273+
.inverted-wrapper {
274+
padding: 20px 20px 0 20px;
275+
}
276+
277+
.legal li {
278+
display: block;
279+
margin: 8px 0;
280+
}
281+
}
282+
283+
@media (min-width: 577px) and (max-width: 768px) {
284+
.panel {
285+
max-width: 490px;
286+
}
287+
}
288+
289+
/* hCaptcha responsive */
290+
.h-captcha {
291+
display: flex;
292+
justify-content: center;
293+
}
294+
295+
.h-captcha iframe {
296+
max-width: 100%;
275297
}
276298

277299
.btn-block {
@@ -322,7 +344,6 @@ form .btn {
322344
max-width: none;
323345
justify-content: center;
324346
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
325-
box-sizing: border-box;
326347
}
327348

328349
.oauth2-btn:hover {

rootfs/api/templates/base/footer.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<footer class="logo-sfdc">
1+
<footer class="logo-sfdc" role="contentinfo">
2+
<nav aria-label="Footer links">
23
<ul class="legal">
34
{% if LEGAL_ENABLED %}
45
<li><a href="https://www.drycc.cc" rel="nofollow">Drycc Documents</a></li>
@@ -14,4 +15,5 @@
1415
<li>© {% now 'Y' %} drycc.cc</li>
1516
{% endif %}
1617
</ul>
18+
</nav>
1719
</footer>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% load static %}
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>{% block title %}Drycc Passport{% endblock %}</title>
8+
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
9+
{% block extra_head %}{% endblock %}
10+
</head>
11+
<body>
12+
<div class="page-wrap gradient-primary">
13+
<div class="container">
14+
{% block content %}{% endblock %}
15+
</div>
16+
{% include "base/footer.html" %}
17+
</div>
18+
{% block extra_scripts %}{% endblock %}
19+
</body>
20+
</html>
Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
1+
{% extends 'base/layout.html' %}
12
{% load i18n %}
2-
{% load static %}
3-
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
4-
<head>
5-
<meta charset="UTF-8">
6-
<title>Authorize</title>
7-
<script type="text/javascript">
8-
window.onload=function(){
9-
const element = document.getElementById("logout-link")
10-
element.href += encodeURIComponent(window.location.pathname + window.location.search)
3+
{% block title %}Authorize{% endblock %}
4+
{% block content %}
5+
<div class="panel">
6+
{% if not error %}
7+
<h2 class="h3">{% trans "Authorize" %} {{ application.name }}?</h2>
8+
{{ updated }}
9+
<div>{{ application.name }} wants to access your {{ request.user.username }} account</div>
10+
<form id="authorizationForm" method="post">
11+
{% csrf_token %}
12+
{% for field in form %}
13+
{% if field.is_hidden %}
14+
{{ field }}
15+
{% endif %}
16+
{% endfor %}
17+
{{ form.errors }}
18+
{{ form.non_field_errors }}
19+
<br>
20+
<input type="submit" class="btn btn-primary btn-lg btn-block" name="allow" value="{% trans 'Authorize' %}"/>
21+
</form>
22+
<a id="logout-link" class="panel-footer" href="/user/logout?next=">With another account? &nbsp;<span>Sign In</span></a>
23+
{% else %}
24+
<h2 class="h3">{{ error.error }}</h2>
25+
<p class="tc gray-90 inverted-wrapper">{{ error.description }}</p>
26+
<div class="inverted-wrapper"></div>
27+
{% endif %}
28+
</div>
29+
{% endblock %}
30+
{% block extra_scripts %}
31+
<script>
32+
document.addEventListener('DOMContentLoaded', function() {
33+
const element = document.getElementById("logout-link");
34+
if (element) {
35+
element.href += encodeURIComponent(window.location.pathname + window.location.search);
1136
}
12-
</script>
13-
</head>
14-
<body>
15-
<div class="page-wrap gradient-primary">
16-
<div class="container">
17-
<div class="panel">
18-
{% if not error %}
19-
<h2 class="h3">{% trans "Authorize" %} {{ application.name }}?</h2>
20-
{{ updated }}
21-
<div>{{ application.name }} wants to access your {{ request.user.username }} account</div>
22-
<form id="authorizationForm" method="post">
23-
{% csrf_token %}
24-
{% for field in form %}
25-
{% if field.is_hidden %}
26-
{{ field }}
27-
{% endif %}
28-
{% endfor %}
29-
{{ form.errors }}
30-
{{ form.non_field_errors }}
31-
<br>
32-
<input type="submit" class="btn btn-primary btn-lg btn-block" name="allow" value="{% trans 'Authorize' %}"/>
33-
</form>
34-
<a id="logout-link" class="panel-footer" href="/user/logout?next=">With another account? &nbsp;<span>Sigin In</span></a>
35-
{% else %}
36-
<h2 class="h3">{{ error.error }}</h2>
37-
<p class="tc gray-90 inverted-wrapper">{{ error.description }}</p>
38-
<div class="inverted-wrapper"></div>
39-
{% endif %}
40-
</div>
41-
</div>
42-
{% include "base/footer.html" %}
43-
</div>
44-
</body>
37+
});
38+
</script>
39+
{% endblock %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends 'user/message.html' %}
2-
{% block title %}Account activite successful{% endblock %}
2+
{% block heading %}Account activate successful{% endblock %}
33
{% block message %}
44
Your account has been activated successfully.
5-
<a href="/user/login/">please go to the login page.</a>
5+
<a href="/user/login/">Please go to the login page.</a>
66
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'user/message.html' %}
2-
{% block title %}Account activite fail{% endblock %}
2+
{% block heading %}Account activate fail{% endblock %}
33
{% block message %}
44
The confirmation link was invalid, possibly it has already been used, go back <a href="/user/registration/">Sign Up</a>
55
{% endblock %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends 'user/message.html' %}
2-
{% block title %}Account update successful{% endblock %}
2+
{% block heading %}Account update successful{% endblock %}
33
{% block message %}
4-
Your account has been update successfully.
4+
Your account has been updated successfully.
55
Please go to the <a href="/">main</a> page.
66
{% endblock %}

rootfs/api/templates/user/account_update_fail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'user/message.html' %}
2-
{% block title %}Account update fail{% endblock %}
2+
{% block heading %}Account update fail{% endblock %}
33
{% block message %}
44
The confirmation link was invalid, possibly it has already been expired.
55
Please go to the <a href="/">main</a> page.
Lines changed: 52 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,60 @@
1-
{% load static %}
2-
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
3-
<head>
4-
<meta charset="UTF-8">
5-
<title>{% if identity_linking %}Identity Linking{% else %}Login{% endif %}</title>
6-
</head>
7-
<div class="page-wrap gradient-primary">
8-
<div class="container">
9-
<div class="panel">
10-
<h2 class="h3">{% if identity_linking %}Identity Linking{% else %}Log in to your account{% endif %}</h2>
1+
{% extends 'base/layout.html' %}
2+
{% block title %}{% if identity_linking %}Identity Linking{% else %}Login{% endif %}{% endblock %}
3+
{% block content %}
4+
<div class="panel">
5+
<h2 class="h3">{% if identity_linking %}Identity Linking{% else %}Log in to your account{% endif %}</h2>
116

12-
{% if not identity_linking %}
13-
<div class="oauth2-container" id="oauth2-container">
14-
<div class="oauth2-buttons" id="oauth2-buttons">
15-
</div>
16-
<div class="oauth2-divider" id="oauth2-divider">
17-
<span class="divider-line"></span>
18-
<span class="divider-text">or</span>
19-
<span class="divider-line"></span>
20-
</div>
21-
</div>
22-
{% endif %}
7+
{% if not identity_linking %}
8+
<div class="oauth2-container" id="oauth2-container">
9+
<div class="oauth2-buttons" id="oauth2-buttons">
10+
</div>
11+
<div class="oauth2-divider" id="oauth2-divider">
12+
<span class="divider-line"></span>
13+
<span class="divider-text">or</span>
14+
<span class="divider-line"></span>
15+
</div>
16+
</div>
17+
{% endif %}
2318

24-
<form method="post" action="{% url 'user_login' %}">
25-
{% csrf_token %}
26-
{% if form.errors %}
27-
{% if identity_linking_error %}
28-
<div class="alert alert-danger">
29-
<strong>{{ identity_linking_error|escape }}</strong>
30-
</div>
31-
{% endif %}
32-
{% for error in form.non_field_errors %}
33-
<div class="alert alert-danger">
34-
<strong>{{ error|escape }}</strong>
35-
</div>
36-
{% endfor %}
37-
{% endif %}
38-
<div class="form-group">
39-
<label for="username">{{ form.username.label_tag }}</label>
40-
<input autofocus="off" class="form-control" id="username" name="username" :placeholder="Username" type="text" required>
41-
</div>
42-
<div class="form-group">
43-
<label for="password">{{ form.password.label_tag }}</label>
44-
<input autocomplete="off" class="form-control password" id="password" name="password" :placeholder="Password" type="password" required>
45-
</div>
46-
<button class="btn btn-primary btn-lg btn-block" id="commit" type="submit">Log In</button>
47-
<input type="hidden" name="next" value={{ next }}>
48-
{% if identity_linking %}
49-
<input type="hidden" name="identity_linking" value="1">
50-
{% endif %}
51-
</form>
52-
{% if registration_enabled %}
53-
<a class="panel-footer" href="/user/registration/">New to Drycc? <span>Sign Up</span></a>
54-
{% endif %}
19+
<form method="post" action="{% url 'user_login' %}">
20+
{% csrf_token %}
21+
{% if form.errors %}
22+
{% if identity_linking_error %}
23+
<div class="alert alert-danger" role="alert">
24+
<strong>{{ identity_linking_error|escape }}</strong>
5525
</div>
56-
{% if password_reset_enabled %}
57-
<div>
58-
<a href="/user/password_reset/" class="white-link">Forgot your password?</a>
26+
{% endif %}
27+
{% for error in form.non_field_errors %}
28+
<div class="alert alert-danger" role="alert">
29+
<strong>{{ error|escape }}</strong>
5930
</div>
31+
{% endfor %}
6032
{% endif %}
61-
</div>
62-
{% include "base/footer.html" %}
33+
<div class="form-group">
34+
<label for="username">{{ form.username.label_tag }}</label>
35+
<input autocomplete="username" class="form-control" id="username" name="username" placeholder="Username" type="text" required>
36+
</div>
37+
<div class="form-group">
38+
<label for="password">{{ form.password.label_tag }}</label>
39+
<input autocomplete="current-password" class="form-control password" id="password" name="password" placeholder="Password" type="password" required>
40+
</div>
41+
<button class="btn btn-primary btn-lg btn-block" id="commit" type="submit">Log In</button>
42+
<input type="hidden" name="next" value="{{ next|escape }}">
43+
{% if identity_linking %}
44+
<input type="hidden" name="identity_linking" value="1">
45+
{% endif %}
46+
</form>
47+
{% if registration_enabled %}
48+
<a class="panel-footer" href="/user/registration/">New to Drycc? <span>Sign Up</span></a>
49+
{% endif %}
6350
</div>
51+
{% if password_reset_enabled %}
52+
<div>
53+
<a href="/user/password_reset/" class="white-link">Forgot your password?</a>
54+
</div>
55+
{% endif %}
56+
{% endblock %}
57+
{% block extra_scripts %}
6458
<script>
6559
{% if not identity_linking %}
6660
fetch('/user/identity-providers/')
@@ -86,3 +80,4 @@ <h2 class="h3">{% if identity_linking %}Identity Linking{% else %}Log in to your
8680
});
8781
{% endif %}
8882
</script>
83+
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'user/message.html' %}
2-
{% block title %}Login done{% endblock %}
2+
{% block heading %}Login done{% endblock %}
33
{% block message %}
44
You can close this page and return to your CLI. It should now be logged in.
55
{% endblock %}

0 commit comments

Comments
 (0)