Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coursework
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Борис Ким
coursework
Commits
69d44efd
Commit
69d44efd
authored
Nov 01, 2021
by
Борис Ким
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Сверстал приличное меню и сайдбар
parent
2a9d1e34
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
68 deletions
+75
-68
admin.py
source/webapp/admin.py
+5
-1
models.py
source/webapp/models.py
+4
-0
main.css
source/webapp/static/css/main.css
+37
-27
base.html
source/webapp/templates/base.html
+12
-28
courses_list.html
source/webapp/templates/courses/courses_list.html
+17
-12
No files found.
source/webapp/admin.py
View file @
69d44efd
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Course
,
Group
,
Class
,
Specialization
# Register your models here.
models
=
[
Course
,
Group
,
Class
,
Specialization
]
for
model
in
models
:
admin
.
site
.
register
(
model
)
\ No newline at end of file
source/webapp/models.py
View file @
69d44efd
...
@@ -49,6 +49,10 @@ class Class(models.Model):
...
@@ -49,6 +49,10 @@ class Class(models.Model):
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
title
return
self
.
title
class
Meta
:
verbose_name
=
"Class"
verbose_name_plural
=
"Classes"
class
Specialization
(
models
.
Model
):
class
Specialization
(
models
.
Model
):
spec_name
=
models
.
CharField
(
max_length
=
100
,
verbose_name
=
'spec_name'
)
spec_name
=
models
.
CharField
(
max_length
=
100
,
verbose_name
=
'spec_name'
)
...
...
source/webapp/static/css/main.css
View file @
69d44efd
body
{
background-color
:
#81CAEA
!important
;
}
*
{
*
{
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.sidebar
{
position
:
fixed
;
height
:
110vh
;
width
:
220px
;
z-index
:
1
;
top
:
0
;
background-color
:
#343a40
;
overflow-x
:
hidden
;
padding-top
:
20px
;
}
.sidebar
a
{
padding
:
6px
8px
6px
16px
;
text-decoration
:
none
;
font-size
:
25px
;
color
:
#818181
;
float
:
left
;
}
.sidebar
a
:hover
{
color
:
#f1f1f1
;
}
.card
{
.card
{
position
:
relative
;
position
:
relative
;
...
@@ -12,39 +37,24 @@
...
@@ -12,39 +37,24 @@
height
:
100vh
;
height
:
100vh
;
overflow-x
:
auto
;
overflow-x
:
auto
;
background-size
:
cover
;
background-size
:
cover
;
}
}
.sidebar
{
.content-wrapper
{
position
:
fixed
;
width
:
1000px
;
background-color
:
#70BBD0
;
margin
:
10px
auto
;
height
:
100vh
;
box-shadow
:
0
0
6px
;
}
.sidebar
.menu
{
position
:
absolute
;
top
:
80px
;
padding
:
14px
20px
;
}
.sidebar
.menu
li
{
margin-top
:
6px
;
padding
:
14px
20px
;
}
}
.sidebar
.menu
i
{
.content-course
{
color
:
#fff
;
padding
:
20px
;
font-size
:
20px
;
padding-right
:
8px
;
}
}
.sidebar
.menu
a
{
.course-container
{
color
:
#fff
;
margin-top
:
50px
;
font-size
:
20px
;
margin-left
:
50px
;
text-decoration
:
none
;
}
}
.content-wrapper
{
.block-course
{
background-color
:
#B3E1EE
;
background-color
:
white
;
width
:
310px
;
height
:
300px
;
}
}
\ No newline at end of file
source/webapp/templates/base.html
View file @
69d44efd
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<title>
{% block title %}{% endblock %}
</title>
<title>
{% block title %}{% endblock %}
</title>
</head>
</head>
<body>
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark
fixed-top
"
>
<a
class=
"navbar-brand"
href=
"#"
>
Navbar
</a>
<a
class=
"navbar-brand"
href=
"#"
>
Navbar
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarNav"
aria-controls=
"navbarNav"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
<span
class=
"navbar-toggler-icon"
></span>
...
@@ -34,35 +34,19 @@
...
@@ -34,35 +34,19 @@
</ul>
</ul>
</div>
</div>
</nav>
</nav>
<div
class=
"row d-flex"
>
<div
class=
"sidebar col-2"
>
<a
href=
"#about"
>
Dashboard
</a>
<a
href=
"#services"
>
Button 1
</a>
<a
href=
"#clients"
>
Button 2
</a>
<a
href=
"#contact"
>
Button 3
</a>
</div>
<div
class=
"content-wrapper col-9"
>
{% block content %}
{% block content %}
<div
class=
"card"
>
<div
class=
"row d-flex"
>
<div
class=
'sidebar col-md-2'
>
<div
class=
"menu"
>
<ul>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
<li><a
href=
"#"
><i
class=
"fas fa-cloud"
></i>
Dashboard
</li>
</ul>
</div>
</div>
<div
class=
"content-wrapper col-md-10"
>
sdfa
</div>
</div>
</div>
{% endblock %}
{% endblock %}
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
source/webapp/templates/courses/courses_list.html
View file @
69d44efd
{% extends 'base.html' %}
{% block title %} List {% endblock %}
{% block title %} List {% endblock %}
{% block content %}
{% block content %}
{% for course in courses %}
<div
class=
'course-container row d-flex flex-wrap justify-content-between'
>
<div
class=
"card"
>
{% for course in courses %}
<div
class=
"card-header"
>
<div
class=
"content-course col-4"
style=
"width: 300px;"
>
Featured
<div
class=
"block-course"
>
</div>
<div
class=
"card-header"
>
<div
class=
"card-body"
>
Course
<h5
class=
"card-title"
>
{{course.title}}
</h5>
</div>
<p
class=
"card-text"
>
{{course.description}}
</p>
<div
class=
"card-body"
>
<a
href=
"#"
class=
"btn btn-primary"
>
Go somewhere
</a>
<h5
class=
"card-title"
>
{{course.title}}
</h5>
</div>
<p
class=
"card-text"
>
{{course.description}}
</p>
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<div>
{% endblock %}
{% endblock %}
\ No newline at end of file
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