-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
47 changed files
with
829 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
// Config | ||
// ========================================================================= | ||
@import base | ||
|
||
// ========================================================================= | ||
.shadow | ||
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, .16) | ||
-moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, .16) | ||
-webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, .16) | ||
+prefix(box-shadow, 0px 3px 6px 0px rgba(0, 0, 0, .16), moz webkit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Config | ||
// ========================================================================= | ||
@import base | ||
|
||
// ========================================================================= | ||
.tooltip | ||
position: relative | ||
&:hover | ||
cursor: help | ||
&:after, &:before | ||
opacity: 1 | ||
|
||
&:after, &:before | ||
position: absolute | ||
left: 50% | ||
opacity: 0 | ||
transition: opacity 0.2s ease | ||
+prefix(box-shadow, 0px 3px 6px 0px rgba(0, 0, 0, .16), moz webkit) | ||
|
||
&:after | ||
top: -5px | ||
content: '' | ||
transform: translateX(-50%) | ||
border-width: 7px 6px 0 6px | ||
border-style: solid | ||
border-color: map-get($colors, night) transparent transparent transparent | ||
|
||
&:before | ||
top: -4px | ||
content: attr(aria-label) | ||
transform: translateX(-50%) translateY(-100%) | ||
padding: map-get($scales, 15) | ||
background: map-get($colors, night) | ||
color: map-get($colors, 'white') | ||
font-size: map-get($scales, 14) | ||
line-height: map-get($scales, 18) | ||
border-radius: $base-radius | ||
min-width: 206px | ||
pointer-events: none | ||
|
||
.tooltip-left | ||
&:after, &:before | ||
transition: none | ||
|
||
&:before | ||
left: calc(0% - 6px) | ||
top: 50% | ||
transform: translateX(-100%) translateY(calc(-50% + 1px)) | ||
padding: map-get($scales, 5) | ||
min-width: auto | ||
white-space: nowrap | ||
|
||
&:after | ||
left: calc(0% - 10px) | ||
top: 50% | ||
transform: translateY(calc(-50% + 1px)) rotate(-90deg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
.mx-auto.shadow.border.rounded.border-silver.maxw420 | ||
= cell(:current_proposal, model&.proposal) | ||
|
||
- steps.each do |s| | ||
- steps.each_with_index do |s, i| | ||
.border-top.border-silver class=s.highlight | ||
.flex.items-center.px20.py16.progress-item | ||
.indicator.mr20 class=s.indicator | ||
.indicator.mr20 class=(s.indicator + position(i)) | ||
h5.mr-auto = s.label | ||
h6.bold = s.message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
class ProgressCell < Cell::ViewModel | ||
private | ||
|
||
def eligibility_status | ||
model&.eligibility_status | ||
end | ||
|
||
def fund | ||
model&.fund || OpenStruct.new(stub?: false) | ||
end | ||
|
||
def proposal | ||
model&.proposal | ||
def position(i) | ||
if i.zero? | ||
' bot' | ||
elsif i == (steps.size - 1) | ||
' top' | ||
else | ||
' bot top' | ||
end | ||
end | ||
|
||
def eligibility_status | ||
model&.eligibility_status | ||
def proposal | ||
model&.proposal | ||
end | ||
|
||
def steps # TODO: refactor | ||
opts = { fund: fund, proposal: proposal, status: eligibility_status } | ||
old_opts = { fund: fund, proposal: proposal, status: eligibility_status } | ||
opts = { assessment: model, featured: fund.featured? } | ||
|
||
sections = { | ||
request: Progress::Request.new(opts), | ||
eligibility: Progress::Eligibility.new(opts), | ||
suitability: Progress::Suitability.new(old_opts), | ||
reveal: Progress::Reveal.new(opts), | ||
apply: Progress::Apply.new(opts) | ||
} | ||
|
||
if fund.stub? | ||
[ | ||
::Progress::Request.new(opts.merge(position: 'bot')), | ||
::Progress::Eligibility.new(opts.merge(position: 'top bot')), | ||
::Progress::Suitability.new(opts.merge(position: 'top bot')), | ||
::Progress::Apply.new(opts.merge(position: 'top')) | ||
] | ||
sections.slice(:request, :eligibility, :suitability, :apply).values | ||
elsif options[:subscribed] || fund.featured? || model&.revealed? | ||
sections.slice(:eligibility, :suitability, :apply).values | ||
else | ||
[ | ||
::Progress::Eligibility.new(opts.merge(position: 'bot')), | ||
::Progress::Suitability.new(opts.merge(position: 'top bot')), | ||
::Progress::Apply.new(opts.merge(position: 'top')) | ||
] | ||
sections.slice(:eligibility, :suitability, :reveal, :apply).values | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.