Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
dist: xenial

language: python

python:
- "3.7"

install:
- pip install -r requirements.txt

before_script:
- python manage.py makemigrations
- python manage.py migrate

script:
- python manage.py test
dist: xenial
language: python
python:
- '3.7'
deploy:
provider: heroku
buildpack: python
api_key:
secure: 9ded86e6-dbca-449e-9bad-048587c0b5f7
app: amcplearnpython
on:
repo: python-am-cp/E-Learning
branch: heroku
run:
- "python manage.py migrate"
install:
- pip install -r requirements-build.txt
before_script:
- python manage.py makemigrations
- python manage.py migrate
script:
- python manage.py test
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn project.wsgi
Binary file added application/static/images/im1.jpg
74 changes: 74 additions & 0 deletions application/static/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
* {
box-sizing: border-box;
}

body {
background-color: #09151A;
}
.navbar {
background-color: #09151A;

}
.navbar-brand{
color: #FFFFFF;
margin: 0 0 0 20px;
}
.nav{

margin: 0 20px 0 0;
}
.nav-item{
font-family: "Segoe UI";
margin: 0 10px 0 10px;
}

.header .navbar-toggle {
width: 25px;
height: 25px;
border: none;
padding: 0;
margin: 35px 10px;
}
.navbar-toggle {
position: relative;
float: right;
padding: 9px 10px;
margin-top: 8px;
margin-right: 15px;
margin-bottom: 8px;
background-color: transparent;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}

.nav{

color: #FFFFFF;
}
.promo-block {
font-family: "Segoe UI";
position: relative;
z-index: 1;
background: url(../images/im1.jpg) center center no-repeat;
background-size: cover;
padding: 500px 0 230px; /* 310 */
padding-top:320px; /* 240 */
padding-right: 200px;
}

.promo-block-divider{
color: #E0FFFF;
}
.container{

}

.textarea {

width: 350px;
height: 140px;
margin: 5px 0 10px;
font-size: 16px;
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

<link rel="stylesheet" href="{% static 'application/styles/base.css' %}">
<link rel="stylesheet" href="{% static '/styles/base.css' %}">

{% block headers %}{% endblock %}
</head>
Expand Down
90 changes: 90 additions & 0 deletions application/templates/mainwindow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<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="{% static '/styles/style.css' %}">

</head>
<body>
<header class="header navbar-fixed-top">
<nav class="navbar navbar-expand-sm" > <!--navbar-dark bg-dark -->
<a href="#" class="navbar-brand"> E-Learning </a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbarMenu">
<span class="navbar-toggle-icon"></span>
</button>
<div class="collapse navbar-collapse nav-collapse" id ="navbarMenu"></div>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link" href="#"><FONT COLOR = #E0FFFF>ELP</FONT></a></li>
<li class="nav-item"><a class="nav-link" href="#"><FONT COLOR = #E0FFFF>О ПРОЕКТЕ</FONT></a></li>
<li class="nav-item"><a class="nav-link" href="#"><FONT COLOR = #E0FFFF>ВХОД</FONT></a></li>
<li class="nav-item"><a class="nav-link" href="#"><FONT COLOR = #E0FFFF>РЕГИСТРАЦИЯ</FONT></a></li>
<li class="nav-item"><a class="nav-link" href="#"><FONT COLOR = #E0FFFF>НАЧАТЬ ОБУЧЕНИЕ</FONT></a></li>
</ul>
</nav>
</header>
<div class="promo-block align-self-start" data-image-src="{% static '/images/im1.jpg' %}">

<div class="container">
<div class="row", style="height:300px;">
<div class="col-sm-6 align-self-start">
<div class="promo-block-divider">

<h1 class="promo-block-title">E-Learning <br/> Python</h1>
<h5 class="promo-block-text">Геймификация курса по изучению питона</h5>
</div>
<ul class="list-inline">
<li><a href="#" class="social-icons"><i class="icon-social-facebook"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-twitter"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-dribbble"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-behance"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-linkedin"></i></a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<!--<div class="promo-block-divider">

<h1 class="promo-block-title">E-Learning <br/> Python</h1>
<h5 class="promo-block-text">Геймификация курса по изучению питона</h5>
</div>
<ul class="list-inline">
<li><a href="#" class="social-icons"><i class="icon-social-facebook"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-twitter"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-dribbble"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-behance"></i></a></li>
<li><a href="#" class="social-icons"><i class="icon-social-linkedin"></i></a></li>
</ul>
-->
</div>
</div>
<!--// end row -->
</div>
</div>


<div id="app">

</div>
<!--
<script src="http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js"></script>
<script>


new Vue({
el: "#app"


})
</script>
-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
</body>
</html>

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'application/layout/base.html' %}
{% extends 'layout/base.html' %}


{% block content %}
Expand Down
1 change: 1 addition & 0 deletions application/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
urlpatterns = [
path('signup/', views.show_signup),
path('admin/', admin.site.urls),
path('mainwindow/', views.show_mainwidnow),
]
7 changes: 5 additions & 2 deletions application/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from django.shortcuts import render, redirect



# serializer registragion
# class UserList(generics.ListAPIView):
# queryset = User.objects.all()
Expand All @@ -26,7 +25,11 @@ def show_signup(request):
user.save()
return HttpResponse('200')

return render(request, 'application/signup.html')
return render(request, 'signup.html')


def show_mainwidnow(request):
return render(request, 'mainwindow.html')



6 changes: 6 additions & 0 deletions project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,9 @@

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

try:
import django_heroku
django_heroku.settings(locals())
except ImportError:
found = False
11 changes: 11 additions & 0 deletions requirements-build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dj-database-url==0.5.0
Django==2.2
gunicorn==19.9.0
psycopg2==2.8
pytz==2018.9
sqlparse==0.3.0
whitenoise==4.1.2
django-filter==2.1.0
djangorestframework==3.9.2
Markdown==3.1
Pillow==6.0.0
11 changes: 8 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
dj-database-url==0.5.0
Django==2.2
django-heroku==0.3.1
gunicorn==19.9.0
psycopg2==2.8
pytz==2018.9
sqlparse==0.3.0
whitenoise==4.1.2
django-filter==2.1.0
djangorestframework==3.9.2
Markdown==3.1
Pillow==6.0.0
pytz==2018.9
sqlparse==0.3.0
Pillow==6.0.0
Binary file added static/images/background.jpg
Binary file added static/images/im1.jpg
Binary file added static/images/planeta.jpeg
5 changes: 5 additions & 0 deletions static/styles/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.siqnup-form {
max-width: 30%;
margin: 32px auto 0 auto;
}
74 changes: 74 additions & 0 deletions static/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
* {
box-sizing: border-box;
}

body {
background-color: #09151A;
}
.navbar {
background-color: #09151A;

}
.navbar-brand{
color: #FFFFFF;
margin: 0 0 0 20px;
}
.nav{

margin: 0 20px 0 0;
}
.nav-item{
font-family: "Segoe UI";
margin: 0 10px 0 10px;
}

.header .navbar-toggle {
width: 25px;
height: 25px;
border: none;
padding: 0;
margin: 35px 10px;
}
.navbar-toggle {
position: relative;
float: right;
padding: 9px 10px;
margin-top: 8px;
margin-right: 15px;
margin-bottom: 8px;
background-color: transparent;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}

.nav{

color: #FFFFFF;
}
.promo-block {
font-family: "Segoe UI";
position: relative;
z-index: 1;
background: url(img/im1.jpg) center center no-repeat;
background-size: cover;
padding: 500px 0 230px; /* 310 */
padding-top:320px; /* 240 */
padding-right: 200px;
}

.promo-block-divider{
color: #E0FFFF;
}
.container{

}

.textarea {

width: 350px;
height: 140px;
margin: 5px 0 10px;
font-size: 16px;
}