Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
red_brick_board
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ciella Francisco
red_brick_board
Commits
1fe4a71f
Commit
1fe4a71f
authored
Mar 26, 2024
by
Ciella Francisco
😵
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/user_profile'
parents
02295020
d159fe40
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
12 deletions
+89
-12
list.html
redbrickboard/accounts/templates/accounts/list.html
+7
-0
login.html
redbrickboard/accounts/templates/accounts/login.html
+2
-2
profile.html
redbrickboard/accounts/templates/accounts/profile.html
+34
-0
urls.py
redbrickboard/accounts/urls.py
+7
-5
views.py
redbrickboard/accounts/views.py
+11
-2
custom.css
redbrickboard/static/css/custom.css
+28
-3
No files found.
redbrickboard/accounts/templates/accounts/list.html
0 → 100644
View file @
1fe4a71f
{% extends "base.html" %}
{% block content %}
{% for object in object_list %}
<a
href=
"{{ object.get_absolute_url }}"
>
{{ object.first_name }}
</a>
<br>
{% endfor %}
{% endblock %}
\ No newline at end of file
redbrickboard/accounts/templates/accounts/login.html
View file @
1fe4a71f
...
...
@@ -5,8 +5,8 @@
{% endblock %}
{% block content %}
<div
id=
"
login-
container"
class=
"d-flex my-5"
>
<div
id=
"
login-form
"
class=
"mx-auto px-3 py-4 bg-white"
style=
"width: 23rem;"
>
<div
id=
"
rbb-container
container"
class=
"d-flex my-5"
>
<div
id=
"
rbb-section
"
class=
"mx-auto px-3 py-4 bg-white"
style=
"width: 23rem;"
>
<p
class=
"h1"
>
Log in
</p>
<form
method=
"POST"
autocomplete=
"off"
>
{% csrf_token %}
...
...
redbrickboard/accounts/templates/accounts/profile.html
0 → 100644
View file @
1fe4a71f
{% extends "base.html" %}
{% block content %}
<div
id=
"rbb-container container"
class=
"d-flex my-5"
>
<div
id=
"rbb-section"
class=
"mx-auto px-3 py-4 bg-white"
style=
"width: 59rem;"
>
<div
class=
"row mx-4 mt-4 mb-5"
>
<div
class=
"col"
>
<img
class=
"img-fluid img-test float-end"
src=
"https://placehold.co/400x400"
/>
</div>
<div
class=
"col"
>
<p
class=
"h1 blue-text"
>
{{ object.first_name }} {{ object.last_name }}
</p>
{% comment %}
<p><span
class=
"badge badge-pill"
>
{{ object.role }}
</span></p>
{% endcomment %}
<span
class=
"profile-pill rounded-pill"
>
{{ object.role.capitalize }}
</span>
<p
class=
"my-3 body-text"
>
{{ object.bio }}
</p>
</div>
</div>
<div
class=
"row"
>
<p
class=
"h1 blue-text"
>
UPCOMING EVENTS
</h1>
{% comment %} generate list of upcoming events {% endcomment %}
</div>
<div
class=
"row"
>
<p
class=
"h1 blue-text"
>
EVENTS ATTENDED
</h1>
{% comment %} generate list of upcoming events {% endcomment %}
</div>
<div
class=
"row"
>
<p
class=
"h1 blue-text"
>
EVENTS ORGANIZED
</h1>
{% comment %} generate list of upcoming events {% endcomment %}
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
redbrickboard/accounts/urls.py
View file @
1fe4a71f
from
django.urls
import
path
from
.
import
views
from
.
views
import
*
app_name
=
"accounts"
urlpatterns
=
[
path
(
'login'
,
views
.
login_page
,
name
=
"login"
),
path
(
'register'
,
views
.
register
,
name
=
"register"
),
path
(
'logout'
,
views
.
user_logout
,
name
=
"logout"
),
path
(
'auth-receiver'
,
views
.
auth_receiver
,
name
=
"auth-receiver"
)
path
(
'login'
,
login_page
,
name
=
"login"
),
path
(
'register'
,
register
,
name
=
"register"
),
path
(
'logout'
,
user_logout
,
name
=
"logout"
),
path
(
'auth-receiver'
,
auth_receiver
,
name
=
"auth-receiver"
),
path
(
'list'
,
UserList
.
as_view
(),
name
=
"list"
),
path
(
'profile/<int:pk>'
,
UserProfile
.
as_view
(),
name
=
"profile"
)
]
\ No newline at end of file
redbrickboard/accounts/views.py
View file @
1fe4a71f
...
...
@@ -6,7 +6,8 @@ from google.oauth2 import id_token
from
google.auth.transport
import
requests
from
.forms
import
CustomUserCreationForm
,
CustomUserAuthenticationForm
from
django.views.generic.detail
import
DetailView
from
django.views.generic.list
import
ListView
from
django.contrib.auth.models
import
auth
from
django.contrib.auth
import
authenticate
,
login
,
logout
...
...
@@ -88,4 +89,12 @@ def auth_receiver(request):
print
(
"Login Successful"
)
return
redirect
(
"index"
)
\ No newline at end of file
class
UserProfile
(
DetailView
):
model
=
models
.
CustomUser
template_name
=
'accounts/profile.html'
class
UserList
(
ListView
):
model
=
models
.
CustomUser
template_name
=
'accounts/list.html'
\ No newline at end of file
redbrickboard/static/css/custom.css
View file @
1fe4a71f
@import
url('https://fonts.googleapis.com/css2?family=Inter:wght@700&display=swap')
;
@import
url('https://fonts.googleapis.com/css2?family=Inria+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap')
;
:root
{
--theme-prusian-blue
:
#003049
;
...
...
@@ -13,6 +14,16 @@
font-size
:
1rem
;
}
.blue-text
{
color
:
var
(
--theme-prusian-blue
);
}
.body-text
{
font-family
:
'Inria Sans'
;
font-weight
:
400
;
font-style
:
normal
;
}
body
{
background-color
:
var
(
--theme-dutch-white
);
background-image
:
url("/static/images/Continuous Background.png")
;
...
...
@@ -88,12 +99,12 @@ body {
height
:
100vh
;
}
#
login
-container
{
#
rbb
-container
{
align-items
:
center
;
justify-content
:
center
;
}
#
login-form
{
#
rbb-section
{
border-radius
:
0.625rem
;
border
:
1px
solid
#000
;
background
:
#FFF
;
...
...
@@ -116,4 +127,18 @@ body {
border-radius
:
0.3125rem
;
background
:
#DF4E4E
;
border-color
:
#DF4E4E
;
}
\ No newline at end of file
}
.profile-pill
{
padding
:
.35em
.65em
;
font-size
:
.75em
;
font-weight
:
700
;
line-height
:
1
;
color
:
#fff
;
text-align
:
center
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
border-radius
:
.25rem
;
background-color
:
var
(
--theme-bright-red
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment