diff --git a/.bowerrc b/.bowerrc index 10c8645..7d4de04 100644 --- a/.bowerrc +++ b/.bowerrc @@ -1,3 +1,3 @@ { - "directory": "bikeshop_project/static" + "directory": "bikeshop_project/vendor" } \ No newline at end of file diff --git a/bikeshop_project/bikeshop/settings/base.py b/bikeshop_project/bikeshop/settings/base.py index f4207b6..3de667f 100644 --- a/bikeshop_project/bikeshop/settings/base.py +++ b/bikeshop_project/bikeshop/settings/base.py @@ -29,6 +29,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'compressor', 'registration', 'core', ] @@ -112,6 +113,19 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder', +) +STATICFILES_DIRS = [ + ('vendor', os.path.join(BASE_DIR, '../vendor')), +] +STATIC_ROOT = 'static' STATIC_URL = '/static/' -AUTH_USER_MODEL = 'registration.Member' \ No newline at end of file +AUTH_USER_MODEL = 'registration.Member' + +COMPRESS_PRECOMPILERS = ( + ('text/x-scss', 'django_libsass.SassCompiler'), +) \ No newline at end of file diff --git a/bikeshop_project/bikeshop/urls.py b/bikeshop_project/bikeshop/urls.py index c03f7d8..40df174 100644 --- a/bikeshop_project/bikeshop/urls.py +++ b/bikeshop_project/bikeshop/urls.py @@ -13,9 +13,11 @@ Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import url +from django.conf.urls import include, url from django.contrib import admin +from core import urls as core_urls urlpatterns = [ + url('^', include(core_urls)), url(r'^admin/', admin.site.urls), ] diff --git a/bikeshop_project/core/static/images/android-desktop.png b/bikeshop_project/core/static/images/android-desktop.png new file mode 100644 index 0000000..f4408f5 Binary files /dev/null and b/bikeshop_project/core/static/images/android-desktop.png differ diff --git a/bikeshop_project/core/static/images/dog.png b/bikeshop_project/core/static/images/dog.png new file mode 100644 index 0000000..1d08cca Binary files /dev/null and b/bikeshop_project/core/static/images/dog.png differ diff --git a/bikeshop_project/core/static/images/favicon.png b/bikeshop_project/core/static/images/favicon.png new file mode 100644 index 0000000..11ec0b5 Binary files /dev/null and b/bikeshop_project/core/static/images/favicon.png differ diff --git a/bikeshop_project/core/static/images/ios-desktop.png b/bikeshop_project/core/static/images/ios-desktop.png new file mode 100644 index 0000000..ac65454 Binary files /dev/null and b/bikeshop_project/core/static/images/ios-desktop.png differ diff --git a/bikeshop_project/core/static/images/user.jpg b/bikeshop_project/core/static/images/user.jpg new file mode 100644 index 0000000..930ab14 Binary files /dev/null and b/bikeshop_project/core/static/images/user.jpg differ diff --git a/bikeshop_project/core/static/scss/screen.scss b/bikeshop_project/core/static/scss/screen.scss new file mode 100644 index 0000000..18ab7b9 --- /dev/null +++ b/bikeshop_project/core/static/scss/screen.scss @@ -0,0 +1,226 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import "vendor/material-design-lite/src/material-design-lite.scss"; + +html, body { + font-family: 'Roboto', 'Helvetica', sans-serif; +} +.demo-avatar { + width: 48px; + height: 48px; + border-radius: 24px; +} +.demo-layout .demo-header .mdl-textfield { + padding: 0px; + margin-top: 41px; +} +.demo-layout .demo-header .mdl-textfield .mdl-textfield__expandable-holder { + bottom: 19px; +} +.demo-layout .mdl-layout__header .mdl-layout__drawer-button { + color: rgba(0, 0, 0, 0.54); +} +.mdl-layout__drawer .avatar { + margin-bottom: 16px; +} +.demo-drawer { + border: none; +} +/* iOS Safari specific workaround */ +.demo-drawer .mdl-menu__container { + z-index: -1; +} +.demo-drawer .demo-navigation { + z-index: -2; +} +/* END iOS Safari specific workaround */ +.demo-drawer .mdl-menu .mdl-menu__item { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.demo-drawer-header { + box-sizing: border-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + padding: 16px; + height: 151px; +} +.demo-avatar-dropdown { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.demo-navigation { + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} +.demo-layout .demo-navigation .mdl-navigation__link { + display: -webkit-flex !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + color: rgba(255, 255, 255, 0.56); + font-weight: 500; +} +.demo-layout .demo-navigation .mdl-navigation__link:hover { + background-color: #00BCD4; + color: #37474F; +} +.demo-navigation .mdl-navigation__link .material-icons { + font-size: 24px; + color: rgba(255, 255, 255, 0.56); + margin-right: 32px; +} + +.demo-content { + max-width: 1080px; +} + +.demo-charts { + -webkit-align-items: center; + -ms-flex-align: center; + -ms-grid-row-align: center; + align-items: center; +} +.demo-chart:nth-child(1) { + color: #ACEC00; +} +.demo-chart:nth-child(2) { + color: #00BBD6; +} +.demo-chart:nth-child(3) { + color: #BA65C9; +} +.demo-chart:nth-child(4) { + color: #EF3C79; +} +.demo-graphs { + padding: 16px 32px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: stretch; + -ms-flex-align: stretch; + align-items: stretch; +} +/* TODO: Find a proper solution to have the graphs + * not float around outside their container in IE10/11. + * Using a browserhacks.com solution for now. + */ +_:-ms-input-placeholder, :root .demo-graphs { + min-height: 664px; +} +_:-ms-input-placeholder, :root .demo-graph { + max-height: 300px; +} +/* TODO end */ +.demo-graph:nth-child(1) { + color: #00b9d8; +} +.demo-graph:nth-child(2) { + color: #d9006e; +} + +.demo-cards { + -webkit-align-items: flex-start; + -ms-flex-align: start; + -ms-grid-row-align: flex-start; + align-items: flex-start; + -webkit-align-content: flex-start; + -ms-flex-line-pack: start; + align-content: flex-start; +} +.demo-cards .demo-separator { + height: 32px; +} +.demo-cards .mdl-card__title.mdl-card__title { + color: white; + font-size: 24px; + font-weight: 400; +} +.demo-cards ul { + padding: 0; +} +.demo-cards h3 { + font-size: 1em; +} +.demo-updates .mdl-card__title { + min-height: 200px; + background-image: url(static("images/dog.png")); + background-position: 90% 100%; + background-repeat: no-repeat; +} +.demo-cards .mdl-card__actions a { + color: #00BCD4; + text-decoration: none; +} + +.demo-options h3 { + margin: 0; +} +.demo-options .mdl-checkbox__box-outline { + border-color: rgba(255, 255, 255, 0.89); +} +.demo-options ul { + margin: 0; + list-style-type: none; +} +.demo-options li { + margin: 4px 0; +} +.demo-options .material-icons { + color: rgba(255, 255, 255, 0.89); +} +.demo-options .mdl-card__actions { + height: 64px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + box-sizing: border-box; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} diff --git a/bikeshop_project/core/templates/base.html b/bikeshop_project/core/templates/base.html new file mode 100644 index 0000000..c203579 --- /dev/null +++ b/bikeshop_project/core/templates/base.html @@ -0,0 +1,252 @@ +{% load compress staticfiles %} + + + + + + + + + Material Design Lite + + + + + + + + + + + + + + + + + + + + + + + {% compress css %} + + {% endcompress %} + + + +
+
+
+ Home +
+
+ +
+ + +
+
+ +
    +
  • About
  • +
  • Contact
  • +
  • Legal information
  • +
+
+
+
+
+ +
+ hello@example.com +
+ +
    +
  • hello@example.com
  • +
  • info@example.com
  • +
  • addAdd another account...
  • +
+
+
+ +
+
+
+
+ + + 82% + + + + 82% + + + + 82% + + + + 82% + +
+
+ + + + + + +
+
+
+
+

Updates

+
+
+ Non dolore elit adipisicing ea reprehenderit consectetur culpa. +
+
+ Read More +
+
+
+
+
+

View options

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ Change location +
+ location_on +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + 500 + 400 + 300 + 200 + 100 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + + + + + + + + + View Source + + + diff --git a/bikeshop_project/core/urls.py b/bikeshop_project/core/urls.py new file mode 100644 index 0000000..3e4e780 --- /dev/null +++ b/bikeshop_project/core/urls.py @@ -0,0 +1,6 @@ +from django.conf.urls import url + +from .views import DashboardView +urlpatterns = [ + url(r'^', DashboardView.as_view()), +] diff --git a/bikeshop_project/core/views.py b/bikeshop_project/core/views.py index 91ea44a..a9d0b98 100644 --- a/bikeshop_project/core/views.py +++ b/bikeshop_project/core/views.py @@ -1,3 +1,7 @@ -from django.shortcuts import render +from django.template.response import TemplateResponse +from django.views.generic import View -# Create your views here. + +class DashboardView(View): + def get(self, request): + return TemplateResponse(request, 'base.html') \ No newline at end of file