diff --git a/dipy_web/settings.py.example b/dipy_web/settings.py.example index 1521be6c..4ae9804f 100644 --- a/dipy_web/settings.py.example +++ b/dipy_web/settings.py.example @@ -42,6 +42,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'social.apps.django_app.default', + 'meta', 'website' ] @@ -54,6 +55,7 @@ MIDDLEWARE_CLASSES = [ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.gzip.GZipMiddleware', ] ROOT_URLCONF = 'dipy_web.urls' @@ -114,6 +116,15 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] +# cache preferences (currently using in memory cache. Replace +# with Memcached for better performance) +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + 'LOCATION': 'dipy-cache', + } +} + # Internationalization # https://docs.djangoproject.com/en/1.9/topics/i18n/ @@ -139,6 +150,9 @@ STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, 'static'), ) +# heroku settings for static files gzip +# STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' + LOGIN_URL = '/dashboard/login' # documentation repository settings @@ -153,6 +167,23 @@ FACEBOOK_APP_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' +# default meta information +DEFAULT_TITLE = "DIPY - Diffusion Imaging In Python" +DEFAULT_DESCRIPTION = """Dipy is a free and open source software + project for computational neuroanatomy, + focusing mainly on diffusion magnetic resonance + imaging (dMRI) analysis. It implements a broad + range of algorithms for denoising, + registration, reconstruction, tracking, + clustering, visualization, and statistical + analysis of MRI data.""" +DEFAULT_LOGO_URL = "http://dipy.herokuapp.com/static/images/dipy-thumb.jpg" +DEFAULT_KEYWORDS = ['DIPY', 'MRI', 'Diffusion Imaging In Python'] + +# django-meta settings +META_SITE_PROTOCOL = 'https' +META_SITE_DOMAIN = 'dipy.herokuapp.com' + # python-social-auth settings SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/' SOCIAL_AUTH_LOGIN_URL = '/login' diff --git a/requirements.txt b/requirements.txt index fabcd56c..b40f8dab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ whitenoise==3.1 dj-database-url==0.4.1 gunicorn==19.5.0 psycopg2==2.6.1 +django-meta==1.3 \ No newline at end of file diff --git a/website/static/css/main.css b/website/static/css/main.css index ebd9cc04..6a2765a8 100644 --- a/website/static/css/main.css +++ b/website/static/css/main.css @@ -1,301 +1,2 @@ -img { - display: block; - margin: 0 auto; } - -p, li { - font-family: 'Source Sans Pro', sans-serif; - font-size: 16px; - font-weight: 300; } - -a { - text-decoration: none; } - a:hover { - text-decoration: none; } - -body { - background-color: #f0f0f0; } - -.h1, .h2, .h3, h1, h2, h3 { - font-family: 'Source Sans Pro', sans-serif; } - -#websiteHeaderLogo { - height: 2.2em; - padding-left: 15px; } - -#websiteNavbar { - min-height: 80px; - background: none; - border: none; - font-family: 'Source Sans Pro', sans-serif; - font-size: 15px; - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 5; } - #websiteNavbar li { - font-size: 1.1em; - padding: 0.9em 0.1em; - transition: .15s; - text-shadow: 0px 0px 1px #FFF; } - #websiteNavbar li a { - font-weight: 400; } - #websiteNavbar li:hover { - background: #f8f8f8 none repeat scroll 0% 0%; - box-shadow: 0px 4px 0px #ff7f00; - color: #000; - text-shadow: 0px 0px 12px #F5C383; } - #websiteNavbar .inner-wrapper { - background: #fff; - border-radius: 0em 0em 0.2em 0.2em; - border-bottom: 2px solid rgba(255, 128, 5, 0.26); } - -.navbar-toggle { - position: relative; - float: right; - padding: 12px 14px; - margin-top: 17px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; } - -.news-date { - float: left; - margin-right: 4px; } - -.youtube-embed { - display: block; - width: 100%; - max-width: 640px; } - -.youtube-wrapper { - display: block; - max-width: 640px; - overflow: hidden; - margin: 0 auto; - box-shadow: 0 0 1em #222; } - -#superContentContainer { - margin-top: 83px; } - -.content-card { - background-color: #fff; - padding-left: 6%; - padding-right: 6%; - padding-top: 1em; - padding-bottom: 2em; } - -.page-heading { - background: rgba(255, 128, 0, 0.04); - background: -moz-linear-gradient(left, rgba(255, 128, 0, 0.04) 0%, rgba(255, 255, 255, 0) 100%); - background: -webkit-gradient(left top, right top, color-stop(0%, rgba(255, 128, 0, 0.04)), color-stop(100%, rgba(255, 255, 255, 0))); - background: -webkit-linear-gradient(left, rgba(255, 128, 0, 0.04) 0%, rgba(255, 255, 255, 0) 100%); - background: -o-linear-gradient(left, rgba(255, 128, 0, 0.04) 0%, rgba(255, 255, 255, 0) 100%); - background: -ms-linear-gradient(left, rgba(255, 128, 0, 0.04) 0%, rgba(255, 255, 255, 0) 100%); - background: linear-gradient(to right, rgba(255, 128, 0, 0.04) 0%, rgba(255, 255, 255, 0) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff8000', endColorstr='#ffffff', GradientType=1 ); - padding: 2px; - margin-left: -2%; - padding-left: 2%; - margin-right: -2%; - border-left: 4px solid rgba(255, 127, 0, 0.26); - margin-top: 2em; - margin-bottom: 1em; } - .page-heading .h1, .page-heading .h2, .page-heading .h3, .page-heading h1, .page-heading h2, .page-heading h3 { - margin-top: 10px; - margin-bottom: 10px; } - -.carousel-caption { - background: rgba(14, 156, 76, 0.81); - z-index: 4; - top: 30%; - left: 0; - bottom: inherit; - right: inherit; - overflow: hidden; - width: auto; - max-width: 30em; - font-size: 1em; - padding: 1em; - transition: all 0.2s; - text-align: left; } - .carousel-caption:hover { - background: rgba(13, 137, 67, 0.92); } - .carousel-caption h2 { - margin: 0; } - .carousel-caption p { - font-size: 18px; } - -.carousel-indicators { - bottom: 40px; - z-index: 4; } - .carousel-indicators li { - background: rgba(229, 229, 229, 0.16); - border: solid 1px #a1a1a1; } - -.carousel-control { - padding-top: 2em; - font-size: 4em; } - -.publicationBibtex { - display: none; - background: #e9e9e9; - padding: 1em; } - -div.codehilite { - background: #fff; - border: none; } - div.codehilite pre { - background: #fafbff; - border: none; - border-radius: 0px; - border-left: 4px solid #2ea8d1; - margin: 10px; - font-family: sans-serif; - margin: 0; } - -.honeycombs .inner_span { - background-color: rgba(254, 221, 179, 0.89); } - -.home-header { - background: #fff; - color: #182422; - box-shadow: 0px -34px 19px -22px RGBA(101, 101, 101, 0.41), inset 0px 0px 0px 0px #CCC; } - .home-header p { - font-size: 1.1em; - font-weight: 400; - font-family: sans serif; - color: #444; } - -#bigLinksWrapper { - background: #e3e3e3; - overflow: hidden; - border-bottom: 2px solid #1a1a1a; } - -.big-link { - box-shadow: inset 0px 0px 0px #1a1a1a; - transition: all .2s; } - .big-link img { - padding: 10px; - max-width: 140px; - padding-bottom: 1.4em; - padding-top: 3em; - transition: all .2s ease-in-out; } - .big-link span { - display: block; - margin: 0 auto; - text-align: center; - font-family: 'Source Sans Pro', sans-serif; - font-size: 1.6em; - color: #1a1a1a; - padding: 0.6em; - transition: all .2s; } - .big-link:hover { - box-shadow: inset 0px -2px 0px #1a1a1a; } - .big-link:hover img { - transform: scale(1.1); } - .big-link:hover span { - transform: scale(1.01); } - -.split-column-wrapper { - background: #fff; - margin-left: 15px; - margin-right: 15px; - overflow: hidden; - padding-left: -15px; - padding-right: -15px; } - -.publicationInfo { - border-bottom: 1px solid #c9c9c9; - margin-top: 1em; - margin-bottom: 1em; - padding-bottom: 1em; } - -#footerContentContainer { - background: #1a1a1a; - color: #e5e5e5; - padding: 1em; } - -#twitter-feed { - padding-top: 2em; } - -.gplus_attachments_wrapper { - padding: 1em; - background: #f6f6f6; - box-shadow: 0px 0px 6px #dadada; } - -.gplus_content_body { - display: none; - position: fixed; - top: 0; - left: 0; - background: rgba(255, 255, 255, 0.94); - right: 0; - bottom: 0; - z-index: 1; - padding: 2em; - margin-top: 4em; - overflow: auto; } - -.gplus_inner_wrapper { - max-width: 1024px; - margin: 0 auto; - margin-bottom: 2em; } - -.gplus_close_link { - float: right; - display: block; - font-size: 1.4em; } - -.login-button { - background-repeat: no-repeat; - display: block; - width: 32em; - height: 5.4em; - margin: 0 auto; - color: rgba(255, 255, 255, 0); - max-width: 100%; } - -.login-button.google-oauth2 { - background-position: 0px -80px; } - -.dashboard-button.btn.btn-default { - padding: 1em; - font-size: 1.4em; - margin: 1em; - float: none; - display: block; - width: auto; - background: #f3f3f3; - color: #363636; - transition: all 0.5s; } - .dashboard-button.btn.btn-default:hover { - background: #6C6B6B; - color: #EDEDED; - box-shadow: 0px 0px 7px RGBA(0, 0, 0, 0.27); } - -.post-separator { - height: 4px; - background: #7B7B7B; - box-shadow: 0px 0px 5px #939393; - border: 0px; } - -#gitterFrame { - width: 100%; - height: 50em; - border: none; - border-left: 3px solid #7aa6b4; } - -.btn-subscribe { - display: block; - background: #7aa6b4; - color: #fff; - width: 15em; - padding: 1em; - margin-top: 1em; - text-decoration: none; } - +img{display:block;margin:0 auto}p,li{font-family:'Source Sans Pro', sans-serif;font-size:16px;font-weight:300}a{text-decoration:none}a:hover{text-decoration:none}body{background-color:#f0f0f0}.h1,.h2,.h3,h1,h2,h3{font-family:'Source Sans Pro', sans-serif}td{padding:0.2em}#websiteHeaderLogo{height:2.2em;padding-left:15px}#websiteNavbar{min-height:80px;background:none;border:none;font-family:'Source Sans Pro', sans-serif;font-size:15px;position:fixed;top:0;left:0;right:0;z-index:5}#websiteNavbar li{font-size:1.1em;padding:0.9em 0.1em;transition:.15s;text-shadow:0px 0px 1px #FFF}#websiteNavbar li a{font-weight:400}#websiteNavbar li:hover{background:#f8f8f8 none repeat scroll 0% 0%;box-shadow:0px 4px 0px #ff7f00;color:#000;text-shadow:0px 0px 12px #F5C383}#websiteNavbar .inner-wrapper{background:#fff;border-radius:0em 0em 0.2em 0.2em;border-bottom:2px solid rgba(255,128,5,0.26)}.navbar-toggle{position:relative;float:right;padding:12px 14px;margin-top:17px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.news-date{float:left;margin-right:4px}.youtube-embed{display:block;width:100%;max-width:640px}.youtube-wrapper{display:block;max-width:640px;overflow:hidden;margin:0 auto;box-shadow:0 0 1em #222}#superContentContainer{margin-top:83px}.content-card{background-color:#fff;padding-left:6%;padding-right:6%;padding-top:1em;padding-bottom:2em}.page-heading .h1,.page-heading .h2,.page-heading .h3,.page-heading h1,.page-heading h2,.page-heading h3{margin-top:10px;margin-bottom:10px}.carousel-caption{background:rgba(14,156,76,0.81);z-index:4;top:30%;left:0;bottom:inherit;right:inherit;overflow:hidden;width:auto;max-width:30em;font-size:1em;padding:1em;transition:all 0.2s;text-align:left}.carousel-caption:hover{background:rgba(13,137,67,0.92)}.carousel-caption h2{margin:0}.carousel-caption p{font-size:18px}.carousel-indicators{bottom:40px;z-index:4}.carousel-indicators li{background:rgba(229,229,229,0.16);border:solid 1px #a1a1a1}.carousel-control{padding-top:2em;font-size:4em}.publicationBibtex{display:none;background:#e9e9e9;padding:1em}div.codehilite,.highlight{background:#fff;border:none}div.codehilite pre,.highlight pre{background:#fafbff;border:1px solid rgba(46,168,209,0.16);border-radius:0px;border-left:4px solid rgba(46,168,209,0.16);margin:10px;font-family:sans-serif;margin:0}.honeycombs .inner_span{background-color:rgba(254,221,179,0.89)}.home-header{background:#fff;color:#182422;box-shadow:0px -34px 19px -22px RGBA(101, 101, 101, 0.41),inset 0px 0px 0px 0px #CCC}.home-header p{font-size:1.1em;font-weight:400;font-family:sans serif;color:#444}.big-link-col{padding-top:1em;padding-bottom:1em}#bigLinksWrapper{background:#fff;overflow:hidden;padding-bottom:3%}.big-link{border-radius:100%;border:1px solid #CCC;max-width:16em;padding:1.5em;margin:0 auto;transition:all .4s ease-in-out}.big-link img{padding:10px;max-width:80px;padding-bottom:1.4em;padding-top:2em;transition:all .2s ease-in-out}.big-link span{display:block;margin:0 auto;text-align:center;font-family:'Source Sans Pro', sans-serif;font-size:1.6em;color:#1a1a1a;padding:0.6em;transition:all .2s}.big-link:hover{transform:scale(1.04);border:1px solid #222;box-shadow:0px 0px 10px RGBA(0, 0, 0, 0.1)}.big-link:hover img{transform:scale(1.1)}.big-link:hover span{transform:scale(1.01)}.split-column-wrapper{background:#fff;margin-left:15px;margin-right:15px;overflow:hidden;padding-left:-15px;padding-right:-15px}.publicationInfo{border-bottom:1px solid #c9c9c9;margin-top:1em;margin-bottom:1em;padding-bottom:1em}#footerContentContainer{background:#1a1a1a;color:#e5e5e5;padding:1em}#twitter-feed{padding-top:2em}.gplus_attachments_wrapper{padding:1em;background:#f6f6f6;box-shadow:0px 0px 6px #dadada}.gplus_content_body{display:none;position:fixed;top:0;left:0;background:rgba(255,255,255,0.94);right:0;bottom:0;z-index:1;padding:2em;margin-top:4em;overflow:auto}.gplus_inner_wrapper{max-width:1024px;margin:0 auto;margin-bottom:2em}.gplus_close_link{float:right;display:block;font-size:1.4em}.login-button{background-repeat:no-repeat;display:block;width:32em;height:5.4em;margin:0 auto;color:rgba(255,255,255,0);max-width:100%}.login-button.google-oauth2{background-position:0px -80px}.dashboard-button{padding:1em;font-size:1.4em;margin:1em;float:none;display:block;width:auto;background:#f3f3f3;color:#363636;transition:all 0.5s}.dashboard-button.logout{background:#da7676 none repeat scroll 0% 0%;border:#1a1a1a;color:#fff}.dashboard-button.logout:hover{background:#e17676 none repeat scroll 0% 0%;color:#fff;box-shadow:0px 0px 7px RGBA(0, 0, 0, 0.27)}.dashboard-button:hover{background:#6C6B6B;color:#EDEDED;box-shadow:0px 0px 7px RGBA(0, 0, 0, 0.27)}.post-separator{height:4px;background:#7B7B7B;box-shadow:0px 0px 5px #939393;border:0px}#gitterFrame{width:100%;height:50em;border:none;border-left:3px solid #7aa6b4}.btn-subscribe{display:block;background:#7aa6b4;color:#fff;width:15em;padding:1em;margin-top:1em;text-decoration:none}.documentation-toc-tree{border-left:3px solid rgba(255,222,190,0.44);padding-left:1em;margin-top:1.8em;color:#454545}.documentation-toc-tree ul{padding-left:1em}code{padding:0px 4px}.documentation-parent-links{border-bottom:1px solid #eceaea;padding-bottom:0.2em;padding-top:0.4em}.caption-text{display:block;margin:0 auto;width:100%;text-align:center} /*# sourceMappingURL=main.css.map */ diff --git a/website/static/css/main.css.map b/website/static/css/main.css.map index f413d82a..8d1fe6a9 100644 --- a/website/static/css/main.css.map +++ b/website/static/css/main.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAGA,GAAI;EACA,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,MAAM;;AAGlB,KAAM;EACF,WAAW,EAAE,6BAA6B;EAC1C,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;;AAGpB,CAAE;EACE,eAAe,EAAE,IAAI;EACrB,OAAO;IACH,eAAe,EAAE,IAAI;;AAI7B,IAAK;EACD,gBAAgB,EAAE,OAAO;;AAG7B,yBAA0B;EACtB,WAAW,EAAE,6BAA6B;;AAM9C,kBAAmB;EACf,MAAM,EAAE,KAAK;EACb,YAAY,EAAE,IAAI;;AAGtB,cAAe;EACd,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,IAAI;EACb,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,6BAA6B;EAC1C,SAAS,EAAE,IAAI;EACf,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EACR,OAAO,EAAE,CAAC;EAEV,iBAAG;IACC,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,gBAAgB;IAC7B,mBAAE;MACE,WAAW,EAAE,GAAG;IAEpB,uBAAQ;MACN,UAAU,EAAE,gCAA2C;MACvD,UAAU,EAAE,mBAAmB;MAC/B,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,oBAAoB;EAIvC,6BAAe;IACX,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,mBAAmB;IAClC,aAAa,EAAE,iCAAiC;;AAKxD,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"sources": ["main.scss"], "names": [], "file": "main.css" diff --git a/website/static/css/main.scss b/website/static/css/main.scss index 42e5922c..66a7d942 100644 --- a/website/static/css/main.scss +++ b/website/static/css/main.scss @@ -27,6 +27,11 @@ body { font-family: 'Source Sans Pro', sans-serif; } +// default table styles +td { + padding: 0.2em; +} + //// Specific Styles // website header and navbar styles @@ -119,22 +124,6 @@ body { // page-heading styles .page-heading { - background: rgba(255,128,0,0.04); - background: -moz-linear-gradient(left, rgba(255,128,0,0.04) 0%, rgba(255,255,255,0) 100%); - background: -webkit-gradient(left top, right top, color-stop(0%, rgba(255,128,0,0.04)), color-stop(100%, rgba(255,255,255,0))); - background: -webkit-linear-gradient(left, rgba(255,128,0,0.04) 0%, rgba(255,255,255,0) 100%); - background: -o-linear-gradient(left, rgba(255,128,0,0.04) 0%, rgba(255,255,255,0) 100%); - background: -ms-linear-gradient(left, rgba(255,128,0,0.04) 0%, rgba(255,255,255,0) 100%); - background: linear-gradient(to right, rgba(255,128,0,0.04) 0%, rgba(255,255,255,0) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff8000', endColorstr='#ffffff', GradientType=1 ); - - padding: 2px; - margin-left: -2%; - padding-left: 2%; - margin-right: -2%; - border-left: 4px solid rgba(255, 127, 0, 0.26); - margin-top: 2em; - margin-bottom: 1em; .h1, .h2, .h3, h1, h2, h3 { margin-top: 10px; margin-bottom: 10px; @@ -188,14 +177,14 @@ body { } // codehilite styles -div.codehilite { +div.codehilite, .highlight { background: #fff; border: none; pre { background: #fafbff; - border: none; + border: 1px solid rgba(46, 168, 209, 0.16); border-radius: 0px; - border-left: 4px solid #2ea8d1; + border-left: 4px solid rgba(46, 168, 209, 0.16); margin: 10px; font-family: sans-serif; margin: 0; @@ -221,20 +210,30 @@ div.codehilite { } } +.big-link-col { + padding-top: 1em; + padding-bottom: 1em; +} + #bigLinksWrapper { - background: #e3e3e3; + background: #fff; overflow: hidden; - border-bottom: 2px solid #1a1a1a; + padding-bottom: 3%; } .big-link { - box-shadow: inset 0px 0px 0px rgb(26, 26, 26); + border-radius: 100%; + border: 1px solid #CCC; + max-width: 16em; + padding: 1.5em; + margin: 0 auto; + transition: all .4s ease-in-out; img { padding: 10px; - max-width: 140px; + max-width: 80px; padding-bottom: 1.4em; - padding-top: 3em; + padding-top: 2em; transition: all .2s ease-in-out; } @@ -250,7 +249,9 @@ div.codehilite { } &:hover{ - box-shadow: inset 0px -2px 0px rgb(26, 26, 26); + transform: scale(1.04); + border: 1px solid #222; + box-shadow: 0px 0px 10px RGBA(0, 0, 0, 0.1); img { transform: scale(1.1); } @@ -258,7 +259,6 @@ div.codehilite { transform: scale(1.01); } } - transition: all .2s; } .split-column-wrapper { @@ -339,7 +339,7 @@ div.codehilite { // dashboard panel styles -.dashboard-button.btn.btn-default { +.dashboard-button { padding: 1em; font-size: 1.4em; margin: 1em; @@ -349,6 +349,16 @@ div.codehilite { background: #f3f3f3; color: #363636; transition: all 0.5s; + &.logout { + background: rgb(218, 118, 118) none repeat scroll 0% 0%; + border: #1a1a1a; + color: #fff; + &:hover { + background: rgb(225, 118, 118) none repeat scroll 0% 0%; + color: #fff; + box-shadow: 0px 0px 7px RGBA(0, 0, 0, 0.27); + } + } &:hover { background: #6C6B6B; color: #EDEDED; @@ -380,4 +390,33 @@ div.codehilite { padding: 1em; margin-top: 1em; text-decoration: none; +} + + +// documentation styles +.documentation-toc-tree { + border-left: 3px solid rgba(255, 222, 190, 0.44); + padding-left: 1em; + margin-top: 1.8em; + color: #454545; + ul { + padding-left: 1em; + } +} + +code { + padding: 0px 4px; +} + +.documentation-parent-links { + border-bottom: 1px solid rgb(236, 234, 234); + padding-bottom: 0.2em; + padding-top: 0.4em; +} + +.caption-text { + display: block; + margin: 0 auto; + width: 100%; + text-align: center; } \ No newline at end of file diff --git a/website/static/css/syntax.css b/website/static/css/syntax.css index fac2ba40..f99a1a3a 100644 --- a/website/static/css/syntax.css +++ b/website/static/css/syntax.css @@ -63,3 +63,69 @@ div.codehilite .vc { color: #19177C } /* Name.Variable.Class */ div.codehilite .vg { color: #19177C } /* Name.Variable.Global */ div.codehilite .vi { color: #19177C } /* Name.Variable.Instance */ div.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */ + +div.highlight .hll { background-color: #ffffcc } +div.highlight { background: #f8f8f8; } +div.highlight .c { color: #408080; font-style: italic } /* Comment */ +div.highlight .err { border: 1px solid #FF0000 } /* Error */ +div.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +div.highlight .o { color: #666666 } /* Operator */ +div.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +div.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +div.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ +div.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +div.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ +div.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +div.highlight .gd { color: #A00000 } /* Generic.Deleted */ +div.highlight .ge { font-style: italic } /* Generic.Emph */ +div.highlight .gr { color: #FF0000 } /* Generic.Error */ +div.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +div.highlight .gi { color: #00A000 } /* Generic.Inserted */ +div.highlight .go { color: #888888 } /* Generic.Output */ +div.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +div.highlight .gs { font-weight: bold } /* Generic.Strong */ +div.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +div.highlight .gt { color: #0044DD } /* Generic.Traceback */ +div.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +div.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +div.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +div.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +div.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +div.highlight .kt { color: #B00040 } /* Keyword.Type */ +div.highlight .m { color: #666666 } /* Literal.Number */ +div.highlight .s { color: #BA2121 } /* Literal.String */ +div.highlight .na { color: #7D9029 } /* Name.Attribute */ +div.highlight .nb { color: #008000 } /* Name.Builtin */ +div.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +div.highlight .no { color: #880000 } /* Name.Constant */ +div.highlight .nd { color: #AA22FF } /* Name.Decorator */ +div.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +div.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +div.highlight .nf { color: #0000FF } /* Name.Function */ +div.highlight .nl { color: #A0A000 } /* Name.Label */ +div.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +div.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +div.highlight .nv { color: #19177C } /* Name.Variable */ +div.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +div.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +div.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +div.highlight .mf { color: #666666 } /* Literal.Number.Float */ +div.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +div.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +div.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +div.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +div.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +div.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +div.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +div.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +div.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +div.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +div.highlight .sx { color: #008000 } /* Literal.String.Other */ +div.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +div.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +div.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +div.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +div.highlight .vc { color: #19177C } /* Name.Variable.Class */ +div.highlight .vg { color: #19177C } /* Name.Variable.Global */ +div.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +div.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/website/static/images/dipy-thumb.jpg b/website/static/images/dipy-thumb.jpg new file mode 100644 index 00000000..cbc8296f Binary files /dev/null and b/website/static/images/dipy-thumb.jpg differ diff --git a/website/templates/website/base_frame.html b/website/templates/website/base_frame.html index ce803b54..6b09e968 100644 --- a/website/templates/website/base_frame.html +++ b/website/templates/website/base_frame.html @@ -2,7 +2,11 @@ - Dipy {% block title %}{% endblock %} + + + {% include "meta.html" %} + + diff --git a/website/templates/website/dashboard.html b/website/templates/website/dashboard.html index 0b3e5977..4ecf8b38 100644 --- a/website/templates/website/dashboard.html +++ b/website/templates/website/dashboard.html @@ -12,6 +12,7 @@
Add / Edit Carousel Images
Add / Edit Honeycomb Images
Manage Documentation
+
Logout
diff --git a/website/templates/website/documentation_page.html b/website/templates/website/documentation_page.html new file mode 100644 index 00000000..42aed9bf --- /dev/null +++ b/website/templates/website/documentation_page.html @@ -0,0 +1,29 @@ +{% extends "website/base_template.html" %} +{% load customfilters %} + +{% block content_body %} + + +
+ {% if doc %} +
+ +
+
+ {{ doc.toc | safe }} +
+
+
+

{{ doc.body|safe }}

+
+
+ {% else %} +

page does not exist

+ {% endif %} +
+{% endblock %} diff --git a/website/templates/website/header.html b/website/templates/website/header.html index 7e629cbd..a1b27191 100644 --- a/website/templates/website/header.html +++ b/website/templates/website/header.html @@ -29,7 +29,7 @@ diff --git a/website/urls.py b/website/urls.py index 8e346e15..88f3a300 100644 --- a/website/urls.py +++ b/website/urls.py @@ -24,6 +24,10 @@ # Admin Panel Login Page url(r'^dashboard/login/?$', views.dashboard_login, name='dashboard_login'), + # Documentation Pages + url(r'^documentation/(?P.*?)/(?P.*?)/$', + views.documentation, name='documentation'), + # Section and Page Management url(r'^dashboard/sections/edit/(?P.*?)/(?P.*?)/$', views.edit_website_section, name='edit_website_section'), @@ -84,4 +88,8 @@ # social login urls url('', include('social.apps.django_app.urls', namespace='social')), + # logout url + url(r'^dashboard/logout/$', 'django.contrib.auth.views.logout', + {'next_page': '/'}) + ] diff --git a/website/views/__init__.py b/website/views/__init__.py index 620d495a..56dab5dd 100644 --- a/website/views/__init__.py +++ b/website/views/__init__.py @@ -1,3 +1,4 @@ +from .documentation_viewer import * from .manage_carousel import * from .manage_documentation import * from .manage_honeycomb import * diff --git a/website/views/documentation_viewer.py b/website/views/documentation_viewer.py new file mode 100644 index 00000000..65d186c2 --- /dev/null +++ b/website/views/documentation_viewer.py @@ -0,0 +1,35 @@ +import requests + +from django.conf import settings +from django.http import Http404 +from django.shortcuts import render +from django.utils.html import strip_tags +from django.views.decorators.cache import cache_page + +from .tools import get_meta_tags_dict + + +@cache_page(60 * 30) # cache the view for 30 minutes +def documentation(request, version, path): + context = {} + repo_info = (settings.DOCUMENTATION_REPO_OWNER, + settings.DOCUMENTATION_REPO_NAME) + base_url = "http://%s.github.io/%s/" % repo_info + url = base_url + version + "/" + path + ".fjson" + response = requests.get(url) + if response.status_code == 404: + url = base_url + version + "/" + path + "/index.fjson" + response = requests.get(url) + if response.status_code == 404: + raise Http404("Page not found") + url_dir = url + if url_dir[-1] != "/": + url_dir += "/" + response_json = response.json() + response_json['body'] = response_json['body'].replace("src=\"", + "src=\"" + url_dir) + page_title = "DIPY : Docs %s - %s" % (version, + strip_tags(response_json['title']),) + context['meta'] = get_meta_tags_dict(title=page_title) + context['doc'] = response_json + return render(request, 'website/documentation_page.html', context) diff --git a/website/views/manage_carousel.py b/website/views/manage_carousel.py index 564e25d7..04c007c0 100644 --- a/website/views/manage_carousel.py +++ b/website/views/manage_carousel.py @@ -1,4 +1,5 @@ from django.contrib.auth.decorators import login_required +from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, redirect @@ -20,7 +21,7 @@ def dashboard_carousel(request): context = {'all_carousel_images': all_carousel_images} return render(request, 'website/dashboard_carousel.html', context) else: - return render(request, 'website/dashboard_carousel.html', {}) + raise PermissionDenied @login_required @@ -38,7 +39,7 @@ def add_carousel_image(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditcarousel.html', {}) + raise PermissionDenied # if user has edit permission: context = {} @@ -71,7 +72,7 @@ def edit_carousel_image(request, carousel_image_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditcarousel.html', {}) + raise PermissionDenied # if user has edit permission: try: @@ -111,7 +112,7 @@ def delete_carousel_image(request, carousel_image_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditcarousel.html', {}) + raise PermissionDenied try: n = CarouselImage.objects.get(id=carousel_image_id) except: diff --git a/website/views/manage_documentation.py b/website/views/manage_documentation.py index f14bfaf6..eb9dd228 100644 --- a/website/views/manage_documentation.py +++ b/website/views/manage_documentation.py @@ -1,3 +1,4 @@ +from django.core.exceptions import PermissionDenied from django.shortcuts import render, redirect from .tools import update_documentations, has_commit_permission @@ -18,7 +19,7 @@ def dashboard_documentation(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/dashboard_documentation.html', {}) + raise PermissionDenied else: context = {} if request.method == 'POST': diff --git a/website/views/manage_honeycomb.py b/website/views/manage_honeycomb.py index e35908d4..7db313d1 100644 --- a/website/views/manage_honeycomb.py +++ b/website/views/manage_honeycomb.py @@ -1,4 +1,5 @@ from django.contrib.auth.decorators import login_required +from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, redirect @@ -20,7 +21,7 @@ def dashboard_honeycomb(request): context = {'all_honeycomb_posts': all_honeycomb_posts} return render(request, 'website/dashboard_honeycomb.html', context) else: - return render(request, 'website/dashboard_honeycomb.html', {}) + raise PermissionDenied @login_required @@ -38,7 +39,7 @@ def add_honeycomb_post(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addedithoneycomb.html', {}) + raise PermissionDenied # if user has edit permission: context = {} @@ -71,7 +72,7 @@ def edit_honeycomb_post(request, honeycomb_post_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addedithoneycomb.html', {}) + raise PermissionDenied # if user has edit permission: try: @@ -111,7 +112,7 @@ def delete_honeycomb_post(request, honeycomb_post_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addedithoneycomb.html', {}) + raise PermissionDenied try: n = HoneycombPost.objects.get(id=honeycomb_post_id) except: diff --git a/website/views/manage_news.py b/website/views/manage_news.py index 6672acc8..90e7b562 100644 --- a/website/views/manage_news.py +++ b/website/views/manage_news.py @@ -1,4 +1,5 @@ from django.contrib.auth.decorators import login_required +from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, redirect @@ -20,7 +21,7 @@ def dashboard_news(request): context = {'all_news_posts': all_news_posts} return render(request, 'website/dashboard_news.html', context) else: - return render(request, 'website/dashboard_news.html', {}) + raise PermissionDenied @login_required @@ -38,7 +39,7 @@ def add_news_post(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditnews.html', {}) + raise PermissionDenied # if user has edit permission: context = {} @@ -71,7 +72,7 @@ def edit_news_post(request, news_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditnews.html', {}) + raise PermissionDenied # if user has edit permission: try: @@ -111,7 +112,7 @@ def delete_news_post(request, news_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditnews.html', {}) + raise PermissionDenied try: n = NewsPost.objects.get(id=news_id) except: diff --git a/website/views/manage_publications.py b/website/views/manage_publications.py index 599fce0c..f55cd4a6 100644 --- a/website/views/manage_publications.py +++ b/website/views/manage_publications.py @@ -1,5 +1,6 @@ import bibtexparser from django.contrib.auth.decorators import login_required +from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, redirect @@ -21,7 +22,7 @@ def dashboard_publications(request): context = {'all_publications': all_publications} return render(request, 'website/dashboard_publications.html', context) else: - return render(request, 'website/dashboard_publications.html', {}) + raise PermissionDenied @login_required @@ -39,7 +40,7 @@ def add_publication(request, method): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditpublication.html', {}) + raise PermissionDenied # if user has edit permission: if(method == "manual"): @@ -134,7 +135,7 @@ def edit_publication(request, publication_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditpublication.html', {}) + raise PermissionDenied # if user has edit permission: try: @@ -174,7 +175,7 @@ def delete_publication(request, publication_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditpublication.html', {}) + raise PermissionDenied try: p = Publication.objects.get(id=publication_id) except: @@ -198,7 +199,7 @@ def highlight_publications(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addeditpublication.html', {}) + raise PermissionDenied else: if request.method == 'POST': highlighted_publications = request.POST.getlist('highlights[]') diff --git a/website/views/manage_sections.py b/website/views/manage_sections.py index 87e36fa4..e658125e 100644 --- a/website/views/manage_sections.py +++ b/website/views/manage_sections.py @@ -1,4 +1,5 @@ from django.contrib.auth.decorators import login_required +from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, redirect @@ -25,7 +26,7 @@ def dashboard_sections(request, section_type_requested): context["type"] = section_type_requested return render(request, 'website/dashboard_sections.html', context) else: - return render(request, 'website/dashboard_sections.html', {}) + raise PermissionDenied @login_required @@ -43,7 +44,7 @@ def edit_website_section(request, section_type_requested, position_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/editsection.html', {}) + raise PermissionDenied # if user has edit permission: try: @@ -100,7 +101,7 @@ def add_website_page(request): # if user does not have edit permission: if not has_permission: - return render(request, 'website/addpagesection.html', {}) + raise PermissionDenied # if user has edit permission: context = {} @@ -135,7 +136,7 @@ def delete_website_page(request, position_id): # if user does not have edit permission: if not has_permission: - return render(request, 'website/dashboard_sections.html', {}) + raise PermissionDenied try: page_section = WebsiteSection.objects.get( website_position_id=position_id) diff --git a/website/views/pages.py b/website/views/pages.py index 3f626031..69d2e734 100644 --- a/website/views/pages.py +++ b/website/views/pages.py @@ -1,6 +1,7 @@ from django.contrib.auth.decorators import login_required from django.http import Http404 from django.shortcuts import render +from django.views.decorators.cache import cache_page from .tools import * from website.models import * @@ -8,6 +9,7 @@ # Definition of views: +@cache_page(60 * 30) # cache the view for 30 minutes def index(request): context = {} home_header = get_website_section('home_header') @@ -27,6 +29,7 @@ def index(request): context['fb_posts'] = get_facebook_page_feed("diffusionimaginginpython", 5) context['tweets'] = get_twitter_feed('dipymri', 5) + context['meta'] = get_meta_tags_dict() return render(request, 'website/index.html', context) @@ -38,6 +41,8 @@ def page(request, position_id): raise Http404("Page does not exist") context['section'] = section + page_title = "DIPY - %s" % (section.title,) + context['meta'] = get_meta_tags_dict(title=page_title) return render(request, 'website/section_page.html', context) @@ -45,6 +50,7 @@ def cite(request): context = {} all_publications = Publication.objects.all() context['all_publications'] = all_publications + context['meta'] = get_meta_tags_dict(title="DIPY - Publications") return render(request, 'website/cite.html', context) @@ -52,18 +58,26 @@ def honeycomb(request): context = {} all_honeycomb_posts = HoneycombPost.objects.all() context['all_honeycomb_posts'] = all_honeycomb_posts + context['meta'] = get_meta_tags_dict(title="DIPY - Gallery") return render(request, 'website/honeycomb.html', context) def support(request): - return render(request, 'website/support.html', {}) + context = {} + context['meta'] = get_meta_tags_dict(title="DIPY - Support") + return render(request, 'website/support.html', context) @login_required def dashboard(request): - return render(request, 'website/dashboard.html', {}) + context = {} + context['meta'] = get_meta_tags_dict() + return render(request, 'website/dashboard.html', context) def dashboard_login(request): + context = {} next_url = request.GET.get('next') - return render(request, 'website/dashboard_login.html', {'next': next_url}) + context['next'] = next_url + context['meta'] = get_meta_tags_dict() + return render(request, 'website/dashboard_login.html', context) diff --git a/website/views/tools.py b/website/views/tools.py index 7dbce3fd..39d6a014 100644 --- a/website/views/tools.py +++ b/website/views/tools.py @@ -3,6 +3,7 @@ from django.core.exceptions import ObjectDoesNotExist import os import requests +from meta.views import Meta from website.models import * @@ -13,8 +14,8 @@ def get_website_section(requested_website_position_id): """ Fetch WebsiteSection with website_position_id - Input - ----- + Parameters + ---------- website_position_id : string Output @@ -33,8 +34,8 @@ def get_latest_news_posts(limit): """ Fetch Latest NewsPosts according to post_date - Input - ----- + Parameters + ---------- limit : string Output @@ -48,8 +49,8 @@ def has_commit_permission(access_token, repository_name): """ Determine if user has commit access to the repository in nipy organisation. - Input - ----- + Parameters + ---------- access_token : string GitHub access token of user. repository_name : string @@ -74,8 +75,8 @@ def get_google_plus_activity(user_id, count): """ Fetch google plus activity list of a user - Input - ----- + Parameters + ---------- user_id : string The ID of the user to get activities for. @@ -99,8 +100,8 @@ def get_facebook_page_feed(page_id, count): """ Fetch the feed of posts published by this page, or by others on this page. - Input - ----- + Parameters + ---------- page_id : string The ID of the page. count: int @@ -159,8 +160,8 @@ def get_twitter_feed(screen_name, count): Fetch the most recent Tweets posted by the user indicated by the screen_name - Input - ----- + Parameters + ---------- screen_name : string The screen name of the user for whom to return Tweets for. @@ -197,9 +198,13 @@ def update_documentations(): settings.DOCUMENTATION_REPO_OWNER, settings.DOCUMENTATION_REPO_NAME) response = requests.get(url) response_json = response.json() + all_versions_in_github = [] + + # add new docs to database for content in response_json: if content["type"] == "dir": version_name = content["name"] + all_versions_in_github.append(version_name) page_url = base_url + version_name try: DocumentationLink.objects.get(version=version_name) @@ -207,3 +212,44 @@ def update_documentations(): d = DocumentationLink(version=version_name, url=page_url) d.save() + all_doc_links = DocumentationLink.objects.all() + + # remove deleted docs from database + for doc in all_doc_links: + if doc.version not in all_versions_in_github: + doc.delete() + + +def get_meta_tags_dict(title=settings.DEFAULT_TITLE, + description=settings.DEFAULT_DESCRIPTION, + keywords=settings.DEFAULT_KEYWORDS, + url="/", image=settings.DEFAULT_LOGO_URL, + object_type="website"): + """ + Get meta data dictionary for a page + + Parameters + ---------- + title : string + The title of the page used in og:title, twitter:title, tag etc. + description : string + Description used in description meta tag as well as the + og:description and twitter:description property. + keywords : list + List of keywords related to the page + url : string + Full or partial url of the page + image : string + Full or partial url of an image + object_type : string + Used for the og:type property. + """ + meta = Meta(title=title, + description=description, + keywords=keywords + settings.DEFAULT_KEYWORDS, + url=url, + image=image, + object_type=object_type, + use_og=True, use_twitter=True, use_facebook=True, + use_googleplus=True, use_title_tag=True) + return meta