Skip to content

Commit

Permalink
Merge pull request #57 from parti-coop/feature/new_solution
Browse files Browse the repository at this point in the history
솔루션의 내용을 업데이트합니다
  • Loading branch information
dalikim authored Mar 12, 2020
2 parents 7d580b7 + 1e2fd50 commit 60d969a
Show file tree
Hide file tree
Showing 17 changed files with 340 additions and 94 deletions.
4 changes: 2 additions & 2 deletions app/admin/contacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

remove_filter :deprecated_solution_slug

filter :solution_slugs_array_in, { as: :select, collection: Solution::CONTACT_OPTIONS.map { |solution_option| [solution_option[:title], solution_option[:slug]] } }
filter :solution_slugs_array_in, { as: :select, collection: Contact::SOLUTION_OPTIONS.map { |solution_option| [solution_option[:title], solution_option[:slug]] } }
filter :project_subject
filter :contact_org
filter :contact_manager
Expand Down Expand Up @@ -57,7 +57,7 @@
end

form do |f|
collected_data = Solution::CONTACT_OPTIONS.map { |solution_option| [solution_option[:title], solution_option[:slug], { checked: f.object.solution_slugs.include?(solution_option[:slug].to_s) }] }
collected_data = Contact::SOLUTION_OPTIONS.map { |solution_option| [solution_option[:title], solution_option[:slug], { checked: f.object.solution_slugs.include?(solution_option[:slug].to_s) }] }
f.inputs do
f.input :project_subject
f.input :project_body
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions app/assets/stylesheets/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,35 @@ section.contacts {
}
}

section.activists {
padding: 120px 0;
background-color: $brand-violet;
border-top: 1px solid white;
.base-section-title {
color: white;
}
.base-section-desc {
color: $brand-violet-light;
}
.activists-button-container {
text-align: center;
.btn-contact {
margin-top: 24px;
font-size: 24px;
font-weight: 500;
line-height: 32px;
color: $brand-violet;
background-color: white;
padding: 16px 32px;
border-radius: 32px;
@include media-breakpoint-down(sm) {
font-size: 20px;
line-height: 28px;
}
}
}
}

footer.app-footer {
padding-top: 120px;
padding-bottom: 120px;
Expand Down
26 changes: 26 additions & 0 deletions app/assets/stylesheets/_solutions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,32 @@ body.body-solutions {
}
}

section.tiles-with {
margin-bottom: 120px;
.tile {
padding: 24px 0;
border-radius: 8px;
.tile-meta {
display: flex;
.title {
flex: none;
width: 30%;
max-width: 300px;
min-width: 200px;
font-size: 1.2em;
border: 1px solid #c2c2c2;
padding: 32px 24px;
border-radius: 8px;
text-align: center;
margin-right: 3em;
.text-muted {
font-size: 0.8em;
}
}
}
}
}

section.tiles-what-we-do {
padding-bottom: 170px;
@include media-breakpoint-down(xs) {
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/solutions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ class SolutionsController < ApplicationController
@info = solution_info
end
end

def soft
@slug = Platform::INFO[:slug]
@info = Platform::INFO
end
end
17 changes: 17 additions & 0 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ class Contact < ApplicationRecord

before_save :trim_solution_slugs

SOLUTION_OPTIONS = Solution::DICTIONARY.map do |solution_slug, solution_info|
{
title: solution_info[:title],
slug: solution_slug
}
end + [
{
title: Platform::INFO[:title],
slug: Platform::INFO[:slug],
}
] + [
{
title: '기타',
slug: 'etc'
}
]

def self.ransackable_scopes(auth_object = nil)
%i(solution_slugs_array_in)
end
Expand Down
55 changes: 55 additions & 0 deletions app/models/platform.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
class Platform
DICTIONARY = {
groups: {
image_path: 'soft_solution_1.png',
title: '빠띠 그룹스',
description: '''
팀과 커뮤니티의 협업을 위한 플랫폼
<br><br>
핵심 기능: 주제/이슈별 채널 관리, 공동문서 작성, 찬반 투표와 설문으로 토론하기, 아카이빙
''',
url: 'https://parti.xyz'
},
demosx: {
image_path: 'soft_solution_4.png',
title: '데모스X',
description: '''
시민과 기관이 함께 정책을 논의하고 실행하는 시민참여 플랫폼
<br><br>
핵심 기능: 오픈소스 운영 가이드, 플랫폼 소스
''',
url: 'http://demosx.org'
},
townhall: {
image_path: 'soft_solution_2.png',
title: '빠띠 타운홀',
description: '''
참가자 중심의 실시간 토론 플랫폼
<br><br>
핵심 기능: 상반되는 의견 중 하나를 선택하는 배틀, 최적의 결론을 도출하는 투표, 참가자와 소통하는 제안, 발표를 극적으로 연출하는 응원
''',
url: 'https://townhall.kr'
},
campaigns: {
image_path: 'soft_solution_3.png',
title: '빠띠 캠페인즈',
description: '''
세상을 바꾸는 시민, 시민단체, 조직, 정당의 캠페인 플랫폼
<br><br>
핵심 기능: 지지를 얻기 위한 서명/지도/인증샷/목소리 모으기, 변화를 만들기 위한 촉구/아카이브하기
''',
url: 'https://campaigns.kr'
}
}

INFO = {
slug: :soft,
path_text: :solutions_soft_path,
title: '민주주의 플랫폼',
subtitle: '일상과 세상을 더 민주적으로',
image_path: 'solutions/card-soft.png',
items_name: '디지털 플랫폼',
items: Platform::DICTIONARY.map { |key, item| item.merge(slug: key) },
portfolios: []
}
end
2 changes: 1 addition & 1 deletion app/models/post.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Post < ApplicationRecord
CATEGORIES = (
(Solution::DICTIONARY.map { |solution_slug, solution_info| [solution_slug, solution_info[:title]] }) + [ [:data, '공공·공익 데이터'], [:lab, '민주주의 랩'], [:culture, '조직 문화'] ]
(Solution::DICTIONARY.map { |solution_slug, solution_info| [solution_slug, solution_info[:title]] }) + [ [:data, '공공·공익 데이터'], [:lab, '민주주의 랩'], [Platform::INFO[:slug], Platform::INFO[:title]], [:culture, '조직 문화'] ]
).to_h

scope :recent, -> (limit_count = nil){
Expand Down
Loading

0 comments on commit 60d969a

Please sign in to comment.