Commit ea6730bc authored by Борис Ким's avatar Борис Ким

Видоизменил базовый шаблон

parent a91e9715
......@@ -115,6 +115,11 @@ STATIC_URL = '/static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
\ No newline at end of file
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.card {
position: relative;
width: 100%;
height: 100vh;
overflow-x: auto;
background-size: cover;
}
.sidebar {
position: fixed;
background-color: #70BBD0;
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{
color: #fff;
font-size: 20px;
padding-right: 8px;
}
.sidebar .menu a{
color: #fff;
font-size: 20px;
text-decoration: none;
}
.content-wrapper {
background-color: #B3E1EE;
}
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<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">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
</div>
</nav>
{% 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 %}
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -2,4 +2,4 @@ from django.shortcuts import render
def my_view(request):
return render(request, 'courses/courses.html')
\ No newline at end of file
return render(request, 'base.html')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment