diff --git a/app/app/urls.py b/app/app/urls.py index 0bcb2e887e4..8947da6b68d 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -205,6 +205,7 @@ path('hackathon-list/', dashboard.views.get_hackathons, name='get_hackathons'), path('hackathon-list', dashboard.views.get_hackathons, name='get_hackathons2'), url(r'^register_hackathon/', dashboard.views.hackathon_registration, name='hackathon_registration'), + path('api/v0.1/hackathon//save/', dashboard.views.save_hackathon, name='save_hackathon'), # action URLs url(r'^funder', retail.views.funder_bounties_redirect, name='funder_bounties_redirect'), diff --git a/app/assets/v2/css/gitcoin.css b/app/assets/v2/css/gitcoin.css index 46d1397b143..879d6771b11 100644 --- a/app/assets/v2/css/gitcoin.css +++ b/app/assets/v2/css/gitcoin.css @@ -182,7 +182,7 @@ h4, } .gc-letter-spacing { - letter-spacing: 0.15em; + letter-spacing: 0.5rem; } div.button-pink { diff --git a/app/assets/v2/css/hackathons/explorer.css b/app/assets/v2/css/hackathons/explorer.css index f354d69b4bd..714ef3a2d43 100644 --- a/app/assets/v2/css/hackathons/explorer.css +++ b/app/assets/v2/css/hackathons/explorer.css @@ -3,32 +3,6 @@ background: linear-gradient(161deg, rgba(55,27,181,1) 37%, rgba(255,51,117,1) 100%); } -.banner img { - margin: 1em; - align-items: center; - display: flex; - transition: all .2s ease-in-out; -} - -.banner .hackathon-logo { - height: 18rem; -} - -.banner .hackathon-header { - letter-spacing: 2px; -} - -.banner .hackathon-name { - font-size: 2rem; - letter-spacing: 8px; - text-transform: uppercase; - border-bottom: 3px solid white; -} - -.banner img:hover { - transform: scale(1.1); -} - .banner .sponsors-gold img { height: 6rem; margin: 1em; @@ -43,7 +17,6 @@ margin-bottom: 1rem; } - /* ETH Hack 2019 */ #ethhack_2019 .hackathon-name { font-size: 3rem; @@ -61,4 +34,4 @@ #grow-ethereum-2019 .text-white { color: black !important; /* TODO: REMOVE */ -} \ No newline at end of file +} diff --git a/app/assets/v2/css/lib/quill-snow.css b/app/assets/v2/css/lib/quill-snow.css new file mode 100644 index 00000000000..b963584fef7 --- /dev/null +++ b/app/assets/v2/css/lib/quill-snow.css @@ -0,0 +1,966 @@ +/*! + * Quill Editor v1.3.6 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ + .ql-container { + box-sizing: border-box; + /* font-family: Helvetica, Arial, sans-serif; */ + /* font-size: 13px; */ + height: 100%; + margin: 0px; + position: relative; +} +.ql-container.ql-disabled .ql-tooltip { + visibility: hidden; +} +.ql-container.ql-disabled .gc-editor ul[data-checked] > li::before { + pointer-events: none; +} +.ql-clipboard { + left: -100000px; + height: 1px; + overflow-y: hidden; + position: absolute; + top: 50%; +} +.ql-clipboard p { + margin: 0; + padding: 0; +} +.ql-editor { + box-sizing: border-box; + /* line-height: 1.42; */ + height: 100%; + outline: none; + overflow-y: auto; + padding: 12px 15px; + tab-size: 4; + -moz-tab-size: 4; + text-align: left; + white-space: pre-wrap; + word-wrap: break-word; +} +.ql-editor > * { + cursor: text; +} +.gc-editor p, +.gc-editor ol, +.gc-editor ul, +.gc-editor pre, +.gc-editor blockquote, +.gc-editor h1, +.gc-editor h2, +.gc-editor h3, +.gc-editor h4, +.gc-editor h5, +.gc-editor h6 { + /* margin: 0; + padding: 0; */ + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.gc-editor ol, .gc-editor ul, .gc-editor ul, .gc-editor ol { + padding-left: 1.5em; +} +.gc-editor ol > li, +.gc-editor ul > li, +.gc-editor ol > li, +.gc-editor ul > li { + list-style-type: none; +} +.gc-editor ul > li::before, .gc-editor ul > li::before { + content: '\2022'; +} +.gc-editor ul[data-checked=true], +.gc-editor ul[data-checked=false] { + pointer-events: none; +} +.gc-editor ul[data-checked=true] > li *, +.gc-editor ul[data-checked=false] > li * { + pointer-events: all; +} +.gc-editor ul[data-checked=true] > li::before, +.gc-editor ul[data-checked=false] > li::before { + color: #777; + cursor: pointer; + pointer-events: all; +} +.gc-editor ul[data-checked=true] > li::before { + content: '\2611'; +} +.gc-editor ul[data-checked=false] > li::before { + content: '\2610'; +} +.gc-editor li::before { + display: inline-block; + white-space: nowrap; + width: 1.2em; +} +.gc-editor li:not(.ql-direction-rtl)::before { + margin-left: -1.5em; + margin-right: 0.3em; + text-align: right; +} +.gc-editor li.ql-direction-rtl::before { + margin-left: 0.3em; + margin-right: -1.5em; +} +.gc-editor ol li:not(.ql-direction-rtl), +.gc-editor ul li:not(.ql-direction-rtl) { + padding-left: 1.5em; +} +.gc-editor ol li.ql-direction-rtl, +.gc-editor ul li.ql-direction-rtl { + padding-right: 1.5em; +} +.gc-editor ol li { + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-increment: list-0; +} +.gc-editor ol li:before { + content: counter(list-0, decimal) '. '; +} +.gc-editor ol li.ql-indent-1 { + counter-increment: list-1; +} +.gc-editor ol li.ql-indent-1:before { + content: counter(list-1, lower-alpha) '. '; +} +.gc-editor ol li.ql-indent-1 { + counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-2 { + counter-increment: list-2; +} +.gc-editor ol li.ql-indent-2:before { + content: counter(list-2, lower-roman) '. '; +} +.gc-editor ol li.ql-indent-2 { + counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-3 { + counter-increment: list-3; +} +.gc-editor ol li.ql-indent-3:before { + content: counter(list-3, decimal) '. '; +} +.gc-editor ol li.ql-indent-3 { + counter-reset: list-4 list-5 list-6 list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-4 { + counter-increment: list-4; +} +.gc-editor ol li.ql-indent-4:before { + content: counter(list-4, lower-alpha) '. '; +} +.gc-editor ol li.ql-indent-4 { + counter-reset: list-5 list-6 list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-5 { + counter-increment: list-5; +} +.gc-editor ol li.ql-indent-5:before { + content: counter(list-5, lower-roman) '. '; +} +.gc-editor ol li.ql-indent-5 { + counter-reset: list-6 list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-6 { + counter-increment: list-6; +} +.gc-editor ol li.ql-indent-6:before { + content: counter(list-6, decimal) '. '; +} +.gc-editor ol li.ql-indent-6 { + counter-reset: list-7 list-8 list-9; +} +.gc-editor ol li.ql-indent-7 { + counter-increment: list-7; +} +.gc-editor ol li.ql-indent-7:before { + content: counter(list-7, lower-alpha) '. '; +} +.gc-editor ol li.ql-indent-7 { + counter-reset: list-8 list-9; +} +.gc-editor ol li.ql-indent-8 { + counter-increment: list-8; +} +.gc-editor ol li.ql-indent-8:before { + content: counter(list-8, lower-roman) '. '; +} +.gc-editor ol li.ql-indent-8 { + counter-reset: list-9; +} +.gc-editor ol li.ql-indent-9 { + counter-increment: list-9; +} +.gc-editor ol li.ql-indent-9:before { + content: counter(list-9, decimal) '. '; +} +.gc-editor .ql-indent-1:not(.ql-direction-rtl) { + padding-left: 3em; +} +.gc-editor li.ql-indent-1:not(.ql-direction-rtl) { + padding-left: 4.5em; +} +.gc-editor .ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 3em; +} +.gc-editor li.ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 4.5em; +} +.gc-editor .ql-indent-2:not(.ql-direction-rtl) { + padding-left: 6em; +} +.gc-editor li.ql-indent-2:not(.ql-direction-rtl) { + padding-left: 7.5em; +} +.gc-editor .ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 6em; +} +.gc-editor li.ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 7.5em; +} +.gc-editor .ql-indent-3:not(.ql-direction-rtl) { + padding-left: 9em; +} +.gc-editor li.ql-indent-3:not(.ql-direction-rtl) { + padding-left: 10.5em; +} +.gc-editor .ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 9em; +} +.gc-editor li.ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 10.5em; +} +.gc-editor .ql-indent-4:not(.ql-direction-rtl) { + padding-left: 12em; +} +.gc-editor li.ql-indent-4:not(.ql-direction-rtl) { + padding-left: 13.5em; +} +.gc-editor .ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 12em; +} +.gc-editor li.ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 13.5em; +} +.gc-editor .ql-indent-5:not(.ql-direction-rtl) { + padding-left: 15em; +} +.gc-editor li.ql-indent-5:not(.ql-direction-rtl) { + padding-left: 16.5em; +} +.gc-editor .ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 15em; +} +.gc-editor li.ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 16.5em; +} +.gc-editor .ql-indent-6:not(.ql-direction-rtl) { + padding-left: 18em; +} +.gc-editor li.ql-indent-6:not(.ql-direction-rtl) { + padding-left: 19.5em; +} +.gc-editor .ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 18em; +} +.gc-editor li.ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 19.5em; +} +.gc-editor .ql-indent-7:not(.ql-direction-rtl) { + padding-left: 21em; +} +.gc-editor li.ql-indent-7:not(.ql-direction-rtl) { + padding-left: 22.5em; +} +.gc-editor .ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 21em; +} +.gc-editor li.ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 22.5em; +} +.gc-editor .ql-indent-8:not(.ql-direction-rtl) { + padding-left: 24em; +} +.gc-editor li.ql-indent-8:not(.ql-direction-rtl) { + padding-left: 25.5em; +} +.gc-editor .ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 24em; +} +.gc-editor li.ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 25.5em; +} +.gc-editor .ql-indent-9:not(.ql-direction-rtl) { + padding-left: 27em; +} +.gc-editor li.ql-indent-9:not(.ql-direction-rtl) { + padding-left: 28.5em; +} +.gc-editor .ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 27em; +} +.gc-editor li.ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 28.5em; +} +.gc-editor .ql-video { + display: block; + max-width: 100%; + min-width: 600px; + min-height: 336px; +} +.gc-editor .ql-video.ql-align-center { + margin: 0 auto; +} +.gc-editor .ql-video.ql-align-right { + margin: 0 0 0 auto; +} +.gc-editor .ql-bg-black { + background-color: #000; +} +.gc-editor .ql-bg-red { + background-color: #e60000; +} +.gc-editor .ql-bg-orange { + background-color: #f90; +} +.gc-editor .ql-bg-yellow { + background-color: #ff0; +} +.gc-editor .ql-bg-green { + background-color: #008a00; +} +.gc-editor .ql-bg-blue { + background-color: #06c; +} +.gc-editor .ql-bg-purple { + background-color: #93f; +} +.gc-editor .ql-color-white { + color: #fff; +} +.gc-editor .ql-color-red { + color: #e60000; +} +.gc-editor .ql-color-orange { + color: #f90; +} +.gc-editor .ql-color-yellow { + color: #ff0; +} +.gc-editor .ql-color-green { + color: #008a00; +} +.gc-editor .ql-color-blue { + color: #06c; +} +.gc-editor .ql-color-purple { + color: #93f; +} +.gc-editor .ql-font-serif { + font-family: Georgia, Times New Roman, serif; +} +.gc-editor .ql-font-monospace { + font-family: Monaco, Courier New, monospace; +} +.gc-editor .ql-size-small { + font-size: 0.75em; +} +.gc-editor .ql-size-large { + font-size: 1.5em; +} +.gc-editor .ql-size-huge { + font-size: 2.5em; +} +.gc-editor .ql-direction-rtl { + direction: rtl; + text-align: inherit; +} +.gc-editor .ql-align-center { + text-align: center; +} +.gc-editor .ql-align-justify { + text-align: justify; +} +.gc-editor .ql-align-right { + text-align: right; +} +.gc-editor.ql-blank::before { + color: rgba(0,0,0,0.6); + content: attr(data-placeholder); + font-style: italic; + left: 15px; + pointer-events: none; + position: absolute; + right: 15px; +} + +/* Toolbar styles */ +.ql-snow.ql-toolbar:after, +.ql-snow .ql-toolbar:after { + clear: both; + content: ''; + display: table; +} +.ql-snow.ql-toolbar button, +.ql-snow .ql-toolbar button { + background: none; + border: none; + cursor: pointer; + display: inline-block; + float: left; + height: 24px; + padding: 3px 5px; + width: 28px; +} +.ql-snow.ql-toolbar button svg, +.ql-snow .ql-toolbar button svg { + float: left; + height: 100%; +} +.ql-snow.ql-toolbar button:active:hover, +.ql-snow .ql-toolbar button:active:hover { + outline: none; +} +.ql-snow.ql-toolbar input.ql-image[type=file], +.ql-snow .ql-toolbar input.ql-image[type=file] { + display: none; +} +.ql-snow.ql-toolbar button:hover, +.ql-snow .ql-toolbar button:hover, +.ql-snow.ql-toolbar button:focus, +.ql-snow .ql-toolbar button:focus, +.ql-snow.ql-toolbar button.ql-active, +.ql-snow .ql-toolbar button.ql-active, +.ql-snow.ql-toolbar .ql-picker-label:hover, +.ql-snow .ql-toolbar .ql-picker-label:hover, +.ql-snow.ql-toolbar .ql-picker-label.ql-active, +.ql-snow .ql-toolbar .ql-picker-label.ql-active, +.ql-snow.ql-toolbar .ql-picker-item:hover, +.ql-snow .ql-toolbar .ql-picker-item:hover, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected { + color: #06c; +} +.ql-snow.ql-toolbar button:hover .ql-fill, +.ql-snow .ql-toolbar button:hover .ql-fill, +.ql-snow.ql-toolbar button:focus .ql-fill, +.ql-snow .ql-toolbar button:focus .ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill { + fill: #06c; +} +.ql-snow.ql-toolbar button:hover .ql-stroke, +.ql-snow .ql-toolbar button:hover .ql-stroke, +.ql-snow.ql-toolbar button:focus .ql-stroke, +.ql-snow .ql-toolbar button:focus .ql-stroke, +.ql-snow.ql-toolbar button.ql-active .ql-stroke, +.ql-snow .ql-toolbar button.ql-active .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow.ql-toolbar button:hover .ql-stroke-miter, +.ql-snow .ql-toolbar button:hover .ql-stroke-miter, +.ql-snow.ql-toolbar button:focus .ql-stroke-miter, +.ql-snow .ql-toolbar button:focus .ql-stroke-miter, +.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter { + stroke: #06c; +} +@media (pointer: coarse) { + .ql-snow.ql-toolbar button:hover:not(.ql-active), + .ql-snow .ql-toolbar button:hover:not(.ql-active) { + color: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill { + fill: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter { + stroke: #444; + } +} +.ql-snow { + box-sizing: border-box; +} +.ql-snow * { + box-sizing: border-box; +} +.ql-snow .ql-hidden { + display: none; +} +.ql-snow .ql-out-bottom, +.ql-snow .ql-out-top { + visibility: hidden; +} +.ql-snow .ql-tooltip { + position: absolute; + transform: translateY(10px); +} +.ql-snow .ql-tooltip a { + cursor: pointer; + text-decoration: none; +} +.ql-snow .ql-tooltip.ql-flip { + transform: translateY(-10px); +} +.ql-snow .ql-formats { + display: inline-block; + vertical-align: middle; +} +.ql-snow .ql-formats:after { + clear: both; + content: ''; + display: table; +} +.ql-snow svg { + vertical-align: inherit; +} +.ql-snow .ql-stroke { + fill: none; + stroke: #444; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; +} +.ql-snow .ql-stroke-miter { + fill: none; + stroke: #444; + stroke-miterlimit: 10; + stroke-width: 2; +} +.ql-snow .ql-fill, +.ql-snow .ql-stroke.ql-fill { + fill: #444; +} +.ql-snow .ql-empty { + fill: none; +} +.ql-snow .ql-even { + fill-rule: evenodd; +} +.ql-snow .ql-thin, +.ql-snow .ql-stroke.ql-thin { + stroke-width: 1; +} +.ql-snow .ql-transparent { + opacity: 0.4; +} +.ql-snow .ql-direction svg:last-child { + display: none; +} +.ql-snow .ql-direction.ql-active svg:last-child { + display: inline; +} +.ql-snow .ql-direction.ql-active svg:first-child { + display: none; +} +.ql-snow .gc-editor h1 { + font-size: 2em; +} +.ql-snow .gc-editor h2 { + /* font-size: 1.5em; */ +} +.ql-snow .gc-editor h3 { + font-size: 1.17em; +} +.ql-snow .gc-editor h4 { + font-size: 1em; +} +.ql-snow .gc-editor h5 { + font-size: 0.83em; +} +.ql-snow .gc-editor h6 { + font-size: 0.67em; +} +.ql-snow .gc-editor a { + text-decoration: underline; +} +.gc-editor blockquote { + border-left: 4px solid #ccc; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 16px; +} +.gc-editor code, +.gc-editor pre { + background-color: #f0f0f0; + border-radius: 3px; +} +.gc-editor pre { + white-space: pre-wrap; + margin-bottom: 5px; + margin-top: 5px; + padding: 5px 10px; +} +.gc-editor code { + font-size: 85%; + padding: 2px 4px; +} +.gc-editor pre.ql-syntax { + background-color: #23241f; + color: #f8f8f2; + overflow: visible; +} +.gc-editor img { + max-width: 100%; +} +.ql-snow .ql-picker { + color: #444; + display: inline-block; + float: left; + font-size: 14px; + font-weight: 500; + height: 24px; + position: relative; + vertical-align: middle; +} +.ql-snow .ql-picker-label { + cursor: pointer; + display: inline-block; + height: 100%; + padding-left: 8px; + padding-right: 2px; + position: relative; + width: 100%; +} +.ql-snow .ql-picker-label::before { + display: inline-block; + line-height: 22px; +} +.ql-snow .ql-picker-options { + background-color: #fff; + display: none; + min-width: 100%; + padding: 4px 8px; + position: absolute; + white-space: nowrap; +} +.ql-snow .ql-picker-options .ql-picker-item { + cursor: pointer; + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label { + color: #ccc; + z-index: 2; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { + fill: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { + stroke: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-options { + display: block; + margin-top: -1px; + top: 100%; + z-index: 1; +} +.ql-snow .ql-color-picker, +.ql-snow .ql-icon-picker { + width: 28px; +} +.ql-snow .ql-color-picker .ql-picker-label, +.ql-snow .ql-icon-picker .ql-picker-label { + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-label svg, +.ql-snow .ql-icon-picker .ql-picker-label svg { + right: 4px; +} +.ql-snow .ql-icon-picker .ql-picker-options { + padding: 4px 0px; +} +.ql-snow .ql-icon-picker .ql-picker-item { + height: 24px; + width: 24px; + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-options { + padding: 3px 5px; + width: 152px; +} +.ql-snow .ql-color-picker .ql-picker-item { + border: 1px solid transparent; + float: left; + height: 16px; + margin: 2px; + padding: 0px; + width: 16px; +} +.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg { + position: absolute; + margin-top: -9px; + right: 0; + top: 50%; + width: 18px; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before { + content: attr(data-label); +} +.ql-snow .ql-picker.ql-header { + width: 98px; +} +.ql-snow .ql-picker.ql-header .ql-picker-label::before, +.ql-snow .ql-picker.ql-header .ql-picker-item::before { + content: 'Normal'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + content: 'Heading 1'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + content: 'Heading 2'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + content: 'Heading 3'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + content: 'Heading 4'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + content: 'Heading 5'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + content: 'Heading 6'; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + font-size: 2em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + font-size: 1.5em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + font-size: 1.17em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + font-size: 1em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + font-size: 0.83em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + font-size: 0.67em; +} +.ql-snow .ql-picker.ql-font { + width: 108px; +} +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: 'Sans Serif'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + content: 'Serif'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + content: 'Monospace'; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + font-family: Georgia, Times New Roman, serif; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + font-family: Monaco, Courier New, monospace; +} +.ql-snow .ql-picker.ql-size { + width: 98px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: 'Normal'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + content: 'Small'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + content: 'Large'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + content: 'Huge'; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + font-size: 10px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + font-size: 18px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + font-size: 32px; +} +.ql-snow .ql-color-picker.ql-background .ql-picker-item { + background-color: #fff; +} +.ql-snow .ql-color-picker.ql-color .ql-picker-item { + background-color: #000; +} +.ql-toolbar.ql-snow { + border: 1px solid #ccc; + box-sizing: border-box; + font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + padding: 8px; +} +.ql-toolbar.ql-snow .ql-formats { + margin-right: 15px; +} +.ql-toolbar.ql-snow .ql-picker-label { + border: 1px solid transparent; +} +.ql-toolbar.ql-snow .ql-picker-options { + border: 1px solid transparent; + box-shadow: rgba(0,0,0,0.2) 0 2px 8px; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected, +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover { + border-color: #000; +} +.ql-toolbar.ql-snow + .ql-container.ql-snow { + border-top: 0px; +} +.ql-snow .ql-tooltip { + background-color: #fff; + border: 1px solid #ccc; + box-shadow: 0px 0px 5px #ddd; + color: #444; + padding: 5px 12px; + white-space: nowrap; +} +.ql-snow .ql-tooltip::before { + content: "Visit URL:"; + line-height: 26px; + margin-right: 8px; +} +.ql-snow .ql-tooltip input[type=text] { + display: none; + border: 1px solid #ccc; + font-size: 13px; + height: 26px; + margin: 0px; + padding: 3px 5px; + width: 170px; +} +.ql-snow .ql-tooltip a.ql-preview { + display: inline-block; + max-width: 200px; + overflow-x: hidden; + text-overflow: ellipsis; + vertical-align: top; +} +.ql-snow .ql-tooltip a.ql-action::after { + border-right: 1px solid #ccc; + content: 'Edit'; + margin-left: 16px; + padding-right: 8px; +} +.ql-snow .ql-tooltip a.ql-remove::before { + content: 'Remove'; + margin-left: 8px; +} +.ql-snow .ql-tooltip a { + line-height: 26px; +} +.ql-snow .ql-tooltip.ql-editing a.ql-preview, +.ql-snow .ql-tooltip.ql-editing a.ql-remove { + display: none; +} +.ql-snow .ql-tooltip.ql-editing input[type=text] { + display: inline-block; +} +.ql-snow .ql-tooltip.ql-editing a.ql-action::after { + border-right: 0px; + content: 'Save'; + padding-right: 0px; +} +.ql-snow .ql-tooltip[data-mode=link]::before { + content: "Enter link:"; +} +.ql-snow .ql-tooltip[data-mode=formula]::before { + content: "Enter formula:"; +} +.ql-snow .ql-tooltip[data-mode=video]::before { + content: "Enter video:"; +} +.ql-snow a { + color: #06c; +} +.ql-container.ql-snow { + border: 1px solid #ccc; +} + +.inactive .ql-editor { + padding:0; + line-height:inherit; +} + +.inactive .ql-toolbar { + display:none; +} + +.inactive .ql-container.ql-snow { + border:none; +} diff --git a/app/assets/v2/images/how-it-works/hackathon/pic1.jpg b/app/assets/v2/images/how-it-works/hackathon/pic1.jpg index 8346947ea1f..305ff3a8c4f 100644 Binary files a/app/assets/v2/images/how-it-works/hackathon/pic1.jpg and b/app/assets/v2/images/how-it-works/hackathon/pic1.jpg differ diff --git a/app/assets/v2/images/how-it-works/hackathon/pic2.jpg b/app/assets/v2/images/how-it-works/hackathon/pic2.jpg index 41985d8d0ab..8e04e432f86 100644 Binary files a/app/assets/v2/images/how-it-works/hackathon/pic2.jpg and b/app/assets/v2/images/how-it-works/hackathon/pic2.jpg differ diff --git a/app/assets/v2/images/how-it-works/hackathon/pic3.jpg b/app/assets/v2/images/how-it-works/hackathon/pic3.jpg index 563b60d7e83..cdc35eb6edd 100644 Binary files a/app/assets/v2/images/how-it-works/hackathon/pic3.jpg and b/app/assets/v2/images/how-it-works/hackathon/pic3.jpg differ diff --git a/app/assets/v2/images/how-it-works/hackathon/pic5.jpg b/app/assets/v2/images/how-it-works/hackathon/pic5.jpg index aa0b58465db..6d09755fd9e 100644 Binary files a/app/assets/v2/images/how-it-works/hackathon/pic5.jpg and b/app/assets/v2/images/how-it-works/hackathon/pic5.jpg differ diff --git a/app/assets/v2/js/pages/hackathon-onboard.js b/app/assets/v2/js/pages/hackathon-onboard.js new file mode 100644 index 00000000000..a03788a16f8 --- /dev/null +++ b/app/assets/v2/js/pages/hackathon-onboard.js @@ -0,0 +1,87 @@ +let quill; + +$('#edit-btn').on('click', function() { + const activateQuill = () => { + if (quill) { + return quill.isEnabled() ? destroyQuill() : rebuildQuill(); + } + quill = new Quill('#description-hackathon', { + modules: { + toolbar: [ + [{ header: [ 1, 2, 3, 4, 5, 6, false ] }], + [ 'bold', 'italic', 'underline', 'strike' ], + [{ 'size': [ 'small', false, 'large', 'huge' ] }], + [{ 'color': [] }, { 'background': [] }], + [{ 'font': [] }], + [{ 'align': [] }], + [{ 'list': 'ordered'}, { 'list': 'bullet' }], + [{ 'indent': '-1'}, { 'indent': '+1' }], + [{ 'direction': 'rtl' }], + [ 'blockquote', 'code-block', 'link', 'image', 'video' ], + ['clean'] + ] + }, + theme: 'snow', + placeholder: 'Compose an epic description for your Tribe...' + }); + $('#save-description-btn').removeClass('d-none'); + return quill; + }; + + loadDynamicScript(activateQuill, 'https://cdn.quilljs.com/1.3.6/quill.js', 'quill-js'); + +}); + +const loadDynamicScript = (callback, url, id) => { + const existingScript = document.getElementById(id); + + if (!existingScript) { + const script = document.createElement('script'); + + script.src = url; + script.id = id; + document.body.appendChild(script); + + script.onload = () => { + if (callback) + callback(); + }; + } + + if (existingScript && callback) + callback(); +}; + +$('[data-savehackathon]').on('click', function() { + const slug = $(this).data('savehackathon'); + const url = `/api/v0.1/hackathon/${slug}/save/`; + const sendSave = fetchData ( + url, + 'POST', + {'description': quill.root.innerHTML}, + {'X-CSRFToken': $("input[name='csrfmiddlewaretoken']").val()} + ); + + $.when(sendSave).then(function(response) { + destroyQuill(); + _alert('Description saved'); + }).fail(function(error) { + _alert('Error saving description', 'error'); + }); +}); + +const destroyQuill = () => { + const editorContainer = $('.editor-container'); + + editorContainer.addClass('inactive'); + quill.enable(false); + $('#save-description-btn').addClass('d-none'); +}; + +const rebuildQuill = () => { + const editorContainer = $('.editor-container'); + + editorContainer.removeClass('inactive'); + quill.enable(true); + $('#save-description-btn').removeClass('d-none'); +}; diff --git a/app/dashboard/migrations/0067_hackathonevent_description.py b/app/dashboard/migrations/0067_hackathonevent_description.py new file mode 100644 index 00000000000..2f5611cc6ad --- /dev/null +++ b/app/dashboard/migrations/0067_hackathonevent_description.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.4 on 2019-12-09 19:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0066_hackathonevent_quest_link'), + ] + + operations = [ + migrations.AddField( + model_name='hackathonevent', + name='description', + field=models.TextField(blank=True, default='', help_text='HTML rich description.'), + ), + ] diff --git a/app/dashboard/models.py b/app/dashboard/models.py index a4a423ebe3e..caeb0b81c19 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -4079,6 +4079,7 @@ class HackathonEvent(SuperModel): identifier = models.CharField(max_length=255, default='', help_text='used for custom styling for the banner') sponsors = models.ManyToManyField(Sponsor, through='HackathonSponsor') show_results = models.BooleanField(help_text=_('Hide/Show the links to access hackathon results'), default=True) + description = models.TextField(default='', blank=True, help_text=_('HTML rich description.')) quest_link = models.CharField(max_length=255, blank=True) def __str__(self): diff --git a/app/dashboard/templates/dashboard/hackathon/hackathons.html b/app/dashboard/templates/dashboard/hackathon/hackathons.html index e52e454653a..1e2e51a945c 100644 --- a/app/dashboard/templates/dashboard/hackathon/hackathons.html +++ b/app/dashboard/templates/dashboard/hackathon/hackathons.html @@ -38,6 +38,20 @@ {% include 'shared/nav_hackathons.html' %} {% include 'shared/minihero.html' with h1='Hackathons' suppress_logo=0 position_h1_below_logo=True hide_rain=True %} +
+
+ +
+
+ +
+ +
+
+
+ +
@@ -70,7 +84,9 @@
{{ hackath {% if hackathon.end_date|timesince <= "1 min" %} Join {% endif %} + {% if hackathon.start_date|timesince >= "1 min" %} Prizes + {% endif %} {% if hackathon.show_results %} Projects {% endif %} diff --git a/app/dashboard/templates/dashboard/hackathon/onboard.html b/app/dashboard/templates/dashboard/hackathon/onboard.html index b499abdabf6..e4ee66686ce 100644 --- a/app/dashboard/templates/dashboard/hackathon/onboard.html +++ b/app/dashboard/templates/dashboard/hackathon/onboard.html @@ -21,8 +21,21 @@ {% include 'shared/head.html' %} {% include 'shared/cards.html' %} - + + - {% if is_staff %} - - {% endif %} + {% if is_staff %} + + {% endif %} +