Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CM1102 shop
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Drury
CM1102 shop
Commits
ae377312
Commit
ae377312
authored
1 year ago
by
Michael Drury
Browse files
Options
Downloads
Patches
Plain Diff
adding a user page and styled the navbar a bit differently
parent
3851a016
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
shop/static/styles.css
+7
-1
7 additions, 1 deletion
shop/static/styles.css
shop/templates/layout.html
+3
-3
3 additions, 3 deletions
shop/templates/layout.html
shop/templates/user_page.html
+2
-0
2 additions, 0 deletions
shop/templates/user_page.html
with
12 additions
and
4 deletions
shop/static/styles.css
+
7
−
1
View file @
ae377312
...
...
@@ -170,7 +170,7 @@ li {
float
:
right
;
}
.navbar_right
_logoutin
{
.navbar_
far_
right
{
float
:
right
;
margin-right
:
10px
;
}
...
...
@@ -560,4 +560,10 @@ li {
color
:
grey
;
margin-top
:
-10%
;
}
.user_page_username
{
text-align
:
center
;
font-family
:
Andale
Mono
,
monospace
;
font-size
:
400%
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
shop/templates/layout.html
+
3
−
3
View file @
ae377312
...
...
@@ -44,11 +44,11 @@
<li><div
class =
"navbar_box"
><a
class =
"navbar_item"
href=
"{{ url_for('cart') }}"
>
Cart
</a></div></li>
<li><div
class =
"navbar_box"
><a
class =
"navbar_item"
href=
"{{ url_for('wishlist') }}"
>
Wishlist
</a></div></li>
{% if current_user.is_authenticated %}
<li
class =
"navbar_right
_logoutin
"
><div
class =
"navbar_box"
><img
class =
"avatar_img"
src =
"{{ url_for('static', filename='images/Logged_in.png') }}"
alt=
"logged_in_avatar"
><
a
class =
"navbar_username"
href=
"{{ url_for('user_page') }}"
>
{{current_user.username[0].upper()}}
<
/a></div></li>
<li
class =
"navbar_right
_logoutin
"
><div
class =
"navbar_box"
><a
class=
"navbar_item"
href=
"{{ url_for('logout') }}"
>
Logout
</a></div></li>
<li
class =
"navbar_
far_
right"
><div
class =
"navbar_box"
>
<a
class=
"navbar_item"
href=
"{{ url_for('user_page') }}"
>
{{current_user.username.upper()}}
<img
class =
"avatar_img"
src =
"{{ url_for('static', filename='images/Logged_in.png') }}"
alt=
"logged_in_avatar"
></a></div></li>
<li
class =
"navbar_right"
><div
class =
"navbar_box"
><a
class=
"navbar_item"
href=
"{{ url_for('logout') }}"
>
Logout
</a></div></li>
{% else %}
<li
class =
"navbar_right
_logoutin
"
><div
class =
"navbar_box"
><a
class=
"navbar_item"
href=
"{{ url_for('login') }}"
>
Login
</a></div></li>
<li
class =
"navbar_
far_
right"
><div
class =
"navbar_box"
><a
class=
"navbar_item"
href=
"{{ url_for('login') }}"
>
Login
</a></div></li>
<li
class =
"navbar_right"
><div
class =
"navbar_box"
><a
class=
"navbar_item"
href=
"{{ url_for('signup') }}"
>
Sign up
</a></div></li>
{% endif %}
</ul>
...
...
This diff is collapsed.
Click to expand it.
shop/templates/user_page.html
+
2
−
0
View file @
ae377312
...
...
@@ -6,6 +6,8 @@
<div
id=
"content-wrap"
>
<h1
class =
"home_title"
>
User Page
</h1>
<h1
class =
"user_page_username"
>
Current User: {{current_user.username}}
</h1>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment