├── apps ├── __init__.py ├── github_info │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── admin.py │ ├── urls.py │ ├── models.py │ └── views.py ├── github_task │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── admin.py │ ├── urls.py │ ├── models.py │ └── views.py ├── github_user │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── admin.py │ ├── models.py │ └── views.py ├── task.conf ├── github_log.py └── github_login.py ├── github_monitor ├── __init__.py ├── wsgi.py ├── urls.py └── settings.py ├── requirements.txt ├── static └── assets │ ├── img │ ├── favicon.png │ ├── kodinger.jpg │ ├── new_logo.png │ ├── apple-icon.png │ ├── background.jpg │ ├── tim_80x80.png │ └── faces │ │ ├── face-0.jpg │ │ ├── face-1.jpg │ │ ├── face-2.jpg │ │ └── face-3.jpg │ ├── fonts │ ├── themify.eot │ ├── themify.ttf │ └── themify.woff │ ├── sass │ ├── paper │ │ ├── mixins │ │ │ ├── _tabs.scss │ │ │ ├── _cards.scss │ │ │ ├── _navbars.scss │ │ │ ├── _icons.scss │ │ │ ├── _inputs.scss │ │ │ ├── _transparency.scss │ │ │ ├── _labels.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _buttons.scss │ │ │ ├── _chartist.scss │ │ │ └── _vendor-prefixes.scss │ │ ├── _mixins.scss │ │ ├── _footers.scss │ │ ├── _alerts.scss │ │ ├── _misc.scss │ │ ├── _tables.scss │ │ ├── _typography.scss │ │ ├── _checkbox-radio.scss │ │ ├── _dropdown.scss │ │ ├── _buttons.scss │ │ ├── _inputs.scss │ │ ├── _sidebar-and-main-panel.scss │ │ ├── _cards.scss │ │ ├── _navbars.scss │ │ └── _chartist.scss │ └── paper-dashboard.scss │ ├── css │ └── demo.css │ └── js │ ├── auth.js │ └── paper-dashboard.js ├── templates ├── assets │ ├── img │ │ ├── favicon.png │ │ ├── apple-icon.png │ │ ├── background.jpg │ │ ├── kodinger.jpg │ │ ├── new_logo.png │ │ ├── tim_80x80.png │ │ └── faces │ │ │ ├── face-0.jpg │ │ │ ├── face-1.jpg │ │ │ ├── face-2.jpg │ │ │ └── face-3.jpg │ ├── fonts │ │ ├── themify.eot │ │ ├── themify.ttf │ │ └── themify.woff │ ├── sass │ │ ├── paper │ │ │ ├── mixins │ │ │ │ ├── _tabs.scss │ │ │ │ ├── _cards.scss │ │ │ │ ├── _navbars.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _inputs.scss │ │ │ │ ├── _transparency.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _sidebar.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _chartist.scss │ │ │ │ └── _vendor-prefixes.scss │ │ │ ├── _mixins.scss │ │ │ ├── _footers.scss │ │ │ ├── _alerts.scss │ │ │ ├── _misc.scss │ │ │ ├── _tables.scss │ │ │ ├── _typography.scss │ │ │ ├── _checkbox-radio.scss │ │ │ ├── _dropdown.scss │ │ │ ├── _buttons.scss │ │ │ ├── _inputs.scss │ │ │ ├── _sidebar-and-main-panel.scss │ │ │ ├── _cards.scss │ │ │ ├── _navbars.scss │ │ │ └── _chartist.scss │ │ └── paper-dashboard.scss │ ├── css │ │ └── demo.css │ └── js │ │ ├── auth.js │ │ └── paper-dashboard.js ├── login.html ├── typography.html └── table.html ├── .idea ├── vcs.xml ├── modules.xml ├── misc.xml └── github_monitor.iml ├── manage.py └── README.md /apps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/github_info/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/github_task/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/github_user/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /github_monitor/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/github_info/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /apps/github_task/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /apps/github_user/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | django==2.2.6 2 | bs4 3 | demjson 4 | lxml 5 | mysqlclient 6 | mysql 7 | requests 8 | supervisor 9 | -------------------------------------------------------------------------------- /static/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/favicon.png -------------------------------------------------------------------------------- /static/assets/img/kodinger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/kodinger.jpg -------------------------------------------------------------------------------- /static/assets/img/new_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/new_logo.png -------------------------------------------------------------------------------- /static/assets/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/fonts/themify.eot -------------------------------------------------------------------------------- /static/assets/fonts/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/fonts/themify.ttf -------------------------------------------------------------------------------- /static/assets/fonts/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/fonts/themify.woff -------------------------------------------------------------------------------- /static/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/apple-icon.png -------------------------------------------------------------------------------- /static/assets/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/background.jpg -------------------------------------------------------------------------------- /static/assets/img/tim_80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/tim_80x80.png -------------------------------------------------------------------------------- /templates/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/favicon.png -------------------------------------------------------------------------------- /static/assets/img/faces/face-0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/faces/face-0.jpg -------------------------------------------------------------------------------- /static/assets/img/faces/face-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/faces/face-1.jpg -------------------------------------------------------------------------------- /static/assets/img/faces/face-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/faces/face-2.jpg -------------------------------------------------------------------------------- /static/assets/img/faces/face-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/static/assets/img/faces/face-3.jpg -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_tabs.scss: -------------------------------------------------------------------------------- 1 | @mixin pill-style($color){ 2 | border: 1px solid $color; 3 | color: $color; 4 | } -------------------------------------------------------------------------------- /templates/assets/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/fonts/themify.eot -------------------------------------------------------------------------------- /templates/assets/fonts/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/fonts/themify.ttf -------------------------------------------------------------------------------- /templates/assets/fonts/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/fonts/themify.woff -------------------------------------------------------------------------------- /templates/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/apple-icon.png -------------------------------------------------------------------------------- /templates/assets/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/background.jpg -------------------------------------------------------------------------------- /templates/assets/img/kodinger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/kodinger.jpg -------------------------------------------------------------------------------- /templates/assets/img/new_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/new_logo.png -------------------------------------------------------------------------------- /templates/assets/img/tim_80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/tim_80x80.png -------------------------------------------------------------------------------- /templates/assets/img/faces/face-0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/faces/face-0.jpg -------------------------------------------------------------------------------- /templates/assets/img/faces/face-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/faces/face-1.jpg -------------------------------------------------------------------------------- /templates/assets/img/faces/face-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/faces/face-2.jpg -------------------------------------------------------------------------------- /templates/assets/img/faces/face-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/github_monitor/master/templates/assets/img/faces/face-3.jpg -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_tabs.scss: -------------------------------------------------------------------------------- 1 | @mixin pill-style($color){ 2 | border: 1px solid $color; 3 | color: $color; 4 | } -------------------------------------------------------------------------------- /apps/github_info/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class GithubInfoConfig(AppConfig): 5 | name = 'github_info' 6 | -------------------------------------------------------------------------------- /apps/github_task/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class GithubTaskConfig(AppConfig): 5 | name = 'github_task' 6 | -------------------------------------------------------------------------------- /apps/github_user/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class GithubUserConfig(AppConfig): 5 | name = 'github_user' 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_cards.scss: -------------------------------------------------------------------------------- 1 | @mixin filter($color){ 2 | @if $color == #FFFFFF{ 3 | background-color: rgba($color,.91); 4 | } @else { 5 | background-color: rgba($color,.69); 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /apps/github_task/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import edit_task 3 | # Register your models here. 4 | 5 | 6 | @admin.register(edit_task) 7 | class editadmin(admin.ModelAdmin): 8 | list_display = ('task_name',) -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_cards.scss: -------------------------------------------------------------------------------- 1 | @mixin filter($color){ 2 | @if $color == #FFFFFF{ 3 | background-color: rgba($color,.91); 4 | } @else { 5 | background-color: rgba($color,.69); 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /apps/github_info/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Warename 3 | # Register your models here. 4 | 5 | @admin.register(Warename) 6 | class WarenameAdmin(admin.ModelAdmin): 7 | list_display = ('name', 'dealwith') -------------------------------------------------------------------------------- /apps/github_user/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import UserList 3 | # Register your models here. 4 | 5 | 6 | @admin.register(UserList) 7 | class UserListAdmin(admin.ModelAdmin): 8 | list_display = ('username', 'token', 'password') -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_navbars.scss: -------------------------------------------------------------------------------- 1 | @mixin navbar-color($color){ 2 | background-color: $color; 3 | } 4 | 5 | @mixin center-item(){ 6 | left: 0; 7 | right: 0; 8 | margin-right: auto; 9 | margin-left: auto; 10 | position: absolute; 11 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_navbars.scss: -------------------------------------------------------------------------------- 1 | @mixin navbar-color($color){ 2 | background-color: $color; 3 | } 4 | 5 | @mixin center-item(){ 6 | left: 0; 7 | right: 0; 8 | margin-right: auto; 9 | margin-left: auto; 10 | position: absolute; 11 | } -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /apps/github_task/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from apps.github_task import views 3 | 4 | 5 | urlpatterns = [ 6 | path('edit/', views.edittask, name='edit'), 7 | path('', views.task, name='task'), 8 | path('all/', views.all_task, name='alltask'), 9 | path('delitem/', views.delitem, name='delitem') 10 | ] -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_icons.scss: -------------------------------------------------------------------------------- 1 | @mixin icon-background ($icon-url){ 2 | background-image : url($icon-url); 3 | 4 | } 5 | 6 | @mixin icon-shape ($size, $padding, $border-radius) { 7 | height: $size; 8 | width: $size; 9 | padding: $padding; 10 | border-radius: $border-radius; 11 | display: inline-table; 12 | 13 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_icons.scss: -------------------------------------------------------------------------------- 1 | @mixin icon-background ($icon-url){ 2 | background-image : url($icon-url); 3 | 4 | } 5 | 6 | @mixin icon-shape ($size, $padding, $border-radius) { 7 | height: $size; 8 | width: $size; 9 | padding: $padding; 10 | border-radius: $border-radius; 11 | display: inline-table; 12 | 13 | } -------------------------------------------------------------------------------- /apps/github_user/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import AbstractUser 3 | 4 | # Create your models here. 5 | 6 | 7 | class UserList(AbstractUser): 8 | token = models.TextField(verbose_name='Token', blank=True) 9 | class Meta: 10 | verbose_name = '用户管理' 11 | verbose_name_plural = '用户管理' 12 | 13 | def __str__(self): 14 | return self.username 15 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_mixins.scss: -------------------------------------------------------------------------------- 1 | //Utilities 2 | 3 | @import "mixins/transparency"; 4 | @import "mixins/vendor-prefixes"; 5 | 6 | 7 | //Components 8 | 9 | @import "mixins/buttons"; 10 | @import "mixins/inputs"; 11 | @import "mixins/labels"; 12 | @import "mixins/tabs"; 13 | @import "mixins/navbars"; 14 | @import "mixins/icons"; 15 | @import "mixins/cards"; 16 | @import "mixins/chartist"; 17 | @import "mixins/sidebar"; -------------------------------------------------------------------------------- /templates/assets/sass/paper/_mixins.scss: -------------------------------------------------------------------------------- 1 | //Utilities 2 | 3 | @import "mixins/transparency"; 4 | @import "mixins/vendor-prefixes"; 5 | 6 | 7 | //Components 8 | 9 | @import "mixins/buttons"; 10 | @import "mixins/inputs"; 11 | @import "mixins/labels"; 12 | @import "mixins/tabs"; 13 | @import "mixins/navbars"; 14 | @import "mixins/icons"; 15 | @import "mixins/cards"; 16 | @import "mixins/chartist"; 17 | @import "mixins/sidebar"; -------------------------------------------------------------------------------- /apps/github_info/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import github_info, deal_info, ignore_info, github_total, dash 3 | 4 | 5 | info_urlpatterns = [ 6 | path('getinfo/', github_info, name='getinfo'), 7 | path('dealinfo/', deal_info, name='dealinfo'), 8 | path('ignore/', ignore_info, name='ignore'), 9 | path('total/', github_total, name='total'), 10 | path('dashboard/', dash, name='dashboard'), 11 | 12 | ] -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_inputs.scss: -------------------------------------------------------------------------------- 1 | @mixin input-size($padding-vertical, $padding-horizontal, $height){ 2 | padding: $padding-vertical $padding-horizontal; 3 | height: $height; 4 | } 5 | 6 | @mixin placeholder($color, $opacity){ 7 | color: $color; 8 | @include opacity(1); 9 | } 10 | 11 | @mixin light-form(){ 12 | border-radius: 0; 13 | border:0; 14 | padding: 0; 15 | background-color: transparent; 16 | 17 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_inputs.scss: -------------------------------------------------------------------------------- 1 | @mixin input-size($padding-vertical, $padding-horizontal, $height){ 2 | padding: $padding-vertical $padding-horizontal; 3 | height: $height; 4 | } 5 | 6 | @mixin placeholder($color, $opacity){ 7 | color: $color; 8 | @include opacity(1); 9 | } 10 | 11 | @mixin light-form(){ 12 | border-radius: 0; 13 | border:0; 14 | padding: 0; 15 | background-color: transparent; 16 | 17 | } -------------------------------------------------------------------------------- /github_monitor/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for github_monitor project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'github_monitor.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_transparency.scss: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | @mixin opacity($opacity) { 4 | opacity: $opacity; 5 | // IE8 filter 6 | $opacity-ie: ($opacity * 100); 7 | filter: #{alpha(opacity=$opacity-ie)}; 8 | } 9 | 10 | @mixin black-filter($opacity){ 11 | top: 0; 12 | left: 0; 13 | height: 100%; 14 | width: 100%; 15 | position: absolute; 16 | background-color: rgba(17,17,17,$opacity); 17 | display: block; 18 | content: ""; 19 | z-index: 1; 20 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_transparency.scss: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | @mixin opacity($opacity) { 4 | opacity: $opacity; 5 | // IE8 filter 6 | $opacity-ie: ($opacity * 100); 7 | filter: #{alpha(opacity=$opacity-ie)}; 8 | } 9 | 10 | @mixin black-filter($opacity){ 11 | top: 0; 12 | left: 0; 13 | height: 100%; 14 | width: 100%; 15 | position: absolute; 16 | background-color: rgba(17,17,17,$opacity); 17 | display: block; 18 | content: ""; 19 | z-index: 1; 20 | } -------------------------------------------------------------------------------- /apps/task.conf: -------------------------------------------------------------------------------- 1 | [program:testpy] 2 | command=python3 github_log.py ; the program (relative uses PATH, can take args) 3 | ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) 4 | ;numprocs=1 ; number of processes copies to start (def 1) 5 | directory=/github_monitor/apps ; directory to cwd to before exec (def no cwd) 6 | ;umask=022 ; umask for process (default None) 7 | priority=999 ; the relative start priority (default 999) 8 | startsecs = 5 9 | autorestart = true 10 | startretries = 3 11 | stdout_logfile = /github_monitor/supervisor.log -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_labels.scss: -------------------------------------------------------------------------------- 1 | @mixin label-style(){ 2 | padding: $padding-label-vertical $padding-label-horizontal; 3 | border: 1px solid $default-color; 4 | border-radius: $border-radius-small; 5 | color: $default-color; 6 | font-weight: $font-weight-semi; 7 | font-size: $font-size-small; 8 | text-transform: uppercase; 9 | display: inline-block; 10 | vertical-align: middle; 11 | } 12 | 13 | @mixin label-color($color){ 14 | border-color: $color; 15 | color: $color; 16 | } 17 | @mixin label-color-fill($color){ 18 | border-color: $color; 19 | color: $white-color; 20 | background-color: $color; 21 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_labels.scss: -------------------------------------------------------------------------------- 1 | @mixin label-style(){ 2 | padding: $padding-label-vertical $padding-label-horizontal; 3 | border: 1px solid $default-color; 4 | border-radius: $border-radius-small; 5 | color: $default-color; 6 | font-weight: $font-weight-semi; 7 | font-size: $font-size-small; 8 | text-transform: uppercase; 9 | display: inline-block; 10 | vertical-align: middle; 11 | } 12 | 13 | @mixin label-color($color){ 14 | border-color: $color; 15 | color: $color; 16 | } 17 | @mixin label-color-fill($color){ 18 | border-color: $color; 19 | color: $white-color; 20 | background-color: $color; 21 | } -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'github_monitor.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /apps/github_info/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | class Warename(models.Model): 6 | AVATOR = { 7 | (1, '已处理'), 8 | (2, '已忽略'), 9 | (0, '未处理'), 10 | } 11 | name = models.CharField(verbose_name='仓库名', max_length=500) 12 | filename = models.CharField(verbose_name='文件名', max_length=1000) 13 | time = models.CharField(verbose_name='更新时间', max_length=50, null=True) 14 | marks = models.CharField(verbose_name='备注', max_length=500, blank=True) 15 | dealwith = models.IntegerField(verbose_name='处置', choices=AVATOR, default=0) 16 | 17 | class Meta: 18 | verbose_name = '仓库' 19 | verbose_name_plural = verbose_name 20 | 21 | def __str__(self): 22 | return self.name -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_sidebar.scss: -------------------------------------------------------------------------------- 1 | @mixin sidebar-background-color($background-color, $font-color){ 2 | &:after, 3 | &:before{ 4 | background-color: $background-color; 5 | } 6 | 7 | .logo{ 8 | border-bottom: 1px solid rgba($font-color,.3); 9 | 10 | p{ 11 | color: $font-color; 12 | } 13 | 14 | .simple-text{ 15 | color: $font-color; 16 | } 17 | } 18 | 19 | .nav{ 20 | li:not(.active){ 21 | > a{ 22 | color: $font-color; 23 | } 24 | } 25 | .divider{ 26 | background-color: rgba($font-color,.2); 27 | } 28 | 29 | } 30 | 31 | } 32 | 33 | @mixin sidebar-active-color($font-color){ 34 | .nav{ 35 | li{ 36 | &.active > a{ 37 | color: $font-color; 38 | opacity: 1; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_sidebar.scss: -------------------------------------------------------------------------------- 1 | @mixin sidebar-background-color($background-color, $font-color){ 2 | &:after, 3 | &:before{ 4 | background-color: $background-color; 5 | } 6 | 7 | .logo{ 8 | border-bottom: 1px solid rgba($font-color,.3); 9 | 10 | p{ 11 | color: $font-color; 12 | } 13 | 14 | .simple-text{ 15 | color: $font-color; 16 | } 17 | } 18 | 19 | .nav{ 20 | li:not(.active){ 21 | > a{ 22 | color: $font-color; 23 | } 24 | } 25 | .divider{ 26 | background-color: rgba($font-color,.2); 27 | } 28 | 29 | } 30 | 31 | } 32 | 33 | @mixin sidebar-active-color($font-color){ 34 | .nav{ 35 | li{ 36 | &.active > a{ 37 | color: $font-color; 38 | opacity: 1; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## GITHUB_MONTIOR 2 | 3 | > python3 + Django 2.2.6 + supervisord 4 | 5 | 1. 环境由简单的Django完成,外加一个HTML展示模板 6 | 2. GitHub的爬虫由supervisord来维护,需要修改配置文件内的信息,可以改成/var/run路径 7 | 3. pip安装如下的文件即可 8 | 9 | 爬虫需要账号密码模拟登陆,进程为五分钟一次。是否扫描根据任务数据里保存的时间来做判断。 10 | 11 | 修改任务只需要在编辑里输入任务名,直接输入其他参数更新即可。 12 | 13 | 数据库采用MySQL5.7。 14 | 15 | ``` 16 | python3 manager.py createsuperuser 17 | python3 manager.py makemigrations 18 | python3 manager.py migrate 19 | 登陆后台添加一个可以登陆前端的账号即可。 20 | ``` 21 | 22 | 23 | 24 | 首界面 25 | 26 | ![1573011489137](https://user-images.githubusercontent.com/27627614/68268529-83d12080-0091-11ea-8956-988a74a77da4.png) 27 | 28 | 全部信息![1573011512652](https://user-images.githubusercontent.com/27627614/68268531-8764a780-0091-11ea-8269-0288c1c879cb.png) 29 | 30 | 未处理信息 31 | 32 | ![1573011525234](https://user-images.githubusercontent.com/27627614/68268533-8764a780-0091-11ea-8231-30c8635d2067.png) 33 | 34 | 界面由于对js了解较少,没有采用比较nodejs类前端框架,当然也可以修改为自己喜欢的界面。 35 | 36 | 食用简单,望喜欢。 -------------------------------------------------------------------------------- /apps/github_task/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from datetime import datetime 3 | from django.utils import timezone 4 | # Create your models here. 5 | 6 | 7 | class edit_task(models.Model): 8 | """编辑任务""" 9 | task_name = models.CharField(max_length=100, verbose_name='任务名') 10 | word = models.CharField(verbose_name='关键词', max_length=200) 11 | warename = models.CharField(verbose_name='忽略仓库', max_length=200) 12 | ignorance = models.CharField(verbose_name='忽略账号', max_length=200) 13 | num = models.IntegerField(verbose_name='页数') 14 | time = models.IntegerField(verbose_name='时间间隔', null=True) 15 | marks = models.TextField(verbose_name='备注') 16 | username = models.CharField(verbose_name='用户名', max_length=50, default='') 17 | password = models.CharField(verbose_name='密码', max_length=50, default='') 18 | end_time = models.DateTimeField(verbose_name='结束时间', default=datetime.now) 19 | 20 | class Meta: 21 | verbose_name = '编辑任务' 22 | verbose_name_plural = verbose_name 23 | 24 | def __str__(self): 25 | return self.task_name 26 | 27 | 28 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_footers.scss: -------------------------------------------------------------------------------- 1 | .footer{ 2 | background-attachment: fixed; 3 | position: relative; 4 | line-height: 20px; 5 | nav { 6 | ul { 7 | list-style: none; 8 | margin: 0; 9 | padding: 0; 10 | font-weight: normal; 11 | li{ 12 | display: inline-block; 13 | padding: 10px 15px; 14 | margin: 15px 3px; 15 | line-height: 20px; 16 | text-align: center; 17 | } 18 | a:not(.btn){ 19 | color: $font-color; 20 | display: block; 21 | margin-bottom: 3px; 22 | 23 | &:focus, 24 | &:hover{ 25 | color: $default-states-color; 26 | } 27 | } 28 | } 29 | } 30 | .copyright{ 31 | color: $font-color; 32 | padding: 10px 15px; 33 | font-size: 14px; 34 | white-space: nowrap; 35 | margin: 15px 3px; 36 | line-height: 20px; 37 | text-align: center; 38 | } 39 | .heart{ 40 | color: $danger-color; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_footers.scss: -------------------------------------------------------------------------------- 1 | .footer{ 2 | background-attachment: fixed; 3 | position: relative; 4 | line-height: 20px; 5 | nav { 6 | ul { 7 | list-style: none; 8 | margin: 0; 9 | padding: 0; 10 | font-weight: normal; 11 | li{ 12 | display: inline-block; 13 | padding: 10px 15px; 14 | margin: 15px 3px; 15 | line-height: 20px; 16 | text-align: center; 17 | } 18 | a:not(.btn){ 19 | color: $font-color; 20 | display: block; 21 | margin-bottom: 3px; 22 | 23 | &:focus, 24 | &:hover{ 25 | color: $default-states-color; 26 | } 27 | } 28 | } 29 | } 30 | .copyright{ 31 | color: $font-color; 32 | padding: 10px 15px; 33 | font-size: 14px; 34 | white-space: nowrap; 35 | margin: 15px 3px; 36 | line-height: 20px; 37 | text-align: center; 38 | } 39 | .heart{ 40 | color: $danger-color; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /github_monitor/urls.py: -------------------------------------------------------------------------------- 1 | """github_monitor URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | from apps.github_info import urls 19 | from apps.github_user import views 20 | from apps.github_task import urls as task 21 | 22 | urlpatterns = [ 23 | path('', views.index, name='index'), 24 | path('login/', views.login, name='login'), 25 | path('logout/', views.logout, name='logout'), 26 | path('admin/', admin.site.urls), 27 | path('table/', include(urls.info_urlpatterns)), 28 | path('task/', include(task.urlpatterns)), 29 | ] 30 | -------------------------------------------------------------------------------- /static/assets/sass/paper-dashboard.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | ========================================================= 4 | * Paper Dashboard - v1.1.2 5 | ========================================================= 6 | 7 | * Product Page: http://www.creative-tim.com/product/paper-dashboard 8 | * Copyright 2017 Creative Tim (http://www.creative-tim.com) 9 | * Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE.md) 10 | 11 | ========================================================= 12 | 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | */ 16 | 17 | 18 | @import "paper/variables"; 19 | @import "paper/mixins"; 20 | 21 | @import "paper/typography"; 22 | 23 | // Core CSS 24 | @import "paper/misc"; 25 | @import "paper/sidebar-and-main-panel"; 26 | @import "paper/buttons"; 27 | @import "paper/inputs"; 28 | 29 | @import "paper/alerts"; 30 | @import "paper/tables"; 31 | 32 | @import "paper/checkbox-radio"; 33 | @import "paper/navbars"; 34 | @import "paper/footers"; 35 | 36 | // Fancy Stuff 37 | 38 | @import "paper/dropdown"; 39 | @import "paper/cards"; 40 | @import "paper/chartist"; 41 | @import "paper/responsive"; 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /templates/assets/sass/paper-dashboard.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | ========================================================= 4 | * Paper Dashboard - v1.1.2 5 | ========================================================= 6 | 7 | * Product Page: http://www.creative-tim.com/product/paper-dashboard 8 | * Copyright 2017 Creative Tim (http://www.creative-tim.com) 9 | * Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE.md) 10 | 11 | ========================================================= 12 | 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | */ 16 | 17 | 18 | @import "paper/variables"; 19 | @import "paper/mixins"; 20 | 21 | @import "paper/typography"; 22 | 23 | // Core CSS 24 | @import "paper/misc"; 25 | @import "paper/sidebar-and-main-panel"; 26 | @import "paper/buttons"; 27 | @import "paper/inputs"; 28 | 29 | @import "paper/alerts"; 30 | @import "paper/tables"; 31 | 32 | @import "paper/checkbox-radio"; 33 | @import "paper/navbars"; 34 | @import "paper/footers"; 35 | 36 | // Fancy Stuff 37 | 38 | @import "paper/dropdown"; 39 | @import "paper/cards"; 40 | @import "paper/chartist"; 41 | @import "paper/responsive"; 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /.idea/github_monitor.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 31 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_alerts.scss: -------------------------------------------------------------------------------- 1 | .alert{ 2 | border: 0; 3 | border-radius: 0; 4 | color: #FFFFFF; 5 | padding: 10px 15px; 6 | font-size: 14px; 7 | 8 | .container &{ 9 | border-radius: 4px; 10 | 11 | } 12 | .navbar &{ 13 | border-radius: 0; 14 | left: 0; 15 | position: absolute; 16 | right: 0; 17 | top: 85px; 18 | width: 100%; 19 | z-index: 3; 20 | } 21 | .navbar:not(.navbar-transparent) &{ 22 | top: 70px; 23 | } 24 | 25 | span[data-notify="icon"]{ 26 | font-size: 30px; 27 | display: block; 28 | left: 15px; 29 | position: absolute; 30 | top: 50%; 31 | margin-top: -20px; 32 | } 33 | 34 | .close ~ span{ 35 | display: block; 36 | max-width: 89%; 37 | } 38 | 39 | &[data-notify="container"]{ 40 | padding: 10px 10px 10px 20px; 41 | border-radius: $border-radius-base; 42 | } 43 | 44 | &.alert-with-icon{ 45 | padding-left: 65px; 46 | } 47 | } 48 | .alert-info{ 49 | background-color: $bg-info; 50 | color: $info-states-color; 51 | } 52 | .alert-success { 53 | background-color: $bg-success; 54 | color: $success-states-color; 55 | } 56 | .alert-warning { 57 | background-color: $bg-warning; 58 | color: $warning-states-color; 59 | } 60 | .alert-danger { 61 | background-color: $bg-danger; 62 | color: $danger-states-color; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_alerts.scss: -------------------------------------------------------------------------------- 1 | .alert{ 2 | border: 0; 3 | border-radius: 0; 4 | color: #FFFFFF; 5 | padding: 10px 15px; 6 | font-size: 14px; 7 | 8 | .container &{ 9 | border-radius: 4px; 10 | 11 | } 12 | .navbar &{ 13 | border-radius: 0; 14 | left: 0; 15 | position: absolute; 16 | right: 0; 17 | top: 85px; 18 | width: 100%; 19 | z-index: 3; 20 | } 21 | .navbar:not(.navbar-transparent) &{ 22 | top: 70px; 23 | } 24 | 25 | span[data-notify="icon"]{ 26 | font-size: 30px; 27 | display: block; 28 | left: 15px; 29 | position: absolute; 30 | top: 50%; 31 | margin-top: -20px; 32 | } 33 | 34 | .close ~ span{ 35 | display: block; 36 | max-width: 89%; 37 | } 38 | 39 | &[data-notify="container"]{ 40 | padding: 10px 10px 10px 20px; 41 | border-radius: $border-radius-base; 42 | } 43 | 44 | &.alert-with-icon{ 45 | padding-left: 65px; 46 | } 47 | } 48 | .alert-info{ 49 | background-color: $bg-info; 50 | color: $info-states-color; 51 | } 52 | .alert-success { 53 | background-color: $bg-success; 54 | color: $success-states-color; 55 | } 56 | .alert-warning { 57 | background-color: $bg-warning; 58 | color: $warning-states-color; 59 | } 60 | .alert-danger { 61 | background-color: $bg-danger; 62 | color: $danger-states-color; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /static/assets/css/demo.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 992px){ 2 | .typo-line{ 3 | padding-left: 140px; 4 | margin-bottom: 40px; 5 | position: relative; 6 | } 7 | 8 | .typo-line .category{ 9 | transform: translateY(-50%); 10 | top: 50%; 11 | left: 0px; 12 | position: absolute; 13 | } 14 | } 15 | 16 | .icon-section { 17 | margin: 0 0 3em; 18 | clear: both; 19 | overflow: hidden; 20 | } 21 | .icon-container { 22 | width: 240px; 23 | padding: .7em 0; 24 | float: left; 25 | position: relative; 26 | text-align: left; 27 | } 28 | .icon-container [class^="ti-"], 29 | .icon-container [class*=" ti-"] { 30 | color: #000; 31 | position: absolute; 32 | margin-top: 3px; 33 | transition: .3s; 34 | } 35 | .icon-container:hover [class^="ti-"], 36 | .icon-container:hover [class*=" ti-"] { 37 | font-size: 2.2em; 38 | margin-top: -5px; 39 | } 40 | .icon-container:hover .icon-name { 41 | color: #000; 42 | } 43 | .icon-name { 44 | color: #aaa; 45 | margin-left: 35px; 46 | font-size: .8em; 47 | transition: .3s; 48 | } 49 | .icon-container:hover .icon-name { 50 | margin-left: 45px; 51 | } 52 | 53 | .places-buttons .btn{ 54 | margin-bottom: 30px 55 | } 56 | .sidebar .nav > li.active-pro{ 57 | position: absolute; 58 | width: 100%; 59 | bottom: 10px; 60 | } 61 | .sidebar .nav > li.active-pro a{ 62 | background: rgba(255, 255, 255, 0.14); 63 | opacity: 1; 64 | color: #FFFFFF; 65 | } 66 | 67 | .table-upgrade td:nth-child(2), 68 | .table-upgrade td:nth-child(3){ 69 | text-align: center; 70 | } 71 | -------------------------------------------------------------------------------- /templates/assets/css/demo.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 992px){ 2 | .typo-line{ 3 | padding-left: 140px; 4 | margin-bottom: 40px; 5 | position: relative; 6 | } 7 | 8 | .typo-line .category{ 9 | transform: translateY(-50%); 10 | top: 50%; 11 | left: 0px; 12 | position: absolute; 13 | } 14 | } 15 | 16 | .icon-section { 17 | margin: 0 0 3em; 18 | clear: both; 19 | overflow: hidden; 20 | } 21 | .icon-container { 22 | width: 240px; 23 | padding: .7em 0; 24 | float: left; 25 | position: relative; 26 | text-align: left; 27 | } 28 | .icon-container [class^="ti-"], 29 | .icon-container [class*=" ti-"] { 30 | color: #000; 31 | position: absolute; 32 | margin-top: 3px; 33 | transition: .3s; 34 | } 35 | .icon-container:hover [class^="ti-"], 36 | .icon-container:hover [class*=" ti-"] { 37 | font-size: 2.2em; 38 | margin-top: -5px; 39 | } 40 | .icon-container:hover .icon-name { 41 | color: #000; 42 | } 43 | .icon-name { 44 | color: #aaa; 45 | margin-left: 35px; 46 | font-size: .8em; 47 | transition: .3s; 48 | } 49 | .icon-container:hover .icon-name { 50 | margin-left: 45px; 51 | } 52 | 53 | .places-buttons .btn{ 54 | margin-bottom: 30px 55 | } 56 | .sidebar .nav > li.active-pro{ 57 | position: absolute; 58 | width: 100%; 59 | bottom: 10px; 60 | } 61 | .sidebar .nav > li.active-pro a{ 62 | background: rgba(255, 255, 255, 0.14); 63 | opacity: 1; 64 | color: #FFFFFF; 65 | } 66 | 67 | .table-upgrade td:nth-child(2), 68 | .table-upgrade td:nth-child(3){ 69 | text-align: center; 70 | } 71 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_misc.scss: -------------------------------------------------------------------------------- 1 | /* General overwrite */ 2 | body{ 3 | color: $font-color; 4 | font-size: $font-size-base; 5 | font-family: 'Muli', Arial, sans-serif; 6 | .wrapper{ 7 | min-height: 100vh; 8 | position: relative; 9 | } 10 | } 11 | a{ 12 | color: $info-color; 13 | 14 | &:hover, &:focus{ 15 | color: $info-states-color; 16 | text-decoration: none; 17 | } 18 | } 19 | 20 | a:focus, a:active, 21 | button::-moz-focus-inner, 22 | input::-moz-focus-inner, 23 | select::-moz-focus-inner, 24 | input[type="file"] > input[type="button"]::-moz-focus-inner{ 25 | outline:0 !important; 26 | } 27 | .ui-slider-handle:focus, 28 | .navbar-toggle, 29 | input:focus, 30 | button:focus { 31 | outline : 0 !important; 32 | } 33 | 34 | /* Animations */ 35 | .form-control, 36 | .input-group-addon, 37 | .tagsinput, 38 | .navbar, 39 | .navbar .alert{ 40 | @include transition($general-transition-time, $transition-linear); 41 | } 42 | 43 | .sidebar .nav a, 44 | .table > tbody > tr .td-actions .btn{ 45 | @include transition($fast-transition-time, $transition-ease-in); 46 | } 47 | 48 | .btn{ 49 | @include transition($ultra-fast-transition-time, $transition-ease-in); 50 | } 51 | .fa{ 52 | width: 21px; 53 | text-align: center; 54 | } 55 | .fa-base{ 56 | font-size: 1.25em !important; 57 | } 58 | 59 | .margin-top{ 60 | margin-top: 50px; 61 | } 62 | hr{ 63 | border-color: $medium-pale-bg; 64 | } 65 | .wrapper{ 66 | position: relative; 67 | top: 0; 68 | height: 100vh; 69 | } 70 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_misc.scss: -------------------------------------------------------------------------------- 1 | /* General overwrite */ 2 | body{ 3 | color: $font-color; 4 | font-size: $font-size-base; 5 | font-family: 'Muli', Arial, sans-serif; 6 | .wrapper{ 7 | min-height: 100vh; 8 | position: relative; 9 | } 10 | } 11 | a{ 12 | color: $info-color; 13 | 14 | &:hover, &:focus{ 15 | color: $info-states-color; 16 | text-decoration: none; 17 | } 18 | } 19 | 20 | a:focus, a:active, 21 | button::-moz-focus-inner, 22 | input::-moz-focus-inner, 23 | select::-moz-focus-inner, 24 | input[type="file"] > input[type="button"]::-moz-focus-inner{ 25 | outline:0 !important; 26 | } 27 | .ui-slider-handle:focus, 28 | .navbar-toggle, 29 | input:focus, 30 | button:focus { 31 | outline : 0 !important; 32 | } 33 | 34 | /* Animations */ 35 | .form-control, 36 | .input-group-addon, 37 | .tagsinput, 38 | .navbar, 39 | .navbar .alert{ 40 | @include transition($general-transition-time, $transition-linear); 41 | } 42 | 43 | .sidebar .nav a, 44 | .table > tbody > tr .td-actions .btn{ 45 | @include transition($fast-transition-time, $transition-ease-in); 46 | } 47 | 48 | .btn{ 49 | @include transition($ultra-fast-transition-time, $transition-ease-in); 50 | } 51 | .fa{ 52 | width: 21px; 53 | text-align: center; 54 | } 55 | .fa-base{ 56 | font-size: 1.25em !important; 57 | } 58 | 59 | .margin-top{ 60 | margin-top: 50px; 61 | } 62 | hr{ 63 | border-color: $medium-pale-bg; 64 | } 65 | .wrapper{ 66 | position: relative; 67 | top: 0; 68 | height: 100vh; 69 | } 70 | -------------------------------------------------------------------------------- /apps/github_user/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import UserList 3 | from django.contrib.auth import logout as lg 4 | # Create your views here. 5 | 6 | 7 | def index(request): 8 | """首页""" 9 | if request.session.get('is_login') == '1': 10 | 11 | return redirect('/table/dashboard') 12 | else: 13 | return redirect('/login') 14 | pass 15 | 16 | 17 | def login(request): 18 | """登陆""" 19 | if request.method == "POST": 20 | username = request.POST.get('username') 21 | password = request.POST.get('password') 22 | if username.strip() and password: 23 | try: 24 | user = UserList.objects.get(username=username) 25 | except: 26 | message = "用户不存在" 27 | return render(request, 'login.html', locals()) 28 | if user.password == password: 29 | request.session['is_login'] = '1' 30 | request.session['user_id'] = user.id 31 | request.session['user_name'] = user.username 32 | request.session.set_expiry(3600) 33 | return redirect('/table/dashboard') 34 | else: 35 | message = '密码不正确' 36 | return render(request, 'login.html', locals()) 37 | else: 38 | message='请输出正确格式的用户名和密码' 39 | return render(request, 'login.html', locals()) 40 | elif request.method == "GET": 41 | return render(request, 'login.html') 42 | return redirect('/login') 43 | 44 | 45 | def logout(request): 46 | """退出""" 47 | if request.session.get('is_login') != '1': 48 | return redirect('/login') 49 | lg(request) 50 | return redirect('/login') 51 | 52 | -------------------------------------------------------------------------------- /apps/github_log.py: -------------------------------------------------------------------------------- 1 | import os,django 2 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "github_monitor.settings") 3 | django.setup() 4 | 5 | from apps import github_login 6 | from apps.github_info import models 7 | from apps.github_task import models as ts 8 | from datetime import datetime 9 | import threading 10 | 11 | 12 | def github(username, password, word, num, warename, ignorance): 13 | list = github_login.github_login(word, num) 14 | gitinfo = list.get_cookie(username, password) 15 | for nua in range(0, len(gitinfo[0])): 16 | for nub in range(0, 10): 17 | try: 18 | if warename != gitinfo[0][nua][nub].split('/')[2] and ignorance != gitinfo[0][nua][nub].split('/')[1] and removal(gitinfo[1][nua][nub],gitinfo[2][nua][nub]): 19 | models.Warename.objects.create(name=gitinfo[0][nua][nub], filename=gitinfo[1][nua][nub], time=gitinfo[2][nua][nub]) 20 | except Exception as e: 21 | print(e) 22 | 23 | 24 | def removal(filename, time): 25 | if models.Warename.objects.filter(filename=filename, time=time): 26 | return False 27 | else: 28 | return True 29 | 30 | 31 | def run(): 32 | task_info = ts.edit_task.objects.all() 33 | for task in task_info: 34 | time = task.time 35 | nowtime = datetime.utcnow() - task.end_time.replace(tzinfo=None) 36 | if nowtime.seconds >= (time * 60): 37 | github(task.username, task.password, task.word, task.num, task.warename, task.ignorance) 38 | t = ts.edit_task.objects.get(id=task.id) 39 | t.end_time = datetime.now() 40 | t.save() 41 | 42 | timer = threading.Timer(300, run) 43 | timer.start() 44 | 45 | 46 | timer = threading.Timer(60, run) 47 | timer.start() 48 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_tables.scss: -------------------------------------------------------------------------------- 1 | .table{ 2 | thead, 3 | tbody, 4 | tfoot{ 5 | tr > th, 6 | tr > td{ 7 | border-top: 1px solid $table-line-color; 8 | } 9 | } 10 | > thead > tr > th{ 11 | border-bottom-width: 0; 12 | font-size: $font-size-h5; 13 | font-weight: $font-weight-light; 14 | } 15 | 16 | .radio, 17 | .checkbox{ 18 | margin-top: 0; 19 | margin-bottom: 22px; 20 | padding: 0; 21 | width: 15px; 22 | } 23 | > thead > tr > th, 24 | > tbody > tr > th, 25 | > tfoot > tr > th, 26 | > thead > tr > td, 27 | > tbody > tr > td, 28 | > tfoot > tr > td{ 29 | padding: 12px; 30 | vertical-align: middle; 31 | } 32 | 33 | .th-description{ 34 | max-width: 150px; 35 | } 36 | .td-price{ 37 | font-size: 26px; 38 | font-weight: $font-weight-light; 39 | margin-top: 5px; 40 | text-align: right; 41 | } 42 | .td-total{ 43 | font-weight: $font-weight-bold; 44 | font-size: $font-size-h5; 45 | padding-top: 20px; 46 | text-align: right; 47 | } 48 | 49 | .td-actions .btn{ 50 | 51 | &.btn-sm, 52 | &.btn-xs{ 53 | padding-left: 3px; 54 | padding-right: 3px; 55 | } 56 | } 57 | 58 | > tbody > tr{ 59 | position: relative; 60 | } 61 | } 62 | .table-striped{ 63 | tbody > tr:nth-of-type(2n+1) { 64 | background-color: #fff; 65 | } 66 | tbody > tr:nth-of-type(2n) { 67 | background-color: $pale-bg; 68 | } 69 | > thead > tr > th, 70 | > tbody > tr > th, 71 | > tfoot > tr > th, 72 | > thead > tr > td, 73 | > tbody > tr > td, 74 | > tfoot > tr > td{ 75 | padding: 15px 8px; 76 | } 77 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/_tables.scss: -------------------------------------------------------------------------------- 1 | .table{ 2 | thead, 3 | tbody, 4 | tfoot{ 5 | tr > th, 6 | tr > td{ 7 | border-top: 1px solid $table-line-color; 8 | } 9 | } 10 | > thead > tr > th{ 11 | border-bottom-width: 0; 12 | font-size: $font-size-h5; 13 | font-weight: $font-weight-light; 14 | } 15 | 16 | .radio, 17 | .checkbox{ 18 | margin-top: 0; 19 | margin-bottom: 22px; 20 | padding: 0; 21 | width: 15px; 22 | } 23 | > thead > tr > th, 24 | > tbody > tr > th, 25 | > tfoot > tr > th, 26 | > thead > tr > td, 27 | > tbody > tr > td, 28 | > tfoot > tr > td{ 29 | padding: 12px; 30 | vertical-align: middle; 31 | } 32 | 33 | .th-description{ 34 | max-width: 150px; 35 | } 36 | .td-price{ 37 | font-size: 26px; 38 | font-weight: $font-weight-light; 39 | margin-top: 5px; 40 | text-align: right; 41 | } 42 | .td-total{ 43 | font-weight: $font-weight-bold; 44 | font-size: $font-size-h5; 45 | padding-top: 20px; 46 | text-align: right; 47 | } 48 | 49 | .td-actions .btn{ 50 | 51 | &.btn-sm, 52 | &.btn-xs{ 53 | padding-left: 3px; 54 | padding-right: 3px; 55 | } 56 | } 57 | 58 | > tbody > tr{ 59 | position: relative; 60 | } 61 | } 62 | .table-striped{ 63 | tbody > tr:nth-of-type(2n+1) { 64 | background-color: #fff; 65 | } 66 | tbody > tr:nth-of-type(2n) { 67 | background-color: $pale-bg; 68 | } 69 | > thead > tr > th, 70 | > tbody > tr > th, 71 | > tfoot > tr > th, 72 | > thead > tr > td, 73 | > tbody > tr > td, 74 | > tfoot > tr > td{ 75 | padding: 15px 8px; 76 | } 77 | } -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Github Monitor 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | logo 18 |
19 |
20 | 45 |
46 | 47 | 50 |
51 | 52 | 53 | 54 | 59 | 60 | -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_buttons.scss: -------------------------------------------------------------------------------- 1 | // Mixin for generating new styles 2 | @mixin btn-styles($btn-color, $btn-states-color) { 3 | border-color: $btn-color; 4 | color: $btn-color; 5 | 6 | &:hover, 7 | &:focus, 8 | &:active, 9 | &.active, 10 | .open > &.dropdown-toggle { 11 | background-color: $btn-color; 12 | color: $fill-font-color; 13 | border-color: $btn-color; 14 | .caret{ 15 | border-top-color: $fill-font-color; 16 | } 17 | } 18 | 19 | &.disabled, 20 | &:disabled, 21 | &[disabled], 22 | fieldset[disabled] & { 23 | &, 24 | &:hover, 25 | &:focus, 26 | &.focus, 27 | &:active, 28 | &.active { 29 | background-color: $transparent-bg; 30 | border-color: $btn-color; 31 | } 32 | } 33 | 34 | 35 | &.btn-fill { 36 | color: $white-color; 37 | background-color: $btn-color; 38 | @include opacity(1); 39 | 40 | &:hover, 41 | &:focus, 42 | &:active, 43 | &.active, 44 | .open > &.dropdown-toggle{ 45 | background-color: $btn-states-color; 46 | color: $white-color; 47 | border-color: $btn-states-color; 48 | } 49 | 50 | .caret{ 51 | border-top-color: $white-color; 52 | } 53 | } 54 | 55 | &.btn-simple { 56 | &:hover, 57 | &:focus, 58 | &:active, 59 | &.active, 60 | .open > &.dropdown-toggle{ 61 | background-color: $transparent-bg; 62 | color: $btn-states-color; 63 | } 64 | 65 | .caret{ 66 | border-top-color: $white-color; 67 | } 68 | } 69 | 70 | .caret{ 71 | border-top-color: $btn-color; 72 | } 73 | } 74 | 75 | 76 | @mixin btn-size($padding-vertical, $padding-horizontal, $font-size, $border, $line-height){ 77 | font-size: $font-size; 78 | border-radius: $border; 79 | padding: $padding-vertical $padding-horizontal; 80 | 81 | &.btn-simple{ 82 | padding: $padding-vertical + 2 $padding-horizontal; 83 | } 84 | 85 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_buttons.scss: -------------------------------------------------------------------------------- 1 | // Mixin for generating new styles 2 | @mixin btn-styles($btn-color, $btn-states-color) { 3 | border-color: $btn-color; 4 | color: $btn-color; 5 | 6 | &:hover, 7 | &:focus, 8 | &:active, 9 | &.active, 10 | .open > &.dropdown-toggle { 11 | background-color: $btn-color; 12 | color: $fill-font-color; 13 | border-color: $btn-color; 14 | .caret{ 15 | border-top-color: $fill-font-color; 16 | } 17 | } 18 | 19 | &.disabled, 20 | &:disabled, 21 | &[disabled], 22 | fieldset[disabled] & { 23 | &, 24 | &:hover, 25 | &:focus, 26 | &.focus, 27 | &:active, 28 | &.active { 29 | background-color: $transparent-bg; 30 | border-color: $btn-color; 31 | } 32 | } 33 | 34 | 35 | &.btn-fill { 36 | color: $white-color; 37 | background-color: $btn-color; 38 | @include opacity(1); 39 | 40 | &:hover, 41 | &:focus, 42 | &:active, 43 | &.active, 44 | .open > &.dropdown-toggle{ 45 | background-color: $btn-states-color; 46 | color: $white-color; 47 | border-color: $btn-states-color; 48 | } 49 | 50 | .caret{ 51 | border-top-color: $white-color; 52 | } 53 | } 54 | 55 | &.btn-simple { 56 | &:hover, 57 | &:focus, 58 | &:active, 59 | &.active, 60 | .open > &.dropdown-toggle{ 61 | background-color: $transparent-bg; 62 | color: $btn-states-color; 63 | } 64 | 65 | .caret{ 66 | border-top-color: $white-color; 67 | } 68 | } 69 | 70 | .caret{ 71 | border-top-color: $btn-color; 72 | } 73 | } 74 | 75 | 76 | @mixin btn-size($padding-vertical, $padding-horizontal, $font-size, $border, $line-height){ 77 | font-size: $font-size; 78 | border-radius: $border; 79 | padding: $padding-vertical $padding-horizontal; 80 | 81 | &.btn-simple{ 82 | padding: $padding-vertical + 2 $padding-horizontal; 83 | } 84 | 85 | } -------------------------------------------------------------------------------- /apps/github_info/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import Warename 3 | from django.views.decorators.csrf import csrf_exempt 4 | 5 | # Create your views here. 6 | 7 | 8 | def github_info(request): 9 | """ 获取信息""" 10 | if request.session.get('is_login') != '1': 11 | return redirect('/login') 12 | if request.method == "GET": 13 | tasks = Warename.objects.filter(dealwith=0) 14 | return render(request, 'table.html', locals()) 15 | 16 | @csrf_exempt 17 | def deal_info(request): 18 | """ 处理""" 19 | if request.session.get('is_login') != '1': 20 | return redirect('/login') 21 | if request.method == "POST": 22 | try: 23 | id = request.POST.get('id') 24 | except: 25 | message = '未查询到数据' 26 | return render(request, 'table.html', locals()) 27 | github = Warename.objects.get(id=id) 28 | github.dealwith = 1 29 | github.save() 30 | message = '处置成功' 31 | return render(request, 'table.html', locals()) 32 | 33 | @csrf_exempt 34 | def ignore_info(request): 35 | """忽略""" 36 | if request.session.get('is_login') != '1': 37 | return redirect('/login') 38 | if request.method == "POST": 39 | try: 40 | id = request.POST.get("id") 41 | except: 42 | message = "未查询到数据" 43 | return render(request, 'table.html', locals()) 44 | github = Warename.objects.get(id=id) 45 | github.dealwith = 2 46 | github.save() 47 | message = "处置成功" 48 | return render(request, 'table.html', locals()) 49 | 50 | 51 | def github_total(request): 52 | """全部信息""" 53 | if request.session.get('is_login') != '1': 54 | return redirect('/login') 55 | if request.method == "GET": 56 | tasks = Warename.objects.all() 57 | return render(request, 'total.html', locals()) 58 | 59 | 60 | def dash(request): 61 | """统计表""" 62 | if request.session.get("is_login") != '1': 63 | return redirect('/login') 64 | if request.method == "GET": 65 | all = Warename.objects.all() 66 | deal = Warename.objects.filter(dealwith=1) 67 | nodeal = Warename.objects.filter(dealwith=2) 68 | ondeal = Warename.objects.filter(dealwith=0) 69 | return render(request, 'dashboard.html', locals()) 70 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_typography.scss: -------------------------------------------------------------------------------- 1 | h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6, p, .navbar, .brand, a, .td-name, td{ 2 | -moz-osx-font-smoothing: grayscale; 3 | -webkit-font-smoothing: antialiased; 4 | font-family: 'Muli', "Helvetica", Arial, sans-serif; 5 | } 6 | 7 | h1, .h1, h2, .h2, h3, .h3, h4, .h4{ 8 | font-weight: $font-weight-normal; 9 | margin: $margin-large-vertical 0 $margin-base-vertical; 10 | } 11 | 12 | h1, .h1 { 13 | font-size: $font-size-h1; 14 | } 15 | h2, .h2{ 16 | font-size: $font-size-h2; 17 | } 18 | h3, .h3{ 19 | font-size: $font-size-h3; 20 | line-height: 1.4; 21 | margin: 20px 0 10px; 22 | } 23 | h4, .h4{ 24 | font-size: $font-size-h4; 25 | font-weight: $font-weight-bold; 26 | line-height: 1.2em; 27 | } 28 | h5, .h5 { 29 | font-size: $font-size-h5; 30 | font-weight: $font-weight-normal; 31 | line-height: 1.4em; 32 | margin-bottom: 15px; 33 | } 34 | h6, .h6{ 35 | font-size: $font-size-h6; 36 | font-weight: $font-weight-bold; 37 | text-transform: uppercase; 38 | } 39 | p{ 40 | font-size: $font-paragraph; 41 | line-height: $line-height-general; 42 | } 43 | 44 | h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { 45 | color: $dark-gray; 46 | font-weight: $font-weight-light; 47 | line-height: $line-height-general; 48 | } 49 | 50 | h1 small, h2 small, h3 small, h1 .small, h2 .small, h3 .small { 51 | font-size: 60%; 52 | } 53 | .title-uppercase{ 54 | text-transform: uppercase; 55 | } 56 | blockquote{ 57 | font-style: italic; 58 | } 59 | blockquote small{ 60 | font-style: normal; 61 | } 62 | .text-muted{ 63 | color: $medium-gray; 64 | } 65 | .text-primary, .text-primary:hover{ 66 | color: $primary-states-color; 67 | } 68 | .text-info, .text-info:hover{ 69 | color: $info-states-color; 70 | } 71 | .text-success, .text-success:hover{ 72 | color: $success-states-color; 73 | } 74 | .text-warning, .text-warning:hover{ 75 | color: $warning-states-color; 76 | } 77 | .text-danger, .text-danger:hover{ 78 | color: $danger-states-color; 79 | } 80 | .glyphicon{ 81 | line-height: 1; 82 | } 83 | strong{ 84 | color: $default-states-color; 85 | } 86 | .icon-primary{ 87 | color: $primary-color; 88 | } 89 | .icon-info{ 90 | color: $info-color; 91 | } 92 | .icon-success{ 93 | color: $success-color; 94 | } 95 | .icon-warning{ 96 | color: $warning-color; 97 | } 98 | .icon-danger{ 99 | color: $danger-color; 100 | } 101 | .chart-legend{ 102 | .text-primary, .text-primary:hover{ 103 | color: $primary-color; 104 | } 105 | .text-info, .text-info:hover{ 106 | color: $info-color; 107 | } 108 | .text-success, .text-success:hover{ 109 | color: $success-color; 110 | } 111 | .text-warning, .text-warning:hover{ 112 | color: $warning-color; 113 | } 114 | .text-danger, .text-danger:hover{ 115 | color: $danger-color; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_typography.scss: -------------------------------------------------------------------------------- 1 | h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6, p, .navbar, .brand, a, .td-name, td{ 2 | -moz-osx-font-smoothing: grayscale; 3 | -webkit-font-smoothing: antialiased; 4 | font-family: 'Muli', "Helvetica", Arial, sans-serif; 5 | } 6 | 7 | h1, .h1, h2, .h2, h3, .h3, h4, .h4{ 8 | font-weight: $font-weight-normal; 9 | margin: $margin-large-vertical 0 $margin-base-vertical; 10 | } 11 | 12 | h1, .h1 { 13 | font-size: $font-size-h1; 14 | } 15 | h2, .h2{ 16 | font-size: $font-size-h2; 17 | } 18 | h3, .h3{ 19 | font-size: $font-size-h3; 20 | line-height: 1.4; 21 | margin: 20px 0 10px; 22 | } 23 | h4, .h4{ 24 | font-size: $font-size-h4; 25 | font-weight: $font-weight-bold; 26 | line-height: 1.2em; 27 | } 28 | h5, .h5 { 29 | font-size: $font-size-h5; 30 | font-weight: $font-weight-normal; 31 | line-height: 1.4em; 32 | margin-bottom: 15px; 33 | } 34 | h6, .h6{ 35 | font-size: $font-size-h6; 36 | font-weight: $font-weight-bold; 37 | text-transform: uppercase; 38 | } 39 | p{ 40 | font-size: $font-paragraph; 41 | line-height: $line-height-general; 42 | } 43 | 44 | h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { 45 | color: $dark-gray; 46 | font-weight: $font-weight-light; 47 | line-height: $line-height-general; 48 | } 49 | 50 | h1 small, h2 small, h3 small, h1 .small, h2 .small, h3 .small { 51 | font-size: 60%; 52 | } 53 | .title-uppercase{ 54 | text-transform: uppercase; 55 | } 56 | blockquote{ 57 | font-style: italic; 58 | } 59 | blockquote small{ 60 | font-style: normal; 61 | } 62 | .text-muted{ 63 | color: $medium-gray; 64 | } 65 | .text-primary, .text-primary:hover{ 66 | color: $primary-states-color; 67 | } 68 | .text-info, .text-info:hover{ 69 | color: $info-states-color; 70 | } 71 | .text-success, .text-success:hover{ 72 | color: $success-states-color; 73 | } 74 | .text-warning, .text-warning:hover{ 75 | color: $warning-states-color; 76 | } 77 | .text-danger, .text-danger:hover{ 78 | color: $danger-states-color; 79 | } 80 | .glyphicon{ 81 | line-height: 1; 82 | } 83 | strong{ 84 | color: $default-states-color; 85 | } 86 | .icon-primary{ 87 | color: $primary-color; 88 | } 89 | .icon-info{ 90 | color: $info-color; 91 | } 92 | .icon-success{ 93 | color: $success-color; 94 | } 95 | .icon-warning{ 96 | color: $warning-color; 97 | } 98 | .icon-danger{ 99 | color: $danger-color; 100 | } 101 | .chart-legend{ 102 | .text-primary, .text-primary:hover{ 103 | color: $primary-color; 104 | } 105 | .text-info, .text-info:hover{ 106 | color: $info-color; 107 | } 108 | .text-success, .text-success:hover{ 109 | color: $success-color; 110 | } 111 | .text-warning, .text-warning:hover{ 112 | color: $warning-color; 113 | } 114 | .text-danger, .text-danger:hover{ 115 | color: $danger-color; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /apps/github_login.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from lxml import etree 3 | from bs4 import BeautifulSoup 4 | 5 | 6 | class github_login(object): 7 | 8 | def __init__(self, word, num): 9 | self.session = requests.Session() 10 | self.cookie = '' 11 | self.word = word 12 | self.num = num 13 | 14 | 15 | def get_cookie(self, username, passwd): 16 | headers = { 17 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0', 18 | 'Accept': 'text/html', 19 | 'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 20 | 'Referer': 'https://github.com/login', 21 | 'Content-Type':'application/x-www-form-urlencoded' 22 | } 23 | self.session.post('https://github.com/session', headers = headers, data=self.get_token(username, passwd)) 24 | r = self.session.get('https://github.com/search?q='+self.word+'&type=Code', headers=headers) 25 | if r.status_code == 200: 26 | self.cookie = self.session.cookies 27 | return self.search() 28 | elif r.status_code == 401: 29 | self.get_cookie(username, passwd) 30 | 31 | def search(self): 32 | 33 | headers = { 34 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0', 35 | 'Accept':'text/html', 36 | 'Accept-Language':'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 37 | 'Referer':'https://github.com/search?q=google.com&type=Code', 38 | 'X-PJAX':'true', 39 | 'X-PJAX-Container':'#js-pjax-container', 40 | 'X-Requested-With':'XMLHttpRequest', 41 | } 42 | list_name, list_addr, list_time = [], [], [] 43 | for i in range(1, self.num + 1): 44 | r = self.session.get( 45 | 'https://github.com/search?o=desc&p=' + str(i) + '&q=' + self.word + '&s=indexed&type=Code', 46 | headers=headers) 47 | print(r.status_code) 48 | html = etree.HTML(r.text) 49 | name = html.xpath("//div/a[@class='link-gray']/@href") #author 50 | list_name.append(name) 51 | addr = html.xpath("//div[@class='f4 text-normal']/a/@href") #url 52 | list_addr.append(addr) 53 | time = html.xpath("//span[@class='updated-at mr-3']/relative-time/text()") #更新时间 54 | list_time.append(time) 55 | 56 | return [list_name, list_addr, list_time] 57 | 58 | 59 | def get_token(self, username, passwd): 60 | headers = { 61 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0', 62 | 'Accept':'text/html', 63 | 'Accept-Language':'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 64 | 'Referer':'https://github.com', 65 | } 66 | post_data = {} 67 | r = self.session.get('https://github.com/login', headers=headers) 68 | soup = BeautifulSoup(r.text, 'lxml') 69 | input = soup.find_all('input') 70 | for item in input: 71 | post_data[item.get('name')] = item.get('value') 72 | post_data['login'], post_data['password'] = username, passwd 73 | return post_data 74 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_checkbox-radio.scss: -------------------------------------------------------------------------------- 1 | /* Checkbox and radio */ 2 | .checkbox, 3 | .radio { 4 | margin-bottom: 12px; 5 | padding-left: 30px; 6 | position: relative; 7 | -webkit-transition: color,opacity 0.25s linear; 8 | transition: color,opacity 0.25s linear; 9 | font-size: $font-size-base; 10 | font-weight: normal; 11 | line-height: 1.5; 12 | color: $font-color; 13 | cursor: pointer; 14 | 15 | .icons { 16 | color: $font-color; 17 | display: block; 18 | height: 20px; 19 | left: 0; 20 | position: absolute; 21 | top: 0; 22 | width: 20px; 23 | text-align: center; 24 | line-height: 21px; 25 | font-size: 20px; 26 | cursor: pointer; 27 | -webkit-transition: color,opacity 0.15s linear; 28 | transition: color,opacity 0.15s linear; 29 | 30 | opacity: .50; 31 | } 32 | 33 | 34 | &.checked{ 35 | .icons{ 36 | opacity: 1; 37 | } 38 | } 39 | 40 | input{ 41 | outline: none !important; 42 | display: none; 43 | } 44 | } 45 | 46 | .checkbox, 47 | .radio{ 48 | label{ 49 | padding-left: 10px; 50 | } 51 | } 52 | 53 | .checkbox .icons .first-icon, 54 | .radio .icons .first-icon, 55 | .checkbox .icons .second-icon, 56 | .radio .icons .second-icon { 57 | display: inline-table; 58 | position: absolute; 59 | left: 0; 60 | top: 0; 61 | background-color: transparent; 62 | margin: 0; 63 | @include opacity(1); 64 | } 65 | .checkbox .icons .second-icon, 66 | .radio .icons .second-icon { 67 | @include opacity(0); 68 | } 69 | .checkbox:hover, 70 | .radio:hover { 71 | -webkit-transition: color 0.2s linear; 72 | transition: color 0.2s linear; 73 | } 74 | .checkbox:hover .first-icon, 75 | .radio:hover .first-icon { 76 | @include opacity(0); 77 | } 78 | .checkbox:hover .second-icon, 79 | .radio:hover .second-icon { 80 | @include opacity (1); 81 | } 82 | .checkbox.checked, 83 | .radio.checked { 84 | // color: $info-color; 85 | } 86 | .checkbox.checked .first-icon, 87 | .radio.checked .first-icon { 88 | opacity: 0; 89 | filter: alpha(opacity=0); 90 | } 91 | .checkbox.checked .second-icon, 92 | .radio.checked .second-icon { 93 | opacity: 1; 94 | filter: alpha(opacity=100); 95 | // color: $info-color; 96 | -webkit-transition: color 0.2s linear; 97 | transition: color 0.2s linear; 98 | } 99 | .checkbox.disabled, 100 | .radio.disabled { 101 | cursor: default; 102 | color: $medium-gray; 103 | } 104 | .checkbox.disabled .icons, 105 | .radio.disabled .icons { 106 | color: $medium-gray; 107 | } 108 | .checkbox.disabled .first-icon, 109 | .radio.disabled .first-icon { 110 | opacity: 1; 111 | filter: alpha(opacity=100); 112 | } 113 | .checkbox.disabled .second-icon, 114 | .radio.disabled .second-icon { 115 | opacity: 0; 116 | filter: alpha(opacity=0); 117 | } 118 | .checkbox.disabled.checked .icons, 119 | .radio.disabled.checked .icons { 120 | color: $medium-gray; 121 | } 122 | .checkbox.disabled.checked .first-icon, 123 | .radio.disabled.checked .first-icon { 124 | opacity: 0; 125 | filter: alpha(opacity=0); 126 | } 127 | .checkbox.disabled.checked .second-icon, 128 | .radio.disabled.checked .second-icon { 129 | opacity: 1; 130 | color: $medium-gray; 131 | filter: alpha(opacity=100); 132 | } 133 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_checkbox-radio.scss: -------------------------------------------------------------------------------- 1 | /* Checkbox and radio */ 2 | .checkbox, 3 | .radio { 4 | margin-bottom: 12px; 5 | padding-left: 30px; 6 | position: relative; 7 | -webkit-transition: color,opacity 0.25s linear; 8 | transition: color,opacity 0.25s linear; 9 | font-size: $font-size-base; 10 | font-weight: normal; 11 | line-height: 1.5; 12 | color: $font-color; 13 | cursor: pointer; 14 | 15 | .icons { 16 | color: $font-color; 17 | display: block; 18 | height: 20px; 19 | left: 0; 20 | position: absolute; 21 | top: 0; 22 | width: 20px; 23 | text-align: center; 24 | line-height: 21px; 25 | font-size: 20px; 26 | cursor: pointer; 27 | -webkit-transition: color,opacity 0.15s linear; 28 | transition: color,opacity 0.15s linear; 29 | 30 | opacity: .50; 31 | } 32 | 33 | 34 | &.checked{ 35 | .icons{ 36 | opacity: 1; 37 | } 38 | } 39 | 40 | input{ 41 | outline: none !important; 42 | display: none; 43 | } 44 | } 45 | 46 | .checkbox, 47 | .radio{ 48 | label{ 49 | padding-left: 10px; 50 | } 51 | } 52 | 53 | .checkbox .icons .first-icon, 54 | .radio .icons .first-icon, 55 | .checkbox .icons .second-icon, 56 | .radio .icons .second-icon { 57 | display: inline-table; 58 | position: absolute; 59 | left: 0; 60 | top: 0; 61 | background-color: transparent; 62 | margin: 0; 63 | @include opacity(1); 64 | } 65 | .checkbox .icons .second-icon, 66 | .radio .icons .second-icon { 67 | @include opacity(0); 68 | } 69 | .checkbox:hover, 70 | .radio:hover { 71 | -webkit-transition: color 0.2s linear; 72 | transition: color 0.2s linear; 73 | } 74 | .checkbox:hover .first-icon, 75 | .radio:hover .first-icon { 76 | @include opacity(0); 77 | } 78 | .checkbox:hover .second-icon, 79 | .radio:hover .second-icon { 80 | @include opacity (1); 81 | } 82 | .checkbox.checked, 83 | .radio.checked { 84 | // color: $info-color; 85 | } 86 | .checkbox.checked .first-icon, 87 | .radio.checked .first-icon { 88 | opacity: 0; 89 | filter: alpha(opacity=0); 90 | } 91 | .checkbox.checked .second-icon, 92 | .radio.checked .second-icon { 93 | opacity: 1; 94 | filter: alpha(opacity=100); 95 | // color: $info-color; 96 | -webkit-transition: color 0.2s linear; 97 | transition: color 0.2s linear; 98 | } 99 | .checkbox.disabled, 100 | .radio.disabled { 101 | cursor: default; 102 | color: $medium-gray; 103 | } 104 | .checkbox.disabled .icons, 105 | .radio.disabled .icons { 106 | color: $medium-gray; 107 | } 108 | .checkbox.disabled .first-icon, 109 | .radio.disabled .first-icon { 110 | opacity: 1; 111 | filter: alpha(opacity=100); 112 | } 113 | .checkbox.disabled .second-icon, 114 | .radio.disabled .second-icon { 115 | opacity: 0; 116 | filter: alpha(opacity=0); 117 | } 118 | .checkbox.disabled.checked .icons, 119 | .radio.disabled.checked .icons { 120 | color: $medium-gray; 121 | } 122 | .checkbox.disabled.checked .first-icon, 123 | .radio.disabled.checked .first-icon { 124 | opacity: 0; 125 | filter: alpha(opacity=0); 126 | } 127 | .checkbox.disabled.checked .second-icon, 128 | .radio.disabled.checked .second-icon { 129 | opacity: 1; 130 | color: $medium-gray; 131 | filter: alpha(opacity=100); 132 | } 133 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_dropdown.scss: -------------------------------------------------------------------------------- 1 | .dropdown-menu{ 2 | background-color: $pale-bg; 3 | border: 0 none; 4 | border-radius: $border-radius-extreme; 5 | display: block; 6 | margin-top: 10px; 7 | padding: 0px; 8 | position: absolute; 9 | visibility: hidden; 10 | z-index: 9000; 11 | 12 | @include opacity(0); 13 | @include box-shadow($dropdown-shadow); 14 | 15 | // the style for opening dropdowns on mobile devices; for the desktop version check the _responsive.scss file 16 | .open &{ 17 | @include opacity(1); 18 | visibility: visible; 19 | } 20 | 21 | .divider{ 22 | background-color: $medium-pale-bg; 23 | margin: 0px; 24 | } 25 | 26 | .dropdown-header{ 27 | color: $dark-gray; 28 | font-size: $font-size-small; 29 | padding: $padding-dropdown-vertical $padding-dropdown-horizontal; 30 | } 31 | 32 | // the style for the dropdown menu that appears under select, it is different from the default one 33 | .select &{ 34 | border-radius: $border-radius-bottom; 35 | @include box-shadow(none); 36 | @include transform-origin($select-coordinates); 37 | @include transform-scale(1); 38 | @include transition($fast-transition-time, $transition-linear); 39 | margin-top: -20px; 40 | } 41 | .select.open &{ 42 | margin-top: -1px; 43 | } 44 | 45 | > li > a { 46 | color: $font-color; 47 | font-size: $font-size-base; 48 | padding: $padding-dropdown-vertical $padding-dropdown-horizontal; 49 | @include transition-none(); 50 | 51 | img{ 52 | margin-top: -3px; 53 | } 54 | } 55 | > li > a:focus{ 56 | outline: 0 !important; 57 | } 58 | 59 | .btn-group.select &{ 60 | min-width: 100%; 61 | } 62 | 63 | > li:first-child > a{ 64 | border-top-left-radius: $border-radius-extreme; 65 | border-top-right-radius: $border-radius-extreme; 66 | } 67 | 68 | > li:last-child > a{ 69 | border-bottom-left-radius: $border-radius-extreme; 70 | border-bottom-right-radius: $border-radius-extreme; 71 | } 72 | 73 | .select & > li:first-child > a{ 74 | border-radius: 0; 75 | border-bottom: 0 none; 76 | } 77 | 78 | > li > a:hover, 79 | > li > a:focus { 80 | background-color: $default-color; 81 | color: $fill-font-color; 82 | opacity: 1; 83 | text-decoration: none; 84 | } 85 | 86 | &.dropdown-primary > li > a:hover, 87 | &.dropdown-primary > li > a:focus{ 88 | background-color: $primary-color; 89 | } 90 | &.dropdown-info > li > a:hover, 91 | &.dropdown-info > li > a:focus{ 92 | background-color: $info-color; 93 | } 94 | &.dropdown-success > li > a:hover, 95 | &.dropdown-success > li > a:focus{ 96 | background-color: $success-color; 97 | } 98 | &.dropdown-warning > li > a:hover, 99 | &.dropdown-warning > li > a:focus{ 100 | background-color: $warning-color; 101 | } 102 | &.dropdown-danger > li > a:hover, 103 | &.dropdown-danger > li > a:focus{ 104 | background-color: $danger-color; 105 | } 106 | 107 | } 108 | 109 | //fix bug for the select items in btn-group 110 | .btn-group.select{ 111 | overflow: hidden; 112 | } 113 | .btn-group.select.open{ 114 | overflow: visible; 115 | } 116 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_dropdown.scss: -------------------------------------------------------------------------------- 1 | .dropdown-menu{ 2 | background-color: $pale-bg; 3 | border: 0 none; 4 | border-radius: $border-radius-extreme; 5 | display: block; 6 | margin-top: 10px; 7 | padding: 0px; 8 | position: absolute; 9 | visibility: hidden; 10 | z-index: 9000; 11 | 12 | @include opacity(0); 13 | @include box-shadow($dropdown-shadow); 14 | 15 | // the style for opening dropdowns on mobile devices; for the desktop version check the _responsive.scss file 16 | .open &{ 17 | @include opacity(1); 18 | visibility: visible; 19 | } 20 | 21 | .divider{ 22 | background-color: $medium-pale-bg; 23 | margin: 0px; 24 | } 25 | 26 | .dropdown-header{ 27 | color: $dark-gray; 28 | font-size: $font-size-small; 29 | padding: $padding-dropdown-vertical $padding-dropdown-horizontal; 30 | } 31 | 32 | // the style for the dropdown menu that appears under select, it is different from the default one 33 | .select &{ 34 | border-radius: $border-radius-bottom; 35 | @include box-shadow(none); 36 | @include transform-origin($select-coordinates); 37 | @include transform-scale(1); 38 | @include transition($fast-transition-time, $transition-linear); 39 | margin-top: -20px; 40 | } 41 | .select.open &{ 42 | margin-top: -1px; 43 | } 44 | 45 | > li > a { 46 | color: $font-color; 47 | font-size: $font-size-base; 48 | padding: $padding-dropdown-vertical $padding-dropdown-horizontal; 49 | @include transition-none(); 50 | 51 | img{ 52 | margin-top: -3px; 53 | } 54 | } 55 | > li > a:focus{ 56 | outline: 0 !important; 57 | } 58 | 59 | .btn-group.select &{ 60 | min-width: 100%; 61 | } 62 | 63 | > li:first-child > a{ 64 | border-top-left-radius: $border-radius-extreme; 65 | border-top-right-radius: $border-radius-extreme; 66 | } 67 | 68 | > li:last-child > a{ 69 | border-bottom-left-radius: $border-radius-extreme; 70 | border-bottom-right-radius: $border-radius-extreme; 71 | } 72 | 73 | .select & > li:first-child > a{ 74 | border-radius: 0; 75 | border-bottom: 0 none; 76 | } 77 | 78 | > li > a:hover, 79 | > li > a:focus { 80 | background-color: $default-color; 81 | color: $fill-font-color; 82 | opacity: 1; 83 | text-decoration: none; 84 | } 85 | 86 | &.dropdown-primary > li > a:hover, 87 | &.dropdown-primary > li > a:focus{ 88 | background-color: $primary-color; 89 | } 90 | &.dropdown-info > li > a:hover, 91 | &.dropdown-info > li > a:focus{ 92 | background-color: $info-color; 93 | } 94 | &.dropdown-success > li > a:hover, 95 | &.dropdown-success > li > a:focus{ 96 | background-color: $success-color; 97 | } 98 | &.dropdown-warning > li > a:hover, 99 | &.dropdown-warning > li > a:focus{ 100 | background-color: $warning-color; 101 | } 102 | &.dropdown-danger > li > a:hover, 103 | &.dropdown-danger > li > a:focus{ 104 | background-color: $danger-color; 105 | } 106 | 107 | } 108 | 109 | //fix bug for the select items in btn-group 110 | .btn-group.select{ 111 | overflow: hidden; 112 | } 113 | .btn-group.select.open{ 114 | overflow: visible; 115 | } 116 | -------------------------------------------------------------------------------- /apps/github_task/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import edit_task 3 | from django.views.decorators.csrf import csrf_exempt 4 | # Create your views here. 5 | 6 | 7 | @csrf_exempt 8 | def edittask(request): 9 | """编辑任务""" 10 | if request.session.get('is_login') != '1': 11 | return redirect('/login') 12 | if request.method == "POST": 13 | task_name = request.POST.get('task_name') 14 | word = request.POST.get('word') 15 | warename = request.POST.get('warename') 16 | ignorance = request.POST.get('ignorance') 17 | num = request.POST.get('num') 18 | time = request.POST.get('time') 19 | marks = request.POST.get('marks') 20 | username = request.POST.get('username') 21 | password = request.POST.get('password') 22 | try: 23 | if edit_task.objects.filter(task_name='task_name'): 24 | if request.POST.get('word'): 25 | edit_task.objects.filter(task_name=task_name).update(word=word) 26 | if request.POST.get('warename'): 27 | edit_task.objects.filter(task_name=task_name).update(warename=warename) 28 | if request.POST.get('ignorance'): 29 | edit_task.objects.filter(task_name=task_name).update(ignorance=ignorance) 30 | if request.POST.get('num'): 31 | edit_task.objects.filter(task_name=task_name).update(num=num) 32 | if request.POST.get('time'): 33 | edit_task.objects.filter(task_name=task_name).update(time=time) 34 | if request.POST.get('marks'): 35 | edit_task.objects.filter(task_name=task_name).update(marks=marks) 36 | if request.POST.get('username'): 37 | edit_task.objects.filter(task_name=task_name).update(username=username) 38 | if request.POST.get('password'): 39 | edit_task.objects.filter(task_name=task_name).update(password=password) 40 | message = '任务更新成功' 41 | return render(request, 'configuration.html', locals()) 42 | else: 43 | if username and password and word: 44 | list = edit_task.objects.create(task_name=task_name,word=word,warename=warename,ignorance=ignorance, 45 | num=num,time=time,marks=marks,username=username,password=password) 46 | message = '任务添加成功' 47 | return render(request, 'configuration.html', locals()) 48 | except: 49 | message = '任务添加失败' 50 | return render(request, 'configuration.html', locals()) 51 | 52 | 53 | 54 | def all_task(request): 55 | """全部任务""" 56 | if request.session.get('is_login') != '1': 57 | return redirect('/login') 58 | if request.method == "GET": 59 | tasks = edit_task.objects.all() 60 | return render(request, 'typography.html', locals()) 61 | 62 | 63 | def task(request): 64 | """编辑页""" 65 | if request.session.get('is_login') != '1': 66 | return redirect('/login') 67 | if request.method == "GET": 68 | return render(request, 'configuration.html') 69 | 70 | @csrf_exempt 71 | def delitem(request): 72 | """删除任务""" 73 | if request.session.get('is_login') != '1': 74 | return redirect('/login') 75 | if request.method == 'POST': 76 | id = request.POST.get('id') 77 | edit_task.objects.get(id=id).delete() 78 | message = "任务删除成功" 79 | return render(request, 'typography.html', locals()) 80 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn, 2 | .navbar .navbar-nav > li > a.btn{ 3 | border-radius: $border-radius-btn-base; 4 | box-sizing: border-box; 5 | border-width: $border-thick; 6 | background-color: $transparent-bg; 7 | font-size: $font-size-base; 8 | font-weight: $font-weight-semi; 9 | 10 | padding: $padding-base-vertical $padding-base-horizontal; 11 | 12 | @include btn-styles($default-color, $default-states-color); 13 | @include transition($fast-transition-time, linear); 14 | 15 | &:hover, 16 | &:focus{ 17 | outline: 0 !important; 18 | } 19 | &:active, 20 | &.active, 21 | .open > &.dropdown-toggle { 22 | @include box-shadow(none); 23 | outline: 0 !important; 24 | } 25 | 26 | &.btn-icon{ 27 | padding: $padding-base-vertical; 28 | } 29 | } 30 | 31 | .btn-group .btn + .btn, 32 | .btn-group .btn + .btn-group, 33 | .btn-group .btn-group + .btn, 34 | .btn-group .btn-group + .btn-group{ 35 | margin-left: -2px; 36 | } 37 | 38 | // Apply the mixin to the buttons 39 | //.btn-default { @include btn-styles($default-color, $default-states-color); } 40 | .navbar .navbar-nav > li > a.btn-primary, .btn-primary { @include btn-styles($primary-color, $primary-states-color); } 41 | .navbar .navbar-nav > li > a.btn-success, .btn-success { @include btn-styles($success-color, $success-states-color); } 42 | .navbar .navbar-nav > li > a.btn-info, .btn-info { @include btn-styles($info-color, $info-states-color); } 43 | .navbar .navbar-nav > li > a.btn-warning, .btn-warning { @include btn-styles($warning-color, $warning-states-color); } 44 | .navbar .navbar-nav > li > a.btn-danger, .btn-danger { @include btn-styles($danger-color, $danger-states-color); } 45 | .btn-neutral { 46 | @include btn-styles($white-color, $white-color); 47 | 48 | &:hover, 49 | &:focus{ 50 | color: $default-color; 51 | } 52 | 53 | &:active, 54 | &.active, 55 | .open > &.dropdown-toggle{ 56 | background-color: $white-color; 57 | color: $default-color; 58 | } 59 | 60 | &.btn-fill{ 61 | color: $default-color; 62 | } 63 | &.btn-fill:hover, 64 | &.btn-fill:focus{ 65 | color: $default-states-color; 66 | } 67 | 68 | &.btn-simple:active, 69 | &.btn-simple.active{ 70 | background-color: transparent; 71 | } 72 | } 73 | 74 | .btn{ 75 | &:disabled, 76 | &[disabled], 77 | &.disabled{ 78 | @include opacity(.5); 79 | } 80 | } 81 | .btn-simple{ 82 | border: $none; 83 | padding: $padding-base-vertical $padding-base-horizontal; 84 | 85 | &.btn-icon{ 86 | padding: $padding-base-vertical; 87 | } 88 | } 89 | .btn-lg{ 90 | @include btn-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-btn-large, $line-height-small); 91 | font-weight: $font-weight-normal; 92 | } 93 | .btn-sm{ 94 | @include btn-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-btn-small, $line-height-small); 95 | } 96 | .btn-xs { 97 | @include btn-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-xs, $border-radius-btn-small, $line-height-small); 98 | } 99 | .btn-wd { 100 | min-width: 140px; 101 | } 102 | 103 | .btn-group.select{ 104 | width: 100%; 105 | } 106 | .btn-group.select .btn{ 107 | text-align: left; 108 | } 109 | .btn-group.select .caret{ 110 | position: absolute; 111 | top: 50%; 112 | margin-top: -1px; 113 | right: 8px; 114 | } 115 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn, 2 | .navbar .navbar-nav > li > a.btn{ 3 | border-radius: $border-radius-btn-base; 4 | box-sizing: border-box; 5 | border-width: $border-thick; 6 | background-color: $transparent-bg; 7 | font-size: $font-size-base; 8 | font-weight: $font-weight-semi; 9 | 10 | padding: $padding-base-vertical $padding-base-horizontal; 11 | 12 | @include btn-styles($default-color, $default-states-color); 13 | @include transition($fast-transition-time, linear); 14 | 15 | &:hover, 16 | &:focus{ 17 | outline: 0 !important; 18 | } 19 | &:active, 20 | &.active, 21 | .open > &.dropdown-toggle { 22 | @include box-shadow(none); 23 | outline: 0 !important; 24 | } 25 | 26 | &.btn-icon{ 27 | padding: $padding-base-vertical; 28 | } 29 | } 30 | 31 | .btn-group .btn + .btn, 32 | .btn-group .btn + .btn-group, 33 | .btn-group .btn-group + .btn, 34 | .btn-group .btn-group + .btn-group{ 35 | margin-left: -2px; 36 | } 37 | 38 | // Apply the mixin to the buttons 39 | //.btn-default { @include btn-styles($default-color, $default-states-color); } 40 | .navbar .navbar-nav > li > a.btn-primary, .btn-primary { @include btn-styles($primary-color, $primary-states-color); } 41 | .navbar .navbar-nav > li > a.btn-success, .btn-success { @include btn-styles($success-color, $success-states-color); } 42 | .navbar .navbar-nav > li > a.btn-info, .btn-info { @include btn-styles($info-color, $info-states-color); } 43 | .navbar .navbar-nav > li > a.btn-warning, .btn-warning { @include btn-styles($warning-color, $warning-states-color); } 44 | .navbar .navbar-nav > li > a.btn-danger, .btn-danger { @include btn-styles($danger-color, $danger-states-color); } 45 | .btn-neutral { 46 | @include btn-styles($white-color, $white-color); 47 | 48 | &:hover, 49 | &:focus{ 50 | color: $default-color; 51 | } 52 | 53 | &:active, 54 | &.active, 55 | .open > &.dropdown-toggle{ 56 | background-color: $white-color; 57 | color: $default-color; 58 | } 59 | 60 | &.btn-fill{ 61 | color: $default-color; 62 | } 63 | &.btn-fill:hover, 64 | &.btn-fill:focus{ 65 | color: $default-states-color; 66 | } 67 | 68 | &.btn-simple:active, 69 | &.btn-simple.active{ 70 | background-color: transparent; 71 | } 72 | } 73 | 74 | .btn{ 75 | &:disabled, 76 | &[disabled], 77 | &.disabled{ 78 | @include opacity(.5); 79 | } 80 | } 81 | .btn-simple{ 82 | border: $none; 83 | padding: $padding-base-vertical $padding-base-horizontal; 84 | 85 | &.btn-icon{ 86 | padding: $padding-base-vertical; 87 | } 88 | } 89 | .btn-lg{ 90 | @include btn-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-btn-large, $line-height-small); 91 | font-weight: $font-weight-normal; 92 | } 93 | .btn-sm{ 94 | @include btn-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-btn-small, $line-height-small); 95 | } 96 | .btn-xs { 97 | @include btn-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-xs, $border-radius-btn-small, $line-height-small); 98 | } 99 | .btn-wd { 100 | min-width: 140px; 101 | } 102 | 103 | .btn-group.select{ 104 | width: 100%; 105 | } 106 | .btn-group.select .btn{ 107 | text-align: left; 108 | } 109 | .btn-group.select .caret{ 110 | position: absolute; 111 | top: 50%; 112 | margin-top: -1px; 113 | right: 8px; 114 | } 115 | -------------------------------------------------------------------------------- /static/assets/js/auth.js: -------------------------------------------------------------------------------- 1 | var Auth = { 2 | vars: { 3 | lowin: document.querySelector('.lowin'), 4 | lowin_brand: document.querySelector('.lowin-brand'), 5 | lowin_wrapper: document.querySelector('.lowin-wrapper'), 6 | lowin_login: document.querySelector('.lowin-login'), 7 | lowin_wrapper_height: 0, 8 | login_back_link: document.querySelector('.login-back-link'), 9 | forgot_link: document.querySelector('.forgot-link'), 10 | login_link: document.querySelector('.login-link'), 11 | login_btn: document.querySelector('.login-btn'), 12 | register_link: document.querySelector('.register-link'), 13 | password_group: document.querySelector('.password-group'), 14 | password_group_height: 0, 15 | lowin_register: document.querySelector('.lowin-register'), 16 | lowin_footer: document.querySelector('.lowin-footer'), 17 | box: document.getElementsByClassName('lowin-box'), 18 | option: {} 19 | }, 20 | login(e) { 21 | Auth.vars.lowin_register.classList.remove('lowin-animated-flip'); 22 | Auth.vars.lowin_register.className += ' lowin-animated-flipback'; 23 | Auth.vars.lowin_login.style.display = 'block'; 24 | Auth.vars.lowin_login.classList.remove('lowin-animated'); 25 | Auth.vars.lowin_login.className += ' lowin-animatedback'; 26 | setTimeout(() => { 27 | Auth.vars.lowin_register.style.display = 'none'; 28 | }, 500); 29 | 30 | setTimeout(() => { 31 | Auth.vars.lowin_register.classList.remove('lowin-animated-flipback'); 32 | Auth.vars.lowin_login.classList.remove('lowin-animatedback'); 33 | },1000); 34 | 35 | Auth.setHeight(Auth.vars.lowin_login.offsetHeight + Auth.vars.lowin_footer.offsetHeight); 36 | 37 | e.preventDefault(); 38 | }, 39 | loginback(e) { 40 | Auth.vars.password_group.classList.remove('lowin-animated'); 41 | Auth.vars.password_group.classList += ' lowin-animated-back'; 42 | Auth.vars.password_group.style.display = 'block'; 43 | 44 | setTimeout(() => { 45 | Auth.vars.login_back_link.style.opacity = 0; 46 | Auth.vars.password_group.style.height = Auth.vars.password_group_height + 'px'; 47 | Auth.vars.password_group.style.marginBottom = 30 + 'px'; 48 | }, 100); 49 | 50 | setTimeout(() => { 51 | Auth.vars.login_back_link.style.display = 'none'; 52 | Auth.vars.password_group.classList.remove('lowin-animated-back'); 53 | }, 1000); 54 | 55 | Auth.vars.login_btn.innerText = 'Sign In'; 56 | Auth.vars.lowin_login.querySelector('form').setAttribute('action', Auth.vars.option.login_url); 57 | 58 | Auth.setHeight(Auth.vars.lowin_wrapper_height); 59 | 60 | e.preventDefault(); 61 | }, 62 | setHeight(height) { 63 | Auth.vars.lowin_wrapper.style.minHeight = height + 'px'; 64 | }, 65 | brand() { 66 | Auth.vars.lowin_brand.classList += ' lowin-animated'; 67 | setTimeout(() => { 68 | Auth.vars.lowin_brand.classList.remove('lowin-animated'); 69 | }, 1000); 70 | }, 71 | init(option) { 72 | Auth.setHeight(Auth.vars.box[0].offsetHeight + Auth.vars.lowin_footer.offsetHeight); 73 | 74 | Auth.vars.password_group.style.height = Auth.vars.password_group.offsetHeight + 'px'; 75 | Auth.vars.password_group_height = Auth.vars.password_group.offsetHeight; 76 | Auth.vars.lowin_wrapper_height = Auth.vars.lowin_wrapper.offsetHeight; 77 | 78 | Auth.vars.option = option; 79 | Auth.vars.lowin_login.querySelector('form').setAttribute('action', option.login_url); 80 | 81 | var len = Auth.vars.box.length - 1; 82 | 83 | for(var i = 0; i <= len; i++) { 84 | if(i !== 0) { 85 | Auth.vars.box[i].className += ' lowin-flip'; 86 | } 87 | } 88 | 89 | Auth.vars.forgot_link.addEventListener("click", (e) => { 90 | Auth.forgot(e); 91 | }); 92 | 93 | Auth.vars.register_link.addEventListener("click", (e) => { 94 | Auth.brand(); 95 | Auth.register(e); 96 | }); 97 | 98 | Auth.vars.login_link.addEventListener("click", (e) => { 99 | Auth.brand(); 100 | Auth.login(e); 101 | }); 102 | 103 | Auth.vars.login_back_link.addEventListener("click", (e) => { 104 | Auth.loginback(e); 105 | }); 106 | } 107 | } -------------------------------------------------------------------------------- /templates/assets/js/auth.js: -------------------------------------------------------------------------------- 1 | var Auth = { 2 | vars: { 3 | lowin: document.querySelector('.lowin'), 4 | lowin_brand: document.querySelector('.lowin-brand'), 5 | lowin_wrapper: document.querySelector('.lowin-wrapper'), 6 | lowin_login: document.querySelector('.lowin-login'), 7 | lowin_wrapper_height: 0, 8 | login_back_link: document.querySelector('.login-back-link'), 9 | forgot_link: document.querySelector('.forgot-link'), 10 | login_link: document.querySelector('.login-link'), 11 | login_btn: document.querySelector('.login-btn'), 12 | register_link: document.querySelector('.register-link'), 13 | password_group: document.querySelector('.password-group'), 14 | password_group_height: 0, 15 | lowin_register: document.querySelector('.lowin-register'), 16 | lowin_footer: document.querySelector('.lowin-footer'), 17 | box: document.getElementsByClassName('lowin-box'), 18 | option: {} 19 | }, 20 | login(e) { 21 | Auth.vars.lowin_register.classList.remove('lowin-animated-flip'); 22 | Auth.vars.lowin_register.className += ' lowin-animated-flipback'; 23 | Auth.vars.lowin_login.style.display = 'block'; 24 | Auth.vars.lowin_login.classList.remove('lowin-animated'); 25 | Auth.vars.lowin_login.className += ' lowin-animatedback'; 26 | setTimeout(() => { 27 | Auth.vars.lowin_register.style.display = 'none'; 28 | }, 500); 29 | 30 | setTimeout(() => { 31 | Auth.vars.lowin_register.classList.remove('lowin-animated-flipback'); 32 | Auth.vars.lowin_login.classList.remove('lowin-animatedback'); 33 | },1000); 34 | 35 | Auth.setHeight(Auth.vars.lowin_login.offsetHeight + Auth.vars.lowin_footer.offsetHeight); 36 | 37 | e.preventDefault(); 38 | }, 39 | loginback(e) { 40 | Auth.vars.password_group.classList.remove('lowin-animated'); 41 | Auth.vars.password_group.classList += ' lowin-animated-back'; 42 | Auth.vars.password_group.style.display = 'block'; 43 | 44 | setTimeout(() => { 45 | Auth.vars.login_back_link.style.opacity = 0; 46 | Auth.vars.password_group.style.height = Auth.vars.password_group_height + 'px'; 47 | Auth.vars.password_group.style.marginBottom = 30 + 'px'; 48 | }, 100); 49 | 50 | setTimeout(() => { 51 | Auth.vars.login_back_link.style.display = 'none'; 52 | Auth.vars.password_group.classList.remove('lowin-animated-back'); 53 | }, 1000); 54 | 55 | Auth.vars.login_btn.innerText = 'Sign In'; 56 | Auth.vars.lowin_login.querySelector('form').setAttribute('action', Auth.vars.option.login_url); 57 | 58 | Auth.setHeight(Auth.vars.lowin_wrapper_height); 59 | 60 | e.preventDefault(); 61 | }, 62 | setHeight(height) { 63 | Auth.vars.lowin_wrapper.style.minHeight = height + 'px'; 64 | }, 65 | brand() { 66 | Auth.vars.lowin_brand.classList += ' lowin-animated'; 67 | setTimeout(() => { 68 | Auth.vars.lowin_brand.classList.remove('lowin-animated'); 69 | }, 1000); 70 | }, 71 | init(option) { 72 | Auth.setHeight(Auth.vars.box[0].offsetHeight + Auth.vars.lowin_footer.offsetHeight); 73 | 74 | Auth.vars.password_group.style.height = Auth.vars.password_group.offsetHeight + 'px'; 75 | Auth.vars.password_group_height = Auth.vars.password_group.offsetHeight; 76 | Auth.vars.lowin_wrapper_height = Auth.vars.lowin_wrapper.offsetHeight; 77 | 78 | Auth.vars.option = option; 79 | Auth.vars.lowin_login.querySelector('form').setAttribute('action', option.login_url); 80 | 81 | var len = Auth.vars.box.length - 1; 82 | 83 | for(var i = 0; i <= len; i++) { 84 | if(i !== 0) { 85 | Auth.vars.box[i].className += ' lowin-flip'; 86 | } 87 | } 88 | 89 | Auth.vars.forgot_link.addEventListener("click", (e) => { 90 | Auth.forgot(e); 91 | }); 92 | 93 | Auth.vars.register_link.addEventListener("click", (e) => { 94 | Auth.brand(); 95 | Auth.register(e); 96 | }); 97 | 98 | Auth.vars.login_link.addEventListener("click", (e) => { 99 | Auth.brand(); 100 | Auth.login(e); 101 | }); 102 | 103 | Auth.vars.login_back_link.addEventListener("click", (e) => { 104 | Auth.loginback(e); 105 | }); 106 | } 107 | } -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_chartist.scss: -------------------------------------------------------------------------------- 1 | // Scales for responsive SVG containers 2 | $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default; 3 | $ct-scales-names: (ct-square, ct-minor-second, ct-major-second, ct-minor-third, ct-major-third, ct-perfect-fourth, ct-perfect-fifth, ct-minor-sixth, ct-golden-section, ct-major-sixth, ct-minor-seventh, ct-major-seventh, ct-octave, ct-major-tenth, ct-major-eleventh, ct-major-twelfth, ct-double-octave) !default; 4 | 5 | // Class names to be used when generating CSS 6 | $ct-class-chart: ct-chart !default; 7 | $ct-class-chart-line: ct-chart-line !default; 8 | $ct-class-chart-bar: ct-chart-bar !default; 9 | $ct-class-horizontal-bars: ct-horizontal-bars !default; 10 | $ct-class-chart-pie: ct-chart-pie !default; 11 | $ct-class-chart-donut: ct-chart-donut !default; 12 | $ct-class-label: ct-label !default; 13 | $ct-class-series: ct-series !default; 14 | $ct-class-line: ct-line !default; 15 | $ct-class-point: ct-point !default; 16 | $ct-class-area: ct-area !default; 17 | $ct-class-bar: ct-bar !default; 18 | $ct-class-slice-pie: ct-slice-pie !default; 19 | $ct-class-slice-donut: ct-slice-donut !default; 20 | $ct-class-grid: ct-grid !default; 21 | $ct-class-vertical: ct-vertical !default; 22 | $ct-class-horizontal: ct-horizontal !default; 23 | $ct-class-start: ct-start !default; 24 | $ct-class-end: ct-end !default; 25 | 26 | // Container ratio 27 | $ct-container-ratio: (1/1.618) !default; 28 | 29 | // Text styles for labels 30 | $ct-text-color: rgba(0, 0, 0, 0.4) !default; 31 | $ct-text-size: 0.9em !default; 32 | $ct-text-align: flex-start !default; 33 | $ct-text-justify: flex-start !default; 34 | $ct-text-line-height: 1; 35 | 36 | // Grid styles 37 | $ct-grid-color: rgba(0, 0, 0, 0.2) !default; 38 | $ct-grid-dasharray: 2px !default; 39 | $ct-grid-width: 1px !default; 40 | 41 | // Line chart properties 42 | $ct-line-width: 4px !default; 43 | $ct-line-dasharray: false !default; 44 | $ct-point-size: 10px !default; 45 | // Line chart point, can be either round or square 46 | $ct-point-shape: round !default; 47 | // Area fill transparency between 0 and 1 48 | $ct-area-opacity: 0.7 !default; 49 | 50 | // Bar chart bar width 51 | $ct-bar-width: 10px !default; 52 | 53 | // Donut width (If donut width is to big it can cause issues where the shape gets distorted) 54 | $ct-donut-width: 60px !default; 55 | 56 | // If set to true it will include the default classes and generate CSS output. If you're planning to use the mixins you 57 | // should set this property to false 58 | $ct-include-classes: true !default; 59 | 60 | // If this is set to true the CSS will contain colored series. You can extend or change the color with the 61 | // properties below 62 | $ct-include-colored-series: $ct-include-classes !default; 63 | 64 | // If set to true this will include all responsive container variations using the scales defined at the top of the script 65 | $ct-include-alternative-responsive-containers: $ct-include-classes !default; 66 | 67 | // Series names and colors. This can be extended or customized as desired. Just add more series and colors. 68 | $ct-series-names: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) !default; 69 | $ct-series-colors: ( 70 | $info-color, 71 | $warning-color, 72 | $danger-color, 73 | $success-color, 74 | $primary-color, 75 | rgba($info-color,.8), 76 | rgba($success-color,.8), 77 | rgba($warning-color,.8), 78 | rgba($danger-color,.8), 79 | rgba($primary-color,.8), 80 | rgba($info-color,.6), 81 | rgba($success-color,.6), 82 | rgba($warning-color,.6), 83 | rgba($danger-color,.6), 84 | rgba($primary-color,.6) 85 | 86 | ) !default; 87 | 88 | // Paper Kit Colors 89 | 90 | .ct-blue{ 91 | stroke: $primary-color !important; 92 | } 93 | .ct-azure{ 94 | stroke: $info-color !important; 95 | } 96 | .ct-green{ 97 | stroke: $success-color !important; 98 | } 99 | .ct-orange{ 100 | stroke: $warning-color !important; 101 | } 102 | .ct-red{ 103 | stroke: $danger-color !important; 104 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_chartist.scss: -------------------------------------------------------------------------------- 1 | // Scales for responsive SVG containers 2 | $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default; 3 | $ct-scales-names: (ct-square, ct-minor-second, ct-major-second, ct-minor-third, ct-major-third, ct-perfect-fourth, ct-perfect-fifth, ct-minor-sixth, ct-golden-section, ct-major-sixth, ct-minor-seventh, ct-major-seventh, ct-octave, ct-major-tenth, ct-major-eleventh, ct-major-twelfth, ct-double-octave) !default; 4 | 5 | // Class names to be used when generating CSS 6 | $ct-class-chart: ct-chart !default; 7 | $ct-class-chart-line: ct-chart-line !default; 8 | $ct-class-chart-bar: ct-chart-bar !default; 9 | $ct-class-horizontal-bars: ct-horizontal-bars !default; 10 | $ct-class-chart-pie: ct-chart-pie !default; 11 | $ct-class-chart-donut: ct-chart-donut !default; 12 | $ct-class-label: ct-label !default; 13 | $ct-class-series: ct-series !default; 14 | $ct-class-line: ct-line !default; 15 | $ct-class-point: ct-point !default; 16 | $ct-class-area: ct-area !default; 17 | $ct-class-bar: ct-bar !default; 18 | $ct-class-slice-pie: ct-slice-pie !default; 19 | $ct-class-slice-donut: ct-slice-donut !default; 20 | $ct-class-grid: ct-grid !default; 21 | $ct-class-vertical: ct-vertical !default; 22 | $ct-class-horizontal: ct-horizontal !default; 23 | $ct-class-start: ct-start !default; 24 | $ct-class-end: ct-end !default; 25 | 26 | // Container ratio 27 | $ct-container-ratio: (1/1.618) !default; 28 | 29 | // Text styles for labels 30 | $ct-text-color: rgba(0, 0, 0, 0.4) !default; 31 | $ct-text-size: 0.9em !default; 32 | $ct-text-align: flex-start !default; 33 | $ct-text-justify: flex-start !default; 34 | $ct-text-line-height: 1; 35 | 36 | // Grid styles 37 | $ct-grid-color: rgba(0, 0, 0, 0.2) !default; 38 | $ct-grid-dasharray: 2px !default; 39 | $ct-grid-width: 1px !default; 40 | 41 | // Line chart properties 42 | $ct-line-width: 4px !default; 43 | $ct-line-dasharray: false !default; 44 | $ct-point-size: 10px !default; 45 | // Line chart point, can be either round or square 46 | $ct-point-shape: round !default; 47 | // Area fill transparency between 0 and 1 48 | $ct-area-opacity: 0.7 !default; 49 | 50 | // Bar chart bar width 51 | $ct-bar-width: 10px !default; 52 | 53 | // Donut width (If donut width is to big it can cause issues where the shape gets distorted) 54 | $ct-donut-width: 60px !default; 55 | 56 | // If set to true it will include the default classes and generate CSS output. If you're planning to use the mixins you 57 | // should set this property to false 58 | $ct-include-classes: true !default; 59 | 60 | // If this is set to true the CSS will contain colored series. You can extend or change the color with the 61 | // properties below 62 | $ct-include-colored-series: $ct-include-classes !default; 63 | 64 | // If set to true this will include all responsive container variations using the scales defined at the top of the script 65 | $ct-include-alternative-responsive-containers: $ct-include-classes !default; 66 | 67 | // Series names and colors. This can be extended or customized as desired. Just add more series and colors. 68 | $ct-series-names: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) !default; 69 | $ct-series-colors: ( 70 | $info-color, 71 | $warning-color, 72 | $danger-color, 73 | $success-color, 74 | $primary-color, 75 | rgba($info-color,.8), 76 | rgba($success-color,.8), 77 | rgba($warning-color,.8), 78 | rgba($danger-color,.8), 79 | rgba($primary-color,.8), 80 | rgba($info-color,.6), 81 | rgba($success-color,.6), 82 | rgba($warning-color,.6), 83 | rgba($danger-color,.6), 84 | rgba($primary-color,.6) 85 | 86 | ) !default; 87 | 88 | // Paper Kit Colors 89 | 90 | .ct-blue{ 91 | stroke: $primary-color !important; 92 | } 93 | .ct-azure{ 94 | stroke: $info-color !important; 95 | } 96 | .ct-green{ 97 | stroke: $success-color !important; 98 | } 99 | .ct-orange{ 100 | stroke: $warning-color !important; 101 | } 102 | .ct-red{ 103 | stroke: $danger-color !important; 104 | } -------------------------------------------------------------------------------- /github_monitor/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for github_monitor project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | import sys 15 | 16 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 17 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 18 | sys.path.insert(0, os.path.join(BASE_DIR, 'apps')) 19 | 20 | 21 | # Quick-start development settings - unsuitable for production 22 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 23 | 24 | # SECURITY WARNING: keep the secret key used in production secret! 25 | SECRET_KEY = '#**&ti@7+ah8dmdu1xjaoi@fe1k)82(0np0b-ec98u)fpnkgm#' 26 | 27 | # SECURITY WARNING: don't run with debug turned on in production! 28 | DEBUG = True 29 | 30 | ALLOWED_HOSTS = [] 31 | 32 | AUTH_USER_MODEL = 'github_user.UserList' 33 | 34 | # Application definition 35 | 36 | INSTALLED_APPS = [ 37 | 'django.contrib.admin', 38 | 'django.contrib.auth', 39 | 'django.contrib.contenttypes', 40 | 'django.contrib.sessions', 41 | 'django.contrib.messages', 42 | 'django.contrib.staticfiles', 43 | 'apps.github_user', 44 | 'apps.github_info', 45 | 'apps.github_task' 46 | ] 47 | 48 | MIDDLEWARE = [ 49 | 'django.middleware.security.SecurityMiddleware', 50 | 'django.contrib.sessions.middleware.SessionMiddleware', 51 | 'django.middleware.common.CommonMiddleware', 52 | 'django.middleware.csrf.CsrfViewMiddleware', 53 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 54 | 'django.contrib.messages.middleware.MessageMiddleware', 55 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 56 | ] 57 | 58 | ROOT_URLCONF = 'github_monitor.urls' 59 | 60 | TEMPLATES = [ 61 | { 62 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 63 | 'DIRS': [os.path.join(BASE_DIR, 'templates')] 64 | , 65 | 'APP_DIRS': True, 66 | 'OPTIONS': { 67 | 'context_processors': [ 68 | 'django.template.context_processors.debug', 69 | 'django.template.context_processors.request', 70 | 'django.contrib.auth.context_processors.auth', 71 | 'django.contrib.messages.context_processors.messages', 72 | ], 73 | }, 74 | }, 75 | ] 76 | 77 | WSGI_APPLICATION = 'github_monitor.wsgi.application' 78 | 79 | 80 | # Database 81 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 82 | 83 | # DATABASES = { 84 | # 'default': { 85 | # 'ENGINE': 'django.db.backends.sqlite3', 86 | # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 87 | # } 88 | # } 89 | 90 | DATABASES = { 91 | 'default': { 92 | 'ENGINE': 'django.db.backends.mysql', 93 | 'NAME': 'github', 94 | 'USER': 'root', 95 | 'PASSWORD': 'root', 96 | 'HOST': 'localhost', 97 | 'PORT': '3306', 98 | } 99 | } 100 | 101 | 102 | # Password validation 103 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 104 | 105 | AUTH_PASSWORD_VALIDATORS = [ 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 114 | }, 115 | { 116 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 117 | }, 118 | ] 119 | 120 | 121 | # Internationalization 122 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 123 | 124 | LANGUAGE_CODE = 'zh-hans' 125 | 126 | TIME_ZONE = 'Asia/shanghai' 127 | 128 | USE_I18N = True 129 | 130 | USE_L10N = True 131 | 132 | USE_TZ = True 133 | 134 | 135 | # Static files (CSS, JavaScript, Images) 136 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 137 | 138 | STATIC_URL = '/static/' 139 | STATICFILES_DIRS = [ 140 | os.path.join(BASE_DIR, 'static'), 141 | ] -------------------------------------------------------------------------------- /static/assets/sass/paper/_inputs.scss: -------------------------------------------------------------------------------- 1 | .form-control::-moz-placeholder{ 2 | @include placeholder($medium-gray,1); 3 | } 4 | .form-control:-moz-placeholder{ 5 | @include placeholder($medium-gray,1); 6 | } 7 | .form-control::-webkit-input-placeholder{ 8 | @include placeholder($medium-gray,1); 9 | } 10 | .form-control:-ms-input-placeholder{ 11 | @include placeholder($medium-gray,1); 12 | } 13 | 14 | .form-control { 15 | background-color: $gray-input-bg; 16 | border: medium none; 17 | border-radius: $border-radius-base; 18 | color: $font-color; 19 | font-size: $font-size-base; 20 | transition: background-color 0.3s ease 0s; 21 | @include input-size($padding-base-vertical, $padding-base-horizontal, $height-base); 22 | @include box-shadow(none); 23 | 24 | &:focus{ 25 | background-color: $white-bg; 26 | @include box-shadow(none); 27 | outline: 0 !important; 28 | } 29 | 30 | .has-success &, 31 | .has-error &, 32 | .has-success &:focus, 33 | .has-error &:focus{ 34 | @include box-shadow(none); 35 | } 36 | 37 | .has-success &{ 38 | background-color: $success-input-bg; 39 | color: $success-color; 40 | &.border-input{ 41 | border: 1px solid $success-color; 42 | } 43 | } 44 | .has-success &:focus{ 45 | background-color: $white-bg; 46 | } 47 | .has-error &{ 48 | background-color: $danger-input-bg; 49 | color: $danger-color; 50 | &.border-input{ 51 | border: 1px solid $danger-color; 52 | } 53 | } 54 | .has-error &:focus{ 55 | background-color: $white-bg; 56 | } 57 | 58 | & + .form-control-feedback{ 59 | border-radius: $border-radius-large; 60 | font-size: $font-size-base; 61 | margin-top: -7px; 62 | position: absolute; 63 | right: 10px; 64 | top: 50%; 65 | vertical-align: middle; 66 | } 67 | &.border-input{ 68 | border: 1px solid $table-line-color; 69 | } 70 | .open &{ 71 | border-bottom-color: transparent; 72 | } 73 | } 74 | 75 | .input-lg{ 76 | height: 55px; 77 | padding: $padding-large-vertical $padding-large-horizontal; 78 | } 79 | 80 | .has-error{ 81 | .form-control-feedback, .control-label{ 82 | color: $danger-color; 83 | } 84 | } 85 | .has-success{ 86 | .form-control-feedback, .control-label{ 87 | color: $success-color; 88 | } 89 | } 90 | 91 | 92 | .input-group-addon { 93 | background-color: $gray-input-bg; 94 | border: medium none; 95 | border-radius: $border-radius-base; 96 | 97 | 98 | .has-success &, 99 | .has-error &{ 100 | background-color: $white-color; 101 | } 102 | .has-error .form-control:focus + &{ 103 | color: $danger-color; 104 | } 105 | .has-success .form-control:focus + &{ 106 | color: $success-color; 107 | } 108 | .form-control:focus + &, 109 | .form-control:focus ~ &{ 110 | background-color: $white-color; 111 | } 112 | } 113 | .border-input{ 114 | .input-group-addon{ 115 | border: solid 1px $table-line-color; 116 | } 117 | } 118 | .input-group{ 119 | margin-bottom: 15px; 120 | } 121 | .input-group[disabled]{ 122 | .input-group-addon{ 123 | background-color: $light-gray; 124 | } 125 | } 126 | .input-group .form-control:first-child, 127 | .input-group-addon:first-child, 128 | .input-group-btn:first-child > .dropdown-toggle, 129 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { 130 | border-right: 0 none; 131 | } 132 | .input-group .form-control:last-child, 133 | .input-group-addon:last-child, 134 | .input-group-btn:last-child > .dropdown-toggle, 135 | .input-group-btn:first-child > .btn:not(:first-child) { 136 | border-left: 0 none; 137 | } 138 | .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { 139 | background-color: $light-gray; 140 | cursor: not-allowed; 141 | @include placeholder($dark-gray,1); 142 | } 143 | .form-control[disabled]::-moz-placeholder{ 144 | @include placeholder($dark-gray,1); 145 | } 146 | .form-control[disabled]:-moz-placeholder{ 147 | @include placeholder($medium-gray,1); 148 | } 149 | .form-control[disabled]::-webkit-input-placeholder{ 150 | @include placeholder($medium-gray,1); 151 | } 152 | .form-control[disabled]:-ms-input-placeholder{ 153 | @include placeholder($medium-gray,1); 154 | } 155 | .input-group-btn .btn{ 156 | border-width: $border-thin; 157 | padding: $padding-round-vertical $padding-base-horizontal; 158 | } 159 | .input-group-btn .btn-default:not(.btn-fill){ 160 | border-color: $medium-gray; 161 | } 162 | 163 | .input-group-btn:last-child > .btn{ 164 | margin-left: 0; 165 | } 166 | textarea.form-control{ 167 | max-width: 100%; 168 | padding: 10px 18px; 169 | resize: none; 170 | } 171 | 172 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_inputs.scss: -------------------------------------------------------------------------------- 1 | .form-control::-moz-placeholder{ 2 | @include placeholder($medium-gray,1); 3 | } 4 | .form-control:-moz-placeholder{ 5 | @include placeholder($medium-gray,1); 6 | } 7 | .form-control::-webkit-input-placeholder{ 8 | @include placeholder($medium-gray,1); 9 | } 10 | .form-control:-ms-input-placeholder{ 11 | @include placeholder($medium-gray,1); 12 | } 13 | 14 | .form-control { 15 | background-color: $gray-input-bg; 16 | border: medium none; 17 | border-radius: $border-radius-base; 18 | color: $font-color; 19 | font-size: $font-size-base; 20 | transition: background-color 0.3s ease 0s; 21 | @include input-size($padding-base-vertical, $padding-base-horizontal, $height-base); 22 | @include box-shadow(none); 23 | 24 | &:focus{ 25 | background-color: $white-bg; 26 | @include box-shadow(none); 27 | outline: 0 !important; 28 | } 29 | 30 | .has-success &, 31 | .has-error &, 32 | .has-success &:focus, 33 | .has-error &:focus{ 34 | @include box-shadow(none); 35 | } 36 | 37 | .has-success &{ 38 | background-color: $success-input-bg; 39 | color: $success-color; 40 | &.border-input{ 41 | border: 1px solid $success-color; 42 | } 43 | } 44 | .has-success &:focus{ 45 | background-color: $white-bg; 46 | } 47 | .has-error &{ 48 | background-color: $danger-input-bg; 49 | color: $danger-color; 50 | &.border-input{ 51 | border: 1px solid $danger-color; 52 | } 53 | } 54 | .has-error &:focus{ 55 | background-color: $white-bg; 56 | } 57 | 58 | & + .form-control-feedback{ 59 | border-radius: $border-radius-large; 60 | font-size: $font-size-base; 61 | margin-top: -7px; 62 | position: absolute; 63 | right: 10px; 64 | top: 50%; 65 | vertical-align: middle; 66 | } 67 | &.border-input{ 68 | border: 1px solid $table-line-color; 69 | } 70 | .open &{ 71 | border-bottom-color: transparent; 72 | } 73 | } 74 | 75 | .input-lg{ 76 | height: 55px; 77 | padding: $padding-large-vertical $padding-large-horizontal; 78 | } 79 | 80 | .has-error{ 81 | .form-control-feedback, .control-label{ 82 | color: $danger-color; 83 | } 84 | } 85 | .has-success{ 86 | .form-control-feedback, .control-label{ 87 | color: $success-color; 88 | } 89 | } 90 | 91 | 92 | .input-group-addon { 93 | background-color: $gray-input-bg; 94 | border: medium none; 95 | border-radius: $border-radius-base; 96 | 97 | 98 | .has-success &, 99 | .has-error &{ 100 | background-color: $white-color; 101 | } 102 | .has-error .form-control:focus + &{ 103 | color: $danger-color; 104 | } 105 | .has-success .form-control:focus + &{ 106 | color: $success-color; 107 | } 108 | .form-control:focus + &, 109 | .form-control:focus ~ &{ 110 | background-color: $white-color; 111 | } 112 | } 113 | .border-input{ 114 | .input-group-addon{ 115 | border: solid 1px $table-line-color; 116 | } 117 | } 118 | .input-group{ 119 | margin-bottom: 15px; 120 | } 121 | .input-group[disabled]{ 122 | .input-group-addon{ 123 | background-color: $light-gray; 124 | } 125 | } 126 | .input-group .form-control:first-child, 127 | .input-group-addon:first-child, 128 | .input-group-btn:first-child > .dropdown-toggle, 129 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { 130 | border-right: 0 none; 131 | } 132 | .input-group .form-control:last-child, 133 | .input-group-addon:last-child, 134 | .input-group-btn:last-child > .dropdown-toggle, 135 | .input-group-btn:first-child > .btn:not(:first-child) { 136 | border-left: 0 none; 137 | } 138 | .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { 139 | background-color: $light-gray; 140 | cursor: not-allowed; 141 | @include placeholder($dark-gray,1); 142 | } 143 | .form-control[disabled]::-moz-placeholder{ 144 | @include placeholder($dark-gray,1); 145 | } 146 | .form-control[disabled]:-moz-placeholder{ 147 | @include placeholder($medium-gray,1); 148 | } 149 | .form-control[disabled]::-webkit-input-placeholder{ 150 | @include placeholder($medium-gray,1); 151 | } 152 | .form-control[disabled]:-ms-input-placeholder{ 153 | @include placeholder($medium-gray,1); 154 | } 155 | .input-group-btn .btn{ 156 | border-width: $border-thin; 157 | padding: $padding-round-vertical $padding-base-horizontal; 158 | } 159 | .input-group-btn .btn-default:not(.btn-fill){ 160 | border-color: $medium-gray; 161 | } 162 | 163 | .input-group-btn:last-child > .btn{ 164 | margin-left: 0; 165 | } 166 | textarea.form-control{ 167 | max-width: 100%; 168 | padding: 10px 18px; 169 | resize: none; 170 | } 171 | 172 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_sidebar-and-main-panel.scss: -------------------------------------------------------------------------------- 1 | .sidebar{ 2 | position: absolute; 3 | top: 0; 4 | bottom: 0; 5 | left: 0; 6 | z-index: 1; 7 | background-size: cover; 8 | background-position: center center; 9 | .sidebar-wrapper{ 10 | position: relative; 11 | max-height: none; 12 | min-height: 100%; 13 | overflow: hidden; 14 | width: 260px; 15 | z-index: 4; 16 | box-shadow: inset -1px 0px 0px 0px $medium-gray; 17 | } 18 | .sidebar-background{ 19 | position: absolute; 20 | z-index: 1; 21 | height: 100%; 22 | width: 100%; 23 | display: block; 24 | top: 0; 25 | left: 0; 26 | background-size: cover; 27 | background-position: center center; 28 | } 29 | 30 | } 31 | .sidebar, 32 | .off-canvas-sidebar{ 33 | width: 260px; 34 | display: block; 35 | font-weight: 200; 36 | 37 | .logo{ 38 | padding: 18px 0px; 39 | margin: 0 20px; 40 | 41 | p{ 42 | float: left; 43 | font-size: 20px; 44 | margin: 10px 10px; 45 | line-height: 20px; 46 | } 47 | 48 | .simple-text{ 49 | text-transform: uppercase; 50 | padding: $padding-small-vertical $padding-zero; 51 | display: block; 52 | font-size: $font-size-large; 53 | text-align: center; 54 | font-weight: $font-weight-normal; 55 | line-height: 30px; 56 | } 57 | } 58 | 59 | .nav{ 60 | margin-top: 20px; 61 | 62 | li{ 63 | > a{ 64 | margin: 10px 0px; 65 | padding-left: 25px; 66 | padding-right: 25px; 67 | 68 | opacity: .7; 69 | } 70 | 71 | &:hover > a{ 72 | opacity: 1; 73 | } 74 | 75 | &.active > a{ 76 | color: $primary-color; 77 | opacity: 1; 78 | 79 | &:before{ 80 | border-right: 17px solid $medium-gray; 81 | border-top: 17px solid transparent; 82 | border-bottom: 17px solid transparent; 83 | content: ""; 84 | display: inline-block; 85 | position: absolute; 86 | right: 0; 87 | top: 8px; 88 | } 89 | 90 | &:after{ 91 | border-right: 17px solid $bg-nude; 92 | border-top: 17px solid transparent; 93 | border-bottom: 17px solid transparent; 94 | content: ""; 95 | display: inline-block; 96 | position: absolute; 97 | right: -1px; 98 | top: 8px; 99 | } 100 | } 101 | } 102 | 103 | p{ 104 | margin: 0; 105 | line-height: 30px; 106 | font-size: 12px; 107 | font-weight: 600; 108 | text-transform: uppercase; 109 | } 110 | 111 | i{ 112 | font-size: 24px; 113 | float: left; 114 | margin-right: 15px; 115 | line-height: 30px; 116 | width: 30px; 117 | text-align: center; 118 | } 119 | } 120 | 121 | &:after, 122 | &:before{ 123 | display: block; 124 | content: ""; 125 | position: absolute; 126 | width: 100%; 127 | height: 100%; 128 | top: 0; 129 | left: 0; 130 | z-index: 2; 131 | background: $white-background-color; 132 | } 133 | 134 | &, 135 | &[data-background-color="white"]{ 136 | @include sidebar-background-color($white-background-color, $default-color); 137 | } 138 | &[data-background-color="black"]{ 139 | @include sidebar-background-color($black-background-color, $white-color); 140 | } 141 | 142 | &[data-active-color="primary"]{ 143 | @include sidebar-active-color($primary-color); 144 | } 145 | &[data-active-color="info"]{ 146 | @include sidebar-active-color($info-color); 147 | } 148 | &[data-active-color="success"]{ 149 | @include sidebar-active-color($success-color); 150 | } 151 | &[data-active-color="warning"]{ 152 | @include sidebar-active-color($warning-color); 153 | } 154 | &[data-active-color="danger"]{ 155 | @include sidebar-active-color($danger-color); 156 | } 157 | 158 | } 159 | 160 | .main-panel{ 161 | background-color: $bg-nude; 162 | position: relative; 163 | z-index: 2; 164 | float: right; 165 | width: $sidebar-width; 166 | min-height: 100%; 167 | 168 | > .content{ 169 | padding: 30px 15px; 170 | min-height: calc(100% - 123px); 171 | } 172 | 173 | > .footer{ 174 | border-top: 1px solid rgba(0, 0, 0, 0.1); 175 | } 176 | 177 | .navbar{ 178 | margin-bottom: 0; 179 | } 180 | } 181 | 182 | .sidebar, 183 | .main-panel{ 184 | overflow: auto; 185 | max-height: 100%; 186 | height: 100%; 187 | -webkit-transition-property: top,bottom; 188 | transition-property: top,bottom; 189 | -webkit-transition-duration: .2s,.2s; 190 | transition-duration: .2s,.2s; 191 | -webkit-transition-timing-function: linear,linear; 192 | transition-timing-function: linear,linear; 193 | -webkit-overflow-scrolling: touch; 194 | } 195 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_sidebar-and-main-panel.scss: -------------------------------------------------------------------------------- 1 | .sidebar{ 2 | position: absolute; 3 | top: 0; 4 | bottom: 0; 5 | left: 0; 6 | z-index: 1; 7 | background-size: cover; 8 | background-position: center center; 9 | .sidebar-wrapper{ 10 | position: relative; 11 | max-height: none; 12 | min-height: 100%; 13 | overflow: hidden; 14 | width: 260px; 15 | z-index: 4; 16 | box-shadow: inset -1px 0px 0px 0px $medium-gray; 17 | } 18 | .sidebar-background{ 19 | position: absolute; 20 | z-index: 1; 21 | height: 100%; 22 | width: 100%; 23 | display: block; 24 | top: 0; 25 | left: 0; 26 | background-size: cover; 27 | background-position: center center; 28 | } 29 | 30 | } 31 | .sidebar, 32 | .off-canvas-sidebar{ 33 | width: 260px; 34 | display: block; 35 | font-weight: 200; 36 | 37 | .logo{ 38 | padding: 18px 0px; 39 | margin: 0 20px; 40 | 41 | p{ 42 | float: left; 43 | font-size: 20px; 44 | margin: 10px 10px; 45 | line-height: 20px; 46 | } 47 | 48 | .simple-text{ 49 | text-transform: uppercase; 50 | padding: $padding-small-vertical $padding-zero; 51 | display: block; 52 | font-size: $font-size-large; 53 | text-align: center; 54 | font-weight: $font-weight-normal; 55 | line-height: 30px; 56 | } 57 | } 58 | 59 | .nav{ 60 | margin-top: 20px; 61 | 62 | li{ 63 | > a{ 64 | margin: 10px 0px; 65 | padding-left: 25px; 66 | padding-right: 25px; 67 | 68 | opacity: .7; 69 | } 70 | 71 | &:hover > a{ 72 | opacity: 1; 73 | } 74 | 75 | &.active > a{ 76 | color: $primary-color; 77 | opacity: 1; 78 | 79 | &:before{ 80 | border-right: 17px solid $medium-gray; 81 | border-top: 17px solid transparent; 82 | border-bottom: 17px solid transparent; 83 | content: ""; 84 | display: inline-block; 85 | position: absolute; 86 | right: 0; 87 | top: 8px; 88 | } 89 | 90 | &:after{ 91 | border-right: 17px solid $bg-nude; 92 | border-top: 17px solid transparent; 93 | border-bottom: 17px solid transparent; 94 | content: ""; 95 | display: inline-block; 96 | position: absolute; 97 | right: -1px; 98 | top: 8px; 99 | } 100 | } 101 | } 102 | 103 | p{ 104 | margin: 0; 105 | line-height: 30px; 106 | font-size: 12px; 107 | font-weight: 600; 108 | text-transform: uppercase; 109 | } 110 | 111 | i{ 112 | font-size: 24px; 113 | float: left; 114 | margin-right: 15px; 115 | line-height: 30px; 116 | width: 30px; 117 | text-align: center; 118 | } 119 | } 120 | 121 | &:after, 122 | &:before{ 123 | display: block; 124 | content: ""; 125 | position: absolute; 126 | width: 100%; 127 | height: 100%; 128 | top: 0; 129 | left: 0; 130 | z-index: 2; 131 | background: $white-background-color; 132 | } 133 | 134 | &, 135 | &[data-background-color="white"]{ 136 | @include sidebar-background-color($white-background-color, $default-color); 137 | } 138 | &[data-background-color="black"]{ 139 | @include sidebar-background-color($black-background-color, $white-color); 140 | } 141 | 142 | &[data-active-color="primary"]{ 143 | @include sidebar-active-color($primary-color); 144 | } 145 | &[data-active-color="info"]{ 146 | @include sidebar-active-color($info-color); 147 | } 148 | &[data-active-color="success"]{ 149 | @include sidebar-active-color($success-color); 150 | } 151 | &[data-active-color="warning"]{ 152 | @include sidebar-active-color($warning-color); 153 | } 154 | &[data-active-color="danger"]{ 155 | @include sidebar-active-color($danger-color); 156 | } 157 | 158 | } 159 | 160 | .main-panel{ 161 | background-color: $bg-nude; 162 | position: relative; 163 | z-index: 2; 164 | float: right; 165 | width: $sidebar-width; 166 | min-height: 100%; 167 | 168 | > .content{ 169 | padding: 30px 15px; 170 | min-height: calc(100% - 123px); 171 | } 172 | 173 | > .footer{ 174 | border-top: 1px solid rgba(0, 0, 0, 0.1); 175 | } 176 | 177 | .navbar{ 178 | margin-bottom: 0; 179 | } 180 | } 181 | 182 | .sidebar, 183 | .main-panel{ 184 | overflow: auto; 185 | max-height: 100%; 186 | height: 100%; 187 | -webkit-transition-property: top,bottom; 188 | transition-property: top,bottom; 189 | -webkit-transition-duration: .2s,.2s; 190 | transition-duration: .2s,.2s; 191 | -webkit-transition-timing-function: linear,linear; 192 | transition-timing-function: linear,linear; 193 | -webkit-overflow-scrolling: touch; 194 | } 195 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_cards.scss: -------------------------------------------------------------------------------- 1 | .card{ 2 | border-radius: $border-radius-extreme; 3 | box-shadow: 0 2px 2px rgba(204, 197, 185, 0.5); 4 | background-color: #FFFFFF; 5 | color: $card-black-color; 6 | margin-bottom: 20px; 7 | position: relative; 8 | z-index: 1; 9 | 10 | .image{ 11 | width: 100%; 12 | overflow: hidden; 13 | height: 260px; 14 | border-radius: $border-radius-extreme $border-radius-extreme 0 0; 15 | position: relative; 16 | -webkit-transform-style: preserve-3d; 17 | -moz-transform-style: preserve-3d; 18 | transform-style: preserve-3d; 19 | 20 | img { 21 | width: 100%; 22 | } 23 | } 24 | .content{ 25 | padding: 15px 15px 10px 15px; 26 | } 27 | .header{ 28 | padding: 20px 20px 0; 29 | } 30 | .description{ 31 | font-size: $font-paragraph; 32 | color: $font-color; 33 | } 34 | 35 | h6{ 36 | font-size: $font-size-small; 37 | margin: 0; 38 | } 39 | .category, 40 | label{ 41 | font-size: $font-size-base; 42 | font-weight: $font-weight-normal; 43 | color: $dark-gray; 44 | margin-bottom: 0px; 45 | i{ 46 | font-size: $font-paragraph; 47 | } 48 | } 49 | 50 | label{ 51 | font-size: 15px; 52 | margin-bottom: 5px; 53 | } 54 | 55 | .title{ 56 | margin: $none; 57 | color: $card-black-color; 58 | font-weight: $font-weight-light; 59 | } 60 | .avatar{ 61 | width: 50px; 62 | height: 50px; 63 | overflow: hidden; 64 | border-radius: 50%; 65 | margin-right: 5px; 66 | } 67 | .footer{ 68 | padding: 0; 69 | line-height: 30px; 70 | 71 | .legend{ 72 | padding: 5px 0; 73 | } 74 | 75 | hr{ 76 | margin-top: 5px; 77 | margin-bottom: 5px; 78 | } 79 | } 80 | .stats{ 81 | color: #a9a9a9; 82 | font-weight: 300; 83 | i{ 84 | margin-right: 2px; 85 | min-width: 15px; 86 | display: inline-block; 87 | } 88 | } 89 | .footer div{ 90 | display: inline-block; 91 | } 92 | 93 | .author{ 94 | font-size: $font-size-small; 95 | font-weight: $font-weight-bold; 96 | text-transform: uppercase; 97 | } 98 | .author i{ 99 | font-size: $font-size-base; 100 | } 101 | 102 | &.card-separator:after{ 103 | height: 100%; 104 | right: -15px; 105 | top: 0; 106 | width: 1px; 107 | background-color: $medium-gray; 108 | content: ""; 109 | position: absolute; 110 | } 111 | 112 | .ct-chart{ 113 | margin: 30px 0 30px; 114 | height: 245px; 115 | } 116 | 117 | .table{ 118 | tbody td:first-child, 119 | thead th:first-child{ 120 | padding-left: 15px; 121 | } 122 | 123 | tbody td:last-child, 124 | thead th:last-child{ 125 | padding-right: 15px; 126 | } 127 | } 128 | 129 | .alert{ 130 | border-radius: $border-radius-base; 131 | position: relative; 132 | 133 | &.alert-with-icon{ 134 | padding-left: 65px; 135 | } 136 | } 137 | .icon-big{ 138 | font-size: 3em; 139 | min-height: 64px; 140 | } 141 | .numbers{ 142 | font-size: 2em; 143 | text-align: right; 144 | p{ 145 | margin: 0; 146 | } 147 | } 148 | ul.team-members{ 149 | li{ 150 | padding: 10px 0px; 151 | &:not(:last-child){ 152 | border-bottom: 1px solid $medium-pale-bg; 153 | } 154 | } 155 | } 156 | } 157 | .card-user{ 158 | .image{ 159 | border-radius: 8px 8px 0 0; 160 | height: 150px; 161 | position: relative; 162 | overflow: hidden; 163 | 164 | img{ 165 | width: 100%; 166 | } 167 | } 168 | .image-plain{ 169 | height: 0; 170 | margin-top: 110px; 171 | } 172 | .author{ 173 | text-align: center; 174 | text-transform: none; 175 | margin-top: -65px; 176 | .title{ 177 | color: $default-states-color; 178 | small{ 179 | color: $card-muted-color; 180 | } 181 | } 182 | } 183 | .avatar{ 184 | width: 100px; 185 | height: 100px; 186 | border-radius: 50%; 187 | position: relative; 188 | margin-bottom: 15px; 189 | 190 | &.border-white{ 191 | border: 5px solid $white-color; 192 | } 193 | &.border-gray{ 194 | border: 5px solid $card-muted-color; 195 | } 196 | } 197 | .title{ 198 | font-weight: 600; 199 | line-height: 24px; 200 | } 201 | .description{ 202 | margin-top: 10px; 203 | } 204 | .content{ 205 | min-height: 200px; 206 | } 207 | 208 | &.card-plain{ 209 | .avatar{ 210 | height: 190px; 211 | width: 190px; 212 | } 213 | } 214 | } 215 | 216 | .card-map{ 217 | .map{ 218 | height: 500px; 219 | padding-top: 20px; 220 | 221 | > div{ 222 | height: 100%; 223 | } 224 | } 225 | } 226 | .card-user, 227 | .card-price{ 228 | .footer{ 229 | padding: 5px 15px 10px; 230 | } 231 | hr{ 232 | margin: 5px 15px; 233 | } 234 | } 235 | .card-plain{ 236 | background-color: transparent; 237 | box-shadow: none; 238 | border-radius: 0; 239 | 240 | .image{ 241 | border-radius: 4px; 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_cards.scss: -------------------------------------------------------------------------------- 1 | .card{ 2 | border-radius: $border-radius-extreme; 3 | box-shadow: 0 2px 2px rgba(204, 197, 185, 0.5); 4 | background-color: #FFFFFF; 5 | color: $card-black-color; 6 | margin-bottom: 20px; 7 | position: relative; 8 | z-index: 1; 9 | 10 | .image{ 11 | width: 100%; 12 | overflow: hidden; 13 | height: 260px; 14 | border-radius: $border-radius-extreme $border-radius-extreme 0 0; 15 | position: relative; 16 | -webkit-transform-style: preserve-3d; 17 | -moz-transform-style: preserve-3d; 18 | transform-style: preserve-3d; 19 | 20 | img { 21 | width: 100%; 22 | } 23 | } 24 | .content{ 25 | padding: 15px 15px 10px 15px; 26 | } 27 | .header{ 28 | padding: 20px 20px 0; 29 | } 30 | .description{ 31 | font-size: $font-paragraph; 32 | color: $font-color; 33 | } 34 | 35 | h6{ 36 | font-size: $font-size-small; 37 | margin: 0; 38 | } 39 | .category, 40 | label{ 41 | font-size: $font-size-base; 42 | font-weight: $font-weight-normal; 43 | color: $dark-gray; 44 | margin-bottom: 0px; 45 | i{ 46 | font-size: $font-paragraph; 47 | } 48 | } 49 | 50 | label{ 51 | font-size: 15px; 52 | margin-bottom: 5px; 53 | } 54 | 55 | .title{ 56 | margin: $none; 57 | color: $card-black-color; 58 | font-weight: $font-weight-light; 59 | } 60 | .avatar{ 61 | width: 50px; 62 | height: 50px; 63 | overflow: hidden; 64 | border-radius: 50%; 65 | margin-right: 5px; 66 | } 67 | .footer{ 68 | padding: 0; 69 | line-height: 30px; 70 | 71 | .legend{ 72 | padding: 5px 0; 73 | } 74 | 75 | hr{ 76 | margin-top: 5px; 77 | margin-bottom: 5px; 78 | } 79 | } 80 | .stats{ 81 | color: #a9a9a9; 82 | font-weight: 300; 83 | i{ 84 | margin-right: 2px; 85 | min-width: 15px; 86 | display: inline-block; 87 | } 88 | } 89 | .footer div{ 90 | display: inline-block; 91 | } 92 | 93 | .author{ 94 | font-size: $font-size-small; 95 | font-weight: $font-weight-bold; 96 | text-transform: uppercase; 97 | } 98 | .author i{ 99 | font-size: $font-size-base; 100 | } 101 | 102 | &.card-separator:after{ 103 | height: 100%; 104 | right: -15px; 105 | top: 0; 106 | width: 1px; 107 | background-color: $medium-gray; 108 | content: ""; 109 | position: absolute; 110 | } 111 | 112 | .ct-chart{ 113 | margin: 30px 0 30px; 114 | height: 245px; 115 | } 116 | 117 | .table{ 118 | tbody td:first-child, 119 | thead th:first-child{ 120 | padding-left: 15px; 121 | } 122 | 123 | tbody td:last-child, 124 | thead th:last-child{ 125 | padding-right: 15px; 126 | } 127 | } 128 | 129 | .alert{ 130 | border-radius: $border-radius-base; 131 | position: relative; 132 | 133 | &.alert-with-icon{ 134 | padding-left: 65px; 135 | } 136 | } 137 | .icon-big{ 138 | font-size: 3em; 139 | min-height: 64px; 140 | } 141 | .numbers{ 142 | font-size: 2em; 143 | text-align: right; 144 | p{ 145 | margin: 0; 146 | } 147 | } 148 | ul.team-members{ 149 | li{ 150 | padding: 10px 0px; 151 | &:not(:last-child){ 152 | border-bottom: 1px solid $medium-pale-bg; 153 | } 154 | } 155 | } 156 | } 157 | .card-user{ 158 | .image{ 159 | border-radius: 8px 8px 0 0; 160 | height: 150px; 161 | position: relative; 162 | overflow: hidden; 163 | 164 | img{ 165 | width: 100%; 166 | } 167 | } 168 | .image-plain{ 169 | height: 0; 170 | margin-top: 110px; 171 | } 172 | .author{ 173 | text-align: center; 174 | text-transform: none; 175 | margin-top: -65px; 176 | .title{ 177 | color: $default-states-color; 178 | small{ 179 | color: $card-muted-color; 180 | } 181 | } 182 | } 183 | .avatar{ 184 | width: 100px; 185 | height: 100px; 186 | border-radius: 50%; 187 | position: relative; 188 | margin-bottom: 15px; 189 | 190 | &.border-white{ 191 | border: 5px solid $white-color; 192 | } 193 | &.border-gray{ 194 | border: 5px solid $card-muted-color; 195 | } 196 | } 197 | .title{ 198 | font-weight: 600; 199 | line-height: 24px; 200 | } 201 | .description{ 202 | margin-top: 10px; 203 | } 204 | .content{ 205 | min-height: 200px; 206 | } 207 | 208 | &.card-plain{ 209 | .avatar{ 210 | height: 190px; 211 | width: 190px; 212 | } 213 | } 214 | } 215 | 216 | .card-map{ 217 | .map{ 218 | height: 500px; 219 | padding-top: 20px; 220 | 221 | > div{ 222 | height: 100%; 223 | } 224 | } 225 | } 226 | .card-user, 227 | .card-price{ 228 | .footer{ 229 | padding: 5px 15px 10px; 230 | } 231 | hr{ 232 | margin: 5px 15px; 233 | } 234 | } 235 | .card-plain{ 236 | background-color: transparent; 237 | box-shadow: none; 238 | border-radius: 0; 239 | 240 | .image{ 241 | border-radius: 4px; 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /static/assets/js/paper-dashboard.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | ========================================================= 4 | * Paper Dashboard - v1.1.2 5 | ========================================================= 6 | 7 | * Product Page: http://www.creative-tim.com/product/paper-dashboard 8 | * Copyright 2017 Creative Tim (http://www.creative-tim.com) 9 | * Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE.md) 10 | 11 | ========================================================= 12 | 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | */ 16 | 17 | 18 | var fixedTop = false; 19 | var transparent = true; 20 | var navbar_initialized = false; 21 | 22 | $(document).ready(function(){ 23 | window_width = $(window).width(); 24 | 25 | // Init navigation toggle for small screens 26 | if(window_width <= 991){ 27 | pd.initRightMenu(); 28 | } 29 | 30 | // Activate the tooltips 31 | $('[rel="tooltip"]').tooltip(); 32 | 33 | }); 34 | 35 | // activate collapse right menu when the windows is resized 36 | $(window).resize(function(){ 37 | if($(window).width() <= 991){ 38 | pd.initRightMenu(); 39 | } 40 | }); 41 | 42 | pd = { 43 | misc:{ 44 | navbar_menu_visible: 0 45 | }, 46 | checkScrollForTransparentNavbar: debounce(function() { 47 | if($(document).scrollTop() > 381 ) { 48 | if(transparent) { 49 | transparent = false; 50 | $('.navbar-color-on-scroll').removeClass('navbar-transparent'); 51 | $('.navbar-title').removeClass('hidden'); 52 | } 53 | } else { 54 | if( !transparent ) { 55 | transparent = true; 56 | $('.navbar-color-on-scroll').addClass('navbar-transparent'); 57 | $('.navbar-title').addClass('hidden'); 58 | } 59 | } 60 | }), 61 | initRightMenu: function(){ 62 | if(!navbar_initialized){ 63 | $off_canvas_sidebar = $('nav').find('.navbar-collapse').first().clone(true); 64 | 65 | $sidebar = $('.sidebar'); 66 | sidebar_bg_color = $sidebar.data('background-color'); 67 | sidebar_active_color = $sidebar.data('active-color'); 68 | 69 | $logo = $sidebar.find('.logo').first(); 70 | logo_content = $logo[0].outerHTML; 71 | 72 | ul_content = ''; 73 | 74 | // set the bg color and active color from the default sidebar to the off canvas sidebar; 75 | $off_canvas_sidebar.attr('data-background-color',sidebar_bg_color); 76 | $off_canvas_sidebar.attr('data-active-color',sidebar_active_color); 77 | 78 | $off_canvas_sidebar.addClass('off-canvas-sidebar'); 79 | 80 | //add the content from the regular header to the right menu 81 | $off_canvas_sidebar.children('ul').each(function(){ 82 | content_buff = $(this).html(); 83 | ul_content = ul_content + content_buff; 84 | }); 85 | 86 | // add the content from the sidebar to the right menu 87 | content_buff = $sidebar.find('.nav').html(); 88 | ul_content = ul_content + '
  • '+ content_buff; 89 | 90 | ul_content = ''; 91 | 92 | navbar_content = logo_content + ul_content; 93 | navbar_content = ''; 94 | 95 | $off_canvas_sidebar.html(navbar_content); 96 | 97 | $('body').append($off_canvas_sidebar); 98 | 99 | $toggle = $('.navbar-toggle'); 100 | 101 | $off_canvas_sidebar.find('a').removeClass('btn btn-round btn-default'); 102 | $off_canvas_sidebar.find('button').removeClass('btn-round btn-fill btn-info btn-primary btn-success btn-danger btn-warning btn-neutral'); 103 | $off_canvas_sidebar.find('button').addClass('btn-simple btn-block'); 104 | 105 | $toggle.click(function (){ 106 | if(pd.misc.navbar_menu_visible == 1) { 107 | $('html').removeClass('nav-open'); 108 | pd.misc.navbar_menu_visible = 0; 109 | $('#bodyClick').remove(); 110 | setTimeout(function(){ 111 | $toggle.removeClass('toggled'); 112 | }, 400); 113 | 114 | } else { 115 | setTimeout(function(){ 116 | $toggle.addClass('toggled'); 117 | }, 430); 118 | 119 | div = '
    '; 120 | $(div).appendTo("body").click(function() { 121 | $('html').removeClass('nav-open'); 122 | pd.misc.navbar_menu_visible = 0; 123 | $('#bodyClick').remove(); 124 | setTimeout(function(){ 125 | $toggle.removeClass('toggled'); 126 | }, 400); 127 | }); 128 | 129 | $('html').addClass('nav-open'); 130 | pd.misc.navbar_menu_visible = 1; 131 | 132 | } 133 | }); 134 | navbar_initialized = true; 135 | } 136 | 137 | } 138 | } 139 | 140 | 141 | // Returns a function, that, as long as it continues to be invoked, will not 142 | // be triggered. The function will be called after it stops being called for 143 | // N milliseconds. If `immediate` is passed, trigger the function on the 144 | // leading edge, instead of the trailing. 145 | 146 | function debounce(func, wait, immediate) { 147 | var timeout; 148 | return function() { 149 | var context = this, args = arguments; 150 | clearTimeout(timeout); 151 | timeout = setTimeout(function() { 152 | timeout = null; 153 | if (!immediate) func.apply(context, args); 154 | }, wait); 155 | if (immediate && !timeout) func.apply(context, args); 156 | }; 157 | }; 158 | -------------------------------------------------------------------------------- /templates/assets/js/paper-dashboard.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | ========================================================= 4 | * Paper Dashboard - v1.1.2 5 | ========================================================= 6 | 7 | * Product Page: http://www.creative-tim.com/product/paper-dashboard 8 | * Copyright 2017 Creative Tim (http://www.creative-tim.com) 9 | * Licensed under MIT (https://github.com/creativetimofficial/paper-dashboard/blob/master/LICENSE.md) 10 | 11 | ========================================================= 12 | 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | */ 16 | 17 | 18 | var fixedTop = false; 19 | var transparent = true; 20 | var navbar_initialized = false; 21 | 22 | $(document).ready(function(){ 23 | window_width = $(window).width(); 24 | 25 | // Init navigation toggle for small screens 26 | if(window_width <= 991){ 27 | pd.initRightMenu(); 28 | } 29 | 30 | // Activate the tooltips 31 | $('[rel="tooltip"]').tooltip(); 32 | 33 | }); 34 | 35 | // activate collapse right menu when the windows is resized 36 | $(window).resize(function(){ 37 | if($(window).width() <= 991){ 38 | pd.initRightMenu(); 39 | } 40 | }); 41 | 42 | pd = { 43 | misc:{ 44 | navbar_menu_visible: 0 45 | }, 46 | checkScrollForTransparentNavbar: debounce(function() { 47 | if($(document).scrollTop() > 381 ) { 48 | if(transparent) { 49 | transparent = false; 50 | $('.navbar-color-on-scroll').removeClass('navbar-transparent'); 51 | $('.navbar-title').removeClass('hidden'); 52 | } 53 | } else { 54 | if( !transparent ) { 55 | transparent = true; 56 | $('.navbar-color-on-scroll').addClass('navbar-transparent'); 57 | $('.navbar-title').addClass('hidden'); 58 | } 59 | } 60 | }), 61 | initRightMenu: function(){ 62 | if(!navbar_initialized){ 63 | $off_canvas_sidebar = $('nav').find('.navbar-collapse').first().clone(true); 64 | 65 | $sidebar = $('.sidebar'); 66 | sidebar_bg_color = $sidebar.data('background-color'); 67 | sidebar_active_color = $sidebar.data('active-color'); 68 | 69 | $logo = $sidebar.find('.logo').first(); 70 | logo_content = $logo[0].outerHTML; 71 | 72 | ul_content = ''; 73 | 74 | // set the bg color and active color from the default sidebar to the off canvas sidebar; 75 | $off_canvas_sidebar.attr('data-background-color',sidebar_bg_color); 76 | $off_canvas_sidebar.attr('data-active-color',sidebar_active_color); 77 | 78 | $off_canvas_sidebar.addClass('off-canvas-sidebar'); 79 | 80 | //add the content from the regular header to the right menu 81 | $off_canvas_sidebar.children('ul').each(function(){ 82 | content_buff = $(this).html(); 83 | ul_content = ul_content + content_buff; 84 | }); 85 | 86 | // add the content from the sidebar to the right menu 87 | content_buff = $sidebar.find('.nav').html(); 88 | ul_content = ul_content + '
  • '+ content_buff; 89 | 90 | ul_content = ''; 91 | 92 | navbar_content = logo_content + ul_content; 93 | navbar_content = ''; 94 | 95 | $off_canvas_sidebar.html(navbar_content); 96 | 97 | $('body').append($off_canvas_sidebar); 98 | 99 | $toggle = $('.navbar-toggle'); 100 | 101 | $off_canvas_sidebar.find('a').removeClass('btn btn-round btn-default'); 102 | $off_canvas_sidebar.find('button').removeClass('btn-round btn-fill btn-info btn-primary btn-success btn-danger btn-warning btn-neutral'); 103 | $off_canvas_sidebar.find('button').addClass('btn-simple btn-block'); 104 | 105 | $toggle.click(function (){ 106 | if(pd.misc.navbar_menu_visible == 1) { 107 | $('html').removeClass('nav-open'); 108 | pd.misc.navbar_menu_visible = 0; 109 | $('#bodyClick').remove(); 110 | setTimeout(function(){ 111 | $toggle.removeClass('toggled'); 112 | }, 400); 113 | 114 | } else { 115 | setTimeout(function(){ 116 | $toggle.addClass('toggled'); 117 | }, 430); 118 | 119 | div = '
    '; 120 | $(div).appendTo("body").click(function() { 121 | $('html').removeClass('nav-open'); 122 | pd.misc.navbar_menu_visible = 0; 123 | $('#bodyClick').remove(); 124 | setTimeout(function(){ 125 | $toggle.removeClass('toggled'); 126 | }, 400); 127 | }); 128 | 129 | $('html').addClass('nav-open'); 130 | pd.misc.navbar_menu_visible = 1; 131 | 132 | } 133 | }); 134 | navbar_initialized = true; 135 | } 136 | 137 | } 138 | } 139 | 140 | 141 | // Returns a function, that, as long as it continues to be invoked, will not 142 | // be triggered. The function will be called after it stops being called for 143 | // N milliseconds. If `immediate` is passed, trigger the function on the 144 | // leading edge, instead of the trailing. 145 | 146 | function debounce(func, wait, immediate) { 147 | var timeout; 148 | return function() { 149 | var context = this, args = arguments; 150 | clearTimeout(timeout); 151 | timeout = setTimeout(function() { 152 | timeout = null; 153 | if (!immediate) func.apply(context, args); 154 | }, wait); 155 | if (immediate && !timeout) func.apply(context, args); 156 | }; 157 | }; 158 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_navbars.scss: -------------------------------------------------------------------------------- 1 | .nav { 2 | > li{ 3 | > a:hover, 4 | > a:focus{ 5 | background-color: transparent; 6 | } 7 | } 8 | } 9 | .navbar{ 10 | border: $none; 11 | border-radius: 0; 12 | font-size: $font-size-navbar; 13 | z-index: 3; 14 | 15 | .navbar-brand{ 16 | font-weight: $font-weight-bold; 17 | margin: $navbar-margin-brand; 18 | padding: $navbar-padding-brand; 19 | font-size: $font-size-large-navbar; 20 | } 21 | .navbar-nav{ 22 | > li > a { 23 | line-height: 1.42857; 24 | margin: $navbar-margin-a; 25 | padding: $navbar-padding-a; 26 | 27 | i, 28 | p{ 29 | display: inline-block; 30 | margin: 0; 31 | } 32 | i{ 33 | position: relative; 34 | top: 1px; 35 | } 36 | } 37 | > li > a.btn{ 38 | margin: $navbar-margin-a-btn; 39 | padding: $padding-base-vertical $padding-base-horizontal; 40 | } 41 | } 42 | .btn{ 43 | margin: $navbar-margin-btn; 44 | font-size: $font-size-base; 45 | } 46 | .btn-simple{ 47 | font-size: $font-size-medium; 48 | } 49 | } 50 | 51 | .navbar-nav > li > .dropdown-menu{ 52 | border-radius: $border-radius-extreme; 53 | margin-top: -5px; 54 | } 55 | 56 | .navbar-default { 57 | background-color: $bg-nude; 58 | border-bottom: 1px solid $medium-gray; 59 | 60 | .brand{ 61 | color: $font-color !important; 62 | } 63 | .navbar-nav{ 64 | > li > a:not(.btn){ 65 | color: $dark-gray; 66 | } 67 | 68 | > .active > a, 69 | > .active > a:not(.btn):hover, 70 | > .active > a:not(.btn):focus, 71 | > li > a:not(.btn):hover, 72 | > li > a:not(.btn):focus { 73 | background-color: transparent; 74 | border-radius: 3px; 75 | color: $info-color; 76 | @include opacity(1); 77 | } 78 | 79 | > .dropdown > a:hover .caret, 80 | > .dropdown > a:focus .caret { 81 | border-bottom-color: $info-color; 82 | border-top-color: $info-color; 83 | 84 | } 85 | 86 | > .open > a, 87 | > .open > a:hover, 88 | > .open > a:focus{ 89 | background-color: transparent; 90 | color: $info-color; 91 | } 92 | 93 | .navbar-toggle:hover,.navbar-toggle:focus { 94 | background-color: transparent; 95 | } 96 | 97 | } 98 | 99 | &:not(.navbar-transparent) .btn-default:hover{ 100 | color: $info-color; 101 | border-color: $info-color; 102 | } 103 | &:not(.navbar-transparent) .btn-neutral, 104 | &:not(.navbar-transparent) .btn-neutral:hover, 105 | &:not(.navbar-transparent) .btn-neutral:active{ 106 | color: $dark-gray; 107 | } 108 | } 109 | 110 | .navbar-form{ 111 | @include box-shadow(none); 112 | .form-control{ 113 | @include light-form(); 114 | height: 22px; 115 | font-size: $font-size-navbar; 116 | line-height: $line-height-general; 117 | color: $light-gray; 118 | } 119 | .navbar-transparent & .form-control, 120 | [class*="navbar-ct"] & .form-control{ 121 | color: $white-color; 122 | border: $none; 123 | border-bottom: 1px solid rgba($white-color,.6); 124 | } 125 | 126 | } 127 | 128 | .navbar-ct-primary{ 129 | @include navbar-color($bg-primary); 130 | } 131 | .navbar-ct-info{ 132 | @include navbar-color($bg-info); 133 | } 134 | .navbar-ct-success{ 135 | @include navbar-color($bg-success); 136 | } 137 | .navbar-ct-warning{ 138 | @include navbar-color($bg-warning); 139 | } 140 | .navbar-ct-danger{ 141 | @include navbar-color($bg-danger); 142 | } 143 | 144 | .navbar-transparent{ 145 | padding-top: 15px; 146 | background-color: transparent; 147 | border-bottom: 1px solid transparent; 148 | } 149 | 150 | .navbar-toggle{ 151 | margin-top: 19px; 152 | margin-bottom: 19px; 153 | border: $none; 154 | 155 | .icon-bar { 156 | background-color: $white-color; 157 | } 158 | .navbar-collapse, 159 | .navbar-form { 160 | border-color: transparent; 161 | } 162 | 163 | &.navbar-default .navbar-toggle:hover, 164 | &.navbar-default .navbar-toggle:focus { 165 | background-color: transparent; 166 | } 167 | } 168 | 169 | .navbar-transparent, [class*="navbar-ct"]{ 170 | 171 | .navbar-brand{ 172 | 173 | @include opacity(.9); 174 | 175 | &:focus, 176 | 177 | &:hover{ 178 | 179 | background-color: transparent; 180 | 181 | @include opacity(1); 182 | 183 | } 184 | 185 | } 186 | 187 | .navbar-brand:not([class*="text"]){ 188 | 189 | color: $white-color; 190 | 191 | } 192 | 193 | .navbar-nav{ 194 | 195 | > li > a:not(.btn){ 196 | 197 | color: $white-color; 198 | 199 | border-color: $white-color; 200 | 201 | @include opacity(0.8); 202 | 203 | } 204 | 205 | > .active > a:not(.btn), 206 | 207 | > .active > a:hover:not(.btn), 208 | 209 | > .active > a:focus:not(.btn), 210 | 211 | > li > a:hover:not(.btn), 212 | 213 | > li > a:focus:not(.btn){ 214 | 215 | background-color: transparent; 216 | 217 | border-radius: 3px; 218 | 219 | color: $white-color; 220 | 221 | @include opacity(1); 222 | 223 | } 224 | 225 | .nav > li > a.btn:hover{ 226 | 227 | background-color: transparent; 228 | 229 | } 230 | 231 | > .dropdown > a .caret, 232 | 233 | > .dropdown > a:hover .caret, 234 | 235 | > .dropdown > a:focus .caret{ 236 | 237 | border-bottom-color: $white-color; 238 | 239 | border-top-color: $white-color; 240 | 241 | } 242 | 243 | > .open > a, 244 | 245 | > .open > a:hover, 246 | 247 | > .open > a:focus { 248 | 249 | background-color: transparent; 250 | 251 | color: $white-color; 252 | 253 | @include opacity(1); 254 | 255 | } 256 | 257 | } 258 | 259 | .btn-default{ 260 | 261 | color: $white-color; 262 | 263 | border-color: $white-color; 264 | 265 | } 266 | 267 | .btn-default.btn-fill{ 268 | 269 | color: $dark-gray; 270 | 271 | background-color: $white-color; 272 | 273 | @include opacity(.9); 274 | 275 | } 276 | 277 | .btn-default.btn-fill:hover, 278 | 279 | .btn-default.btn-fill:focus, 280 | 281 | .btn-default.btn-fill:active, 282 | 283 | .btn-default.btn-fill.active, 284 | 285 | .open .dropdown-toggle.btn-fill.btn-default{ 286 | 287 | border-color: $white-color; 288 | 289 | @include opacity(1); 290 | 291 | } 292 | 293 | } 294 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/_navbars.scss: -------------------------------------------------------------------------------- 1 | .nav { 2 | > li{ 3 | > a:hover, 4 | > a:focus{ 5 | background-color: transparent; 6 | } 7 | } 8 | } 9 | .navbar{ 10 | border: $none; 11 | border-radius: 0; 12 | font-size: $font-size-navbar; 13 | z-index: 3; 14 | 15 | .navbar-brand{ 16 | font-weight: $font-weight-bold; 17 | margin: $navbar-margin-brand; 18 | padding: $navbar-padding-brand; 19 | font-size: $font-size-large-navbar; 20 | } 21 | .navbar-nav{ 22 | > li > a { 23 | line-height: 1.42857; 24 | margin: $navbar-margin-a; 25 | padding: $navbar-padding-a; 26 | 27 | i, 28 | p{ 29 | display: inline-block; 30 | margin: 0; 31 | } 32 | i{ 33 | position: relative; 34 | top: 1px; 35 | } 36 | } 37 | > li > a.btn{ 38 | margin: $navbar-margin-a-btn; 39 | padding: $padding-base-vertical $padding-base-horizontal; 40 | } 41 | } 42 | .btn{ 43 | margin: $navbar-margin-btn; 44 | font-size: $font-size-base; 45 | } 46 | .btn-simple{ 47 | font-size: $font-size-medium; 48 | } 49 | } 50 | 51 | .navbar-nav > li > .dropdown-menu{ 52 | border-radius: $border-radius-extreme; 53 | margin-top: -5px; 54 | } 55 | 56 | .navbar-default { 57 | background-color: $bg-nude; 58 | border-bottom: 1px solid $medium-gray; 59 | 60 | .brand{ 61 | color: $font-color !important; 62 | } 63 | .navbar-nav{ 64 | > li > a:not(.btn){ 65 | color: $dark-gray; 66 | } 67 | 68 | > .active > a, 69 | > .active > a:not(.btn):hover, 70 | > .active > a:not(.btn):focus, 71 | > li > a:not(.btn):hover, 72 | > li > a:not(.btn):focus { 73 | background-color: transparent; 74 | border-radius: 3px; 75 | color: $info-color; 76 | @include opacity(1); 77 | } 78 | 79 | > .dropdown > a:hover .caret, 80 | > .dropdown > a:focus .caret { 81 | border-bottom-color: $info-color; 82 | border-top-color: $info-color; 83 | 84 | } 85 | 86 | > .open > a, 87 | > .open > a:hover, 88 | > .open > a:focus{ 89 | background-color: transparent; 90 | color: $info-color; 91 | } 92 | 93 | .navbar-toggle:hover,.navbar-toggle:focus { 94 | background-color: transparent; 95 | } 96 | 97 | } 98 | 99 | &:not(.navbar-transparent) .btn-default:hover{ 100 | color: $info-color; 101 | border-color: $info-color; 102 | } 103 | &:not(.navbar-transparent) .btn-neutral, 104 | &:not(.navbar-transparent) .btn-neutral:hover, 105 | &:not(.navbar-transparent) .btn-neutral:active{ 106 | color: $dark-gray; 107 | } 108 | } 109 | 110 | .navbar-form{ 111 | @include box-shadow(none); 112 | .form-control{ 113 | @include light-form(); 114 | height: 22px; 115 | font-size: $font-size-navbar; 116 | line-height: $line-height-general; 117 | color: $light-gray; 118 | } 119 | .navbar-transparent & .form-control, 120 | [class*="navbar-ct"] & .form-control{ 121 | color: $white-color; 122 | border: $none; 123 | border-bottom: 1px solid rgba($white-color,.6); 124 | } 125 | 126 | } 127 | 128 | .navbar-ct-primary{ 129 | @include navbar-color($bg-primary); 130 | } 131 | .navbar-ct-info{ 132 | @include navbar-color($bg-info); 133 | } 134 | .navbar-ct-success{ 135 | @include navbar-color($bg-success); 136 | } 137 | .navbar-ct-warning{ 138 | @include navbar-color($bg-warning); 139 | } 140 | .navbar-ct-danger{ 141 | @include navbar-color($bg-danger); 142 | } 143 | 144 | .navbar-transparent{ 145 | padding-top: 15px; 146 | background-color: transparent; 147 | border-bottom: 1px solid transparent; 148 | } 149 | 150 | .navbar-toggle{ 151 | margin-top: 19px; 152 | margin-bottom: 19px; 153 | border: $none; 154 | 155 | .icon-bar { 156 | background-color: $white-color; 157 | } 158 | .navbar-collapse, 159 | .navbar-form { 160 | border-color: transparent; 161 | } 162 | 163 | &.navbar-default .navbar-toggle:hover, 164 | &.navbar-default .navbar-toggle:focus { 165 | background-color: transparent; 166 | } 167 | } 168 | 169 | .navbar-transparent, [class*="navbar-ct"]{ 170 | 171 | .navbar-brand{ 172 | 173 | @include opacity(.9); 174 | 175 | &:focus, 176 | 177 | &:hover{ 178 | 179 | background-color: transparent; 180 | 181 | @include opacity(1); 182 | 183 | } 184 | 185 | } 186 | 187 | .navbar-brand:not([class*="text"]){ 188 | 189 | color: $white-color; 190 | 191 | } 192 | 193 | .navbar-nav{ 194 | 195 | > li > a:not(.btn){ 196 | 197 | color: $white-color; 198 | 199 | border-color: $white-color; 200 | 201 | @include opacity(0.8); 202 | 203 | } 204 | 205 | > .active > a:not(.btn), 206 | 207 | > .active > a:hover:not(.btn), 208 | 209 | > .active > a:focus:not(.btn), 210 | 211 | > li > a:hover:not(.btn), 212 | 213 | > li > a:focus:not(.btn){ 214 | 215 | background-color: transparent; 216 | 217 | border-radius: 3px; 218 | 219 | color: $white-color; 220 | 221 | @include opacity(1); 222 | 223 | } 224 | 225 | .nav > li > a.btn:hover{ 226 | 227 | background-color: transparent; 228 | 229 | } 230 | 231 | > .dropdown > a .caret, 232 | 233 | > .dropdown > a:hover .caret, 234 | 235 | > .dropdown > a:focus .caret{ 236 | 237 | border-bottom-color: $white-color; 238 | 239 | border-top-color: $white-color; 240 | 241 | } 242 | 243 | > .open > a, 244 | 245 | > .open > a:hover, 246 | 247 | > .open > a:focus { 248 | 249 | background-color: transparent; 250 | 251 | color: $white-color; 252 | 253 | @include opacity(1); 254 | 255 | } 256 | 257 | } 258 | 259 | .btn-default{ 260 | 261 | color: $white-color; 262 | 263 | border-color: $white-color; 264 | 265 | } 266 | 267 | .btn-default.btn-fill{ 268 | 269 | color: $dark-gray; 270 | 271 | background-color: $white-color; 272 | 273 | @include opacity(.9); 274 | 275 | } 276 | 277 | .btn-default.btn-fill:hover, 278 | 279 | .btn-default.btn-fill:focus, 280 | 281 | .btn-default.btn-fill:active, 282 | 283 | .btn-default.btn-fill.active, 284 | 285 | .open .dropdown-toggle.btn-fill.btn-default{ 286 | 287 | border-color: $white-color; 288 | 289 | @include opacity(1); 290 | 291 | } 292 | 293 | } 294 | -------------------------------------------------------------------------------- /static/assets/sass/paper/mixins/_vendor-prefixes.scss: -------------------------------------------------------------------------------- 1 | // User select 2 | // For selecting text on the page 3 | 4 | @mixin user-select($select) { 5 | -webkit-user-select: $select; 6 | -moz-user-select: $select; 7 | -ms-user-select: $select; // IE10+ 8 | user-select: $select; 9 | } 10 | 11 | @mixin box-shadow($shadow...) { 12 | -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1 13 | box-shadow: $shadow; 14 | } 15 | 16 | // Box sizing 17 | @mixin box-sizing($boxmodel) { 18 | -webkit-box-sizing: $boxmodel; 19 | -moz-box-sizing: $boxmodel; 20 | box-sizing: $boxmodel; 21 | } 22 | 23 | 24 | @mixin transition($time, $type){ 25 | -webkit-transition: all $time $type; 26 | -moz-transition: all $time $type; 27 | -o-transition: all $time $type; 28 | -ms-transition: all $time $type; 29 | transition: all $time $type; 30 | } 31 | 32 | @mixin transition-none(){ 33 | -webkit-transition: none; 34 | -moz-transition: none; 35 | -o-transition: none; 36 | -ms-transition: none; 37 | transition: none; 38 | } 39 | 40 | @mixin transform-scale($value){ 41 | -webkit-transform: scale($value); 42 | -moz-transform: scale($value); 43 | -o-transform: scale($value); 44 | -ms-transform: scale($value); 45 | transform: scale($value); 46 | } 47 | 48 | @mixin transform-translate-x($value){ 49 | -webkit-transform: translate3d($value, 0, 0); 50 | -moz-transform: translate3d($value, 0, 0); 51 | -o-transform: translate3d($value, 0, 0); 52 | -ms-transform: translate3d($value, 0, 0); 53 | transform: translate3d($value, 0, 0); 54 | } 55 | 56 | @mixin transform-origin($coordinates){ 57 | -webkit-transform-origin: $coordinates; 58 | -moz-transform-origin: $coordinates; 59 | -o-transform-origin: $coordinates; 60 | -ms-transform-origin: $coordinates; 61 | transform-origin: $coordinates; 62 | } 63 | 64 | @mixin icon-gradient ($top-color, $bottom-color){ 65 | background: $top-color; 66 | background: -moz-linear-gradient(top, $top-color 0%, $bottom-color 100%); 67 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$top-color), color-stop(100%,$bottom-color)); 68 | background: -webkit-linear-gradient(top, $top-color 0%,$bottom-color 100%); 69 | background: -o-linear-gradient(top, $top-color 0%,$bottom-color 100%); 70 | background: -ms-linear-gradient(top, $top-color 0%,$bottom-color 100%); 71 | background: linear-gradient(to bottom, $top-color 0%,$bottom-color 100%); 72 | background-size: 150% 150%; 73 | } 74 | 75 | @mixin radial-gradient($extern-color, $center-color){ 76 | background: $extern-color; 77 | background: -moz-radial-gradient(center, ellipse cover, $center-color 0%, $extern-color 100%); /* FF3.6+ */ 78 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,$center-color), color-stop(100%,$extern-color)); /* Chrome,Safari4+ */ 79 | background: -webkit-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Chrome10+,Safari5.1+ */ 80 | background: -o-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Opera 12+ */ 81 | background: -ms-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* IE10+ */ 82 | background: radial-gradient(ellipse at center, $center-color 0%,$extern-color 100%); /* W3C */ 83 | background-size: 550% 450%; 84 | } 85 | 86 | @mixin vertical-align { 87 | position: relative; 88 | top: 50%; 89 | -webkit-transform: translateY(-50%); 90 | -ms-transform: translateY(-50%); 91 | transform: translateY(-50%); 92 | } 93 | 94 | @mixin rotate-180(){ 95 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 96 | -webkit-transform: rotate(180deg); 97 | -ms-transform: rotate(180deg); 98 | transform: rotate(180deg); 99 | } 100 | 101 | @mixin bar-animation($type){ 102 | -webkit-animation: $type 500ms linear 0s; 103 | -moz-animation: $type 500ms linear 0s; 104 | animation: $type 500ms 0s; 105 | -webkit-animation-fill-mode: forwards; 106 | -moz-animation-fill-mode: forwards; 107 | animation-fill-mode: forwards; 108 | } 109 | 110 | @mixin topbar-x-rotation(){ 111 | @keyframes topbar-x { 112 | 0% {top: 0px; transform: rotate(0deg); } 113 | 45% {top: 6px; transform: rotate(145deg); } 114 | 75% {transform: rotate(130deg); } 115 | 100% {transform: rotate(135deg); } 116 | } 117 | @-webkit-keyframes topbar-x { 118 | 0% {top: 0px; -webkit-transform: rotate(0deg); } 119 | 45% {top: 6px; -webkit-transform: rotate(145deg); } 120 | 75% {-webkit-transform: rotate(130deg); } 121 | 100% { -webkit-transform: rotate(135deg); } 122 | } 123 | @-moz-keyframes topbar-x { 124 | 0% {top: 0px; -moz-transform: rotate(0deg); } 125 | 45% {top: 6px; -moz-transform: rotate(145deg); } 126 | 75% {-moz-transform: rotate(130deg); } 127 | 100% { -moz-transform: rotate(135deg); } 128 | } 129 | } 130 | 131 | @mixin topbar-back-rotation(){ 132 | @keyframes topbar-back { 133 | 0% { top: 6px; transform: rotate(135deg); } 134 | 45% { transform: rotate(-10deg); } 135 | 75% { transform: rotate(5deg); } 136 | 100% { top: 0px; transform: rotate(0); } 137 | } 138 | 139 | @-webkit-keyframes topbar-back { 140 | 0% { top: 6px; -webkit-transform: rotate(135deg); } 141 | 45% { -webkit-transform: rotate(-10deg); } 142 | 75% { -webkit-transform: rotate(5deg); } 143 | 100% { top: 0px; -webkit-transform: rotate(0); } 144 | } 145 | 146 | @-moz-keyframes topbar-back { 147 | 0% { top: 6px; -moz-transform: rotate(135deg); } 148 | 45% { -moz-transform: rotate(-10deg); } 149 | 75% { -moz-transform: rotate(5deg); } 150 | 100% { top: 0px; -moz-transform: rotate(0); } 151 | } 152 | } 153 | 154 | @mixin bottombar-x-rotation(){ 155 | @keyframes bottombar-x { 156 | 0% {bottom: 0px; transform: rotate(0deg);} 157 | 45% {bottom: 6px; transform: rotate(-145deg);} 158 | 75% {transform: rotate(-130deg);} 159 | 100% {transform: rotate(-135deg);} 160 | } 161 | @-webkit-keyframes bottombar-x { 162 | 0% {bottom: 0px; -webkit-transform: rotate(0deg);} 163 | 45% {bottom: 6px; -webkit-transform: rotate(-145deg);} 164 | 75% {-webkit-transform: rotate(-130deg);} 165 | 100% {-webkit-transform: rotate(-135deg);} 166 | } 167 | @-moz-keyframes bottombar-x { 168 | 0% {bottom: 0px; -moz-transform: rotate(0deg);} 169 | 45% {bottom: 6px; -moz-transform: rotate(-145deg);} 170 | 75% {-moz-transform: rotate(-130deg);} 171 | 100% {-moz-transform: rotate(-135deg);} 172 | } 173 | } 174 | 175 | @mixin bottombar-back-rotation{ 176 | @keyframes bottombar-back { 177 | 0% { bottom: 6px;transform: rotate(-135deg);} 178 | 45% { transform: rotate(10deg);} 179 | 75% { transform: rotate(-5deg);} 180 | 100% { bottom: 0px;transform: rotate(0);} 181 | } 182 | @-webkit-keyframes bottombar-back { 183 | 0% {bottom: 6px;-webkit-transform: rotate(-135deg);} 184 | 45% {-webkit-transform: rotate(10deg);} 185 | 75% {-webkit-transform: rotate(-5deg);} 186 | 100% {bottom: 0px;-webkit-transform: rotate(0);} 187 | } 188 | @-moz-keyframes bottombar-back { 189 | 0% {bottom: 6px;-moz-transform: rotate(-135deg);} 190 | 45% {-moz-transform: rotate(10deg);} 191 | 75% {-moz-transform: rotate(-5deg);} 192 | 100% {bottom: 0px;-moz-transform: rotate(0);} 193 | } 194 | 195 | } 196 | 197 | 198 | -------------------------------------------------------------------------------- /templates/assets/sass/paper/mixins/_vendor-prefixes.scss: -------------------------------------------------------------------------------- 1 | // User select 2 | // For selecting text on the page 3 | 4 | @mixin user-select($select) { 5 | -webkit-user-select: $select; 6 | -moz-user-select: $select; 7 | -ms-user-select: $select; // IE10+ 8 | user-select: $select; 9 | } 10 | 11 | @mixin box-shadow($shadow...) { 12 | -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1 13 | box-shadow: $shadow; 14 | } 15 | 16 | // Box sizing 17 | @mixin box-sizing($boxmodel) { 18 | -webkit-box-sizing: $boxmodel; 19 | -moz-box-sizing: $boxmodel; 20 | box-sizing: $boxmodel; 21 | } 22 | 23 | 24 | @mixin transition($time, $type){ 25 | -webkit-transition: all $time $type; 26 | -moz-transition: all $time $type; 27 | -o-transition: all $time $type; 28 | -ms-transition: all $time $type; 29 | transition: all $time $type; 30 | } 31 | 32 | @mixin transition-none(){ 33 | -webkit-transition: none; 34 | -moz-transition: none; 35 | -o-transition: none; 36 | -ms-transition: none; 37 | transition: none; 38 | } 39 | 40 | @mixin transform-scale($value){ 41 | -webkit-transform: scale($value); 42 | -moz-transform: scale($value); 43 | -o-transform: scale($value); 44 | -ms-transform: scale($value); 45 | transform: scale($value); 46 | } 47 | 48 | @mixin transform-translate-x($value){ 49 | -webkit-transform: translate3d($value, 0, 0); 50 | -moz-transform: translate3d($value, 0, 0); 51 | -o-transform: translate3d($value, 0, 0); 52 | -ms-transform: translate3d($value, 0, 0); 53 | transform: translate3d($value, 0, 0); 54 | } 55 | 56 | @mixin transform-origin($coordinates){ 57 | -webkit-transform-origin: $coordinates; 58 | -moz-transform-origin: $coordinates; 59 | -o-transform-origin: $coordinates; 60 | -ms-transform-origin: $coordinates; 61 | transform-origin: $coordinates; 62 | } 63 | 64 | @mixin icon-gradient ($top-color, $bottom-color){ 65 | background: $top-color; 66 | background: -moz-linear-gradient(top, $top-color 0%, $bottom-color 100%); 67 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$top-color), color-stop(100%,$bottom-color)); 68 | background: -webkit-linear-gradient(top, $top-color 0%,$bottom-color 100%); 69 | background: -o-linear-gradient(top, $top-color 0%,$bottom-color 100%); 70 | background: -ms-linear-gradient(top, $top-color 0%,$bottom-color 100%); 71 | background: linear-gradient(to bottom, $top-color 0%,$bottom-color 100%); 72 | background-size: 150% 150%; 73 | } 74 | 75 | @mixin radial-gradient($extern-color, $center-color){ 76 | background: $extern-color; 77 | background: -moz-radial-gradient(center, ellipse cover, $center-color 0%, $extern-color 100%); /* FF3.6+ */ 78 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,$center-color), color-stop(100%,$extern-color)); /* Chrome,Safari4+ */ 79 | background: -webkit-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Chrome10+,Safari5.1+ */ 80 | background: -o-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Opera 12+ */ 81 | background: -ms-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* IE10+ */ 82 | background: radial-gradient(ellipse at center, $center-color 0%,$extern-color 100%); /* W3C */ 83 | background-size: 550% 450%; 84 | } 85 | 86 | @mixin vertical-align { 87 | position: relative; 88 | top: 50%; 89 | -webkit-transform: translateY(-50%); 90 | -ms-transform: translateY(-50%); 91 | transform: translateY(-50%); 92 | } 93 | 94 | @mixin rotate-180(){ 95 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 96 | -webkit-transform: rotate(180deg); 97 | -ms-transform: rotate(180deg); 98 | transform: rotate(180deg); 99 | } 100 | 101 | @mixin bar-animation($type){ 102 | -webkit-animation: $type 500ms linear 0s; 103 | -moz-animation: $type 500ms linear 0s; 104 | animation: $type 500ms 0s; 105 | -webkit-animation-fill-mode: forwards; 106 | -moz-animation-fill-mode: forwards; 107 | animation-fill-mode: forwards; 108 | } 109 | 110 | @mixin topbar-x-rotation(){ 111 | @keyframes topbar-x { 112 | 0% {top: 0px; transform: rotate(0deg); } 113 | 45% {top: 6px; transform: rotate(145deg); } 114 | 75% {transform: rotate(130deg); } 115 | 100% {transform: rotate(135deg); } 116 | } 117 | @-webkit-keyframes topbar-x { 118 | 0% {top: 0px; -webkit-transform: rotate(0deg); } 119 | 45% {top: 6px; -webkit-transform: rotate(145deg); } 120 | 75% {-webkit-transform: rotate(130deg); } 121 | 100% { -webkit-transform: rotate(135deg); } 122 | } 123 | @-moz-keyframes topbar-x { 124 | 0% {top: 0px; -moz-transform: rotate(0deg); } 125 | 45% {top: 6px; -moz-transform: rotate(145deg); } 126 | 75% {-moz-transform: rotate(130deg); } 127 | 100% { -moz-transform: rotate(135deg); } 128 | } 129 | } 130 | 131 | @mixin topbar-back-rotation(){ 132 | @keyframes topbar-back { 133 | 0% { top: 6px; transform: rotate(135deg); } 134 | 45% { transform: rotate(-10deg); } 135 | 75% { transform: rotate(5deg); } 136 | 100% { top: 0px; transform: rotate(0); } 137 | } 138 | 139 | @-webkit-keyframes topbar-back { 140 | 0% { top: 6px; -webkit-transform: rotate(135deg); } 141 | 45% { -webkit-transform: rotate(-10deg); } 142 | 75% { -webkit-transform: rotate(5deg); } 143 | 100% { top: 0px; -webkit-transform: rotate(0); } 144 | } 145 | 146 | @-moz-keyframes topbar-back { 147 | 0% { top: 6px; -moz-transform: rotate(135deg); } 148 | 45% { -moz-transform: rotate(-10deg); } 149 | 75% { -moz-transform: rotate(5deg); } 150 | 100% { top: 0px; -moz-transform: rotate(0); } 151 | } 152 | } 153 | 154 | @mixin bottombar-x-rotation(){ 155 | @keyframes bottombar-x { 156 | 0% {bottom: 0px; transform: rotate(0deg);} 157 | 45% {bottom: 6px; transform: rotate(-145deg);} 158 | 75% {transform: rotate(-130deg);} 159 | 100% {transform: rotate(-135deg);} 160 | } 161 | @-webkit-keyframes bottombar-x { 162 | 0% {bottom: 0px; -webkit-transform: rotate(0deg);} 163 | 45% {bottom: 6px; -webkit-transform: rotate(-145deg);} 164 | 75% {-webkit-transform: rotate(-130deg);} 165 | 100% {-webkit-transform: rotate(-135deg);} 166 | } 167 | @-moz-keyframes bottombar-x { 168 | 0% {bottom: 0px; -moz-transform: rotate(0deg);} 169 | 45% {bottom: 6px; -moz-transform: rotate(-145deg);} 170 | 75% {-moz-transform: rotate(-130deg);} 171 | 100% {-moz-transform: rotate(-135deg);} 172 | } 173 | } 174 | 175 | @mixin bottombar-back-rotation{ 176 | @keyframes bottombar-back { 177 | 0% { bottom: 6px;transform: rotate(-135deg);} 178 | 45% { transform: rotate(10deg);} 179 | 75% { transform: rotate(-5deg);} 180 | 100% { bottom: 0px;transform: rotate(0);} 181 | } 182 | @-webkit-keyframes bottombar-back { 183 | 0% {bottom: 6px;-webkit-transform: rotate(-135deg);} 184 | 45% {-webkit-transform: rotate(10deg);} 185 | 75% {-webkit-transform: rotate(-5deg);} 186 | 100% {bottom: 0px;-webkit-transform: rotate(0);} 187 | } 188 | @-moz-keyframes bottombar-back { 189 | 0% {bottom: 6px;-moz-transform: rotate(-135deg);} 190 | 45% {-moz-transform: rotate(10deg);} 191 | 75% {-moz-transform: rotate(-5deg);} 192 | 100% {bottom: 0px;-moz-transform: rotate(0);} 193 | } 194 | 195 | } 196 | 197 | 198 | -------------------------------------------------------------------------------- /templates/typography.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Paper Dashboard by Creative Tim 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
    36 | 84 | 85 |
    86 | 103 |
    104 |
    105 |
    106 |
    107 |
    108 |
    109 |

    全部任务

    110 |

    All tasks

    111 |
    112 |
    113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | {{ message }} 125 | {% for task in tasks %} 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 136 | {% endfor %} 137 | 138 | 139 |
    ID任务名关键词页数时间间隔备注结束时间
    {{ task.id }}{{ task.task_name }}{{ task.word }}{{ task.num }}{{ task.time }}{{ task.marks }}{{ task.end_time }} 135 |
    140 | 141 |
    142 |
    143 |
    144 | 145 |
    146 |
    147 |
    148 | 149 |
    150 | 151 | 152 |
    153 | 154 | 155 | 156 | 157 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /static/assets/sass/paper/_chartist.scss: -------------------------------------------------------------------------------- 1 | @mixin ct-responsive-svg-container($width: 100%, $ratio: $ct-container-ratio) { 2 | display: block; 3 | position: relative; 4 | width: $width; 5 | 6 | &:before { 7 | display: block; 8 | float: left; 9 | content: ""; 10 | width: 0; 11 | height: 0; 12 | padding-bottom: $ratio * 100%; 13 | } 14 | 15 | &:after { 16 | content: ""; 17 | display: table; 18 | clear: both; 19 | } 20 | 21 | > svg { 22 | display: block; 23 | position: absolute; 24 | top: 0; 25 | left: 0; 26 | } 27 | } 28 | 29 | @mixin ct-align-justify($ct-text-align: $ct-text-align, $ct-text-justify: $ct-text-justify) { 30 | -webkit-box-align: $ct-text-align; 31 | -webkit-align-items: $ct-text-align; 32 | -ms-flex-align: $ct-text-align; 33 | align-items: $ct-text-align; 34 | -webkit-box-pack: $ct-text-justify; 35 | -webkit-justify-content: $ct-text-justify; 36 | -ms-flex-pack: $ct-text-justify; 37 | justify-content: $ct-text-justify; 38 | // Fallback to text-align for non-flex browsers 39 | @if($ct-text-justify == 'flex-start') { 40 | text-align: left; 41 | } @else if ($ct-text-justify == 'flex-end') { 42 | text-align: right; 43 | } @else { 44 | text-align: center; 45 | } 46 | } 47 | 48 | @mixin ct-flex() { 49 | // Fallback to block 50 | display: block; 51 | display: -webkit-box; 52 | display: -moz-box; 53 | display: -ms-flexbox; 54 | display: -webkit-flex; 55 | display: flex; 56 | } 57 | 58 | @mixin ct-chart-label($ct-text-color: $ct-text-color, $ct-text-size: $ct-text-size, $ct-text-line-height: $ct-text-line-height) { 59 | fill: $ct-text-color; 60 | color: $ct-text-color; 61 | font-size: $ct-text-size; 62 | line-height: $ct-text-line-height; 63 | } 64 | 65 | @mixin ct-chart-grid($ct-grid-color: $ct-grid-color, $ct-grid-width: $ct-grid-width, $ct-grid-dasharray: $ct-grid-dasharray) { 66 | stroke: $ct-grid-color; 67 | stroke-width: $ct-grid-width; 68 | 69 | @if ($ct-grid-dasharray) { 70 | stroke-dasharray: $ct-grid-dasharray; 71 | } 72 | } 73 | 74 | @mixin ct-chart-point($ct-point-size: $ct-point-size, $ct-point-shape: $ct-point-shape) { 75 | stroke-width: $ct-point-size; 76 | stroke-linecap: $ct-point-shape; 77 | } 78 | 79 | @mixin ct-chart-line($ct-line-width: $ct-line-width, $ct-line-dasharray: $ct-line-dasharray) { 80 | fill: none; 81 | stroke-width: $ct-line-width; 82 | 83 | @if ($ct-line-dasharray) { 84 | stroke-dasharray: $ct-line-dasharray; 85 | } 86 | } 87 | 88 | @mixin ct-chart-area($ct-area-opacity: $ct-area-opacity) { 89 | stroke: none; 90 | fill-opacity: $ct-area-opacity; 91 | } 92 | 93 | @mixin ct-chart-bar($ct-bar-width: $ct-bar-width) { 94 | fill: none; 95 | stroke-width: $ct-bar-width; 96 | } 97 | 98 | @mixin ct-chart-donut($ct-donut-width: $ct-donut-width) { 99 | fill: none; 100 | stroke-width: $ct-donut-width; 101 | } 102 | 103 | @mixin ct-chart-series-color($color) { 104 | .#{$ct-class-point}, .#{$ct-class-line}, .#{$ct-class-bar}, .#{$ct-class-slice-donut} { 105 | stroke: $color; 106 | } 107 | 108 | .#{$ct-class-slice-pie}, .#{$ct-class-area} { 109 | fill: $color; 110 | } 111 | } 112 | 113 | @mixin ct-chart($ct-container-ratio: $ct-container-ratio, $ct-text-color: $ct-text-color, $ct-text-size: $ct-text-size, $ct-grid-color: $ct-grid-color, $ct-grid-width: $ct-grid-width, $ct-grid-dasharray: $ct-grid-dasharray, $ct-point-size: $ct-point-size, $ct-point-shape: $ct-point-shape, $ct-line-width: $ct-line-width, $ct-bar-width: $ct-bar-width, $ct-donut-width: $ct-donut-width, $ct-series-names: $ct-series-names, $ct-series-colors: $ct-series-colors) { 114 | 115 | .#{$ct-class-label} { 116 | @include ct-chart-label($ct-text-color, $ct-text-size); 117 | } 118 | 119 | .#{$ct-class-chart-line} .#{$ct-class-label}, 120 | .#{$ct-class-chart-bar} .#{$ct-class-label} { 121 | @include ct-flex(); 122 | } 123 | 124 | .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 125 | @include ct-align-justify(flex-end, flex-start); 126 | // Fallback for browsers that don't support foreignObjects 127 | text-anchor: start; 128 | } 129 | 130 | .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 131 | @include ct-align-justify(flex-start, flex-start); 132 | // Fallback for browsers that don't support foreignObjects 133 | text-anchor: start; 134 | } 135 | 136 | .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} { 137 | @include ct-align-justify(flex-end, flex-end); 138 | // Fallback for browsers that don't support foreignObjects 139 | text-anchor: end; 140 | } 141 | 142 | .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} { 143 | @include ct-align-justify(flex-end, flex-start); 144 | // Fallback for browsers that don't support foreignObjects 145 | text-anchor: start; 146 | } 147 | 148 | .#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 149 | @include ct-align-justify(flex-end, center); 150 | // Fallback for browsers that don't support foreignObjects 151 | text-anchor: start; 152 | } 153 | 154 | .#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 155 | @include ct-align-justify(flex-start, center); 156 | // Fallback for browsers that don't support foreignObjects 157 | text-anchor: start; 158 | } 159 | 160 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 161 | @include ct-align-justify(flex-end, flex-start); 162 | // Fallback for browsers that don't support foreignObjects 163 | text-anchor: start; 164 | } 165 | 166 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 167 | @include ct-align-justify(flex-start, flex-start); 168 | // Fallback for browsers that don't support foreignObjects 169 | text-anchor: start; 170 | } 171 | 172 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} { 173 | //@include ct-chart-label($ct-text-color, $ct-text-size, center, $ct-vertical-text-justify); 174 | @include ct-align-justify(center, flex-end); 175 | // Fallback for browsers that don't support foreignObjects 176 | text-anchor: end; 177 | } 178 | 179 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} { 180 | @include ct-align-justify(center, flex-start); 181 | // Fallback for browsers that don't support foreignObjects 182 | text-anchor: end; 183 | } 184 | 185 | .#{$ct-class-grid} { 186 | @include ct-chart-grid($ct-grid-color, $ct-grid-width, $ct-grid-dasharray); 187 | } 188 | 189 | .#{$ct-class-point} { 190 | @include ct-chart-point($ct-point-size, $ct-point-shape); 191 | } 192 | 193 | .#{$ct-class-line} { 194 | @include ct-chart-line($ct-line-width); 195 | } 196 | 197 | .#{$ct-class-area} { 198 | @include ct-chart-area(); 199 | } 200 | 201 | .#{$ct-class-bar} { 202 | @include ct-chart-bar($ct-bar-width); 203 | } 204 | 205 | .#{$ct-class-slice-donut} { 206 | @include ct-chart-donut($ct-donut-width); 207 | } 208 | 209 | @if $ct-include-colored-series { 210 | @for $i from 0 to length($ct-series-names) { 211 | .#{$ct-class-series}-#{nth($ct-series-names, $i + 1)} { 212 | $color: nth($ct-series-colors, $i + 1); 213 | 214 | @include ct-chart-series-color($color); 215 | } 216 | } 217 | } 218 | } 219 | 220 | @if $ct-include-classes { 221 | @include ct-chart(); 222 | 223 | @if $ct-include-alternative-responsive-containers { 224 | @for $i from 0 to length($ct-scales-names) { 225 | .#{nth($ct-scales-names, $i + 1)} { 226 | @include ct-responsive-svg-container($ratio: nth($ct-scales, $i + 1)); 227 | } 228 | } 229 | } 230 | } -------------------------------------------------------------------------------- /templates/assets/sass/paper/_chartist.scss: -------------------------------------------------------------------------------- 1 | @mixin ct-responsive-svg-container($width: 100%, $ratio: $ct-container-ratio) { 2 | display: block; 3 | position: relative; 4 | width: $width; 5 | 6 | &:before { 7 | display: block; 8 | float: left; 9 | content: ""; 10 | width: 0; 11 | height: 0; 12 | padding-bottom: $ratio * 100%; 13 | } 14 | 15 | &:after { 16 | content: ""; 17 | display: table; 18 | clear: both; 19 | } 20 | 21 | > svg { 22 | display: block; 23 | position: absolute; 24 | top: 0; 25 | left: 0; 26 | } 27 | } 28 | 29 | @mixin ct-align-justify($ct-text-align: $ct-text-align, $ct-text-justify: $ct-text-justify) { 30 | -webkit-box-align: $ct-text-align; 31 | -webkit-align-items: $ct-text-align; 32 | -ms-flex-align: $ct-text-align; 33 | align-items: $ct-text-align; 34 | -webkit-box-pack: $ct-text-justify; 35 | -webkit-justify-content: $ct-text-justify; 36 | -ms-flex-pack: $ct-text-justify; 37 | justify-content: $ct-text-justify; 38 | // Fallback to text-align for non-flex browsers 39 | @if($ct-text-justify == 'flex-start') { 40 | text-align: left; 41 | } @else if ($ct-text-justify == 'flex-end') { 42 | text-align: right; 43 | } @else { 44 | text-align: center; 45 | } 46 | } 47 | 48 | @mixin ct-flex() { 49 | // Fallback to block 50 | display: block; 51 | display: -webkit-box; 52 | display: -moz-box; 53 | display: -ms-flexbox; 54 | display: -webkit-flex; 55 | display: flex; 56 | } 57 | 58 | @mixin ct-chart-label($ct-text-color: $ct-text-color, $ct-text-size: $ct-text-size, $ct-text-line-height: $ct-text-line-height) { 59 | fill: $ct-text-color; 60 | color: $ct-text-color; 61 | font-size: $ct-text-size; 62 | line-height: $ct-text-line-height; 63 | } 64 | 65 | @mixin ct-chart-grid($ct-grid-color: $ct-grid-color, $ct-grid-width: $ct-grid-width, $ct-grid-dasharray: $ct-grid-dasharray) { 66 | stroke: $ct-grid-color; 67 | stroke-width: $ct-grid-width; 68 | 69 | @if ($ct-grid-dasharray) { 70 | stroke-dasharray: $ct-grid-dasharray; 71 | } 72 | } 73 | 74 | @mixin ct-chart-point($ct-point-size: $ct-point-size, $ct-point-shape: $ct-point-shape) { 75 | stroke-width: $ct-point-size; 76 | stroke-linecap: $ct-point-shape; 77 | } 78 | 79 | @mixin ct-chart-line($ct-line-width: $ct-line-width, $ct-line-dasharray: $ct-line-dasharray) { 80 | fill: none; 81 | stroke-width: $ct-line-width; 82 | 83 | @if ($ct-line-dasharray) { 84 | stroke-dasharray: $ct-line-dasharray; 85 | } 86 | } 87 | 88 | @mixin ct-chart-area($ct-area-opacity: $ct-area-opacity) { 89 | stroke: none; 90 | fill-opacity: $ct-area-opacity; 91 | } 92 | 93 | @mixin ct-chart-bar($ct-bar-width: $ct-bar-width) { 94 | fill: none; 95 | stroke-width: $ct-bar-width; 96 | } 97 | 98 | @mixin ct-chart-donut($ct-donut-width: $ct-donut-width) { 99 | fill: none; 100 | stroke-width: $ct-donut-width; 101 | } 102 | 103 | @mixin ct-chart-series-color($color) { 104 | .#{$ct-class-point}, .#{$ct-class-line}, .#{$ct-class-bar}, .#{$ct-class-slice-donut} { 105 | stroke: $color; 106 | } 107 | 108 | .#{$ct-class-slice-pie}, .#{$ct-class-area} { 109 | fill: $color; 110 | } 111 | } 112 | 113 | @mixin ct-chart($ct-container-ratio: $ct-container-ratio, $ct-text-color: $ct-text-color, $ct-text-size: $ct-text-size, $ct-grid-color: $ct-grid-color, $ct-grid-width: $ct-grid-width, $ct-grid-dasharray: $ct-grid-dasharray, $ct-point-size: $ct-point-size, $ct-point-shape: $ct-point-shape, $ct-line-width: $ct-line-width, $ct-bar-width: $ct-bar-width, $ct-donut-width: $ct-donut-width, $ct-series-names: $ct-series-names, $ct-series-colors: $ct-series-colors) { 114 | 115 | .#{$ct-class-label} { 116 | @include ct-chart-label($ct-text-color, $ct-text-size); 117 | } 118 | 119 | .#{$ct-class-chart-line} .#{$ct-class-label}, 120 | .#{$ct-class-chart-bar} .#{$ct-class-label} { 121 | @include ct-flex(); 122 | } 123 | 124 | .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 125 | @include ct-align-justify(flex-end, flex-start); 126 | // Fallback for browsers that don't support foreignObjects 127 | text-anchor: start; 128 | } 129 | 130 | .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 131 | @include ct-align-justify(flex-start, flex-start); 132 | // Fallback for browsers that don't support foreignObjects 133 | text-anchor: start; 134 | } 135 | 136 | .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} { 137 | @include ct-align-justify(flex-end, flex-end); 138 | // Fallback for browsers that don't support foreignObjects 139 | text-anchor: end; 140 | } 141 | 142 | .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} { 143 | @include ct-align-justify(flex-end, flex-start); 144 | // Fallback for browsers that don't support foreignObjects 145 | text-anchor: start; 146 | } 147 | 148 | .#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 149 | @include ct-align-justify(flex-end, center); 150 | // Fallback for browsers that don't support foreignObjects 151 | text-anchor: start; 152 | } 153 | 154 | .#{$ct-class-chart-bar} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 155 | @include ct-align-justify(flex-start, center); 156 | // Fallback for browsers that don't support foreignObjects 157 | text-anchor: start; 158 | } 159 | 160 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-start} { 161 | @include ct-align-justify(flex-end, flex-start); 162 | // Fallback for browsers that don't support foreignObjects 163 | text-anchor: start; 164 | } 165 | 166 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-horizontal}.#{$ct-class-end} { 167 | @include ct-align-justify(flex-start, flex-start); 168 | // Fallback for browsers that don't support foreignObjects 169 | text-anchor: start; 170 | } 171 | 172 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-start} { 173 | //@include ct-chart-label($ct-text-color, $ct-text-size, center, $ct-vertical-text-justify); 174 | @include ct-align-justify(center, flex-end); 175 | // Fallback for browsers that don't support foreignObjects 176 | text-anchor: end; 177 | } 178 | 179 | .#{$ct-class-chart-bar}.#{$ct-class-horizontal-bars} .#{$ct-class-label}.#{$ct-class-vertical}.#{$ct-class-end} { 180 | @include ct-align-justify(center, flex-start); 181 | // Fallback for browsers that don't support foreignObjects 182 | text-anchor: end; 183 | } 184 | 185 | .#{$ct-class-grid} { 186 | @include ct-chart-grid($ct-grid-color, $ct-grid-width, $ct-grid-dasharray); 187 | } 188 | 189 | .#{$ct-class-point} { 190 | @include ct-chart-point($ct-point-size, $ct-point-shape); 191 | } 192 | 193 | .#{$ct-class-line} { 194 | @include ct-chart-line($ct-line-width); 195 | } 196 | 197 | .#{$ct-class-area} { 198 | @include ct-chart-area(); 199 | } 200 | 201 | .#{$ct-class-bar} { 202 | @include ct-chart-bar($ct-bar-width); 203 | } 204 | 205 | .#{$ct-class-slice-donut} { 206 | @include ct-chart-donut($ct-donut-width); 207 | } 208 | 209 | @if $ct-include-colored-series { 210 | @for $i from 0 to length($ct-series-names) { 211 | .#{$ct-class-series}-#{nth($ct-series-names, $i + 1)} { 212 | $color: nth($ct-series-colors, $i + 1); 213 | 214 | @include ct-chart-series-color($color); 215 | } 216 | } 217 | } 218 | } 219 | 220 | @if $ct-include-classes { 221 | @include ct-chart(); 222 | 223 | @if $ct-include-alternative-responsive-containers { 224 | @for $i from 0 to length($ct-scales-names) { 225 | .#{nth($ct-scales-names, $i + 1)} { 226 | @include ct-responsive-svg-container($ratio: nth($ct-scales, $i + 1)); 227 | } 228 | } 229 | } 230 | } -------------------------------------------------------------------------------- /templates/table.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 未处理详情 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
    36 | 84 | 85 |
    86 | 103 | 104 | 105 |
    106 |
    107 |
    108 |
    109 |
    110 |
    111 |

    GitHub泄露

    112 |

    Information leakage

    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | {% for task in tasks %} 124 | 125 | 126 | 127 | 128 | 129 | 131 | {% endfor %} 132 | 133 | 134 |
    ID仓库名文件名更新时间
    {{ task.id }}{{ task.name }}{{ task.time }} 130 |
    135 | 136 |
    137 |
    138 |
    139 | 140 |
    141 |
    142 |
    143 | 144 | 145 |
    146 |
    147 | 148 | 149 | 150 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | --------------------------------------------------------------------------------