Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Redesign admin login page
Browse files Browse the repository at this point in the history
Signed-off-by: harshithpabbati <[email protected]>
  • Loading branch information
amreshk005 authored and harshithpabbati committed Sep 4, 2019
2 parents 711d1c7 + b988bb0 commit ca44adc
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

dist: xenial
language: python
python:
- "3.6"
Expand All @@ -7,4 +7,5 @@ install:
script:
- python manage.py makemigrations questions
- python manage.py migrate
- python manage.py test
- python manage.py test

9 changes: 7 additions & 2 deletions questions/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from django.contrib import admin
from .models import *

admin.site.register(Topic)
admin.site.register(Type)

class SnippetAdmin(admin.ModelAdmin):
change_list_template = 'admin/questions/login.html'


admin.site.register(Topic, SnippetAdmin)
admin.site.register(Type, SnippetAdmin)
Binary file added questions/static/questions/logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions questions/templates/admin/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{% extends "admin/login.html" %}
{% load i18n static %}

{% load static %}

{% block footer %}
<style>
#footer {
text-align: center;
padding: 2rem;
background: #eee;
font-family: monospace;
font-weight: 400;
font-size: 1rem;
/* color: #333; */
}
</style>
<div id="footer">
Qujini Question Paper Generator
</div>
{% endblock %}
{% block script %}


<script src="{% static 'questions/js/login-extra.js' %}"></script>
{% endblock %}


<!-- //new start -->
{% block branding %}
<style>
body.login {
/* background: #ffc107; */
min-height: 100vh;
align-items: center;
justify-content: center;
display: flex;
}

.login #header {
height: auto;
padding: 1rem;
/* background: #222; */
}

.login #branding {
width: 100%;
}

.login .head {
display: flex;
align-items: center;
justify-content: center;
}

.login #container {
/* background: #fff; */
border: none;
border-radius: 4px;
box-shadow: 2px 3px 5px #333;
overflow: hidden;
width: 50vw;
margin: 0;
max-width: 400px;
}

.login .submit-row {
display: flex;
justify-content: center;
padding: 2.5rem 0;
}

.login .submit-row input {
/* background: #ffc107; */
/* color: black; */
display: block;
width: 100%;
}
</style>

<div class="head">
<img class="brand_img" src="{% static 'questions/logo_light.png' %}" style="height: 5rem;" alt="logo">
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion qujini/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
# Application definition

INSTALLED_APPS = [
'questions',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'questions',
'ckeditor',
]

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Django==2.2.1
django-ckeditor==5.7.1
pytz==2019.1
sqlparse==0.3.0

sqlparse==0.3.0

0 comments on commit ca44adc

Please sign in to comment.