diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3505304 --- /dev/null +++ b/.gitignore @@ -0,0 +1,111 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +.static_storage/ +.media/ +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +.idea/ +db.sqlite3 +static/media/ +config/local_settings.py +*/migrations +static/upload diff --git a/Biodiversity/settings.py b/Biodiversity/settings.py index 4195e5d..b9a7dd9 100644 --- a/Biodiversity/settings.py +++ b/Biodiversity/settings.py @@ -42,7 +42,8 @@ INSTALLED_APPS = [ 'bootstrap3', 'dashboard', 'user', - 'geo' + 'geo', + 'portal' ] MIDDLEWARE = [ diff --git a/Biodiversity/urls.py b/Biodiversity/urls.py index 5cc5f2a..e52c470 100644 --- a/Biodiversity/urls.py +++ b/Biodiversity/urls.py @@ -18,9 +18,9 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), - path('', include('dashboard.urls')), + path('dashboard/', include('dashboard.urls')), path('manages/', include('user.urls')), path('captcha/', include('captcha.urls')), - path('geo/',include('geo.urls')) - + path('geo/',include('geo.urls')), + path('', include('portal.urls')) ] diff --git a/portal/__init__.py b/portal/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/portal/admin.py b/portal/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/portal/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/portal/apps.py b/portal/apps.py new file mode 100644 index 0000000..811caa8 --- /dev/null +++ b/portal/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class PortalConfig(AppConfig): + name = 'portal' diff --git a/portal/migrations/__init__.py b/portal/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/portal/models.py b/portal/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/portal/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/portal/static/portal/css/carousel.css b/portal/static/portal/css/carousel.css new file mode 100644 index 0000000..5e9d9dc --- /dev/null +++ b/portal/static/portal/css/carousel.css @@ -0,0 +1,147 @@ +/* GLOBAL STYLES +-------------------------------------------------- */ +/* Padding below the footer and lighter body text */ + +body { + padding-bottom: 40px; + color: #5a5a5a; +} + +/* CUSTOMIZE THE NAVBAR +-------------------------------------------------- */ + +/* Special class on .container surrounding .navbar, used for positioning it into place. */ +.navbar-wrapper { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 20; +} + +/* Flip around the padding for proper display in narrow viewports */ +.navbar-wrapper > .container { + padding-right: 0; + padding-left: 0; +} + +.navbar-wrapper .navbar { + padding-right: 15px; + padding-left: 15px; +} + +.navbar-wrapper .navbar .container { + width: auto; +} + +/* CUSTOMIZE THE CAROUSEL +-------------------------------------------------- */ + +/* Carousel base class */ +.carousel { + height: 365px; +} + +/* Since positioning the image, we need to help out the caption */ +.carousel-caption { + z-index: 10; +} + +/* Declare heights because of positioning of img element */ +.carousel .item { + height: 365px; + background-color: #777; +} + +.carousel-inner > .item > img { + position: absolute; + top: 0; + left: 0; + min-width: 100%; + height: 365px; +} + +.carousel-caption { + right: 33%; + left: 33%; + text-align: left; + padding-bottom: 110px; +} + +.carousel-caption h1 { + font-size: 32px; +} + +/* MARKETING CONTENT +-------------------------------------------------- */ + +/* Center align the text within the three columns below the carousel */ +.marketing .col-lg-4 { + margin-bottom: 20px; + text-align: center; +} + +.marketing h2 { + font-weight: normal; +} + +.marketing .col-lg-4 p { + margin-right: 10px; + margin-left: 10px; +} + +/* Featurettes +------------------------- */ + +.featurette-divider { + margin: 80px 0; /* Space out the Bootstrap
more */ +} + +/* Thin out the marketing headings */ +.featurette-heading { + font-weight: 300; + line-height: 1; + letter-spacing: -1px; +} + +/* RESPONSIVE CSS +-------------------------------------------------- */ + +@media (min-width: 768px) { + /* Navbar positioning foo */ + .navbar-wrapper { + margin-top: 20px; + } + + .navbar-wrapper .container { + padding-right: 15px; + padding-left: 15px; + } + + .navbar-wrapper .navbar { + padding-right: 0; + padding-left: 0; + } + + /* The navbar becomes detached from the top, so we round the corners */ + .navbar-wrapper .navbar { + border-radius: 4px; + } + + /* Bump up size of carousel content */ + .carousel-caption p { + margin-bottom: 20px; + font-size: 21px; + line-height: 1.4; + } + + .featurette-heading { + font-size: 50px; + } +} + +@media (min-width: 992px) { + .featurette-heading { + margin-top: 120px; + } +} \ No newline at end of file diff --git a/portal/static/portal/css/portal.css b/portal/static/portal/css/portal.css new file mode 100644 index 0000000..8acfef0 --- /dev/null +++ b/portal/static/portal/css/portal.css @@ -0,0 +1,42 @@ +.nav-pills > li > a { + border-radius: 0; + color: #ffffff; +} + +.nav-pills > li.active > a, .nav-pills > li.active > a:focus, .nav-pills > li.active > a:hover, .nav-pills > li > a:hover, .nav-pills > li > a:focus { + background-color: #2C4D9E; + color: #ffffff; +} + +.main-search .form-control { + height: 44px; + padding: 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + border: 0; + border-radius: 2px; +} + +.main-search .btn { + padding: 12px; + border-radius: 0 2px 2px 0; + border:0; + background-color: #2C4D9E; + color: #ffffff; +} + +.block-menu { + margin-top: -33px; + font-size: 18px; + text-align: center; +} + +.block-menu .panel-body { + padding: 5px; +} + +.block-menu img { + margin-right: 15px; +} \ No newline at end of file diff --git a/portal/static/portal/img/1.png b/portal/static/portal/img/1.png new file mode 100755 index 0000000..900c862 Binary files /dev/null and b/portal/static/portal/img/1.png differ diff --git a/portal/static/portal/img/2.png b/portal/static/portal/img/2.png new file mode 100755 index 0000000..2172b46 Binary files /dev/null and b/portal/static/portal/img/2.png differ diff --git a/portal/static/portal/img/3.png b/portal/static/portal/img/3.png new file mode 100755 index 0000000..35e7e69 Binary files /dev/null and b/portal/static/portal/img/3.png differ diff --git a/portal/static/portal/img/4.png b/portal/static/portal/img/4.png new file mode 100755 index 0000000..b9c17f1 Binary files /dev/null and b/portal/static/portal/img/4.png differ diff --git a/portal/static/portal/img/banner.png b/portal/static/portal/img/banner.png new file mode 100755 index 0000000..a346814 Binary files /dev/null and b/portal/static/portal/img/banner.png differ diff --git a/portal/static/portal/img/logo.png b/portal/static/portal/img/logo.png new file mode 100755 index 0000000..7d76f74 Binary files /dev/null and b/portal/static/portal/img/logo.png differ diff --git a/portal/templates/portal/index.html b/portal/templates/portal/index.html new file mode 100644 index 0000000..a38f0a7 --- /dev/null +++ b/portal/templates/portal/index.html @@ -0,0 +1,47 @@ +{% extends 'portal/layout.html' %} +{% load static %} + +{% block add_css %} + + +{% endblock %} + +{% block body %} +
+
+
+
+
+ + 一路一带 +
+
+
+
+
+
+ + 物种分布 +
+
+
+
+
+
+ + 数据资源 +
+
+
+
+
+
+ + 在线计算 +
+
+
+
+
+

你好,世界!

+{% endblock %} \ No newline at end of file diff --git a/portal/templates/portal/layout.html b/portal/templates/portal/layout.html new file mode 100644 index 0000000..6aa423a --- /dev/null +++ b/portal/templates/portal/layout.html @@ -0,0 +1,74 @@ +{% load static %} + + + + + + + + + {% block title %} + 生物多样性数据分析平台 + {% endblock %} + + + + + + + + {% block add_css %} {% endblock %} + + + + + + + + +{% block body %}{% endblock %} + + + + + +{% block add_js %} {% endblock %} + + \ No newline at end of file diff --git a/portal/tests.py b/portal/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/portal/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/portal/urls.py b/portal/urls.py new file mode 100644 index 0000000..9cab442 --- /dev/null +++ b/portal/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='portal-index'), +] diff --git a/portal/views.py b/portal/views.py new file mode 100644 index 0000000..c404f4d --- /dev/null +++ b/portal/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import render + + +# Create your views here. + +def index(request): + return render(request, 'portal/index.html')