Compare commits
No commits in common. "main" and "develop" have entirely different histories.
4
.gitignore
vendored
@ -160,3 +160,7 @@ cython_debug/
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# 项目
|
||||
SinkDark/static/
|
||||
SinkDark/*/migrations/
|
||||
SinkDark/media/
|
||||
|
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
10
.idea/SinkDark.iml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/SinkDark/static/ckeditor/ckeditor/plugins/codesnippet/lib" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.11" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
12
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E501" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
7
.idea/misc.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
|
||||
<component name="PyCharmProfessionalAdvertiser">
|
||||
<option name="shown" value="true" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/SinkDark.iml" filepath="$PROJECT_DIR$/.idea/SinkDark.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# 使用官方 Python 基础镜像
|
||||
FROM python:3.11-slim-buster
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 将项目文件复制到容器中
|
||||
COPY. /app
|
||||
|
||||
# 安装项目依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 设置环境变量
|
||||
ENV DJANGO_SETTINGS_MODULE=your_project_name.settings
|
||||
|
||||
# 暴露容器端口
|
||||
EXPOSE 8000
|
||||
|
||||
# 运行 Django 项目
|
||||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 CrossDark
|
||||
Copyright (c) 2024 crossdark
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
4
SinkDark/SinkDark/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
import pymysql
|
||||
|
||||
|
||||
pymysql.install_as_MySQLdb()
|
9
SinkDark/SinkDark/asgi.py
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MyDjango.settings')
|
||||
|
||||
application = get_asgi_application()
|
66
SinkDark/SinkDark/myadmin.py
Normal file
@ -0,0 +1,66 @@
|
||||
from django.contrib import admin
|
||||
from functools import update_wrapper
|
||||
from django.views.generic import RedirectView
|
||||
from django.urls import reverse
|
||||
from django.views.decorators.cache import never_cache
|
||||
from django.views.decorators.csrf import csrf_protect
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.urls import include, path, re_path
|
||||
from django.contrib.contenttypes import views as contenttype_views
|
||||
from django.contrib.auth.views import redirect_to_login
|
||||
|
||||
|
||||
class MyAdminSite(admin.AdminSite):
|
||||
def admin_view(self, view, cacheable=False):
|
||||
def inner(request, *args, **kwargs):
|
||||
if not self.has_permission(request):
|
||||
if request.path == reverse('admin:logout', current_app=self.name):
|
||||
index_path = reverse('admin:index', current_app=self.name)
|
||||
return HttpResponseRedirect(index_path)
|
||||
return redirect_to_login(
|
||||
request.get_full_path(),
|
||||
'/user/login.html'
|
||||
)
|
||||
return view(request, *args, **kwargs)
|
||||
if not cacheable:
|
||||
inner = never_cache(inner)
|
||||
if not getattr(view, 'csrf_exempt', False):
|
||||
inner = csrf_protect(inner)
|
||||
return update_wrapper(inner, view)
|
||||
|
||||
def get_urls(self):
|
||||
def wrap(view, cacheable=False):
|
||||
def wrapper(*args, **kwargs):
|
||||
return self.admin_view(view, cacheable)(*args, **kwargs)
|
||||
wrapper.admin_site = self
|
||||
return update_wrapper(wrapper, view)
|
||||
urlpatterns = [
|
||||
path('', wrap(self.index), name='index'),
|
||||
path('login/', RedirectView.as_view(url='/user/login.html')),
|
||||
path('logout/', wrap(self.logout), name='logout'),
|
||||
path('password_change/', wrap(self.password_change, cacheable=True), name='password_change'),
|
||||
path(
|
||||
'password_change/done/',
|
||||
wrap(self.password_change_done, cacheable=True),
|
||||
name='password_change_done',
|
||||
),
|
||||
path('jsi18n/', wrap(self.i18n_javascript, cacheable=True), name='jsi18n'),
|
||||
path(
|
||||
'r/<int:content_type_id>/<path:object_id>/',
|
||||
wrap(contenttype_views.shortcut),
|
||||
name='view_on_site',
|
||||
),
|
||||
]
|
||||
valid_app_labels = []
|
||||
for model, model_admin in self._registry.items():
|
||||
urlpatterns += [
|
||||
path('%s/%s/' % (model._meta.app_label, model._meta.model_name), include(model_admin.urls)),
|
||||
]
|
||||
if model._meta.app_label not in valid_app_labels:
|
||||
valid_app_labels.append(model._meta.app_label)
|
||||
if valid_app_labels:
|
||||
regex = r'^(?P<app_label>' + '|'.join(valid_app_labels) + ')/$'
|
||||
urlpatterns += [
|
||||
re_path(regex, wrap(self.app_index), name='app_list'),
|
||||
]
|
||||
return urlpatterns
|
3
SinkDark/SinkDark/myapps.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib.admin.apps import AdminConfig
|
||||
class MyAdminConfig(AdminConfig):
|
||||
default_site = 'SinkDark.myadmin.MyAdminSite'
|
127
SinkDark/SinkDark/settings.py
Normal file
@ -0,0 +1,127 @@
|
||||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = '+f%vbh_8b+(*kp=clju)691popu%a*#60ik99n4(n2ex9g$)_a'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['crossdark.com']
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
# 'django.contrib.admin',
|
||||
'SinkDark.myapps.MyAdminConfig',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'article',
|
||||
'album',
|
||||
'account',
|
||||
'interflow',
|
||||
'ckeditor',
|
||||
'ckeditor_uploader',
|
||||
'mdeditor',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
# 使用中文
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'SinkDark.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'SinkDark.wsgi.application'
|
||||
|
||||
"""DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'test',
|
||||
'USER': 'crossdark',
|
||||
'PASSWORD': 'Clever-3366',
|
||||
'HOST': 'crossdark.net',
|
||||
'PORT': '3306',
|
||||
},
|
||||
}"""
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
# 配置自定义用户模型MyUser
|
||||
AUTH_USER_MODEL = 'account.MyUser'
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATICFILES_DIRS = [BASE_DIR / 'publicStatic']
|
||||
STATIC_ROOT = BASE_DIR / 'static'
|
||||
|
||||
# 设置媒体资源的保存路径
|
||||
MEDIA_URL = "/media/"
|
||||
MEDIA_ROOT = BASE_DIR / "media"
|
||||
# 编辑器的配置信息
|
||||
CKEDITOR_UPLOAD_PATH = "article_images"
|
||||
CKEDITOR_CONFIGS = {
|
||||
'default': {
|
||||
'toolbar': 'Full'
|
||||
}
|
||||
}
|
||||
CKEDITOR_ALLOW_NONIMAGE_FILES = False
|
||||
CKEDITOR_BROWSE_SHOW_DIRS = True
|
20
SinkDark/SinkDark/urls.py
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include, re_path
|
||||
from django.views.static import serve
|
||||
from django.conf import settings
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('user/', include('account.urls')),
|
||||
path('', include('article.urls')),
|
||||
path('album/', include('album.urls')),
|
||||
path('board/', include('interflow.urls')),
|
||||
re_path('media/(?P<path>.*)', serve, {'document_root': settings.MEDIA_ROOT}, name='media'),
|
||||
re_path('static/(?P<path>.*)', serve, {'document_root': settings.STATIC_ROOT}, name='static'),
|
||||
# 设置编辑器的路由信息
|
||||
path('ckeditor/', include('ckeditor_uploader.urls')),
|
||||
path('mdeditor/', include('mdeditor.urls'))
|
||||
]
|
||||
|
9
SinkDark/SinkDark/wsgi.py
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SinkDark.settings')
|
||||
|
||||
application = get_wsgi_application()
|
14
SinkDark/account/__init__.py
Normal file
@ -0,0 +1,14 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
# 修改app在admin后台显示名称
|
||||
# default_app_config的值来自apps.py的类名
|
||||
default_app_config = 'account.IndexConfig'
|
||||
|
||||
# 获取当前app的命名
|
||||
def get_current_app_name(_file):
|
||||
return os.path.split(os.path.dirname(_file))[-1]
|
||||
|
||||
# 重写类IndexConfig
|
||||
class IndexConfig(AppConfig):
|
||||
name = get_current_app_name(__file__)
|
||||
verbose_name = '用户管理'
|
24
SinkDark/account/admin.py
Normal file
@ -0,0 +1,24 @@
|
||||
from django.contrib import admin
|
||||
from .models import MyUser
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
@admin.register(MyUser)
|
||||
class MyUserAdmin(UserAdmin):
|
||||
list_display = ['username', 'email',
|
||||
'name', 'introduce',
|
||||
'company', 'profession',
|
||||
'address', 'telephone',
|
||||
'wx', 'qq', 'wb', 'photo']
|
||||
fieldsets = list(UserAdmin.fieldsets)
|
||||
fieldsets[1] = (_('Personal info'),
|
||||
{'fields': ('name', 'introduce',
|
||||
'email', 'company',
|
||||
'profession', 'address',
|
||||
'telephone', 'wx',
|
||||
'qq', 'wb', 'photo')})
|
||||
|
||||
def get_queryset(self, request):
|
||||
qs = super(MyUserAdmin, self).get_queryset(request)
|
||||
return qs.filter(id=request.user.id)
|
6
SinkDark/account/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AccountConfig(AppConfig):
|
||||
name = 'account'
|
||||
|
54
SinkDark/account/migrations/0001_initial.py
Normal file
@ -0,0 +1,54 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-17 09:19
|
||||
|
||||
import django.contrib.auth.models
|
||||
import django.contrib.auth.validators
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='MyUser',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
|
||||
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
|
||||
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
|
||||
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
|
||||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
||||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
||||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
||||
('name', models.CharField(default='匿名用户', max_length=50, verbose_name='姓名')),
|
||||
('introduce', models.TextField(default='暂无介绍', verbose_name='简介')),
|
||||
('company', models.CharField(default='暂无信息', max_length=100, verbose_name='公司')),
|
||||
('profession', models.CharField(default='暂无信息', max_length=100, verbose_name='职业')),
|
||||
('address', models.CharField(default='暂无信息', max_length=100, verbose_name='住址')),
|
||||
('telephone', models.CharField(default='暂无信息', max_length=11, verbose_name='电话')),
|
||||
('wx', models.CharField(default='暂无信息', max_length=50, verbose_name='微信')),
|
||||
('qq', models.CharField(default='暂无信息', max_length=50, verbose_name='QQ')),
|
||||
('wb', models.CharField(default='暂无信息', max_length=100, verbose_name='微博')),
|
||||
('photo', models.ImageField(blank=True, upload_to='images/user/', verbose_name='头像')),
|
||||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
|
||||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'user',
|
||||
'verbose_name_plural': 'users',
|
||||
'abstract': False,
|
||||
},
|
||||
managers=[
|
||||
('objects', django.contrib.auth.models.UserManager()),
|
||||
],
|
||||
),
|
||||
]
|
0
SinkDark/account/migrations/__init__.py
Normal file
19
SinkDark/account/models.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
||||
|
||||
class MyUser(AbstractUser):
|
||||
name = models.CharField('姓名', max_length=50, default='匿名用户')
|
||||
introduce = models.TextField('简介', default='暂无介绍')
|
||||
company = models.CharField('公司', max_length=100, default='暂无信息')
|
||||
profession = models.CharField('职业', max_length=100, default='暂无信息')
|
||||
address = models.CharField('住址', max_length=100, default='暂无信息')
|
||||
telephone = models.CharField('电话', max_length=11, default='暂无信息')
|
||||
wx = models.CharField('微信', max_length=50, default='暂无信息')
|
||||
qq = models.CharField('QQ', max_length=50, default='暂无信息')
|
||||
wb = models.CharField('微博', max_length=100, default='暂无信息')
|
||||
photo = models.ImageField('头像', blank=True, upload_to='images/user/')
|
||||
|
||||
# 设置返回值
|
||||
def __str__(self):
|
||||
return self.name
|
3
SinkDark/account/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
11
SinkDark/account/urls.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
urlpatterns = [
|
||||
# 用户注册
|
||||
path('register.html', register, name='register'),
|
||||
# 用户登录
|
||||
path('login.html', userLogin, name='userLogin'),
|
||||
# 关于我
|
||||
path('about/<int:id>.html', about, name='about'),
|
||||
]
|
69
SinkDark/account/views.py
Normal file
@ -0,0 +1,69 @@
|
||||
from django.shortcuts import render, redirect
|
||||
from .models import MyUser
|
||||
from django.contrib.auth import login
|
||||
from django.contrib.auth import logout
|
||||
from django.contrib.auth import authenticate
|
||||
from django.urls import reverse
|
||||
from album.models import AlbumInfo
|
||||
from article.models import ArticleTag
|
||||
|
||||
def register(request):
|
||||
title = '注册博客'
|
||||
pageTitle = '用户注册'
|
||||
confirmPassword = True
|
||||
button = '注册'
|
||||
urlText = '用户登录'
|
||||
urlName = 'userLogin'
|
||||
if request.method == 'POST':
|
||||
u = request.POST.get('username', '')
|
||||
p = request.POST.get('password', '')
|
||||
cp = request.POST.get('cp', '')
|
||||
if MyUser.objects.filter(username=u):
|
||||
tips = '用户已存在'
|
||||
elif cp != p:
|
||||
tips = '两次密码输入不一致'
|
||||
else:
|
||||
d = {
|
||||
'username': u, 'password': p,
|
||||
'is_superuser': 1, 'is_staff': 1
|
||||
}
|
||||
user = MyUser.objects.create_user(**d)
|
||||
user.save()
|
||||
tips = '注册成功,请登录'
|
||||
logout(request)
|
||||
return redirect(reverse('userLogin'))
|
||||
return render(request, 'user.html', locals())
|
||||
|
||||
|
||||
def userLogin(request):
|
||||
title = '登录博客'
|
||||
pageTitle = '用户登录'
|
||||
button = '登录'
|
||||
urlText = '用户注册'
|
||||
urlName = 'register'
|
||||
if request.method == 'POST':
|
||||
u = request.POST.get('username', '')
|
||||
p = request.POST.get('password', '')
|
||||
if MyUser.objects.filter(username=u):
|
||||
user = authenticate(username=u, password=p)
|
||||
if user:
|
||||
if user.is_active:
|
||||
login(request, user)
|
||||
kwargs = {'id': request.user.id, 'page': 1}
|
||||
return redirect(reverse('article', kwargs=kwargs))
|
||||
else:
|
||||
tips = '账号密码错误,请重新输入'
|
||||
else:
|
||||
tips = '用户不存在,请注册'
|
||||
else:
|
||||
if request.user.username:
|
||||
kwargs = {'id': request.user.id, 'page': 1}
|
||||
return redirect(reverse('article', kwargs=kwargs))
|
||||
return render(request, 'user.html', locals())
|
||||
|
||||
|
||||
def about(request, id):
|
||||
album = AlbumInfo.objects.filter(user_id=id)
|
||||
tag = ArticleTag.objects.filter(user_id=id)
|
||||
user = MyUser.objects.filter(id=id).first()
|
||||
return render(request, 'about.html', locals())
|
14
SinkDark/album/__init__.py
Normal file
@ -0,0 +1,14 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
# 修改app在admin后台显示名称
|
||||
# default_app_config的值来自apps.py的类名
|
||||
default_app_config = 'album.IndexConfig'
|
||||
|
||||
# 获取当前app的命名
|
||||
def get_current_app_name(_file):
|
||||
return os.path.split(os.path.dirname(_file))[-1]
|
||||
|
||||
# 重写类IndexConfig
|
||||
class IndexConfig(AppConfig):
|
||||
name = get_current_app_name(__file__)
|
||||
verbose_name = '我的图片墙'
|
20
SinkDark/album/admin.py
Normal file
@ -0,0 +1,20 @@
|
||||
from django.contrib import admin
|
||||
from .models import AlbumInfo
|
||||
from account.models import MyUser
|
||||
|
||||
|
||||
@admin.register(AlbumInfo)
|
||||
class AlbumInfoAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'user', 'title', 'introduce', 'photo']
|
||||
|
||||
# 根据当前用户名设置数据访问权限
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(user_id=request.user.id)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'user':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = MyUser.objects.filter(id=id)
|
||||
return super().formfield_for_foreignkey(db_field, request, **kwargs)
|
6
SinkDark/album/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AlbumConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'album'
|
31
SinkDark/album/migrations/0001_initial.py
Normal file
@ -0,0 +1,31 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-17 09:19
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AlbumInfo',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('title', models.CharField(blank=True, max_length=50, verbose_name='标题')),
|
||||
('introduce', models.CharField(blank=True, max_length=200, verbose_name='描述')),
|
||||
('photo', models.ImageField(blank=True, upload_to='images/album/', verbose_name='图片')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '图片墙管理',
|
||||
'verbose_name_plural': '图片墙管理',
|
||||
},
|
||||
),
|
||||
]
|
0
SinkDark/album/migrations/__init__.py
Normal file
17
SinkDark/album/models.py
Normal file
@ -0,0 +1,17 @@
|
||||
from django.db import models
|
||||
from account.models import MyUser
|
||||
|
||||
|
||||
class AlbumInfo(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
user = models.ForeignKey(MyUser, on_delete=models.CASCADE, verbose_name='用户')
|
||||
title = models.CharField('标题', max_length=50, blank=True)
|
||||
introduce = models.CharField('描述', max_length=200, blank=True)
|
||||
photo = models.ImageField('图片', blank=True, upload_to='images/album/')
|
||||
|
||||
def __str__(self):
|
||||
return str(self.id)
|
||||
|
||||
class Meta:
|
||||
verbose_name = '图片墙管理'
|
||||
verbose_name_plural = '图片墙管理'
|
3
SinkDark/album/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
7
SinkDark/album/urls.py
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
urlpatterns = [
|
||||
# 图片墙
|
||||
path('<int:id>/<int:page>.html', album, name='album'),
|
||||
]
|
19
SinkDark/album/views.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django.shortcuts import render
|
||||
from django.core.paginator import Paginator
|
||||
from django.core.paginator import PageNotAnInteger
|
||||
from django.core.paginator import EmptyPage
|
||||
from .models import AlbumInfo
|
||||
|
||||
|
||||
def album(request, id, page):
|
||||
albumList = AlbumInfo.objects.filter(user_id=id).order_by('id')
|
||||
paginator = Paginator(albumList, 8)
|
||||
try:
|
||||
pageInfo = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
# 如果参数page 的数据类型不是整型,就返回第一页数据
|
||||
pageInfo = paginator.page(1)
|
||||
except EmptyPage:
|
||||
# 若用户访问的页数大于实际页数,则返回最后一页的数据
|
||||
pageInfo = paginator.page(paginator.num_pages)
|
||||
return render(request, 'album.html', locals())
|
17
SinkDark/article/__init__.py
Normal file
@ -0,0 +1,17 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
|
||||
# 修改app在admin后台显示名称
|
||||
# default_app_config的值来自apps.py的类名
|
||||
default_app_config = 'article.IndexConfig'
|
||||
|
||||
|
||||
# 获取当前app的命名
|
||||
def get_current_app_name(_file):
|
||||
return os.path.split(os.path.dirname(_file))[-1]
|
||||
|
||||
|
||||
# 重写类IndexConfig
|
||||
class IndexConfig(AppConfig):
|
||||
name = get_current_app_name(__file__)
|
||||
verbose_name = '博客管理'
|
65
SinkDark/article/admin.py
Normal file
@ -0,0 +1,65 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
|
||||
admin.site.site_title = '博客管理后台'
|
||||
admin.site.site_header = '博客管理'
|
||||
|
||||
# admin.site.register(ArticleInfo) # 将文章模型注册到admin后台的mdeditor
|
||||
|
||||
|
||||
@admin.register(ArticleTag)
|
||||
class ArticleTagAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'tag', 'user']
|
||||
|
||||
# 根据当前用户名设置数据访问权限
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(user_id=request.user.id)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'user':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = MyUser.objects.filter(id=id)
|
||||
return super().formfield_for_foreignkey(db_field, request, **kwargs)
|
||||
|
||||
|
||||
@admin.register(ArticleInfo)
|
||||
class ArticleInfoAdmin(admin.ModelAdmin):
|
||||
list_display = ['author', 'title', 'content', 'articlephoto', 'created', 'updated']
|
||||
|
||||
# 根据当前用户名设置数据访问权限
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(author_id=request.user.id)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'article_tag':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = ArticleTag.objects.filter(user_id=id)
|
||||
return super().formfield_for_manytomany(db_field, request, **kwargs)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'author':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = MyUser.objects.filter(id=id)
|
||||
return super().formfield_for_foreignkey(db_field, request, **kwargs)
|
||||
|
||||
|
||||
@admin.register(Comment)
|
||||
class CommentAdmin(admin.ModelAdmin):
|
||||
list_display = ['article', 'commentator', 'content', 'created']
|
||||
|
||||
# 根据当前用户名设置数据访问权限
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(article__author__id=request.user.id)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'article':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = Comment.objects.filter(article__author__id=id)
|
||||
return super().formfield_for_foreignkey(db_field, request, **kwargs)
|
6
SinkDark/article/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ArticleConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'article'
|
64
SinkDark/article/migrations/0001_initial.py
Normal file
@ -0,0 +1,64 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-17 09:19
|
||||
|
||||
import ckeditor_uploader.fields
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ArticleTag',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('tag', models.CharField(max_length=500, verbose_name='标签')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '博文分类',
|
||||
'verbose_name_plural': '博文分类',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ArticleInfo',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=200, verbose_name='标题')),
|
||||
('content', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='内容')),
|
||||
('articlephoto', models.ImageField(blank=True, upload_to='images/article/', verbose_name='文章图片')),
|
||||
('reading', models.IntegerField(default=0, verbose_name='阅读量')),
|
||||
('liking', models.IntegerField(default=0, verbose_name='点赞量')),
|
||||
('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
|
||||
('updated', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
|
||||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
|
||||
('article_tag', models.ManyToManyField(blank=True, to='article.articletag', verbose_name='文章标签')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '博文管理',
|
||||
'verbose_name_plural': '博文管理',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Comment',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('commentator', models.CharField(max_length=90, verbose_name='评论用户')),
|
||||
('content', models.TextField(verbose_name='评论内容')),
|
||||
('created', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
|
||||
('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='article.articleinfo', verbose_name='所属文章')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '评论管理',
|
||||
'verbose_name_plural': '评论管理',
|
||||
},
|
||||
),
|
||||
]
|
19
SinkDark/article/migrations/0002_articleinfo_rendered.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-20 12:22
|
||||
|
||||
import ckeditor_uploader.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('article', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='articleinfo',
|
||||
name='rendered',
|
||||
field=ckeditor_uploader.fields.RichTextUploadingField(default='<p>默认内容</p>', verbose_name='最终内容'),
|
||||
),
|
||||
]
|
0
SinkDark/article/migrations/__init__.py
Normal file
64
SinkDark/article/models.py
Normal file
@ -0,0 +1,64 @@
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from account.models import MyUser
|
||||
from ckeditor_uploader.fields import RichTextUploadingField
|
||||
from mdeditor.fields import MDTextField
|
||||
import CrossDown # md渲染
|
||||
|
||||
|
||||
class ArticleTag(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
tag = models.CharField('标签', max_length=500)
|
||||
user = models.ForeignKey(MyUser, on_delete=models.CASCADE, verbose_name='用户')
|
||||
|
||||
def __str__(self):
|
||||
return self.tag
|
||||
|
||||
class Meta:
|
||||
verbose_name = '博文分类'
|
||||
verbose_name_plural = '博文分类'
|
||||
|
||||
|
||||
class ArticleInfo(models.Model):
|
||||
author = models.ForeignKey(MyUser, on_delete=models.CASCADE, verbose_name='用户')
|
||||
title = models.CharField('标题', max_length=200)
|
||||
content = MDTextField(verbose_name='内容')
|
||||
rendered = RichTextUploadingField(verbose_name='最终内容', default='<p>默认内容</p>', editable=False)
|
||||
brief = RichTextUploadingField(verbose_name='简介', default='简介')
|
||||
articlephoto = models.ImageField('文章图片', blank=True, upload_to='images/article/')
|
||||
reading = models.IntegerField('阅读量', default=0)
|
||||
liking = models.IntegerField('点赞量', default=0)
|
||||
created = models.DateTimeField('创建时间', default=timezone.now)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
article_tag = models.ManyToManyField(ArticleTag, blank=True, verbose_name='文章标签')
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
# 在文章每次保存时运行
|
||||
self.rendered, meta = CrossDown.main(self.content) # 渲染md
|
||||
print(meta)
|
||||
if 'title' in meta: # 设置标题
|
||||
self.title = meta['title'][0]
|
||||
if 'summary' in meta: # 设置简介
|
||||
self.brief = meta['summary'][0]
|
||||
super().save(*args, **kwargs) # 保存
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
class Meta:
|
||||
verbose_name = '博文管理'
|
||||
verbose_name_plural = '博文管理'
|
||||
|
||||
|
||||
class Comment(models.Model):
|
||||
article = models.ForeignKey(ArticleInfo, on_delete=models.CASCADE, verbose_name='所属文章')
|
||||
commentator = models.CharField('评论用户', max_length=90)
|
||||
content = models.TextField('评论内容')
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.article.title
|
||||
|
||||
class Meta:
|
||||
verbose_name = '评论管理'
|
||||
verbose_name_plural = '评论管理'
|
0
SinkDark/article/signals.py
Normal file
3
SinkDark/article/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
13
SinkDark/article/urls.py
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
from django.urls import path
|
||||
from django.views.generic import RedirectView
|
||||
from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
# 首页地址自动跳转用户登录页面
|
||||
path('', RedirectView.as_view(url='user/login.html')),
|
||||
# 文章列表
|
||||
path('<int:id>/<int:page>.html', article, name='article'),
|
||||
# 文章正文内容
|
||||
path('detail/<int:id>/<int:aId>.html', detail, name='detail')
|
||||
]
|
53
SinkDark/article/views.py
Normal file
@ -0,0 +1,53 @@
|
||||
from django.shortcuts import render, redirect
|
||||
from account.models import MyUser
|
||||
from album.models import AlbumInfo
|
||||
from django.core.paginator import Paginator
|
||||
from django.core.paginator import PageNotAnInteger
|
||||
from django.core.paginator import EmptyPage
|
||||
from .models import ArticleInfo, ArticleTag, Comment
|
||||
from django.db.models import F
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
def article(request, id, page):
|
||||
album = AlbumInfo.objects.filter(user_id=id)
|
||||
tag = ArticleTag.objects.filter(user_id=id)
|
||||
user = MyUser.objects.filter(id=id).first()
|
||||
if not user:
|
||||
return redirect(reverse('register'))
|
||||
ats = ArticleInfo.objects.filter(author_id=id).order_by('-created')
|
||||
paginator = Paginator(ats, 10)
|
||||
try:
|
||||
pageInfo = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
# 如果参数page 的数据类型不是整型,就返回第一页数据
|
||||
pageInfo = paginator.page(1)
|
||||
except EmptyPage:
|
||||
# 若用户访问的页数大于实际页数,则返回最后一页的数据
|
||||
pageInfo = paginator.page(paginator.num_pages)
|
||||
return render(request, 'article.html', locals())
|
||||
|
||||
|
||||
def detail(request, id, aId):
|
||||
album = AlbumInfo.objects.filter(user_id=id)
|
||||
tag = ArticleTag.objects.filter(user_id=id)
|
||||
user = MyUser.objects.filter(id=id).first()
|
||||
if request.method == 'GET':
|
||||
ats = ArticleInfo.objects.filter(id=aId).first()
|
||||
atags = ArticleInfo.objects.get(id=aId).article_tag.all()
|
||||
cms = Comment.objects.filter(article_id=aId).order_by('-created')
|
||||
# 添加阅读量
|
||||
if not request.session.get('reading' + str(id) + str(aId), ''):
|
||||
reading = ArticleInfo.objects.filter(id=aId)
|
||||
reading.update(reading=F('reading') + 1)
|
||||
request.session['reading' + str(id) + str(aId)] = True
|
||||
return render(request, 'detail.html', locals())
|
||||
else:
|
||||
commentator = request.POST.get('name')
|
||||
email = request.POST.get('email')
|
||||
content = request.POST.get('content')
|
||||
value = {'commentator': commentator,
|
||||
'content': content, 'article_id': aId}
|
||||
Comment.objects.create(**value)
|
||||
kwargs = {'id': id, 'aId': aId}
|
||||
return redirect(reverse('detail', kwargs=kwargs))
|
14
SinkDark/interflow/__init__.py
Normal file
@ -0,0 +1,14 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
# 修改app在admin后台显示名称
|
||||
# default_app_config的值来自apps.py的类名
|
||||
default_app_config = 'interflow.IndexConfig'
|
||||
|
||||
# 获取当前app的命名
|
||||
def get_current_app_name(_file):
|
||||
return os.path.split(os.path.dirname(_file))[-1]
|
||||
|
||||
# 重写类IndexConfig
|
||||
class IndexConfig(AppConfig):
|
||||
name = get_current_app_name(__file__)
|
||||
verbose_name = '留言管理'
|
20
SinkDark/interflow/admin.py
Normal file
@ -0,0 +1,20 @@
|
||||
from django.contrib import admin
|
||||
from .models import Board
|
||||
from account.models import MyUser
|
||||
|
||||
|
||||
@admin.register(Board)
|
||||
class BoardAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'name', 'email', 'content', 'created', 'user']
|
||||
|
||||
# 根据当前用户名设置数据访问权限
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(user_id=request.user.id)
|
||||
|
||||
# 新增或修改数据时,设置外键可选值
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
if db_field.name == 'user':
|
||||
id = request.user.id
|
||||
kwargs["queryset"] = MyUser.objects.filter(id=id)
|
||||
return super().formfield_for_foreignkey(db_field, request, **kwargs)
|
6
SinkDark/interflow/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class InterflowConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'interflow'
|
33
SinkDark/interflow/migrations/0001_initial.py
Normal file
@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.1.1 on 2024-09-17 09:19
|
||||
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Board',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=50, verbose_name='留言用户')),
|
||||
('email', models.CharField(max_length=50, verbose_name='邮箱地址')),
|
||||
('content', models.CharField(max_length=500, verbose_name='留言内容')),
|
||||
('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '博客留言',
|
||||
'verbose_name_plural': '博客留言',
|
||||
},
|
||||
),
|
||||
]
|
0
SinkDark/interflow/migrations/__init__.py
Normal file
19
SinkDark/interflow/models.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django.db import models
|
||||
from account.models import MyUser
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
class Board(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField('留言用户', max_length=50)
|
||||
email = models.CharField('邮箱地址', max_length=50)
|
||||
content = models.CharField('留言内容', max_length=500)
|
||||
created = models.DateTimeField('创建时间', default=timezone.now)
|
||||
user = models.ForeignKey(MyUser, on_delete=models.CASCADE, verbose_name='用户')
|
||||
|
||||
def __str__(self):
|
||||
return self.email
|
||||
|
||||
class Meta:
|
||||
verbose_name = '博客留言'
|
||||
verbose_name_plural = '博客留言'
|
3
SinkDark/interflow/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
7
SinkDark/interflow/urls.py
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
urlpatterns = [
|
||||
# 留言板
|
||||
path('<int:id>/<int:page>.html', board, name='board'),
|
||||
]
|
38
SinkDark/interflow/views.py
Normal file
@ -0,0 +1,38 @@
|
||||
from django.shortcuts import render, redirect
|
||||
from django.core.paginator import Paginator
|
||||
from django.core.paginator import PageNotAnInteger
|
||||
from django.core.paginator import EmptyPage
|
||||
from article.models import ArticleTag
|
||||
from account.models import MyUser
|
||||
from album.models import AlbumInfo
|
||||
from .models import Board
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
def board(request, id, page):
|
||||
album = AlbumInfo.objects.filter(user_id=id)
|
||||
tag = ArticleTag.objects.filter(user_id=id)
|
||||
user = MyUser.objects.filter(id=id).first()
|
||||
if not user:
|
||||
return redirect(reverse('register'))
|
||||
if request.method == 'GET':
|
||||
boardList = Board.objects.filter(user_id=id).order_by('-created')
|
||||
paginator = Paginator(boardList, 10)
|
||||
try:
|
||||
pageInfo = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
# 如果参数page 的数据类型不是整型,就返回第一页数据
|
||||
pageInfo = paginator.page(1)
|
||||
except EmptyPage:
|
||||
# 若用户访问的页数大于实际页数,则返回最后一页的数据
|
||||
pageInfo = paginator.page(paginator.num_pages)
|
||||
return render(request, 'board.html', locals())
|
||||
else:
|
||||
name = request.POST.get('name')
|
||||
email = request.POST.get('email')
|
||||
content = request.POST.get('content')
|
||||
value = {'name': name, 'email': email,
|
||||
'content': content, 'user_id': id}
|
||||
Board.objects.create(**value)
|
||||
kwargs = {'id': id, 'page': 1}
|
||||
return redirect(reverse('board', kwargs=kwargs))
|
15
SinkDark/manage.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == '__main__':
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SinkDark.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
BIN
SinkDark/media/images/album/Map.jpeg
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
SinkDark/media/images/article/4.jpg
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
SinkDark/media/images/user/9.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
SinkDark/media/images/user/图标.PNG
Normal file
After Width: | Height: | Size: 594 KiB |
95
SinkDark/publicStatic/css/base.css
Normal file
@ -0,0 +1,95 @@
|
||||
@charset "UTF-8";
|
||||
@font-face {
|
||||
font-family: 'DuanNing'; /* 定义字体名称 */
|
||||
src: url('../fonts/段宁毛笔小楷.ttf') format('truetype'); /* 指定字体文件路径和格式 */
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'SetoFont'; /* 定义字体名称 */
|
||||
src: url('../fonts/小濑字体.ttf') format('truetype'); /* 指定字体文件路径和格式 */
|
||||
}
|
||||
/* css */
|
||||
* { margin: 0; padding: 0 }
|
||||
body {
|
||||
font: 15px "DuanNing", "Microsoft YaHei", Arial, Helvetica, sans-serif; /* 设置字体大小和字体族 */
|
||||
background-image: url('../images/盐湖.png'); /* 设置背景图片 */
|
||||
line-height: 1.5; /* 设置行高为字体大小的1.5倍 */
|
||||
background-size: cover; /* 背景图片覆盖整个元素区域,可能会被裁剪以保持宽高比 */
|
||||
background-repeat: no-repeat; /* 背景图片不重复 */
|
||||
background-attachment: fixed; /* 背景图片固定,不随页面滚动 */
|
||||
}
|
||||
img { border: 0; display: block }
|
||||
ul, li { list-style: none; }
|
||||
a { text-decoration: none; color: #555 }
|
||||
a:hover { text-decoration: none; color: #000; }
|
||||
.clear { clear: both; }
|
||||
.blank { height: 20px; overflow: hidden; width: 100%; margin: auto; clear: both }
|
||||
.f_l { float: left }
|
||||
.f_r { float: right }
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 3fr 1fr; /* 左侧和右侧各占1份空间,中间占2份 */
|
||||
grid-gap: 10px; /* 网格间隙 */
|
||||
width: 90%; /* 确保容器宽度为父元素的100% */
|
||||
margin: 80px
|
||||
}
|
||||
|
||||
.lb_box{
|
||||
/* 左侧占位用 */
|
||||
}
|
||||
|
||||
.rb_box{
|
||||
/* 右侧占位用 */
|
||||
}
|
||||
|
||||
.md_box{
|
||||
/* 中间占位用 */
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
|
||||
.l_box {
|
||||
/* 左侧内容样式 */
|
||||
position: fixed;
|
||||
width: 18%;
|
||||
left: 5%;
|
||||
}
|
||||
|
||||
.l_box {
|
||||
/* 左侧内容样式 */
|
||||
position: fixed;
|
||||
width: 18%;
|
||||
right: 5%;
|
||||
}
|
||||
|
||||
.main {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
margin: 0 auto; /* 添加左右自动外边距以实现水平居中 */
|
||||
display: block; /* 已经是默认值,但保持清晰 */
|
||||
}
|
||||
.container { width: 1000px; margin: auto }
|
||||
nav { width: 1000px; margin: auto }
|
||||
.logo { float: left; font-size: 22px }
|
||||
#mnavh { display: none; width: 30px; height: 40px; float: right; text-align: center; padding: 0 5px }
|
||||
#starlist { float: right; }
|
||||
#starlist li { float: left; display: block; padding: 0 0 0 40px; font-size: 16px }
|
||||
.navicon { display: block; position: relative; width: 30px; height: 5px; background-color: #000; margin-top: 20px }
|
||||
.navicon:before, .navicon:after { content: ''; display: block; width: 30px; height: 5px; position: absolute; background: #000; -webkit-transition-property: margin, -webkit-transform; transition-property: margin, -webkit-transform; transition-property: margin, transform; transition-property: margin, transform, -webkit-transform; -webkit-transition-duration: 300ms; transition-duration: 300ms; }
|
||||
.navicon:before { margin-top: -10px; }
|
||||
.navicon:after { margin-top: 10px; }
|
||||
.open .navicon { background: none }
|
||||
.open .navicon:before { margin-top: 0; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
|
||||
.open .navicon:after { margin-top: 0; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
|
||||
.open .navicon:before, .open .navicon:after { content: ''; display: block; width: 30px; height: 5px; position: absolute; background: #000; }
|
||||
#starlist #selected { color: #f65a8a; }
|
||||
.header-navigation { position: fixed; top: 0; width: 100%; height: 60px; line-height: 60px; background: rgba(255,255,255,.9); text-align: center; border-bottom: 1px solid #ddd; box-shadow: 0 1px 1px rgba(0,0,0,.04); z-index: 9999; }
|
||||
/* Slide transitions */
|
||||
.slideUp { -webkit-transform: translateY(-100px); -ms-transform: translateY(-100px); -o-transform: translateY(-100px); transform: translateY(-100px); -webkit-transition: transform .5s ease-out; -o-transition: transform .5s ease-out; transition: transform .5s ease-out; }
|
||||
.slideDown { -webkit-transform: translateY(0); -ms-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); -webkit-transition: transform .5s ease-out; -o-transition: transform .5s ease-out; transition: transform .5s ease-out; }
|
||||
/*footer*/
|
||||
footer { width: 100%; color: #a5a4a4; text-align: center; padding: 20px 0; clear: both; text-shadow: #fff 1px 0 2px, #fff 0 1px 2px, #fff -1px 0 2px, #fff 0 -1px 2px; }
|
||||
footer a { color: #a5a4a4; }
|
||||
/*cd-top*/
|
||||
/*cd-top*/
|
||||
.cd-top { display: inline-block; height: 40px; width: 40px; position: fixed; bottom: 40px; right: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); overflow: hidden; text-indent: 100%; white-space: nowrap; background: rgba(0, 0, 0, 0.8) url(../images/top.png) no-repeat center; visibility: hidden; opacity: 0; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; transition: all 0.3s; }
|
||||
.cd-top.cd-is-visible { visibility: visible; opacity: 1; }
|
90
SinkDark/publicStatic/css/index.css
Normal file
@ -0,0 +1,90 @@
|
||||
@charset "UTF-8";
|
||||
.l_box h2 { color: #333; font-size: 14px; line-height: 30px; padding-left: 20px; background: #fff }
|
||||
.l_box div { background: rgba(255,255,255,0.5); margin-bottom: 20px; overflow: hidden }
|
||||
.l_box div ul { padding: 10px; overflow: hidden }
|
||||
.about_me img { width: 100%;height: 100% }
|
||||
.about_me p { line-height: 24px; font-size: 14px }
|
||||
.about_me i { width: 90px; float: left; clear: left; margin-right: 10px; height: 90px; overflow: hidden }
|
||||
.wdxc li { width: 32%; overflow: hidden; float: left; height: 80px; margin-bottom: 2px; margin-right: 2px }
|
||||
.wdxc li img {width: 100%; height:100%; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; transition: all 0.5s; }
|
||||
.wdxc li img:hover { transform: scale(1.05) }
|
||||
.fenlei li { margin-bottom: 10px; margin-left: 10px }
|
||||
.tuijian li { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; margin-bottom: 5px; background: url(../images/li.png) left center no-repeat; padding-left: 20px }
|
||||
.links a { display: block; float: left; margin: 0 10px 5px 0 }
|
||||
.guanzhu img { width: 100% }
|
||||
.tools a { display: block; float: left; margin: 0 10px 5px 0 }
|
||||
.l_box .search { border: 1px solid #000; background: #000; border-radius: 0 5px 5px 0; position: relative; }
|
||||
.search input.input_submit { border: 0; background: 0; color: #fff; outline: none; position: absolute; top: 10px; right: 8% }
|
||||
.search input.input_text { border: 0; line-height: 36px; height: 36px; width: 72%; padding-left: 10px; outline: none }
|
||||
.rt_box .search { border: 1px solid #000; background: #000; border-radius: 0 5px 5px 0; position: relative; }
|
||||
.main li { background: rgba(255,255,255,0.8); padding: 15px; overflow: hidden; color: #797b7c; margin-bottom: 20px }
|
||||
.main li h3 { font-size: 16px; line-height: 25px; text-shadow: #FFF 1px 1px 1px }
|
||||
.main li h3 a { color: #222 }
|
||||
.main li h3 a:hover { color: #000; text-decoration: underline }
|
||||
.main li img { float: right; clear: right; width: 100%;height:100%; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; transition: all 0.5s; }
|
||||
.main li i { width: 150px; display: block; max-height: 100px; overflow: hidden; float: right; margin-left: 20px }
|
||||
.main li p { margin: 20px 0 0 0; line-height: 22px; overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical; display: -webkit-box; -webkit-line-clamp: 2; }
|
||||
.main li:hover img { transform: scale(1.05) }
|
||||
.main li:hover h3 a { color: #19585d; }
|
||||
.pagelist { text-align: center; color: #666; width: 100%; clear: both; margin: 20px 0; padding-top: 20px }
|
||||
.pagelist a { color: #666; margin: 0 2px 5px 2px; display: inline-block; border: 1px solid #fff; padding: 5px 10px; background: #FFF }
|
||||
.pagelist a:hover { color: #19585d; }
|
||||
.pagelist > b { border: 1px solid #000; padding: 5px 10px; }
|
||||
a.curPage { color: #19585d; font-weight: bold; }
|
||||
/*about*/
|
||||
.about { padding: 20px; background: rgba(255,255,255,0.8); margin-bottom: 20px; }
|
||||
.about img { max-width: 500px; margin: 20px 0; width: 100% }
|
||||
.cloud ul a { line-height: 24px; height: 24px; display: block; background: #999; float: left; padding: 3px 11px; margin: 10px 10px 0 0; border-radius: 8px; -moz-transition: all 0.5s; -webkit-transition: all 0.5s; -o-transition: all 0.5s; transition: all 0.5s; color: #FFF }
|
||||
.cloud ul a:nth-child(8n-7) { background: #8A9B0F }
|
||||
.cloud ul a:nth-child(8n-6) { background: #EB6841 }
|
||||
.cloud ul a:nth-child(8n-5) { background: #3FB8AF }
|
||||
.cloud ul a:nth-child(8n-4) { background: #FE4365 }
|
||||
.cloud ul a:nth-child(8n-3) { background: #FC9D9A }
|
||||
.cloud ul a:nth-child(8n-2) { background: #EDC951 }
|
||||
.cloud ul a:nth-child(8n-1) { background: #C8C8A9 }
|
||||
.cloud ul a:nth-child(8n) { background: #83AF9B }
|
||||
.cloud ul a:first-child { background: #036564 }
|
||||
.cloud ul a:last-child { background: #3299BB }
|
||||
.cloud ul a:hover { border-radius: 0; text-shadow: #000 1px 1px 1px }
|
||||
.picbox { width: 100%; overflow: hidden; }
|
||||
.picvalue { overflow: hidden; width: 24%; float: left; margin-right: 10px }
|
||||
.picvalue { display: block; background: #FFF; margin: 0 0 20px 0; border: 1px #d9d9d9 solid; }
|
||||
.picvalue i { margin: 10px; height: auto; overflow: hidden; display: block; }
|
||||
.picvalue img { width: 200px; height: 200px; margin: 0 auto}
|
||||
.picinfo h3 { border-bottom: #ccc 1px solid; padding: 10px 0; margin: 0 20px; font-size: 16px }
|
||||
.picinfo span { padding: 10px 20px; display: block; color: #666; }
|
||||
.picvalue a:hover { color: #19585d }
|
||||
.tags a { background: #F4650E; padding: 3px 8px; margin: 0 5px 0 0; color: #fff; }
|
||||
.tags { margin: 10px 0; }
|
||||
.infosbox img { max-width: 100%; height: auto; width: 100% }
|
||||
.share { padding: 20px; }
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
.news_pl { margin: 10px 0 20px 0; width: 100%; overflow: hidden; }
|
||||
.news_pl h2 { border-bottom: #000 2px solid; line-height: 40px; font-size: 14px; padding-left: 10px; color: #000 }
|
||||
.diggit { width: 160px; margin: auto; background: #E2523A; color: #fff; box-shadow: 1px 2px 6px 0px rgba(0,0,0,.2); border-radius: 3px; line-height: 40px; text-align: center; }
|
||||
.diggit a { color: #fff; }
|
||||
#diggnum { margin: 5px; }
|
||||
/*gbook*/
|
||||
.gbook { background: #FFF; overflow: hidden; margin-bottom: 20px }
|
||||
.gbox { padding: 20px; overflow: hidden; }
|
||||
.gbox p { margin-bottom: 10px }
|
||||
p.fbtime { color: #000; }
|
||||
.fbtime span { float: right; color: #999; font-size: 12px; width: 70px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap; }
|
||||
p.fbinfo { margin: 10px 0; }
|
||||
.fb ul { margin: 10px 10px; padding: 10px 10px 10px 70px; border-bottom: #ececec 1px solid; }
|
||||
|
||||
textarea#lytext { width: 100%; }
|
||||
.gbox input[type="submit"] { display: block; background: #040404; color: #fff; border: 0; line-height: 30px; padding: 0 20px; border-radius: 5px; float: right; }
|
||||
.saying { line-height: 30px; color: #a9a6a6; }
|
||||
.saying span { float: right }
|
||||
.saying span a { color: #de1513; }
|
||||
img#plKeyImg { display: inline-block; }
|
||||
.yname { margin: 10px 10px 10px 0 }
|
||||
.yname span, .yzm span { padding-right: 10px; }
|
||||
.yzm { margin: 0 10px 10px 0 }
|
||||
#plpost input[type="submit"] { display: block; background: #303030; color: #fff; border: 0; line-height: 30px; padding: 0 20px; border-radius: 5px; float: right; }
|
||||
textarea#saytext { width: 100%; }
|
||||
#plpost { margin: 0 20px }
|
14
SinkDark/publicStatic/css/info.css
Normal file
@ -0,0 +1,14 @@
|
||||
@charset "UTF-8";
|
||||
.infosbox { overflow: hidden; background: rgba(255,255,255,0.8); margin-bottom: 20px }
|
||||
.newsview { padding: 0 30px }
|
||||
.news_con a { color: #0e6dad }
|
||||
.news_con a:hover { color: #000 }
|
||||
.intitle { line-height: 40px; height: 40px; font-size: 14px; ; border-bottom: #000 2px solid; }
|
||||
.intitle a { font-weight: normal; }
|
||||
.news_title { font-size: 24px; font-weight: normal; padding: 20px 0; color: #333; }
|
||||
.bloginfo { width: 100%; overflow: hidden }
|
||||
.bloginfo li { float: left; margin-right: 20px }
|
||||
.news_about { color: #888888; border: 1px solid #F3F3F3; padding: 10px; margin: 20px auto 15px auto; line-height: 23px; background: none repeat 0 0 #F6F6F6; }
|
||||
.news_about strong { color: #38485A; font-weight: 400 !important; font-size: 13px; padding-right: 8px; }
|
||||
.news_content { line-height: 24px; font-size: 14px; }
|
||||
.news_content p { overflow: hidden; padding-bottom: 4px; padding-top: 6px; word-wrap: break-word; }
|
62
SinkDark/publicStatic/css/m.css
Normal file
@ -0,0 +1,62 @@
|
||||
@charset "UTF-8";
|
||||
@media screen and (min-width: 1024px) and (max-width: 1199px) {
|
||||
header { width: 96%; margin: auto }
|
||||
}
|
||||
@media screen and (min-width: 960px) and (max-width: 1023px) {
|
||||
header { width: 96%; margin: auto }
|
||||
article { width: 96% }
|
||||
nav { width: 96%; }
|
||||
#starlist li { padding-left: 20px }
|
||||
.picshowlist { display: none }
|
||||
.tuijian, .guanzhu { width: 270px; }
|
||||
}
|
||||
@media screen and (min-width: 768px) and (max-width: 959px) {
|
||||
header { width: 96%; margin: auto }
|
||||
article { width: 96% }
|
||||
nav { width: 96%; }
|
||||
#starlist li { padding-left: 15px }
|
||||
.picbox ul { width: 23%; }
|
||||
.picshowlist { display: none }
|
||||
.pagelist a { padding: 2px 3px; }
|
||||
}
|
||||
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
||||
header { width: 96%; margin: auto }
|
||||
article { width: 96% }
|
||||
.logo { width: 100% }
|
||||
nav { width: 100%; position: relative }
|
||||
#starlist { display: none; background: rgba(0,0,0,.5); width: 100% }
|
||||
#starlist li { display: block; width: 70%; padding: 0; background: #FFF }
|
||||
#starlist li:last-child { padding-bottom: 100% }
|
||||
#mnavh { position: absolute; display: block; top: 8px; left: 10px }
|
||||
.l_box { display: none }
|
||||
.r_box, .infosbox, .picsbox, main { width: 100% }
|
||||
.pagelist a { padding: 2px 3px; }
|
||||
.picbox ul { width: 22%; }
|
||||
.picbox ul li i { margin: 5px }
|
||||
.picinfo { display: none }
|
||||
.picshowlist { display: none }
|
||||
.lmname, .view { display: none }
|
||||
}
|
||||
@media only screen and (max-width: 479px) {
|
||||
header { width: 96%; margin: auto }
|
||||
article { width: 100% }
|
||||
.logo { width: 100% }
|
||||
nav { width: 100%; position: relative }
|
||||
#starlist { display: none; background: rgba(0,0,0,.5); width: 100% }
|
||||
#starlist li { display: block; width: 70%; padding: 0; background: #FFF }
|
||||
#starlist li:last-child { padding-bottom: 100% }
|
||||
#mnavh { position: absolute; display: block; top: 8px; left: 10px }
|
||||
.l_box { display: none }
|
||||
.r_box, .infosbox, .picsbox, main { width: 100% }
|
||||
.picbox { width: 96%; margin: auto }
|
||||
.picbox ul { width: 48%; margin-right: 0 }
|
||||
.picbox ul:nth-child(1), .picbox ul:nth-child(3) { margin-right: 8px }
|
||||
.piclistshow ul li { height: 100px; padding: 0 }
|
||||
.piclistshow .picimg { height: 100px }
|
||||
.picbox ul li i { margin: 2px }
|
||||
.picinfo { display: none }
|
||||
.picshowlist, .pictxt { display: none }
|
||||
.lmname, .view { display: none }
|
||||
.r_box li i { float: none; margin: 0 auto 20px; width: 100%; max-height: initial }
|
||||
.newsview { padding: 0 15px; }
|
||||
}
|
77
SinkDark/publicStatic/css/md.css
Normal file
@ -0,0 +1,77 @@
|
||||
pre { line-height: 125%; }
|
||||
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
.codehilite .hll { background-color: #ffffcc }
|
||||
.codehilite { background: #f8f8f8; }
|
||||
.codehilite .c { color: #3D7B7B; font-style: italic } /* Comment */
|
||||
.codehilite .err { border: 1px solid #FF0000 } /* Error */
|
||||
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
|
||||
.codehilite .o { color: #666666 } /* Operator */
|
||||
.codehilite .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
|
||||
.codehilite .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
|
||||
.codehilite .cp { color: #9C6500 } /* Comment.Preproc */
|
||||
.codehilite .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
|
||||
.codehilite .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
|
||||
.codehilite .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
|
||||
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.codehilite .ge { font-style: italic } /* Generic.Emph */
|
||||
.codehilite .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
||||
.codehilite .gr { color: #E40000 } /* Generic.Error */
|
||||
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.codehilite .gi { color: #008400 } /* Generic.Inserted */
|
||||
.codehilite .go { color: #717171 } /* Generic.Output */
|
||||
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
||||
.codehilite .gs { font-weight: bold } /* Generic.Strong */
|
||||
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
||||
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
||||
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
||||
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
|
||||
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
||||
.codehilite .kt { color: #B00040 } /* Keyword.Type */
|
||||
.codehilite .m { color: #666666 } /* Literal.Number */
|
||||
.codehilite .s { color: #BA2121 } /* Literal.String */
|
||||
.codehilite .na { color: #687822 } /* Name.Attribute */
|
||||
.codehilite .nb { color: #008000 } /* Name.Builtin */
|
||||
.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
||||
.codehilite .no { color: #880000 } /* Name.Constant */
|
||||
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
|
||||
.codehilite .ni { color: #717171; font-weight: bold } /* Name.Entity */
|
||||
.codehilite .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
|
||||
.codehilite .nf { color: #0000FF } /* Name.Function */
|
||||
.codehilite .nl { color: #767600 } /* Name.Label */
|
||||
.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
||||
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
||||
.codehilite .nv { color: #19177C } /* Name.Variable */
|
||||
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
||||
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.codehilite .mb { color: #666666 } /* Literal.Number.Bin */
|
||||
.codehilite .mf { color: #666666 } /* Literal.Number.Float */
|
||||
.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
|
||||
.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
|
||||
.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
|
||||
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
|
||||
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
|
||||
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
|
||||
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
||||
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
||||
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
|
||||
.codehilite .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
|
||||
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
||||
.codehilite .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
|
||||
.codehilite .sx { color: #008000 } /* Literal.String.Other */
|
||||
.codehilite .sr { color: #A45A77 } /* Literal.String.Regex */
|
||||
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
|
||||
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
|
||||
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
||||
.codehilite .fm { color: #0000FF } /* Name.Function.Magic */
|
||||
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
|
||||
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
|
||||
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
|
||||
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
|
||||
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||
|
||||
.block {background-color: grey; color: white;} /* 灰色背景,白色文字 */
|
87
SinkDark/publicStatic/css/reset.css
Normal file
@ -0,0 +1,87 @@
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul,li {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
display: block;
|
||||
}
|
||||
body{
|
||||
font-size: 14px;
|
||||
}
|
||||
.clearfix{
|
||||
zoom:1;
|
||||
}
|
||||
.clearfix:after{
|
||||
content:".";
|
||||
display:block;
|
||||
visibility:hidden;
|
||||
height:0;
|
||||
clear:both;
|
||||
}
|
||||
.fl,.l{
|
||||
float: left;
|
||||
}
|
||||
.fr,.r{
|
||||
float: right;
|
||||
}
|
||||
/*margin-top*/
|
||||
.mt10{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.mt15{
|
||||
margin-top: 15px;
|
||||
}
|
||||
.mt20{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.mt5{
|
||||
margin-top: 5px;
|
||||
}
|
||||
.mt0{
|
||||
margin-top: 0px;
|
||||
}
|
||||
/*padding-left*/
|
||||
.pl15{
|
||||
padding-left: 15px;
|
||||
}
|
74
SinkDark/publicStatic/css/user.css
Normal file
@ -0,0 +1,74 @@
|
||||
body{
|
||||
background: #ddd
|
||||
}
|
||||
.loginwarrp{
|
||||
margin: 250px auto;
|
||||
width: 400px;
|
||||
padding: 30px 50px;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
font-family: '微软雅黑','文泉驿正黑','黑体';
|
||||
}
|
||||
.loginwarrp .logo{
|
||||
width:100%;
|
||||
height:44px;
|
||||
line-height: 44px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
border-bottom:1px solid #ddd;
|
||||
}
|
||||
.loginwarrp .login_form{
|
||||
margin-top: 15px;
|
||||
}
|
||||
.loginwarrp .login_form .login-item{
|
||||
padding: 2px 8px;
|
||||
border:1px solid #dedede;
|
||||
border-radius: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.loginwarrp .login_form .login_input{
|
||||
height: 35px;
|
||||
border: none;
|
||||
line-height: 35px;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
outline: none;
|
||||
}
|
||||
.loginwarrp .login_form .verify{
|
||||
float: left;
|
||||
}
|
||||
.loginwarrp .verify .verify_input{
|
||||
width: 160px;
|
||||
}
|
||||
.loginwarrp .verifyimg{
|
||||
height: 30px;
|
||||
margin: 20px 0 0 20px;
|
||||
}
|
||||
.loginwarrp .login-sub{
|
||||
text-align: center;
|
||||
}
|
||||
.loginwarrp .login-sub input{
|
||||
margin-top:15px;
|
||||
background: #45B549;
|
||||
line-height: 35px;
|
||||
width: 150px;
|
||||
color: #FFFFFF;
|
||||
font-size: 16px;
|
||||
font-family: '微软雅黑','文泉驿正黑','黑体';
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.turn-url{
|
||||
margin-top:30px;
|
||||
width: 170px;
|
||||
font-size: 16px;
|
||||
font-family: '微软雅黑','文泉驿正黑','黑体';
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
float: right;
|
||||
}
|
||||
.loginwarrp .login_form .login-item .error{
|
||||
color: #F00;
|
||||
font-family: '微软雅黑','文泉驿正黑','黑体';
|
||||
}
|
BIN
SinkDark/publicStatic/fonts/小濑字体.ttf
Normal file
BIN
SinkDark/publicStatic/fonts/段宁毛笔小楷.ttf
Normal file
BIN
SinkDark/publicStatic/images/li.png
Normal file
After Width: | Height: | Size: 993 B |
BIN
SinkDark/publicStatic/images/pic.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
SinkDark/publicStatic/images/top.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
SinkDark/publicStatic/images/user.jpg
Normal file
After Width: | Height: | Size: 669 B |
BIN
SinkDark/publicStatic/images/盐湖.png
Normal file
After Width: | Height: | Size: 8.9 MiB |
168
SinkDark/publicStatic/js/canvas-particle.js
Normal file
@ -0,0 +1,168 @@
|
||||
var CanvasParticle = (function(){
|
||||
function getElementByTag(name){
|
||||
return document.getElementsByTagName(name);
|
||||
}
|
||||
function getELementById(id){
|
||||
return document.getElementById(id);
|
||||
}
|
||||
// 根据传入的config初始化画布
|
||||
function canvasInit(canvasConfig){
|
||||
canvasConfig = canvasConfig || {};
|
||||
var html = getElementByTag("html")[0];
|
||||
var body = getElementByTag("body")[0];
|
||||
var canvasDiv = getELementById("canvas-particle");
|
||||
var canvasObj = document.createElement("canvas");
|
||||
|
||||
var canvas = {
|
||||
element: canvasObj,
|
||||
points : [],
|
||||
// 默认配置
|
||||
config: {
|
||||
vx: canvasConfig.vx || 4,
|
||||
vy: canvasConfig.vy || 4,
|
||||
height: canvasConfig.height || 2,
|
||||
width: canvasConfig.width || 2,
|
||||
count: canvasConfig.count || 100,
|
||||
color: canvasConfig.color || "0, 0, 255",
|
||||
stroke: canvasConfig.stroke || "130,255,255",
|
||||
dist: canvasConfig.dist || 6000,
|
||||
e_dist: canvasConfig.e_dist || 20000,
|
||||
max_conn: 10
|
||||
}
|
||||
};
|
||||
|
||||
// 获取context
|
||||
if(canvas.element.getContext("2d")){
|
||||
canvas.context = canvas.element.getContext("2d");
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
body.style.padding = "0";
|
||||
body.style.margin = "0";
|
||||
// body.replaceChild(canvas.element, canvasDiv);
|
||||
body.appendChild(canvas.element);
|
||||
|
||||
canvas.element.style = "position: absolute; top: 0; left: 0; z-index: -1;";
|
||||
canvasSize(canvas.element);
|
||||
window.onresize = function(){
|
||||
canvasSize(canvas.element);
|
||||
}
|
||||
body.onmousemove = function(e){
|
||||
var event = e || window.event;
|
||||
canvas.mouse = {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
}
|
||||
}
|
||||
document.onmouseleave = function(){
|
||||
canvas.mouse = undefined;
|
||||
}
|
||||
setInterval(function(){
|
||||
drawPoint(canvas);
|
||||
}, 40);
|
||||
}
|
||||
|
||||
// 设置canvas大小
|
||||
function canvasSize(canvas){
|
||||
canvas.width = window.innerWeight || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
canvas.height = window.innerWeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
}
|
||||
|
||||
// 画点
|
||||
function drawPoint(canvas){
|
||||
var context = canvas.context,
|
||||
point,
|
||||
dist;
|
||||
context.clearRect(0, 0, canvas.element.width, canvas.element.height);
|
||||
context.beginPath();
|
||||
context.fillStyle = "rgb("+ canvas.config.color +")";
|
||||
for(var i = 0, len = canvas.config.count; i < len; i++){
|
||||
if(canvas.points.length != canvas.config.count){
|
||||
// 初始化所有点
|
||||
point = {
|
||||
x: Math.floor(Math.random() * canvas.element.width),
|
||||
y: Math.floor(Math.random() * canvas.element.height),
|
||||
vx: canvas.config.vx / 2 - Math.random() * canvas.config.vx,
|
||||
vy: canvas.config.vy / 2 - Math.random() * canvas.config.vy
|
||||
}
|
||||
}else{
|
||||
// 处理球的速度和位置,并且做边界处理
|
||||
point = borderPoint(canvas.points[i], canvas);
|
||||
}
|
||||
context.fillRect(point.x - canvas.config.width / 2, point.y - canvas.config.height / 2, canvas.config.width, canvas.config.height);
|
||||
|
||||
canvas.points[i] = point;
|
||||
}
|
||||
drawLine(context, canvas, canvas.mouse);
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
// 边界处理
|
||||
function borderPoint(point, canvas){
|
||||
var p = point;
|
||||
if(point.x <= 0 || point.x >= canvas.element.width){
|
||||
p.vx = -p.vx;
|
||||
p.x += p.vx;
|
||||
}else if(point.y <= 0 || point.y >= canvas.element.height){
|
||||
p.vy = -p.vy;
|
||||
p.y += p.vy;
|
||||
}else{
|
||||
p = {
|
||||
x: p.x + p.vx,
|
||||
y: p.y + p.vy,
|
||||
vx: p.vx,
|
||||
vy: p.vy
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
// 画线
|
||||
function drawLine(context, canvas, mouse){
|
||||
context = context || canvas.context;
|
||||
for(var i = 0, len = canvas.config.count; i < len; i++){
|
||||
// 初始化最大连接数
|
||||
canvas.points[i].max_conn = 0;
|
||||
// point to point
|
||||
for(var j = 0; j < len; j++){
|
||||
if(i != j){
|
||||
dist = Math.round(canvas.points[i].x - canvas.points[j].x) * Math.round(canvas.points[i].x - canvas.points[j].x) +
|
||||
Math.round(canvas.points[i].y - canvas.points[j].y) * Math.round(canvas.points[i].y - canvas.points[j].y);
|
||||
// 两点距离小于吸附距离,而且小于最大连接数,则画线
|
||||
if(dist <= canvas.config.dist && canvas.points[i].max_conn <canvas.config.max_conn){
|
||||
canvas.points[i].max_conn++;
|
||||
// 距离越远,线条越细,而且越透明
|
||||
context.lineWidth = 0.5 - dist / canvas.config.dist;
|
||||
context.strokeStyle = "rgba("+ canvas.config.stroke + ","+ (1 - dist / canvas.config.dist) +")"
|
||||
context.beginPath();
|
||||
context.moveTo(canvas.points[i].x, canvas.points[i].y);
|
||||
context.lineTo(canvas.points[j].x, canvas.points[j].y);
|
||||
context.stroke();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果鼠标进入画布
|
||||
// point to mouse
|
||||
if(mouse){
|
||||
dist = Math.round(canvas.points[i].x - mouse.x) * Math.round(canvas.points[i].x - mouse.x) +
|
||||
Math.round(canvas.points[i].y - mouse.y) * Math.round(canvas.points[i].y - mouse.y);
|
||||
// 遇到鼠标吸附距离时加速,直接改变point的x,y值达到加速效果
|
||||
if(dist > canvas.config.dist && dist <= canvas.config.e_dist){
|
||||
canvas.points[i].x = canvas.points[i].x + (mouse.x - canvas.points[i].x) / 20;
|
||||
canvas.points[i].y = canvas.points[i].y + (mouse.y - canvas.points[i].y) / 20;
|
||||
}
|
||||
if(dist <= canvas.config.e_dist){
|
||||
context.lineWidth = 1;
|
||||
context.strokeStyle = "rgba("+ canvas.config.stroke + ","+ (1 - dist / canvas.config.e_dist) +")";
|
||||
context.beginPath();
|
||||
context.moveTo(canvas.points[i].x, canvas.points[i].y);
|
||||
context.lineTo(mouse.x, mouse.y);
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return canvasInit;
|
||||
})();
|
85
SinkDark/publicStatic/js/comm.js
Normal file
@ -0,0 +1,85 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
//nav
|
||||
$("#mnavh").click(function(){
|
||||
$("#starlist").toggle();
|
||||
$("#mnavh").toggleClass("open");
|
||||
});
|
||||
|
||||
var obj=null;
|
||||
var As=document.getElementById('starlist').getElementsByTagName('a');
|
||||
obj = As[0];
|
||||
for(i=1;i<As.length;i++){if(window.location.href.indexOf(As[i].href)>=0)
|
||||
obj=As[i];}
|
||||
obj.id='selected';
|
||||
|
||||
|
||||
|
||||
var new_scroll_position = 0;
|
||||
var last_scroll_position;
|
||||
var header = document.getElementById("header");
|
||||
|
||||
window.addEventListener('scroll', function(e) {
|
||||
last_scroll_position = window.scrollY;
|
||||
|
||||
// Scrolling down
|
||||
if (new_scroll_position < last_scroll_position && last_scroll_position > 80) {
|
||||
// header.removeClass('slideDown').addClass('slideUp');
|
||||
header.classList.remove("slideDown");
|
||||
header.classList.add("slideUp");
|
||||
|
||||
// Scrolling up
|
||||
} else if (new_scroll_position > last_scroll_position) {
|
||||
// header.removeClass('slideUp').addClass('slideDown');
|
||||
header.classList.remove("slideUp");
|
||||
header.classList.add("slideDown");
|
||||
}
|
||||
|
||||
new_scroll_position = last_scroll_position;
|
||||
});
|
||||
|
||||
|
||||
//»Øµ½¶¥²¿
|
||||
// browser window scroll (in pixels) after which the "back to top" link is shown
|
||||
var offset = 300,
|
||||
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
|
||||
offset_opacity = 1200,
|
||||
//duration of the top scrolling animation (in ms)
|
||||
scroll_top_duration = 700,
|
||||
//grab the "back to top" link
|
||||
$back_to_top = $('.cd-top');
|
||||
|
||||
//hide or show the "back to top" link
|
||||
$(window).scroll(function () {
|
||||
($(this).scrollTop() > offset) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
|
||||
if ($(this).scrollTop() > offset_opacity) {
|
||||
$back_to_top.addClass('cd-fade-out');
|
||||
}
|
||||
});
|
||||
//smooth scroll to top
|
||||
$back_to_top.on('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('body,html').animate({
|
||||
scrollTop: 0,
|
||||
}, scroll_top_duration
|
||||
);
|
||||
});
|
||||
|
||||
//²àÀ¸¹Ì¶¨
|
||||
|
||||
//aside
|
||||
var Sticky = new hcSticky('aside', {
|
||||
stickTo: 'main',
|
||||
innerTop: 200,
|
||||
followScroll: false,
|
||||
queries: {
|
||||
480: {
|
||||
disable: true,
|
||||
stickTo: 'body'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
19
SinkDark/publicStatic/js/jquery.min.js
vendored
Normal file
1
SinkDark/publicStatic/js/modernizr.js
Normal file
59
SinkDark/publicStatic/js/page.js
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
<!--
|
||||
var ETNGpager = function( srcName, dstName, cntPP, cntPS )
|
||||
{
|
||||
this.srcName = srcName;
|
||||
this.dstName = dstName;
|
||||
this.curP = 1;//默认当前页为第一页
|
||||
this.cntPP = cntPP || 2;//默认每页两条纪录
|
||||
this.cntPS = cntPS || 3;//默认每页显示5个分页上下文
|
||||
this.items = [];
|
||||
this.showPNP = true;/*显示上下页链接*/
|
||||
this.showType = true;/*滑动分页*/
|
||||
this.result = {pagedata:[],pagebar:'',limit:[0,0],report:''};
|
||||
this.parse();/*总纪录数*/
|
||||
}
|
||||
ETNGpager.prototype.page = function (){
|
||||
this.cntP = Math.ceil(this.cntR/this.cntPP);/*总页数*/
|
||||
this.cntS = Math.ceil(this.cntP/this.cntPS);/*总段数*/
|
||||
this.curS = Math.ceil(this.curP/this.cntPS);/*当前段*/
|
||||
this.preP = this.curP -1;/*上一页*/
|
||||
this.nextP = this.curP +1;/*下一页*/
|
||||
this.preS = this.curS -1;/*上一段*/
|
||||
this.nextS = this.curS +1;/*下一段*/
|
||||
this.startR = (this.curP -1)*this.cntPP + 1;/*起始纪录*/
|
||||
this.endR = (this.curP*this.cntPP >this.cntR)?this.cntR:this.curP*this.cntPP;/*结束纪录*/
|
||||
this.result['pagedata']=[];
|
||||
if(this.showType){
|
||||
this.perSide = Math.floor(this.cntPS/2);
|
||||
this.startP = (this.curP > this.perSide)?(this.curP - this.perSide):1;
|
||||
this.endP = (this.startP + this.cntPS)>this.cntP?this.cntP:(this.startP + this.cntPS);
|
||||
}else{
|
||||
this.startP = (this.curS-1)*this.cntPS+1;
|
||||
this.endP = (this.curS*this.cntPS>this.cntP)?this.cntP:(this.curS*this.cntPS);
|
||||
}
|
||||
for(var i = this.startP;i<=this.endP;i++){
|
||||
this.result['pagedata'].push((i==this.curP)?'<a href="#" class="curPage">'+i+'</a>':'<a href="#" onclick="page('+i+')">'+i+'</a>');
|
||||
}
|
||||
if(this.showPNP){
|
||||
if(this.curP>1)this.result['pagedata'].unshift('<a href="#" onclick="page('+(this.curP-1)+')">上一页</a>');
|
||||
if(this.curP<this.cntP)this.result['pagedata'].push('<a href="#" onclick="page('+(this.curP+1)+')">下一页</a>');
|
||||
}
|
||||
this.result['pagebar'] = this.result['pagedata'].join(' ');
|
||||
this.result['limit'] = [this.startR,this.endR];
|
||||
this.result['report'] ='<a class="allpage"><b>'+this.cntR+'</b></a> ' ;
|
||||
}
|
||||
ETNGpager.prototype.parse = function (){
|
||||
var obj = document.getElementById(this.srcName);
|
||||
for(var i = 0;i<obj.childNodes.length;i++){
|
||||
if(obj.childNodes[i].nodeType!=3)this.items[this.items.length]=obj.childNodes[i].innerHTML;
|
||||
}
|
||||
this.cntR = this.items.length;
|
||||
return this.items.length;
|
||||
}
|
||||
ETNGpager.prototype.create=function(){
|
||||
this.page();
|
||||
document.getElementById(this.dstName).innerHTML='<li>'+this.items.slice(this.startR-1,this.endR).join('</li><li>')+'</li>';
|
||||
document.getElementById(this.dstName).innerHTML+='<div class="pagelist">'+this.result['report']+this.result['pagebar']+'</div>';
|
||||
}
|
||||
//-->
|
16
SinkDark/publicStatic/js/page2.js
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
<!--
|
||||
var pager = new ETNGpager('list','list2',24,10);//24为每页显示条数。10为导航显示菜单数
|
||||
var curP = 1;
|
||||
page()
|
||||
function page(i){
|
||||
curP =(curP>pager.cntP)?1:curP;
|
||||
if(i){
|
||||
curP = n =i;
|
||||
}else{
|
||||
n = curP++;
|
||||
}
|
||||
pager.curP = (n>pager.cntP)?pager.cntP:n;
|
||||
pager.create();
|
||||
}
|
||||
//-->
|
212
SinkDark/publicStatic/js/piccontent.min.js
vendored
Normal file
@ -0,0 +1,212 @@
|
||||
$(function() {
|
||||
$(".piclistshow li").hover(function() {
|
||||
|
||||
},
|
||||
function() {
|
||||
|
||||
});
|
||||
$(document).keydown(function(event) {
|
||||
var key = event.keyCode;
|
||||
var firstdisplay = $(".firsttop").css("display");
|
||||
var enddisplay = $(".endtop").css("display");
|
||||
if (firstdisplay == "none" && enddisplay == "none") {
|
||||
if (key == 37) {
|
||||
preclick()
|
||||
} else {
|
||||
if (key == 39) {
|
||||
nextclick()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (key == 27) {
|
||||
$(".firsttop").css("display", "none");
|
||||
$(".bodymodal").css("display", "none");
|
||||
$(".endtop").css("display", "none")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var firstpic = $(".picmidmid ul li").first().find("img");
|
||||
var firstsrc = firstpic.attr("bigimg");
|
||||
var firsttxt = firstpic.attr("text");
|
||||
$("#pic1").attr("src", firstsrc);
|
||||
firstpic.addClass("selectpic");
|
||||
$(".picshowtxt_right").text(firsttxt);
|
||||
$("#preArrow").hover(function() {
|
||||
$("#preArrow_A").css("display", "block")
|
||||
},
|
||||
function() {
|
||||
$("#preArrow_A").css("display", "none")
|
||||
});
|
||||
$("#nextArrow").hover(function() {
|
||||
$("#nextArrow_A").css("display", "block")
|
||||
},
|
||||
function() {
|
||||
$("#nextArrow_A").css("display", "none")
|
||||
});
|
||||
var getli = $(".picmidmid ul li");
|
||||
function nextclick() {
|
||||
var currrentindex = parseFloat($("#pic1").attr("curindex"));
|
||||
var length = getli.length;
|
||||
if (currrentindex != (length - 1)) {
|
||||
var curli = getli.eq(currrentindex);
|
||||
if (currrentindex > 3) {
|
||||
getli.eq(currrentindex - 4).css("display", "none");
|
||||
getli.eq(currrentindex + 1).css("width", "106px").css("display", "block")
|
||||
}
|
||||
var curnextli = getli.eq(currrentindex + 1);
|
||||
var curnextsrc = curnextli.find("img").attr("bigimg");
|
||||
var curnexttxt = curnextli.find("img").attr("text");
|
||||
curli.find("img").removeClass("selectpic");
|
||||
curnextli.find("img").addClass("selectpic");
|
||||
$("#pic1").attr("src", curnextsrc);
|
||||
$("#pic1").attr("curindex", currrentindex + 1);
|
||||
$(".picshowtxt_right").text(curnexttxt);
|
||||
$(".picshowtxt_left span").text(currrentindex + 2)
|
||||
} else {
|
||||
$(".bodymodal").css("display", "block");
|
||||
$(".endtop").css("display", "block")
|
||||
}
|
||||
}
|
||||
$("#nextArrow_B").click(function() {
|
||||
nextclick()
|
||||
});
|
||||
$("#nextArrow").click(function() {
|
||||
nextclick()
|
||||
});
|
||||
function preclick() {
|
||||
var currrentindex = parseFloat($("#pic1").attr("curindex"));
|
||||
if (currrentindex != 0) {
|
||||
var curli = getli.eq(currrentindex);
|
||||
var length = getli.length;
|
||||
if (currrentindex <= (length - 5)) {
|
||||
getli.eq(currrentindex + 4).css("display", "none");
|
||||
getli.eq(currrentindex - 1).css("width", "106px").css("display", "block")
|
||||
}
|
||||
var curnextli = getli.eq(currrentindex - 1);
|
||||
var curnextsrc = curnextli.find("img").attr("bigimg");
|
||||
var curnexttxt = curnextli.find("img").attr("text");
|
||||
curli.find("img").removeClass("selectpic");
|
||||
curnextli.find("img").addClass("selectpic");
|
||||
$("#pic1").attr("src", curnextsrc);
|
||||
$(".picshowtxt_right").text(curnexttxt);
|
||||
$("#pic1").attr("curindex", currrentindex - 1);
|
||||
$(".picshowtxt_left span").text(currrentindex)
|
||||
} else {
|
||||
$(".bodymodal").css("display", "block");
|
||||
$(".firsttop").css("display", "block")
|
||||
}
|
||||
}
|
||||
$("#preArrow_B").click(function() {
|
||||
preclick()
|
||||
});
|
||||
$("#preArrow").click(function() {
|
||||
preclick()
|
||||
});
|
||||
getli.click(function() {
|
||||
var currentliindex = $(this).index(".picmidmid ul li");
|
||||
$(".picmidmid ul li img[class='selectpic']").removeClass("selectpic");
|
||||
var currentli = getli.eq(currentliindex);
|
||||
currentli.find("img").addClass("selectpic");
|
||||
var bigimgsrc = currentli.find("img").attr("bigimg");
|
||||
var curnexttxt = currentli.find("img").attr("text");
|
||||
$("#pic1").attr("src", bigimgsrc);
|
||||
$("#pic1").attr("curindex", currentliindex);
|
||||
$(".picshowtxt_right").text(curnexttxt);
|
||||
$(".picshowtxt_left span").text(currentliindex + 1)
|
||||
});
|
||||
$(".piclistshow li").click(function() {
|
||||
var curli = $(this).index(".piclistshow li");
|
||||
showgaoqing();
|
||||
$(".picmidmid ul li img[class='selectpic']").removeClass("selectpic");
|
||||
var currentli = getli.eq(curli);
|
||||
currentli.find("img").addClass("selectpic");
|
||||
var bigimgsrc = currentli.find("img").attr("bigimg");
|
||||
var curnexttxt = currentli.find("img").attr("text");
|
||||
$("#pic1").attr("src", bigimgsrc);
|
||||
$("#pic1").attr("curindex", curli);
|
||||
$(".picshowtxt_right").text(curnexttxt);
|
||||
$(".picshowtxt_left span").text(curli + 1);
|
||||
$(".picmidmid li").css("display", "block");
|
||||
if (curli >= 5) {
|
||||
var cha = curli - 5;
|
||||
for (var i = 0; i <= cha; i++) {
|
||||
getli.eq(i).css("display", "none")
|
||||
}
|
||||
}
|
||||
});
|
||||
setblock();
|
||||
function setblock() {
|
||||
|
||||
}
|
||||
$(window).resize(function() {
|
||||
setblock()
|
||||
});
|
||||
$(".closebtn1").click(function() {
|
||||
$(".firsttop").css("display", "none");
|
||||
$(".bodymodal").css("display", "none")
|
||||
});
|
||||
$(".closebtn2").click(function() {
|
||||
$(".endtop").css("display", "none");
|
||||
$(".bodymodal").css("display", "none")
|
||||
});
|
||||
$(".replaybtn1").click(function() {
|
||||
$(".firsttop").css("display", "none");
|
||||
$(".bodymodal").css("display", "none")
|
||||
});
|
||||
$(".replaybtn2").click(function() {
|
||||
$(".endtop").css("display", "none");
|
||||
$(".bodymodal").css("display", "none");
|
||||
$(".detail_picbot_mid ul li img[class='selectpic']").removeClass("selectpic");
|
||||
$(".detail_picbot_mid ul li").eq(0).find("img").addClass("selectpic");
|
||||
var bigimgsrc = $(".detail_picbot_mid ul li").eq(0).find("img").attr("bigimg");
|
||||
$("#pic1").attr("src", bigimgsrc);
|
||||
$("#pic1").attr("curindex", 0)
|
||||
});
|
||||
$(".list").click(function() {
|
||||
$(".picshow").css("display", "none");
|
||||
$(".piclistshow").css("display", "block");
|
||||
$(".source_right").css("display", "none");
|
||||
$(".source_right1").css("display", "block")
|
||||
});
|
||||
$(".gaoqing").click(function() {
|
||||
showgaoqing();
|
||||
});
|
||||
function showgaoqing() {
|
||||
$(".picshow").css("display", "block");
|
||||
$(".piclistshow").css("display", "none");
|
||||
$(".source_right").css("display", "block");
|
||||
$(".source_right1").css("display", "none")
|
||||
}
|
||||
$(".rank ul").first().css("display", "block");
|
||||
$(".ranknext").click(function() {
|
||||
var showindex = $(this).attr("show");
|
||||
var show = parseInt(showindex) + 1;
|
||||
var length = $(".rank ul").length;
|
||||
if (show < length) {
|
||||
$(".rank ul").eq(showindex).css("display", "none");
|
||||
$(".rank ul").eq(show).css("display", "block");
|
||||
$(this).attr("show", show);
|
||||
$(".rank ul").eq(show).find("img").lazyload()
|
||||
} else {
|
||||
$(".rank ul").css("display", "none");
|
||||
$(".rank ul").first().css("display", "block");
|
||||
$(this).attr("show", 0);
|
||||
$(".rank ul").first().find("img").lazyload()
|
||||
}
|
||||
});
|
||||
$(".tuijian").click(function() {
|
||||
var showindex = $(this).attr("show");
|
||||
var show = parseInt(showindex) + 1;
|
||||
var length = $(".rank1 ul").length;
|
||||
if (show < length) {
|
||||
$(".rank1 ul").eq(showindex).css("display", "none");
|
||||
$(".rank1 ul").eq(show).css("display", "block");
|
||||
$(this).attr("show", show)
|
||||
} else {
|
||||
$(".rank1 ul").css("display", "none");
|
||||
$(".rank1 ul").first().css("display", "block");
|
||||
$(this).attr("show", 0)
|
||||
}
|
||||
});
|
||||
});
|
413
SinkDark/publicStatic/js/scrollReveal.js
Normal file
@ -0,0 +1,413 @@
|
||||
/*
|
||||
_ _ _____ _ _
|
||||
| | | __ \ | | (_)
|
||||
___ ___ _ __ ___ | | | |__) |_____ _____ __ _| | _ ___
|
||||
/ __|/ __| '__/ _ \| | | _ // _ \ \ / / _ \/ _` | | | / __|
|
||||
\__ \ (__| | | (_) | | | | \ \ __/\ V / __/ (_| | |_| \__ \
|
||||
|___/\___|_| \___/|_|_|_| \_\___| \_/ \___|\__,_|_(_) |___/ v.0.1.3
|
||||
_/ |
|
||||
|__/
|
||||
|
||||
"Declarative on-scroll reveal animations."
|
||||
|
||||
/*=============================================================================
|
||||
|
||||
scrollReveal.js was inspired by cbpScroller.js (c) 2014 Codrops.
|
||||
|
||||
Licensed under the MIT license.
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
/*! scrollReveal.js v0.1.3 (c) 2014 Julian Lloyd | MIT license */
|
||||
|
||||
/*===========================================================================*/
|
||||
|
||||
|
||||
window.scrollReveal = (function (window) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// generator (increments) for the next scroll-reveal-id
|
||||
var nextId = 1;
|
||||
|
||||
/**
|
||||
* RequestAnimationFrame polyfill
|
||||
* @function
|
||||
* @private
|
||||
*/
|
||||
var requestAnimFrame = (function () {
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
function (callback) {
|
||||
window.setTimeout(callback, 1000 / 60);
|
||||
};
|
||||
}());
|
||||
|
||||
function scrollReveal(options) {
|
||||
|
||||
this.options = this.extend(this.defaults, options);
|
||||
this.docElem = this.options.elem;
|
||||
this.styleBank = {};
|
||||
|
||||
if (this.options.init == true) this.init();
|
||||
}
|
||||
|
||||
scrollReveal.prototype = {
|
||||
|
||||
defaults: {
|
||||
after: '0s',
|
||||
enter: 'bottom',
|
||||
move: '24px',
|
||||
over: '0.66s',
|
||||
easing: 'ease-in-out',
|
||||
opacity: 0,
|
||||
complete: function() {},
|
||||
|
||||
// if 0, the element is considered in the viewport as soon as it enters
|
||||
// if 1, the element is considered in the viewport when it's fully visible
|
||||
viewportFactor: 0.33,
|
||||
|
||||
// if false, animations occur only once
|
||||
// if true, animations occur each time an element enters the viewport
|
||||
reset: false,
|
||||
|
||||
// if true, scrollReveal.init() is automaticaly called upon instantiation
|
||||
init: true,
|
||||
elem: window.document.documentElement
|
||||
},
|
||||
|
||||
/*=============================================================================*/
|
||||
|
||||
init: function () {
|
||||
|
||||
this.scrolled = false;
|
||||
|
||||
var self = this;
|
||||
|
||||
// Check DOM for the data-scrollReveal attribute
|
||||
// and initialize all found elements.
|
||||
this.elems = Array.prototype.slice.call(this.docElem.querySelectorAll('[data-scroll-reveal]'));
|
||||
this.elems.forEach(function (el, i) {
|
||||
|
||||
// Capture original style attribute
|
||||
var id = el.getAttribute("data-scroll-reveal-id");
|
||||
if (!id) {
|
||||
id = nextId++;
|
||||
el.setAttribute("data-scroll-reveal-id", id);
|
||||
}
|
||||
if (!self.styleBank[id]) {
|
||||
self.styleBank[id] = el.getAttribute('style');
|
||||
}
|
||||
|
||||
self.update(el);
|
||||
});
|
||||
|
||||
var scrollHandler = function (e) {
|
||||
// No changing, exit
|
||||
if (!self.scrolled) {
|
||||
self.scrolled = true;
|
||||
requestAnimFrame(function () {
|
||||
self._scrollPage();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var resizeHandler = function () {
|
||||
|
||||
// If we’re still waiting for settimeout, reset the timer.
|
||||
if (self.resizeTimeout) {
|
||||
clearTimeout(self.resizeTimeout);
|
||||
}
|
||||
function delayed() {
|
||||
self._scrollPage();
|
||||
self.resizeTimeout = null;
|
||||
}
|
||||
self.resizeTimeout = setTimeout(delayed, 200);
|
||||
};
|
||||
|
||||
// captureScroll
|
||||
if (this.docElem == window.document.documentElement) {
|
||||
window.addEventListener('scroll', scrollHandler, false);
|
||||
window.addEventListener('resize', resizeHandler, false);
|
||||
}
|
||||
else {
|
||||
this.docElem.addEventListener('scroll', scrollHandler, false);
|
||||
}
|
||||
},
|
||||
|
||||
/*=============================================================================*/
|
||||
|
||||
_scrollPage: function () {
|
||||
var self = this;
|
||||
|
||||
this.elems.forEach(function (el, i) {
|
||||
self.update(el);
|
||||
});
|
||||
this.scrolled = false;
|
||||
},
|
||||
|
||||
/*=============================================================================*/
|
||||
|
||||
parseLanguage: function (el) {
|
||||
|
||||
// Splits on a sequence of one or more commas or spaces.
|
||||
var words = el.getAttribute('data-scroll-reveal').split(/[, ]+/),
|
||||
parsed = {};
|
||||
|
||||
function filter (words) {
|
||||
var ret = [],
|
||||
|
||||
blacklist = [
|
||||
"from",
|
||||
"the",
|
||||
"and",
|
||||
"then",
|
||||
"but",
|
||||
"with"
|
||||
];
|
||||
|
||||
words.forEach(function (word, i) {
|
||||
if (blacklist.indexOf(word) > -1) {
|
||||
return;
|
||||
}
|
||||
ret.push(word);
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
words = filter(words);
|
||||
|
||||
words.forEach(function (word, i) {
|
||||
|
||||
switch (word) {
|
||||
case "enter":
|
||||
parsed.enter = words[i + 1];
|
||||
return;
|
||||
|
||||
case "after":
|
||||
parsed.after = words[i + 1];
|
||||
return;
|
||||
|
||||
case "wait":
|
||||
parsed.after = words[i + 1];
|
||||
return;
|
||||
|
||||
case "move":
|
||||
parsed.move = words[i + 1];
|
||||
return;
|
||||
|
||||
case "ease":
|
||||
parsed.move = words[i + 1];
|
||||
parsed.ease = "ease";
|
||||
return;
|
||||
|
||||
case "ease-in":
|
||||
parsed.move = words[i + 1];
|
||||
parsed.easing = "ease-in";
|
||||
return;
|
||||
|
||||
case "ease-in-out":
|
||||
parsed.move = words[i + 1];
|
||||
parsed.easing = "ease-in-out";
|
||||
return;
|
||||
|
||||
case "ease-out":
|
||||
parsed.move = words[i + 1];
|
||||
parsed.easing = "ease-out";
|
||||
return;
|
||||
|
||||
case "over":
|
||||
parsed.over = words[i + 1];
|
||||
return;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
return parsed;
|
||||
},
|
||||
|
||||
|
||||
/*=============================================================================*/
|
||||
|
||||
update: function (el) {
|
||||
|
||||
var that = this;
|
||||
var css = this.genCSS(el);
|
||||
var style = this.styleBank[el.getAttribute("data-scroll-reveal-id")];
|
||||
|
||||
if (style != null) style += ";"; else style = "";
|
||||
|
||||
if (!el.getAttribute('data-scroll-reveal-initialized')) {
|
||||
el.setAttribute('style', style + css.initial);
|
||||
el.setAttribute('data-scroll-reveal-initialized', true);
|
||||
}
|
||||
|
||||
if (!this.isElementInViewport(el, this.options.viewportFactor)) {
|
||||
if (this.options.reset) {
|
||||
el.setAttribute('style', style + css.initial + css.reset);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (el.getAttribute('data-scroll-reveal-complete')) return;
|
||||
|
||||
if (this.isElementInViewport(el, this.options.viewportFactor)) {
|
||||
el.setAttribute('style', style + css.target + css.transition);
|
||||
// Without reset enabled, we can safely remove the style tag
|
||||
// to prevent CSS specificy wars with authored CSS.
|
||||
if (!this.options.reset) {
|
||||
setTimeout(function () {
|
||||
if (style != "") {
|
||||
el.setAttribute('style', style);
|
||||
} else {
|
||||
el.removeAttribute('style');
|
||||
}
|
||||
el.setAttribute('data-scroll-reveal-complete',true);
|
||||
that.options.complete(el);
|
||||
}, css.totalDuration);
|
||||
}
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
/*=============================================================================*/
|
||||
|
||||
genCSS: function (el) {
|
||||
var parsed = this.parseLanguage(el),
|
||||
enter,
|
||||
axis;
|
||||
|
||||
if (parsed.enter) {
|
||||
|
||||
if (parsed.enter == "top" || parsed.enter == "bottom") {
|
||||
enter = parsed.enter;
|
||||
axis = "y";
|
||||
}
|
||||
|
||||
if (parsed.enter == "left" || parsed.enter == "right") {
|
||||
enter = parsed.enter;
|
||||
axis = "x";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (this.options.enter == "top" || this.options.enter == "bottom") {
|
||||
enter = this.options.enter
|
||||
axis = "y";
|
||||
}
|
||||
|
||||
if (this.options.enter == "left" || this.options.enter == "right") {
|
||||
enter = this.options.enter
|
||||
axis = "x";
|
||||
}
|
||||
}
|
||||
|
||||
// After all values are parsed, let’s make sure our our
|
||||
// pixel distance is negative for top and left entrances.
|
||||
//
|
||||
// ie. "move 25px from top" starts at 'top: -25px' in CSS.
|
||||
|
||||
if (enter == "top" || enter == "left") {
|
||||
if (parsed.move) {
|
||||
parsed.move = "-" + parsed.move;
|
||||
}
|
||||
else {
|
||||
parsed.move = "-" + this.options.move;
|
||||
}
|
||||
}
|
||||
|
||||
var dist = parsed.move || this.options.move,
|
||||
dur = parsed.over || this.options.over,
|
||||
delay = parsed.after || this.options.after,
|
||||
easing = parsed.easing || this.options.easing,
|
||||
opacity = parsed.opacity || this.options.opacity;
|
||||
|
||||
var transition = "-webkit-transition: -webkit-transform " + dur + " " + easing + " " + delay + ", opacity " + dur + " " + easing + " " + delay + ";" +
|
||||
"transition: transform " + dur + " " + easing + " " + delay + ", opacity " + dur + " " + easing + " " + delay + ";" +
|
||||
"-webkit-perspective: 1000;" +
|
||||
"-webkit-backface-visibility: hidden;";
|
||||
|
||||
// The same as transition, but removing the delay for elements fading out.
|
||||
var reset = "-webkit-transition: -webkit-transform " + dur + " " + easing + " 0s, opacity " + dur + " " + easing + " " + delay + ";" +
|
||||
"transition: transform " + dur + " " + easing + " 0s, opacity " + dur + " " + easing + " " + delay + ";" +
|
||||
"-webkit-perspective: 1000;" +
|
||||
"-webkit-backface-visibility: hidden;";
|
||||
|
||||
var initial = "-webkit-transform: translate" + axis + "(" + dist + ");" +
|
||||
"transform: translate" + axis + "(" + dist + ");" +
|
||||
"opacity: " + opacity + ";";
|
||||
|
||||
var target = "-webkit-transform: translate" + axis + "(0);" +
|
||||
"transform: translate" + axis + "(0);" +
|
||||
"opacity: 1;";
|
||||
return {
|
||||
transition: transition,
|
||||
initial: initial,
|
||||
target: target,
|
||||
reset: reset,
|
||||
totalDuration: ((parseFloat(dur) + parseFloat(delay)) * 1000)
|
||||
};
|
||||
},
|
||||
|
||||
getViewportH : function () {
|
||||
var client = this.docElem['clientHeight'],
|
||||
inner = window['innerHeight'];
|
||||
|
||||
if (this.docElem == window.document.documentElement)
|
||||
return (client < inner) ? inner : client;
|
||||
else
|
||||
return client;
|
||||
},
|
||||
|
||||
getOffset : function(el) {
|
||||
var offsetTop = 0,
|
||||
offsetLeft = 0;
|
||||
|
||||
do {
|
||||
if (!isNaN(el.offsetTop)) {
|
||||
offsetTop += el.offsetTop;
|
||||
}
|
||||
if (!isNaN(el.offsetLeft)) {
|
||||
offsetLeft += el.offsetLeft;
|
||||
}
|
||||
} while (el = el.offsetParent)
|
||||
|
||||
return {
|
||||
top: offsetTop,
|
||||
left: offsetLeft
|
||||
}
|
||||
},
|
||||
|
||||
isElementInViewport : function(el, h) {
|
||||
var scrolled = this.docElem.scrollTop + this.docElem.offsetTop;
|
||||
if (this.docElem == window.document.documentElement)scrolled = window.pageYOffset;
|
||||
var
|
||||
viewed = scrolled + this.getViewportH(),
|
||||
elH = el.offsetHeight,
|
||||
elTop = this.getOffset(el).top,
|
||||
elBottom = elTop + elH,
|
||||
h = h || 0;
|
||||
|
||||
return (elTop + elH * h) <= viewed
|
||||
&& (elBottom) >= scrolled
|
||||
|| (el.currentStyle? el.currentStyle : window.getComputedStyle(el, null)).position == 'fixed';
|
||||
},
|
||||
|
||||
extend: function (a, b){
|
||||
for (var key in b) {
|
||||
if (b.hasOwnProperty(key)) {
|
||||
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}; // end scrollReveal.prototype
|
||||
|
||||
return scrollReveal;
|
||||
})(window);
|
36
SinkDark/publicStatic/js/user.js
Normal file
@ -0,0 +1,36 @@
|
||||
$(function(){
|
||||
$('#username').focus().blur(checkName);
|
||||
$('#password').blur(checkPassword);
|
||||
});
|
||||
|
||||
function checkName(){
|
||||
var name = $('#username').val();
|
||||
if(name == null || name == ""){
|
||||
//提示错误
|
||||
$('#count-msg').html("不能为空哦!");
|
||||
return false;
|
||||
}
|
||||
var reg = /^\w{3,10}$/;
|
||||
if(!reg.test(name)){
|
||||
$('#count-msg').html("输入3-10个字母或数字或下划线!");
|
||||
return false;
|
||||
}
|
||||
$('#count-msg').empty();
|
||||
return true;
|
||||
}
|
||||
|
||||
function checkPassword(){
|
||||
var password = $('#password').val();
|
||||
if(password == null || password == ""){
|
||||
//提示错误
|
||||
$('#password-msg').html("密码不能为空");
|
||||
return false;
|
||||
}
|
||||
var reg = /^\w{3,10}$/;
|
||||
if(!reg.test(password)){
|
||||
$('#password-msg').html("输入3-10个字母或数字或下划线");
|
||||
return false;
|
||||
}
|
||||
$('#password-msg').empty();
|
||||
return true;
|
||||
}
|
260
SinkDark/static/admin/css/autocomplete.css
Normal file
@ -0,0 +1,260 @@
|
||||
select.admin-autocomplete {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single,
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple {
|
||||
min-height: 30px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection {
|
||||
border-color: #999;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--single,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--single {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--multiple,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--multiple {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple {
|
||||
border: solid #999 1px;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[role=group] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[aria-disabled=true] {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #79aec8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px;
|
||||
}
|
987
SinkDark/static/admin/css/base.css
Normal file
@ -0,0 +1,987 @@
|
||||
/*
|
||||
DJANGO Admin styles
|
||||
*/
|
||||
|
||||
@import url(fonts.css);
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* LINKS */
|
||||
|
||||
a:link, a:visited {
|
||||
color: #447e9b;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:focus, a:hover {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
a.section:link, a.section:visited {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.section:focus, a.section:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* GLOBAL DEFAULTS */
|
||||
|
||||
p, ol, ul, dl {
|
||||
margin: .2em 0 .8em 0;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 20px;
|
||||
font-weight: 300;
|
||||
font-size: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
margin: 1em 0 .5em 0;
|
||||
}
|
||||
|
||||
h2.subhead {
|
||||
font-weight: normal;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
margin: .8em 0 .3em 0;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 12px;
|
||||
margin: 1em 0 .8em 0;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 10px;
|
||||
margin: 1.5em 0 .5em 0;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style-type: square;
|
||||
padding: 1px 0;
|
||||
}
|
||||
|
||||
li ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li, dt, dd {
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
margin-left: 2px;
|
||||
padding-left: 10px;
|
||||
border-left: 5px solid #ddd;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
pre.literal-block {
|
||||
margin: 10px;
|
||||
background: #eee;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
code strong {
|
||||
color: #930;
|
||||
}
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
color: #eee;
|
||||
background-color: #eee;
|
||||
height: 1px;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
|
||||
/* TEXT STYLES & MODIFIERS */
|
||||
|
||||
.small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tiny {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
p.tiny {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.mini {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
p.mini {
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.help, p.help, form p.help, div.help, form div.help, div.help li {
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div.help ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.help-tooltip {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
p img, h1 img, h2 img, h3 img, h4 img, td img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.quiet, a.quiet:link, a.quiet:visited {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.float-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.example {
|
||||
margin: 10px 0;
|
||||
padding: 5px 10px;
|
||||
background: #efefef;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* TABLES */
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
td, th {
|
||||
font-size: 13px;
|
||||
line-height: 16px;
|
||||
border-bottom: 1px solid #eee;
|
||||
vertical-align: top;
|
||||
padding: 8px;
|
||||
font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
thead th,
|
||||
tfoot td {
|
||||
color: #666;
|
||||
padding: 5px 10px;
|
||||
font-size: 11px;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
tfoot td {
|
||||
border-bottom: none;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
thead th.required {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
tr.alt {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.row1 {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
/* SORTABLE TABLES */
|
||||
|
||||
thead th {
|
||||
padding: 5px 10px;
|
||||
line-height: normal;
|
||||
text-transform: uppercase;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
thead th a:link, thead th a:visited {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
thead th.sorted {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
thead th.sorted .text {
|
||||
padding-right: 42px;
|
||||
}
|
||||
|
||||
table thead th .text span {
|
||||
padding: 8px 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
table thead th .text a {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
table thead th .text a:focus, table thead th .text a:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
thead th.sorted a.sortremove {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
table thead th.sorted:hover a.sortremove {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions {
|
||||
display: block;
|
||||
padding: 9px 5px 0 5px;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortpriority {
|
||||
font-size: .8em;
|
||||
min-width: 12px;
|
||||
text-align: center;
|
||||
vertical-align: 3px;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a {
|
||||
position: relative;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
display: inline-block;
|
||||
background: url(../img/sorting-icons.svg) 0 0 no-repeat;
|
||||
background-size: 14px auto;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.sortremove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.sortremove:after {
|
||||
content: '\\';
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 3px;
|
||||
font-weight: 200;
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.sortremove:focus:after,
|
||||
table thead th.sorted .sortoptions a.sortremove:hover:after {
|
||||
color: #447e9b;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.sortremove:focus,
|
||||
table thead th.sorted .sortoptions a.sortremove:hover {
|
||||
background-position: 0 -14px;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.ascending {
|
||||
background-position: 0 -28px;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.ascending:focus,
|
||||
table thead th.sorted .sortoptions a.ascending:hover {
|
||||
background-position: 0 -42px;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.descending {
|
||||
top: 1px;
|
||||
background-position: 0 -56px;
|
||||
}
|
||||
|
||||
table thead th.sorted .sortoptions a.descending:focus,
|
||||
table thead th.sorted .sortoptions a.descending:hover {
|
||||
background-position: 0 -70px;
|
||||
}
|
||||
|
||||
/* FORM DEFAULTS */
|
||||
|
||||
input, textarea, select, .form-row p, form .button {
|
||||
margin: 2px 0;
|
||||
padding: 2px 3px;
|
||||
vertical-align: middle;
|
||||
font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
.form-row div.help {
|
||||
padding: 2px 3px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
input[type=text], input[type=password], input[type=email], input[type=url],
|
||||
input[type=number], input[type=tel], textarea, select, .vTextField {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
padding: 5px 6px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
|
||||
input[type=url]:focus, input[type=number]:focus, input[type=tel]:focus,
|
||||
textarea:focus, select:focus, .vTextField:focus {
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
select {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
select[multiple] {
|
||||
/* Allow HTML size attribute to override the height in the rule above. */
|
||||
height: auto;
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
/* FORM BUTTONS */
|
||||
|
||||
.button, input[type=submit], input[type=button], .submit-row input, a.button {
|
||||
background: #79aec8;
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.button {
|
||||
padding: 4px 5px;
|
||||
}
|
||||
|
||||
.button:active, input[type=submit]:active, input[type=button]:active,
|
||||
.button:focus, input[type=submit]:focus, input[type=button]:focus,
|
||||
.button:hover, input[type=submit]:hover, input[type=button]:hover {
|
||||
background: #609ab6;
|
||||
}
|
||||
|
||||
.button[disabled], input[type=submit][disabled], input[type=button][disabled] {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.button.default, input[type=submit].default, .submit-row input.default {
|
||||
float: right;
|
||||
border: none;
|
||||
font-weight: 400;
|
||||
background: #417690;
|
||||
}
|
||||
|
||||
.button.default:active, input[type=submit].default:active,
|
||||
.button.default:focus, input[type=submit].default:focus,
|
||||
.button.default:hover, input[type=submit].default:hover {
|
||||
background: #205067;
|
||||
}
|
||||
|
||||
.button[disabled].default,
|
||||
input[type=submit][disabled].default,
|
||||
input[type=button][disabled].default {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
|
||||
/* MODULES */
|
||||
|
||||
.module {
|
||||
border: none;
|
||||
margin-bottom: 30px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.module p, .module ul, .module h3, .module h4, .module dl, .module pre {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.module blockquote {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.module ul, .module ol {
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.module h3 {
|
||||
margin-top: .6em;
|
||||
}
|
||||
|
||||
.module h2, .module caption, .inline-group h2 {
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
background: #79aec8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.module caption,
|
||||
.inline-group h2 {
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.module table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* MESSAGES & ERRORS */
|
||||
|
||||
ul.messagelist {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul.messagelist li {
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
padding: 10px 10px 10px 65px;
|
||||
margin: 0 0 10px 0;
|
||||
background: #dfd url(../img/icon-yes.svg) 40px 12px no-repeat;
|
||||
background-size: 16px auto;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
ul.messagelist li.warning {
|
||||
background: #ffc url(../img/icon-alert.svg) 40px 14px no-repeat;
|
||||
background-size: 14px auto;
|
||||
}
|
||||
|
||||
ul.messagelist li.error {
|
||||
background: #ffefef url(../img/icon-no.svg) 40px 12px no-repeat;
|
||||
background-size: 16px auto;
|
||||
}
|
||||
|
||||
.errornote {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
padding: 10px 12px;
|
||||
margin: 0 0 10px 0;
|
||||
color: #ba2121;
|
||||
border: 1px solid #ba2121;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
background-position: 5px 12px;
|
||||
}
|
||||
|
||||
ul.errorlist {
|
||||
margin: 0 0 4px;
|
||||
padding: 0;
|
||||
color: #ba2121;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
ul.errorlist li {
|
||||
font-size: 13px;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
ul.errorlist li:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ul.errorlist li a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
td ul.errorlist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td ul.errorlist li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.form-row.errors {
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.form-row.errors ul.errorlist li {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.errors input, .errors select, .errors textarea {
|
||||
border: 1px solid #ba2121;
|
||||
}
|
||||
|
||||
div.system-message {
|
||||
background: #ffc;
|
||||
margin: 10px;
|
||||
padding: 6px 8px;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
padding: 4px 5px 4px 25px;
|
||||
margin: 0;
|
||||
color: #c11;
|
||||
background: #ffefef url(../img/icon-no.svg) 5px 5px no-repeat;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 12px;
|
||||
padding: 5px 0 0 12px;
|
||||
}
|
||||
|
||||
/* BREADCRUMBS */
|
||||
|
||||
div.breadcrumbs {
|
||||
background: #79aec8;
|
||||
padding: 10px 40px;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
color: #c4dce8;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.breadcrumbs a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.breadcrumbs a:focus, div.breadcrumbs a:hover {
|
||||
color: #c4dce8;
|
||||
}
|
||||
|
||||
/* ACTION ICONS */
|
||||
|
||||
.viewlink, .inlineviewlink {
|
||||
padding-left: 16px;
|
||||
background: url(../img/icon-viewlink.svg) 0 1px no-repeat;
|
||||
}
|
||||
|
||||
.addlink {
|
||||
padding-left: 16px;
|
||||
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
|
||||
}
|
||||
|
||||
.changelink, .inlinechangelink {
|
||||
padding-left: 16px;
|
||||
background: url(../img/icon-changelink.svg) 0 1px no-repeat;
|
||||
}
|
||||
|
||||
.deletelink {
|
||||
padding-left: 16px;
|
||||
background: url(../img/icon-deletelink.svg) 0 1px no-repeat;
|
||||
}
|
||||
|
||||
a.deletelink:link, a.deletelink:visited {
|
||||
color: #CC3434;
|
||||
}
|
||||
|
||||
a.deletelink:focus, a.deletelink:hover {
|
||||
color: #993333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* OBJECT TOOLS */
|
||||
|
||||
.object-tools {
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
padding-left: 0;
|
||||
float: right;
|
||||
position: relative;
|
||||
margin-top: -48px;
|
||||
}
|
||||
|
||||
.form-row .object-tools {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
float: none;
|
||||
height: 2em;
|
||||
padding-left: 3.5em;
|
||||
}
|
||||
|
||||
.object-tools li {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.object-tools a {
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.object-tools a:link, .object-tools a:visited {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 3px 12px;
|
||||
background: #999;
|
||||
font-weight: 400;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.object-tools a:focus, .object-tools a:hover {
|
||||
background-color: #417690;
|
||||
}
|
||||
|
||||
.object-tools a:focus{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.object-tools a.viewsitelink, .object-tools a.golink,.object-tools a.addlink {
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 7px center;
|
||||
padding-right: 26px;
|
||||
}
|
||||
|
||||
.object-tools a.viewsitelink, .object-tools a.golink {
|
||||
background-image: url(../img/tooltag-arrowright.svg);
|
||||
}
|
||||
|
||||
.object-tools a.addlink {
|
||||
background-image: url(../img/tooltag-add.svg);
|
||||
}
|
||||
|
||||
/* OBJECT HISTORY */
|
||||
|
||||
table#change-history {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table#change-history tbody th {
|
||||
width: 16em;
|
||||
}
|
||||
|
||||
/* PAGE STRUCTURE */
|
||||
|
||||
#container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-width: 980px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 20px 40px;
|
||||
}
|
||||
|
||||
.dashboard #content {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
#content-main {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#content-related {
|
||||
float: right;
|
||||
width: 260px;
|
||||
position: relative;
|
||||
margin-right: -300px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
clear: both;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* COLUMN TYPES */
|
||||
|
||||
.colMS {
|
||||
margin-right: 300px;
|
||||
}
|
||||
|
||||
.colSM {
|
||||
margin-left: 300px;
|
||||
}
|
||||
|
||||
.colSM #content-related {
|
||||
float: left;
|
||||
margin-right: 0;
|
||||
margin-left: -300px;
|
||||
}
|
||||
|
||||
.colSM #content-main {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.popup .colM {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* HEADER */
|
||||
|
||||
#header {
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 40px;
|
||||
background: #417690;
|
||||
color: #ffc;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#header a:link, #header a:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#header a:focus , #header a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#branding {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#branding h1 {
|
||||
padding: 0;
|
||||
margin: 0 20px 0 0;
|
||||
font-weight: 300;
|
||||
font-size: 24px;
|
||||
color: #f5dd5d;
|
||||
}
|
||||
|
||||
#branding h1, #branding h1 a:link, #branding h1 a:visited {
|
||||
color: #f5dd5d;
|
||||
}
|
||||
|
||||
#branding h2 {
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
margin: -8px 0 8px 0;
|
||||
font-weight: normal;
|
||||
color: #ffc;
|
||||
}
|
||||
|
||||
#branding a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#user-tools {
|
||||
float: right;
|
||||
padding: 0;
|
||||
margin: 0 0 0 20px;
|
||||
font-weight: 300;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#user-tools a {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
#user-tools a:focus, #user-tools a:hover {
|
||||
text-decoration: none;
|
||||
border-bottom-color: #79aec8;
|
||||
color: #79aec8;
|
||||
}
|
||||
|
||||
/* SIDEBAR */
|
||||
|
||||
#content-related {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
#content-related .module {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#content-related h3 {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
padding: 0 16px;
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
#content-related h4 {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#content-related p {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
#content-related .actionlist {
|
||||
padding: 0;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
#content-related .actionlist li {
|
||||
line-height: 1.2;
|
||||
margin-bottom: 10px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
#content-related .module h2 {
|
||||
background: none;
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.delete-confirmation form input[type="submit"] {
|
||||
background: #ba2121;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.delete-confirmation form input[type="submit"]:active,
|
||||
.delete-confirmation form input[type="submit"]:focus,
|
||||
.delete-confirmation form input[type="submit"]:hover {
|
||||
background: #a41515;
|
||||
}
|
||||
|
||||
.delete-confirmation form .cancel-link {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
background: #ddd;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
color: #333;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.delete-confirmation form .cancel-link:active,
|
||||
.delete-confirmation form .cancel-link:focus,
|
||||
.delete-confirmation form .cancel-link:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
/* POPUP */
|
||||
.popup #content {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.popup #container {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.popup #header {
|
||||
padding: 10px 20px;
|
||||
}
|
344
SinkDark/static/admin/css/changelists.css
Normal file
@ -0,0 +1,344 @@
|
||||
/* CHANGELISTS */
|
||||
|
||||
#changelist {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#changelist table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.change-list .hiddenfields { display:none; }
|
||||
|
||||
.change-list .filtered table {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.change-list .filtered {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.change-list .filtered .results, .change-list .filtered .paginator,
|
||||
.filtered #toolbar, .filtered div.xfull {
|
||||
margin-right: 280px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.change-list .filtered table tbody th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
#changelist-form .results {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
#changelist .toplinks {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#changelist .paginator {
|
||||
color: #666;
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* CHANGELIST TABLES */
|
||||
|
||||
#changelist table thead th {
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#changelist table thead th.action-checkbox-column {
|
||||
width: 1.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#changelist table tbody td.action-checkbox {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#changelist table tfoot {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* TOOLBAR */
|
||||
|
||||
#changelist #toolbar {
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 15px;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#changelist #toolbar form input {
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 5px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#changelist #toolbar form #searchbar {
|
||||
height: 19px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 5px;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#changelist #toolbar form #searchbar:focus {
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
#changelist #toolbar form input[type="submit"] {
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 10px;
|
||||
margin: 0;
|
||||
vertical-align: middle;
|
||||
background: #fff;
|
||||
box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#changelist #toolbar form input[type="submit"]:focus,
|
||||
#changelist #toolbar form input[type="submit"]:hover {
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
#changelist #changelist-search img {
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* FILTER COLUMN */
|
||||
|
||||
#changelist-filter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
width: 240px;
|
||||
background: #f8f8f8;
|
||||
border-left: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#changelist-filter h2 {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 5px 15px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#changelist-filter h3 {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
padding: 0 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#changelist-filter ul {
|
||||
margin: 5px 0;
|
||||
padding: 0 15px 15px;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
#changelist-filter ul:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: none;
|
||||
}
|
||||
|
||||
#changelist-filter li {
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#changelist-filter a {
|
||||
display: block;
|
||||
color: #999;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
border-left: 5px solid #eaeaea;
|
||||
padding-left: 10px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected a {
|
||||
color: #5b80b2;
|
||||
}
|
||||
|
||||
#changelist-filter a:focus, #changelist-filter a:hover,
|
||||
#changelist-filter li.selected a:focus,
|
||||
#changelist-filter li.selected a:hover {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
/* DATE DRILLDOWN */
|
||||
|
||||
.change-list ul.toplinks {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.change-list ul.toplinks li {
|
||||
padding: 3px 6px;
|
||||
font-weight: bold;
|
||||
list-style-type: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.change-list ul.toplinks .date-back a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.change-list ul.toplinks .date-back a:focus,
|
||||
.change-list ul.toplinks .date-back a:hover {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
/* PAGINATOR */
|
||||
|
||||
.paginator {
|
||||
font-size: 13px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
line-height: 22px;
|
||||
margin: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.paginator a:link, .paginator a:visited {
|
||||
padding: 2px 6px;
|
||||
background: #79aec8;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.paginator a.showall {
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #5b80b2;
|
||||
}
|
||||
|
||||
.paginator a.showall:focus, .paginator a.showall:hover {
|
||||
background: none;
|
||||
color: #036;
|
||||
}
|
||||
|
||||
.paginator .end {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.paginator .this-page {
|
||||
padding: 2px 6px;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.paginator a:focus, .paginator a:hover {
|
||||
color: white;
|
||||
background: #036;
|
||||
}
|
||||
|
||||
/* ACTIONS */
|
||||
|
||||
.filtered .actions {
|
||||
margin-right: 280px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#changelist table input {
|
||||
margin: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
#changelist table tbody tr.selected {
|
||||
background-color: #FFFFCC;
|
||||
}
|
||||
|
||||
#changelist .actions {
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
line-height: 24px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#changelist .actions.selected {
|
||||
background: #fffccf;
|
||||
border-top: 1px solid #fffee8;
|
||||
border-bottom: 1px solid #edecd6;
|
||||
}
|
||||
|
||||
#changelist .actions span.all,
|
||||
#changelist .actions span.action-counter,
|
||||
#changelist .actions span.clear,
|
||||
#changelist .actions span.question {
|
||||
font-size: 13px;
|
||||
margin: 0 0.5em;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#changelist .actions:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
vertical-align: top;
|
||||
height: 24px;
|
||||
background: none;
|
||||
color: #000;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 0 0 0 4px;
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#changelist .actions select:focus {
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#changelist .actions .button {
|
||||
font-size: 13px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
background: #fff;
|
||||
box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
|
||||
cursor: pointer;
|
||||
height: 24px;
|
||||
line-height: 1;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#changelist .actions .button:focus, #changelist .actions .button:hover {
|
||||
border-color: #999;
|
||||
}
|
130
SinkDark/static/admin/css/dark_mode.css
Normal file
@ -0,0 +1,130 @@
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary: #264b5d;
|
||||
--primary-fg: #f7f7f7;
|
||||
|
||||
--body-fg: #eeeeee;
|
||||
--body-bg: #121212;
|
||||
--body-quiet-color: #d0d0d0;
|
||||
--body-medium-color: #e0e0e0;
|
||||
--body-loud-color: #ffffff;
|
||||
|
||||
--breadcrumbs-link-fg: #e0e0e0;
|
||||
--breadcrumbs-bg: var(--primary);
|
||||
|
||||
--link-fg: #81d4fa;
|
||||
--link-hover-color: #4ac1f7;
|
||||
--link-selected-fg: #6f94c6;
|
||||
|
||||
--hairline-color: #272727;
|
||||
--border-color: #353535;
|
||||
|
||||
--error-fg: #e35f5f;
|
||||
--message-success-bg: #006b1b;
|
||||
--message-warning-bg: #583305;
|
||||
--message-error-bg: #570808;
|
||||
|
||||
--darkened-bg: #212121;
|
||||
--selected-bg: #1b1b1b;
|
||||
--selected-row: #00363a;
|
||||
|
||||
--close-button-bg: #333333;
|
||||
--close-button-hover-bg: #666666;
|
||||
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
html[data-theme="dark"] {
|
||||
--primary: #264b5d;
|
||||
--primary-fg: #f7f7f7;
|
||||
|
||||
--body-fg: #eeeeee;
|
||||
--body-bg: #121212;
|
||||
--body-quiet-color: #d0d0d0;
|
||||
--body-medium-color: #e0e0e0;
|
||||
--body-loud-color: #ffffff;
|
||||
|
||||
--breadcrumbs-link-fg: #e0e0e0;
|
||||
--breadcrumbs-bg: var(--primary);
|
||||
|
||||
--link-fg: #81d4fa;
|
||||
--link-hover-color: #4ac1f7;
|
||||
--link-selected-fg: #6f94c6;
|
||||
|
||||
--hairline-color: #272727;
|
||||
--border-color: #353535;
|
||||
|
||||
--error-fg: #e35f5f;
|
||||
--message-success-bg: #006b1b;
|
||||
--message-warning-bg: #583305;
|
||||
--message-error-bg: #570808;
|
||||
|
||||
--darkened-bg: #212121;
|
||||
--selected-bg: #1b1b1b;
|
||||
--selected-row: #00363a;
|
||||
|
||||
--close-button-bg: #333333;
|
||||
--close-button-hover-bg: #666666;
|
||||
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
/* THEME SWITCH */
|
||||
.theme-toggle {
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
vertical-align: middle;
|
||||
margin-inline-start: 5px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.theme-toggle svg {
|
||||
vertical-align: middle;
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
Fully hide screen reader text so we only show the one matching the current
|
||||
theme.
|
||||
*/
|
||||
.theme-toggle .visually-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html[data-theme="auto"] .theme-toggle .theme-label-when-auto {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .theme-toggle .theme-label-when-dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-toggle .theme-label-when-light {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ICONS */
|
||||
.theme-toggle svg.theme-icon-when-auto,
|
||||
.theme-toggle svg.theme-icon-when-dark,
|
||||
.theme-toggle svg.theme-icon-when-light {
|
||||
fill: var(--header-link-color);
|
||||
color: var(--header-bg);
|
||||
}
|
||||
|
||||
html[data-theme="auto"] .theme-toggle svg.theme-icon-when-auto {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
|
||||
display: block;
|
||||
}
|
27
SinkDark/static/admin/css/dashboard.css
Normal file
@ -0,0 +1,27 @@
|
||||
/* DASHBOARD */
|
||||
|
||||
.dashboard .module table th {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dashboard .module table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dashboard .module table td a {
|
||||
display: block;
|
||||
padding-right: .6em;
|
||||
}
|
||||
|
||||
/* RECENT ACTIONS MODULE */
|
||||
|
||||
.module ul.actionlist {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
ul.actionlist li {
|
||||
list-style-type: none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
20
SinkDark/static/admin/css/fonts.css
Normal file
@ -0,0 +1,20 @@
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('../fonts/Roboto-Bold-webfont.woff');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('../fonts/Roboto-Regular-webfont.woff');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('../fonts/Roboto-Light-webfont.woff');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
532
SinkDark/static/admin/css/forms.css
Normal file
@ -0,0 +1,532 @@
|
||||
@import url('widgets.css');
|
||||
|
||||
/* FORM ROWS */
|
||||
|
||||
.form-row {
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.form-row img, .form-row input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-row label input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
vertical-align: 0;
|
||||
}
|
||||
|
||||
form .form-row p {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* FORM LABELS */
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.required label, label.required {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form ul.radiolist li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
form ul.radiolist label {
|
||||
float: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
form ul.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline {
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
float: left;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
/* ALIGNED FIELDSETS */
|
||||
|
||||
.aligned label {
|
||||
display: block;
|
||||
padding: 4px 10px 0 0;
|
||||
float: left;
|
||||
width: 160px;
|
||||
word-wrap: break-word;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.aligned label:not(.vCheckboxLabel):after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.aligned label + p, .aligned label + div.help, .aligned label + div.readonly {
|
||||
padding: 6px 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 170px;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
display: inline;
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help,
|
||||
form .aligned div.help {
|
||||
clear: left;
|
||||
margin-top: 0;
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned label + p.help,
|
||||
form .aligned label + div.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help:last-child,
|
||||
form .aligned div.help:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
form .aligned input + p.help,
|
||||
form .aligned textarea + p.help,
|
||||
form .aligned select + p.help,
|
||||
form .aligned input + div.help,
|
||||
form .aligned textarea + div.help,
|
||||
form .aligned select + div.help {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
form .aligned table p {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
float: none;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
padding: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel + p.help,
|
||||
.aligned .vCheckboxLabel + div.help {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
.checkbox-row p.help,
|
||||
.checkbox-row div.help {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
fieldset .fieldBox {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
/* WIDE FIELDSETS */
|
||||
|
||||
.wide label {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
form .wide p,
|
||||
form .wide input + p.help,
|
||||
form .wide input + div.help {
|
||||
margin-left: 200px;
|
||||
}
|
||||
|
||||
form .wide p.help,
|
||||
form .wide div.help {
|
||||
padding-left: 38px;
|
||||
}
|
||||
|
||||
form div.help ul {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
/* COLLAPSED FIELDSETS */
|
||||
|
||||
fieldset.collapsed * {
|
||||
display: none;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2, fieldset.collapsed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
fieldset.collapsed {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2 {
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
fieldset .collapse-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
fieldset.collapsed .collapse-toggle {
|
||||
background: transparent;
|
||||
display: inline;
|
||||
color: #447e9b;
|
||||
}
|
||||
|
||||
/* MONOSPACE TEXTAREAS */
|
||||
|
||||
fieldset.monospace textarea {
|
||||
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
/* SUBMIT ROW */
|
||||
|
||||
.submit-row {
|
||||
padding: 12px 14px;
|
||||
margin: 0 0 20px;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.popup .submit-row {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.submit-row input {
|
||||
height: 35px;
|
||||
line-height: 15px;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.submit-row input.default {
|
||||
margin: 0 0 0 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.submit-row p {
|
||||
margin: 0.3em;
|
||||
}
|
||||
|
||||
.submit-row p.deletelink-box {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
display: block;
|
||||
background: #ba2121;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.submit-row a.closelink {
|
||||
display: inline-block;
|
||||
background: #bbbbbb;
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
margin: 0 0 0 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink:focus,
|
||||
.submit-row a.deletelink:hover,
|
||||
.submit-row a.deletelink:active {
|
||||
background: #a41515;
|
||||
}
|
||||
|
||||
.submit-row a.closelink:focus,
|
||||
.submit-row a.closelink:hover,
|
||||
.submit-row a.closelink:active {
|
||||
background: #aaaaaa;
|
||||
}
|
||||
|
||||
/* CUSTOM FORM FIELDS */
|
||||
|
||||
.vSelectMultipleField {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vCheckboxField {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
margin-right: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.vDateField {
|
||||
min-width: 6.85em;
|
||||
}
|
||||
|
||||
.vTimeField {
|
||||
min-width: 4.7em;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
.vLargeTextField, .vXMLLargeTextField {
|
||||
width: 48em;
|
||||
}
|
||||
|
||||
.flatpages-flatpage #id_content {
|
||||
height: 40.2em;
|
||||
}
|
||||
|
||||
.module table .vPositiveSmallIntegerField {
|
||||
width: 2.2em;
|
||||
}
|
||||
|
||||
.vTextField, .vUUIDField {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.vIntegerField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.vBigIntegerField {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.vForeignKeyRawIdAdminField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
/* INLINES */
|
||||
|
||||
.inline-group {
|
||||
padding: 0;
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
|
||||
.inline-group thead th {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.inline-group .aligned label {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.inline-related {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inline-related h3 {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
background: #f8f8f8;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
margin-left: 2px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.inline-related fieldset {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-related fieldset.module h3 {
|
||||
margin: 0;
|
||||
padding: 2px 5px 3px 5px;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
background: #bcd;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.inline-group .tabular fieldset.module {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-related.tabular fieldset.module table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.last-related fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.has_original td {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr td.original {
|
||||
padding: 2px 0 0 0;
|
||||
width: 0;
|
||||
_position: relative;
|
||||
}
|
||||
|
||||
.inline-group .tabular th.original {
|
||||
width: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group .tabular td.original p {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 1.1em;
|
||||
padding: 2px 9px;
|
||||
overflow: hidden;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
_width: 700px;
|
||||
}
|
||||
|
||||
.inline-group ul.tools {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.inline-group ul.tools li {
|
||||
display: inline;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
color: #666;
|
||||
background: #f8f8f8;
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.inline-group ul.tools a.add,
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
|
||||
padding-left: 16px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.empty-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */
|
||||
|
||||
.add-another, .related-lookup {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px;
|
||||
}
|
||||
|
||||
.add-another {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/icon-addlink.svg);
|
||||
}
|
||||
|
||||
.related-lookup {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/search.svg);
|
||||
}
|
||||
|
||||
form .related-widget-wrapper ul {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.clearable-file-input input {
|
||||
margin-top: 0;
|
||||
}
|
79
SinkDark/static/admin/css/login.css
Normal file
@ -0,0 +1,79 @@
|
||||
/* LOGIN FORM */
|
||||
|
||||
body.login {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.login #header {
|
||||
height: auto;
|
||||
padding: 15px 16px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.login #header h1 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.login #header h1 a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.login #content {
|
||||
padding: 20px 20px 0;
|
||||
}
|
||||
|
||||
.login #container {
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
width: 28em;
|
||||
min-width: 300px;
|
||||
margin: 100px auto;
|
||||
}
|
||||
|
||||
.login #content-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login .form-row {
|
||||
padding: 4px 0;
|
||||
float: left;
|
||||
width: 100%;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
padding-right: 0.5em;
|
||||
line-height: 2em;
|
||||
font-size: 1em;
|
||||
clear: both;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.login .form-row #id_username, .login .form-row #id_password {
|
||||
clear: both;
|
||||
padding: 8px;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.login span.help {
|
||||
font-size: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
clear: both;
|
||||
padding: 1em 0 0 9.4em;
|
||||
margin: 0;
|
||||
border: none;
|
||||
background: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.login .password-reset-link {
|
||||
text-align: center;
|
||||
}
|
150
SinkDark/static/admin/css/nav_sidebar.css
Normal file
@ -0,0 +1,150 @@
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar {
|
||||
z-index: 20;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0 23px;
|
||||
width: 23px;
|
||||
border: 0;
|
||||
border-right: 1px solid var(--hairline-color);
|
||||
background-color: var(--body-bg);
|
||||
cursor: pointer;
|
||||
font-size: 1.25rem;
|
||||
color: var(--link-fg);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toggle-nav-sidebar {
|
||||
border-left: 1px solid var(--hairline-color);
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar:hover,
|
||||
.toggle-nav-sidebar:focus {
|
||||
background-color: var(--darkened-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar {
|
||||
z-index: 15;
|
||||
flex: 0 0 275px;
|
||||
left: -276px;
|
||||
margin-left: -276px;
|
||||
border-top: 1px solid transparent;
|
||||
border-right: 1px solid var(--hairline-color);
|
||||
background-color: var(--body-bg);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
[dir="rtl"] #nav-sidebar {
|
||||
border-left: 1px solid var(--hairline-color);
|
||||
border-right: 0;
|
||||
left: 0;
|
||||
margin-left: 0;
|
||||
right: -276px;
|
||||
margin-right: -276px;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar::before {
|
||||
content: '\00BB';
|
||||
}
|
||||
|
||||
.main.shifted .toggle-nav-sidebar::before {
|
||||
content: '\00AB';
|
||||
}
|
||||
|
||||
.main > #nav-sidebar {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.main.shifted > #nav-sidebar {
|
||||
margin-left: 0;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
[dir="rtl"] .main.shifted > #nav-sidebar {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#nav-sidebar .module th {
|
||||
width: 100%;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
#nav-sidebar .module th,
|
||||
#nav-sidebar .module caption {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
#nav-sidebar .module td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[dir="rtl"] #nav-sidebar .module th,
|
||||
[dir="rtl"] #nav-sidebar .module caption {
|
||||
padding-left: 8px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
#nav-sidebar .current-app .section:link,
|
||||
#nav-sidebar .current-app .section:visited {
|
||||
color: var(--header-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#nav-sidebar .current-model {
|
||||
background: var(--selected-row);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
#nav-sidebar .current-model {
|
||||
background-color: SelectedItem;
|
||||
}
|
||||
}
|
||||
|
||||
.main > #nav-sidebar + .content {
|
||||
max-width: calc(100% - 23px);
|
||||
}
|
||||
|
||||
.main.shifted > #nav-sidebar + .content {
|
||||
max-width: calc(100% - 299px);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#nav-sidebar, #toggle-nav-sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main > #nav-sidebar + .content,
|
||||
.main.shifted > #nav-sidebar + .content {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#nav-filter {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 2px 5px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid var(--border-color);
|
||||
background-color: var(--darkened-bg);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#nav-filter:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#nav-filter.no-results {
|
||||
background: var(--message-error-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar table {
|
||||
width: 100%;
|
||||
}
|
992
SinkDark/static/admin/css/responsive.css
Normal file
@ -0,0 +1,992 @@
|
||||
/* Tablets */
|
||||
|
||||
input[type="submit"], button {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
/* Basic */
|
||||
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
|
||||
#container {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 20px 30px 30px;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
#header {
|
||||
flex-direction: column;
|
||||
padding: 15px 30px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
#branding h1 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 20px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
#user-tools {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.85;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#user-tools a {
|
||||
display: inline-block;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Dashboard */
|
||||
|
||||
.dashboard #content {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#content-related {
|
||||
margin-right: -290px;
|
||||
}
|
||||
|
||||
.colSM #content-related {
|
||||
margin-left: -290px;
|
||||
}
|
||||
|
||||
.colMS {
|
||||
margin-right: 290px;
|
||||
}
|
||||
|
||||
.colSM {
|
||||
margin-left: 290px;
|
||||
}
|
||||
|
||||
.dashboard .module table td a {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
td .changelink, td .addlink {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* Changelist */
|
||||
|
||||
#changelist #toolbar {
|
||||
border: none;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#changelist-search > div {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
#changelist-search label {
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
#changelist #toolbar form #searchbar {
|
||||
-webkit-flex: 1 0 auto;
|
||||
flex: 1 0 auto;
|
||||
width: 0;
|
||||
height: 22px;
|
||||
margin: 0 10px 0 6px;
|
||||
}
|
||||
|
||||
#changelist-search .quiet {
|
||||
width: 100%;
|
||||
margin: 5px 0 0 25px;
|
||||
}
|
||||
|
||||
#changelist .actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
#changelist .actions.selected {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#changelist .actions .button {
|
||||
min-width: 48px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
#changelist .actions span.all,
|
||||
#changelist .actions span.clear,
|
||||
#changelist .actions span.question,
|
||||
#changelist .actions span.action-counter {
|
||||
font-size: 11px;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.change-list .filtered .results,
|
||||
.change-list .filtered .paginator,
|
||||
.filtered #toolbar,
|
||||
.filtered .actions,
|
||||
.filtered div.xfull {
|
||||
margin-right: 230px;
|
||||
}
|
||||
|
||||
#changelist .paginator {
|
||||
border-top-color: #eee;
|
||||
}
|
||||
|
||||
#changelist .results + .paginator {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
|
||||
label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-row input[type=text],
|
||||
.form-row input[type=password],
|
||||
.form-row input[type=email],
|
||||
.form-row input[type=url],
|
||||
.form-row input[type=tel],
|
||||
.form-row input[type=number],
|
||||
.form-row textarea,
|
||||
.form-row select,
|
||||
.form-row .vTextField {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 6px 8px;
|
||||
min-height: 36px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-row select {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.form-row select[multiple] {
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
fieldset .fieldBox {
|
||||
float: none;
|
||||
margin: 0 -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
fieldset .fieldBox + .fieldBox {
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
textarea {
|
||||
max-width: 518px;
|
||||
max-height: 120px;
|
||||
}
|
||||
|
||||
.aligned label {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.aligned .add-another,
|
||||
.aligned .related-lookup,
|
||||
.aligned .datetimeshortcuts,
|
||||
.aligned .related-lookup + strong {
|
||||
align-self: center;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* Related widget */
|
||||
|
||||
.related-widget-wrapper {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link + .selector {
|
||||
max-width: calc(100% - 30px);
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* Selector */
|
||||
|
||||
.selector {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.selector .selector-filter label {
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
.selector .selector-filter input {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
width: auto;
|
||||
flex: 1 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
width: 100%;
|
||||
flex: 1 0 auto;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
width: 26px;
|
||||
height: 52px;
|
||||
padding: 2px 0;
|
||||
margin: auto 15px;
|
||||
border-radius: 20px;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
|
||||
.selector-add, .selector-remove {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background-position: 0 -120px;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background-position: 0 -80px;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.stacked {
|
||||
flex-direction: column;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.stacked > * {
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.stacked select {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.stacked .selector-available, .stacked .selector-chosen {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.stacked ul.selector-chooser {
|
||||
width: 52px;
|
||||
height: 26px;
|
||||
padding: 0 2px;
|
||||
margin: 15px auto;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.stacked .selector-chooser li {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.stacked .selector-add, .stacked .selector-remove {
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
.stacked .selector-add {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add {
|
||||
background-position: 0 -60px;
|
||||
}
|
||||
|
||||
.stacked .selector-remove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
|
||||
.help-tooltip, .selector .help-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
form .form-row p.datetime {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.datetime input {
|
||||
width: 50%;
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
.datetime span {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.datetime .timezonewarning {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.datetimeshortcuts {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.inline-group {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
|
||||
ul.messagelist li {
|
||||
padding-left: 55px;
|
||||
background-position: 30px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.error {
|
||||
background-position: 30px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.warning {
|
||||
background-position: 30px 14px;
|
||||
}
|
||||
|
||||
/* Login */
|
||||
|
||||
.login #header {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
.login #branding h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* GIS */
|
||||
|
||||
div.olMap {
|
||||
max-width: calc(100vw - 30px);
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.olMap + .clear_features {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Docs */
|
||||
|
||||
.module table.xfull {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.literal-block {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
|
||||
@media (max-width: 767px) {
|
||||
/* Layout */
|
||||
|
||||
#header, #content, #footer {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#footer:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
/* Dashboard */
|
||||
|
||||
.colMS, .colSM {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content-related, .colSM #content-related {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content-related .module {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#content-related .module h2 {
|
||||
padding: 10px 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Changelist */
|
||||
|
||||
#changelist {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#changelist #toolbar {
|
||||
order: 1;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#changelist .xfull {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#changelist-form {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
flex: 1 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#changelist .actions span {
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
|
||||
.change-list .filtered .results, .change-list .filtered .paginator,
|
||||
.filtered #toolbar, .filtered .actions, .filtered div.xfull {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
position: static;
|
||||
width: auto;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.object-tools {
|
||||
float: none;
|
||||
margin: 0 0 15px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.object-tools li {
|
||||
height: auto;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.object-tools li + li {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
|
||||
.form-row {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.aligned .form-row,
|
||||
.aligned .form-row > div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
max-width: 100vw;
|
||||
}
|
||||
|
||||
.aligned .form-row > div {
|
||||
width: calc(100vw - 30px);
|
||||
}
|
||||
|
||||
textarea {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
fieldset .fieldBox + .fieldBox {
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
fieldset.collapsed .form-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.aligned label {
|
||||
width: 100%;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
.aligned label:after {
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.aligned .form-row input,
|
||||
.aligned .form-row select,
|
||||
.aligned .form-row textarea {
|
||||
flex: 1 1 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.aligned .checkbox-row {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.aligned .checkbox-row input {
|
||||
flex: 0 1 auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
flex: 1 0;
|
||||
padding: 1px 0 0 5px;
|
||||
}
|
||||
|
||||
.aligned label + p,
|
||||
.aligned label + div.help,
|
||||
.aligned label + div.readonly {
|
||||
padding: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.aligned p.file-upload {
|
||||
margin-left: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
span.clearable-file-input {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
span.clearable-file-input label {
|
||||
font-size: 13px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.aligned .timezonewarning {
|
||||
flex: 1 0 100%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
form .aligned .form-row div.help {
|
||||
width: 100%;
|
||||
margin: 5px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
margin-right: 15px;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist li + li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Related widget */
|
||||
|
||||
.related-widget-wrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.related-widget-wrapper .selector {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.related-widget-wrapper > a {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.related-widget-wrapper .radiolist ~ a {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.related-widget-wrapper > select ~ a {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Selector */
|
||||
|
||||
.selector {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selector > * {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
margin-bottom: 0;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
max-height: 96px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
display: block;
|
||||
float: none;
|
||||
width: 52px;
|
||||
height: 26px;
|
||||
padding: 0 2px;
|
||||
margin: 15px auto 20px;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
/* Inlines */
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related {
|
||||
border: 2px solid #eee;
|
||||
border-radius: 4px;
|
||||
margin-top: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related > * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related + .inline-related {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related .module {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related .module .form-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 {
|
||||
padding: 10px;
|
||||
border-top-width: 0;
|
||||
border-bottom-width: 2px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 .inline_label {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 span.delete {
|
||||
float: none;
|
||||
flex: 1 1 100%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .aligned .form-row > div:not([class]) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .aligned label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] div.add-row {
|
||||
margin-top: 15px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
display: block;
|
||||
padding: 8px 10px 8px 26px;
|
||||
background-position: 8px 9px;
|
||||
}
|
||||
|
||||
/* Submit row */
|
||||
|
||||
.submit-row {
|
||||
padding: 10px 10px 0;
|
||||
margin: 0 0 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.submit-row > * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.submit-row input, .submit-row input.default, .submit-row a, .submit-row a.closelink {
|
||||
float: none;
|
||||
margin: 0 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.submit-row a.closelink {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.submit-row p.deletelink-box {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
|
||||
ul.messagelist li {
|
||||
padding-left: 40px;
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.error {
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.warning {
|
||||
background-position: 15px 14px;
|
||||
}
|
||||
|
||||
/* Paginator */
|
||||
|
||||
.paginator .this-page, .paginator a:link, .paginator a:visited {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
/* Login */
|
||||
|
||||
body.login {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.login #container {
|
||||
width: auto;
|
||||
max-width: 480px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
.login #header,
|
||||
.login #content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.login #content-main {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.login .form-row {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.login .form-row + .form-row {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
display: block;
|
||||
margin: 0 0 5px;
|
||||
padding: 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
padding: 15px 0 0;
|
||||
}
|
||||
|
||||
.login br, .login .submit-row label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.login .submit-row input {
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.errornote {
|
||||
margin: 0 0 20px;
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* Calendar and clock */
|
||||
|
||||
.calendarbox, .clockbox {
|
||||
position: fixed !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: 0;
|
||||
border: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.calendarbox:before, .clockbox:before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.calendarbox > *, .clockbox > * {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.calendarbox > div:first-child {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.calendarbox .calendar, .clockbox h2 {
|
||||
border-radius: 4px 4px 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.calendarbox .calendar-cancel, .clockbox .calendar-cancel {
|
||||
border-radius: 0 0 4px 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.calendar-shortcuts {
|
||||
padding: 10px 0;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.calendar-shortcuts a {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.timelist a {
|
||||
background: #fff;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.calendar-cancel {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.clockbox h2 {
|
||||
padding: 8px 15px;
|
||||
}
|
||||
|
||||
.calendar caption {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
|
||||
z-index: 1;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
/* History */
|
||||
|
||||
table#change-history tbody th, table#change-history tbody td {
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
table#change-history tbody th {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Docs */
|
||||
|
||||
table.model tbody th, table.model tbody td {
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
84
SinkDark/static/admin/css/responsive_rtl.css
Normal file
@ -0,0 +1,84 @@
|
||||
/* TABLETS */
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
[dir="rtl"] .colMS {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] #user-tools {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
[dir="rtl"] #changelist .actions label {
|
||||
padding-left: 10px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] #changelist .actions select {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .change-list .filtered .results,
|
||||
[dir="rtl"] .change-list .filtered .paginator,
|
||||
[dir="rtl"] .filtered #toolbar,
|
||||
[dir="rtl"] .filtered div.xfull,
|
||||
[dir="rtl"] .filtered .actions {
|
||||
margin-right: 0;
|
||||
margin-left: 230px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .inline-group ul.tools a.add,
|
||||
[dir="rtl"] .inline-group div.add-row a,
|
||||
[dir="rtl"] .inline-group .tabular tr.add-row td a {
|
||||
padding: 8px 26px 8px 10px;
|
||||
background-position: calc(100% - 8px) 9px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .related-widget-wrapper-link + .selector {
|
||||
margin-right: 0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .selector .selector-filter label {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .object-tools li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
[dir="rtl"] .object-tools li + li {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .dashboard .module table td a {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* MOBILE */
|
||||
|
||||
@media (max-width: 767px) {
|
||||
[dir="rtl"] .change-list .filtered .results,
|
||||
[dir="rtl"] .change-list .filtered .paginator,
|
||||
[dir="rtl"] .filtered #toolbar,
|
||||
[dir="rtl"] .filtered div.xfull,
|
||||
[dir="rtl"] .filtered .actions {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .aligned .add-another,
|
||||
[dir="rtl"] .aligned .related-lookup,
|
||||
[dir="rtl"] .aligned .datetimeshortcuts {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .aligned ul {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
269
SinkDark/static/admin/css/rtl.css
Normal file
@ -0,0 +1,269 @@
|
||||
body {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/* LOGIN */
|
||||
|
||||
.login .form-row {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
float: right;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
clear: both;
|
||||
padding: 1em 9.4em 0 0;
|
||||
}
|
||||
|
||||
/* GLOBAL */
|
||||
|
||||
th {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.module h2, .module caption {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.module ul, .module ol {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.viewlink, .addlink, .changelink {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
background-position: 100% 1px;
|
||||
}
|
||||
|
||||
.deletelink {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
background-position: 100% 1px;
|
||||
}
|
||||
|
||||
.object-tools {
|
||||
float: left;
|
||||
}
|
||||
|
||||
thead th:first-child,
|
||||
tfoot td:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
/* LAYOUT */
|
||||
|
||||
#user-tools {
|
||||
right: auto;
|
||||
left: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#content-main {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#content-related {
|
||||
float: left;
|
||||
margin-left: -300px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.colMS {
|
||||
margin-left: 300px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* SORTABLE TABLES */
|
||||
|
||||
table thead th.sorted .sortoptions {
|
||||
float: left;
|
||||
}
|
||||
|
||||
thead th.sorted .text {
|
||||
padding-right: 0;
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
/* dashboard styles */
|
||||
|
||||
.dashboard .module table td a {
|
||||
padding-left: .6em;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
/* changelists styles */
|
||||
|
||||
.change-list .filtered table {
|
||||
border-left: none;
|
||||
border-right: 0px none;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
right: auto;
|
||||
left: 0;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull {
|
||||
margin-right: 0;
|
||||
margin-left: 280px;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
border-left: none;
|
||||
padding-left: 10px;
|
||||
margin-left: 0;
|
||||
border-right: 5px solid #eaeaea;
|
||||
padding-right: 10px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
|
||||
.filtered .actions {
|
||||
margin-left: 280px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#changelist table tbody td:first-child, #changelist table tbody th:first-child {
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
/* FORMS */
|
||||
|
||||
.aligned label {
|
||||
padding: 0 0 3px 1em;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.submit-row {
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.submit-row p.deletelink-box {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.submit-row input.default {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
form .aligned p.help, form .aligned div.help {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-right: 163px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
float: right;
|
||||
padding-right: 0;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
input[type=submit].default, .submit-row input.default {
|
||||
float: left;
|
||||
}
|
||||
|
||||
fieldset .fieldBox {
|
||||
float: right;
|
||||
margin-left: 20px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.errorlist li {
|
||||
background-position: 100% 12px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.errornote {
|
||||
background-position: 100% 12px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
/* WIDGETS */
|
||||
|
||||
.calendarnav-previous {
|
||||
top: 0;
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.calendarnav-next {
|
||||
top: 0;
|
||||
right: auto;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.calendar caption, .calendarbox h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.selector {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.inline-deletelink {
|
||||
float: left;
|
||||
}
|
||||
|
||||
form .form-row p.datetime {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.related-widget-wrapper {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
|
||||
.inline-related h2, .inline-group h2 {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
padding-right: 20px;
|
||||
padding-left: inherit;
|
||||
left: 10px;
|
||||
right: inherit;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
margin-left: inherit;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
/* IE7 specific bug fixes */
|
||||
|
||||
div.colM {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.submit-row input {
|
||||
float: left;
|
||||
}
|
19
SinkDark/static/admin/css/unusable_password_field.css
Normal file
@ -0,0 +1,19 @@
|
||||
/* Hide warnings fields if usable password is selected */
|
||||
form:has(#id_usable_password input[value="true"]:checked) .messagelist {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide password fields if unusable password is selected */
|
||||
form:has(#id_usable_password input[value="false"]:checked) .field-password1,
|
||||
form:has(#id_usable_password input[value="false"]:checked) .field-password2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Select appropriate submit button */
|
||||
form:has(#id_usable_password input[value="true"]:checked) input[type="submit"].unset-password {
|
||||
display: none;
|
||||
}
|
||||
|
||||
form:has(#id_usable_password input[value="false"]:checked) input[type="submit"].set-password {
|
||||
display: none;
|
||||
}
|
21
SinkDark/static/admin/css/vendor/select2/LICENSE-SELECT2.md
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012-2015 Kevin Brown, Igor Vaynberg, and Select2 contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
484
SinkDark/static/admin/css/vendor/select2/select2.css
vendored
Normal file
@ -0,0 +1,484 @@
|
||||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
height: 1px !important;
|
||||
margin: -1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
1
SinkDark/static/admin/css/vendor/select2/select2.min.css
vendored
Normal file
565
SinkDark/static/admin/css/widgets.css
Normal file
@ -0,0 +1,565 @@
|
||||
/* SELECTOR (FILTER INTERFACE) */
|
||||
|
||||
.selector {
|
||||
width: 800px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
width: 380px;
|
||||
height: 17.2em;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
float: left;
|
||||
width: 380px;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.selector-chosen select {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.selector-available h2, .selector-chosen h2 {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.selector-chosen h2 {
|
||||
background: #79aec8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.selector .selector-available h2 {
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
background: white;
|
||||
border: 1px solid #ccc;
|
||||
border-width: 0 1px;
|
||||
padding: 8px;
|
||||
color: #999;
|
||||
font-size: 10px;
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.selector .selector-filter label,
|
||||
.inline-group .aligned .selector .selector-filter label {
|
||||
float: left;
|
||||
margin: 7px 0 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.selector .selector-available input {
|
||||
width: 320px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
float: left;
|
||||
width: 22px;
|
||||
background-color: #eee;
|
||||
border-radius: 10px;
|
||||
margin: 10em 5px 0 5px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.selector-chooser li {
|
||||
margin: 0;
|
||||
padding: 3px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
padding: 0 10px;
|
||||
margin: 0 0 10px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
.selector-add, .selector-remove {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
text-indent: -3000px;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.active.selector-add, .active.selector-remove {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.active.selector-add:hover, .active.selector-remove:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background: url(../img/selector-icons.svg) 0 -96px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-add:focus, .active.selector-add:hover {
|
||||
background-position: 0 -112px;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background: url(../img/selector-icons.svg) 0 -64px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-remove:focus, .active.selector-remove:hover {
|
||||
background-position: 0 -80px;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
text-align: left;
|
||||
margin: 1px auto 3px;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:focus, a.active.selector-clearall:focus,
|
||||
a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
|
||||
color: #447e9b;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall, a.active.selector-clearall {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.selector-chooseall {
|
||||
padding: 0 18px 0 0;
|
||||
background: url(../img/selector-icons.svg) right -160px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:focus, a.active.selector-chooseall:hover {
|
||||
background-position: 100% -176px;
|
||||
}
|
||||
|
||||
a.selector-clearall {
|
||||
padding: 0 0 0 18px;
|
||||
background: url(../img/selector-icons.svg) 0 -128px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.active.selector-clearall:focus, a.active.selector-clearall:hover {
|
||||
background-position: 0 -144px;
|
||||
}
|
||||
|
||||
/* STACKED SELECTORS */
|
||||
|
||||
.stacked {
|
||||
float: left;
|
||||
width: 490px;
|
||||
}
|
||||
|
||||
.stacked select {
|
||||
width: 480px;
|
||||
height: 10.1em;
|
||||
}
|
||||
|
||||
.stacked .selector-available, .stacked .selector-chosen {
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.stacked .selector-available {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.stacked .selector-available input {
|
||||
width: 422px;
|
||||
}
|
||||
|
||||
.stacked ul.selector-chooser {
|
||||
height: 22px;
|
||||
width: 50px;
|
||||
margin: 0 0 10px 40%;
|
||||
background-color: #eee;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.stacked .selector-chooser li {
|
||||
float: left;
|
||||
padding: 3px 3px 3px 5px;
|
||||
}
|
||||
|
||||
.stacked .selector-chooseall, .stacked .selector-clearall {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.stacked .selector-add {
|
||||
background: url(../img/selector-icons.svg) 0 -32px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add {
|
||||
background-position: 0 -48px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stacked .selector-remove {
|
||||
background: url(../img/selector-icons.svg) 0 0 no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove {
|
||||
background-position: 0 -16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selector .help-icon {
|
||||
background: url(../img/icon-unknown.svg) 0 0 no-repeat;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: -2px 0 0 2px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.selector .selector-chosen .help-icon {
|
||||
background: url(../img/icon-unknown-alt.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.selector .search-label-icon {
|
||||
background: url(../img/search.svg) 0 0 no-repeat;
|
||||
display: inline-block;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
/* DATE AND TIME */
|
||||
|
||||
p.datetime {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.datetime span {
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
font-size: 11px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.datetime input, .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
|
||||
min-width: 0;
|
||||
margin-left: 5px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
table p.datetime {
|
||||
font-size: 11px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .clock-icon, .datetimeshortcuts .date-icon {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .clock-icon {
|
||||
background: url(../img/icon-clock.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.datetimeshortcuts a:focus .clock-icon,
|
||||
.datetimeshortcuts a:hover .clock-icon {
|
||||
background-position: 0 -16px;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .date-icon {
|
||||
background: url(../img/icon-calendar.svg) 0 0 no-repeat;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.datetimeshortcuts a:focus .date-icon,
|
||||
.datetimeshortcuts a:hover .date-icon {
|
||||
background-position: 0 -16px;
|
||||
}
|
||||
|
||||
.timezonewarning {
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* URL */
|
||||
|
||||
p.url {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.url a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* FILE UPLOADS */
|
||||
|
||||
p.file-upload {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.aligned p.file-upload {
|
||||
margin-left: 170px;
|
||||
}
|
||||
|
||||
.file-upload a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.file-upload .deletelink {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
span.clearable-file-input label {
|
||||
color: #333;
|
||||
font-size: 11px;
|
||||
display: inline;
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* CALENDARS & CLOCKS */
|
||||
|
||||
.calendarbox, .clockbox {
|
||||
margin: 5px auto;
|
||||
font-size: 12px;
|
||||
width: 19em;
|
||||
text-align: center;
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.clockbox {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.calendar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendar table {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-collapse: collapse;
|
||||
background: white;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.calendar caption, .calendarbox h2 {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
border-top: none;
|
||||
background: #f5dd5d;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.calendar th {
|
||||
padding: 8px 5px;
|
||||
background: #f8f8f8;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.calendar td {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.calendar td.selected a {
|
||||
background: #79aec8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar td.nonday {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.calendar td.today a {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.calendar td a, .timelist a {
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
padding: 6px;
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.calendar td a:focus, .timelist a:focus,
|
||||
.calendar td a:hover, .timelist a:hover {
|
||||
background: #79aec8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calendar td a:active, .timelist a:active {
|
||||
background: #417690;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calendarnav {
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
margin: 0;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
.calendarnav a:link, #calendarnav a:visited,
|
||||
#calendarnav a:focus, #calendarnav a:hover {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.calendar-shortcuts {
|
||||
background: white;
|
||||
font-size: 11px;
|
||||
line-height: 11px;
|
||||
border-top: 1px solid #eee;
|
||||
padding: 8px 0;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
text-indent: -9999px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendarnav-previous {
|
||||
left: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous:focus,
|
||||
.calendarbox .calendarnav-previous:hover {
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.calendarnav-next {
|
||||
right: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 -30px no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-next:focus,
|
||||
.calendarbox .calendarnav-next:hover {
|
||||
background-position: 0 -45px;
|
||||
}
|
||||
|
||||
.calendar-cancel {
|
||||
margin: 0;
|
||||
padding: 4px 0;
|
||||
font-size: 12px;
|
||||
background: #eee;
|
||||
border-top: 1px solid #ddd;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.calendar-cancel:focus, .calendar-cancel:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
.calendar-cancel a {
|
||||
color: black;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.timelist, .timelist li {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.timelist a {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/* EDIT INLINE */
|
||||
|
||||
.inline-deletelink {
|
||||
float: right;
|
||||
text-indent: -9999px;
|
||||
background: url(../img/inline-delete.svg) 0 0 no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
.inline-deletelink:focus, .inline-deletelink:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* RELATED WIDGET WRAPPER */
|
||||
.related-widget-wrapper {
|
||||
float: left; /* display properly in form rows with multiple fields */
|
||||
overflow: hidden; /* clear floated contents */
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link:link {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link:link:focus,
|
||||
.related-widget-wrapper-link:link:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 7px;
|
||||
}
|