decidim-design 0.28.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +29 -0
- data/Rakefile +3 -0
- data/app/controllers/concerns/decidim/design/has_templates.rb +20 -0
- data/app/controllers/decidim/design/application_controller.rb +28 -0
- data/app/controllers/decidim/design/components_controller.rb +21 -0
- data/app/controllers/decidim/design/foundations_controller.rb +14 -0
- data/app/controllers/decidim/design/home_controller.rb +11 -0
- data/app/helpers/decidim/design/activities_helper.rb +65 -0
- data/app/helpers/decidim/design/address_helper.rb +59 -0
- data/app/helpers/decidim/design/announcement_helper.rb +73 -0
- data/app/helpers/decidim/design/application_helper.rb +100 -0
- data/app/helpers/decidim/design/author_helper.rb +91 -0
- data/app/helpers/decidim/design/buttons_helper.rb +148 -0
- data/app/helpers/decidim/design/cards_helper.rb +195 -0
- data/app/helpers/decidim/design/colors_helper.rb +96 -0
- data/app/helpers/decidim/design/follow_helper.rb +42 -0
- data/app/helpers/decidim/design/iconography_helper.rb +72 -0
- data/app/helpers/decidim/design/report_helper.rb +38 -0
- data/app/helpers/decidim/design/share_helper.rb +38 -0
- data/app/helpers/decidim/design/tab_panels_helper.rb +103 -0
- data/app/helpers/decidim/design/typography_helper.rb +112 -0
- data/app/packs/entrypoints/decidim_design.js +2 -0
- data/app/packs/stylesheets/design.scss +121 -0
- data/app/views/decidim/design/components/accordions.html.erb +66 -0
- data/app/views/decidim/design/components/activities/_static-activities.html.erb +79 -0
- data/app/views/decidim/design/components/activities/_static-activity.html.erb +56 -0
- data/app/views/decidim/design/components/activities.html.erb +11 -0
- data/app/views/decidim/design/components/address/_static-address-online.html.erb +9 -0
- data/app/views/decidim/design/components/address/_static-address-person.html.erb +8 -0
- data/app/views/decidim/design/components/address.html.erb +11 -0
- data/app/views/decidim/design/components/announcement.html.erb +11 -0
- data/app/views/decidim/design/components/author/_static-avatar.html.erb +38 -0
- data/app/views/decidim/design/components/author/_static-compact.html.erb +46 -0
- data/app/views/decidim/design/components/author/_static-default.html.erb +35 -0
- data/app/views/decidim/design/components/author.html.erb +11 -0
- data/app/views/decidim/design/components/buttons.html.erb +15 -0
- data/app/views/decidim/design/components/cards/_static-card-g-highlight.html.erb +18 -0
- data/app/views/decidim/design/components/cards/_static-card-g-metadata-2.html.erb +17 -0
- data/app/views/decidim/design/components/cards/_static-card-g-metadata.html.erb +14 -0
- data/app/views/decidim/design/components/cards/_static-card-g.html.erb +17 -0
- data/app/views/decidim/design/components/cards/_static-card-l-description.html.erb +28 -0
- data/app/views/decidim/design/components/cards/_static-card-l-extra-data-2.html.erb +31 -0
- data/app/views/decidim/design/components/cards/_static-card-l-extra-data.html.erb +16 -0
- data/app/views/decidim/design/components/cards/_static-card-l-image.html.erb +66 -0
- data/app/views/decidim/design/components/cards/_static-card-l-meetings.html.erb +30 -0
- data/app/views/decidim/design/components/cards/_static-card-l.html.erb +60 -0
- data/app/views/decidim/design/components/cards/_static-card-s.html.erb +15 -0
- data/app/views/decidim/design/components/cards.html.erb +11 -0
- data/app/views/decidim/design/components/dialogs.html.erb +89 -0
- data/app/views/decidim/design/components/dropdowns.html.erb +64 -0
- data/app/views/decidim/design/components/follow/_static-follow-default.html.erb +4 -0
- data/app/views/decidim/design/components/follow/_static-follow-unfollow.html.erb +4 -0
- data/app/views/decidim/design/components/follow.html.erb +11 -0
- data/app/views/decidim/design/components/forms.html.erb +235 -0
- data/app/views/decidim/design/components/report/_static-report.html.erb +34 -0
- data/app/views/decidim/design/components/report.html.erb +11 -0
- data/app/views/decidim/design/components/share.html.erb +11 -0
- data/app/views/decidim/design/components/tab_panels.html.erb +11 -0
- data/app/views/decidim/design/foundations/accessibility.html.erb +99 -0
- data/app/views/decidim/design/foundations/color/_table.html.erb +26 -0
- data/app/views/decidim/design/foundations/color.html.erb +16 -0
- data/app/views/decidim/design/foundations/iconography/_icons.html.erb +8 -0
- data/app/views/decidim/design/foundations/iconography.html.erb +16 -0
- data/app/views/decidim/design/foundations/layout.html.erb +128 -0
- data/app/views/decidim/design/foundations/typography.html.erb +15 -0
- data/app/views/decidim/design/home/index.html.erb +17 -0
- data/app/views/decidim/design/shared/_card_grid.html.erb +3 -0
- data/app/views/decidim/design/shared/_cell_snippet.html.erb +6 -0
- data/app/views/decidim/design/shared/_sections.html.erb +9 -0
- data/app/views/decidim/design/shared/_table.html.erb +12 -0
- data/app/views/layouts/decidim/design/_head.html.erb +5 -0
- data/app/views/layouts/decidim/design/_layout.html.erb +86 -0
- data/app/views/layouts/decidim/design/application.html.erb +15 -0
- data/config/assets.rb +8 -0
- data/config/routes.rb +10 -0
- data/lib/decidim/design/engine.rb +35 -0
- data/lib/decidim/design/version.rb +9 -0
- data/lib/decidim/design.rb +10 -0
- metadata +154 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
<% sections.each do |section| %>
|
2
|
+
<section id="<%= section[:id] %>" class="design__section">
|
3
|
+
<%= section_title(section) %>
|
4
|
+
<% section[:contents].each do |content| %>
|
5
|
+
<%= render_content(content) %>
|
6
|
+
<%= render_cell_snippet(content) if content.dig(:cell_snippet, :cell).present? %>
|
7
|
+
<% end %>
|
8
|
+
</section>
|
9
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= content_tag :table, local_assigns.slice(:style).merge(class: "design__table") do %>
|
2
|
+
<thead>
|
3
|
+
<% headings.each do |heading| %>
|
4
|
+
<th><%= heading %></th>
|
5
|
+
<% end %>
|
6
|
+
</thead>
|
7
|
+
<tbody>
|
8
|
+
<% items.each do |row| %>
|
9
|
+
<tr><%= render_row(row) %></tr>
|
10
|
+
<% end %>
|
11
|
+
</tbody>
|
12
|
+
<% end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2
|
+
<%= javascript_pack_tag "decidim_core", "decidim_design", defer: false %>
|
3
|
+
<%= stylesheet_pack_tag "decidim_core", "decidim_design", media: "all" %>
|
4
|
+
<%= organization_colors %>
|
5
|
+
<%= render partial: "layouts/decidim/js_configuration" %>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<%
|
2
|
+
sections = [{
|
3
|
+
url: decidim_design.root_path,
|
4
|
+
path: false,
|
5
|
+
icon: "home-7-line",
|
6
|
+
text: "Home"
|
7
|
+
},{
|
8
|
+
url: false,
|
9
|
+
path: "foundations",
|
10
|
+
icon: "ruler-line",
|
11
|
+
text: "Foundations"
|
12
|
+
},{
|
13
|
+
url: false,
|
14
|
+
path: "components",
|
15
|
+
icon: "focus-line",
|
16
|
+
text: "Components"
|
17
|
+
}]
|
18
|
+
%>
|
19
|
+
|
20
|
+
<div class="design__layout">
|
21
|
+
<aside>
|
22
|
+
<ul class="design__navigation">
|
23
|
+
<% sections.each do |section| %>
|
24
|
+
<li>
|
25
|
+
<% block = capture do %>
|
26
|
+
<%= icon section[:icon] %>
|
27
|
+
<span><%= section[:text] %></span>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% if section[:url].present? %>
|
31
|
+
<%= link_to section[:url] do %>
|
32
|
+
<%= block %>
|
33
|
+
<% end %>
|
34
|
+
<% else %>
|
35
|
+
<%= content_tag :span do %>
|
36
|
+
<%= block %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% items = path_items(section[:path]).concat(section[:extra_items].to_a) %>
|
41
|
+
<% if items.present? %>
|
42
|
+
<ul>
|
43
|
+
<% items.each do |item| %>
|
44
|
+
<li>
|
45
|
+
<%= link_to item[:name].titleize, item[:path], class: params[:id] == item[:name] && controller_name == section[:path] ? "font-bold" : "" %>
|
46
|
+
<%= icon "arrow-right-line" %>
|
47
|
+
</li>
|
48
|
+
<% end %>
|
49
|
+
</ul>
|
50
|
+
<% end %>
|
51
|
+
</li>
|
52
|
+
<% end %>
|
53
|
+
</ul>
|
54
|
+
</aside>
|
55
|
+
|
56
|
+
<main>
|
57
|
+
<% if content_for?(:heading) %>
|
58
|
+
<section class="design__heading__section">
|
59
|
+
<h1 class="design__heading__5xl">
|
60
|
+
<%= yield :heading %>
|
61
|
+
</h1>
|
62
|
+
|
63
|
+
<% if content_for?(:description) %>
|
64
|
+
<div class="design__heading__description">
|
65
|
+
<%= yield :description %>
|
66
|
+
</div>
|
67
|
+
<% end %>
|
68
|
+
</section>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<%= yield %>
|
72
|
+
</main>
|
73
|
+
|
74
|
+
<aside>
|
75
|
+
<div class="design__navigation__right">
|
76
|
+
<% if content_for?(:right_aside) %>
|
77
|
+
<%= yield :right_aside %>
|
78
|
+
<% else %>
|
79
|
+
<nav>
|
80
|
+
<strong>On this page</strong>
|
81
|
+
<%= yield :toc %>
|
82
|
+
</nav>
|
83
|
+
<% end %>
|
84
|
+
</div>
|
85
|
+
</aside>
|
86
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% add_decidim_page_title(strip_tags(yield(:heading).lines.last).strip) if content_for?(:heading) %>
|
2
|
+
<% add_decidim_page_title("Decidim Design Guide") %>
|
3
|
+
<!DOCTYPE html>
|
4
|
+
<html>
|
5
|
+
<head>
|
6
|
+
<title><%= decidim_page_title %></title>
|
7
|
+
<%= render partial: "layouts/decidim/design/head" %>
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body class="relative text-black text-md form-defaults">
|
11
|
+
<%= render layout: "layouts/decidim/design/layout" do %>
|
12
|
+
<%= yield %>
|
13
|
+
<% end %>
|
14
|
+
</body>
|
15
|
+
</html>
|
data/config/assets.rb
ADDED
data/config/routes.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
require "active_support/all"
|
5
|
+
require "decidim/core"
|
6
|
+
|
7
|
+
module Decidim
|
8
|
+
module Design
|
9
|
+
# This is the engine that runs on the public interface of `decidim-design`.
|
10
|
+
class Engine < ::Rails::Engine
|
11
|
+
isolate_namespace Decidim::Design
|
12
|
+
|
13
|
+
initializer "decidim_design.mount_routes" do |_app|
|
14
|
+
Decidim::Core::Engine.routes do
|
15
|
+
mount Decidim::Design::Engine => "/design"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
initializer "decidim_design.register_icons" do
|
20
|
+
Decidim.icons.register(name: "home-7-line", icon: "home-7-line", category: "system", description: "", engine: :design)
|
21
|
+
Decidim.icons.register(name: "ruler-line", icon: "ruler-line", category: "system", description: "", engine: :design)
|
22
|
+
Decidim.icons.register(name: "focus-line", icon: "focus-line", category: "system", description: "", engine: :design)
|
23
|
+
end
|
24
|
+
|
25
|
+
initializer "decidim_design.add_cells_view_paths" do
|
26
|
+
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Design::Engine.root}/app/cells")
|
27
|
+
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Design::Engine.root}/app/views") # for partials
|
28
|
+
end
|
29
|
+
|
30
|
+
initializer "decidim_design.webpacker.assets_path" do
|
31
|
+
Decidim.register_assets_path File.expand_path("app/packs", root)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "decidim/design/engine"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
# This namespace holds the logic of the `Design` component. This component
|
7
|
+
# allows each module to expose the design system components that it uses.
|
8
|
+
module Design
|
9
|
+
end
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: decidim-design
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.28.0.rc4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Decidim Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: decidim-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.28.0.rc4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.28.0.rc4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: decidim-dev
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.28.0.rc4
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.28.0.rc4
|
41
|
+
description: The design guide module for Decidim.
|
42
|
+
email:
|
43
|
+
- hola@decidim.org
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- app/controllers/concerns/decidim/design/has_templates.rb
|
51
|
+
- app/controllers/decidim/design/application_controller.rb
|
52
|
+
- app/controllers/decidim/design/components_controller.rb
|
53
|
+
- app/controllers/decidim/design/foundations_controller.rb
|
54
|
+
- app/controllers/decidim/design/home_controller.rb
|
55
|
+
- app/helpers/decidim/design/activities_helper.rb
|
56
|
+
- app/helpers/decidim/design/address_helper.rb
|
57
|
+
- app/helpers/decidim/design/announcement_helper.rb
|
58
|
+
- app/helpers/decidim/design/application_helper.rb
|
59
|
+
- app/helpers/decidim/design/author_helper.rb
|
60
|
+
- app/helpers/decidim/design/buttons_helper.rb
|
61
|
+
- app/helpers/decidim/design/cards_helper.rb
|
62
|
+
- app/helpers/decidim/design/colors_helper.rb
|
63
|
+
- app/helpers/decidim/design/follow_helper.rb
|
64
|
+
- app/helpers/decidim/design/iconography_helper.rb
|
65
|
+
- app/helpers/decidim/design/report_helper.rb
|
66
|
+
- app/helpers/decidim/design/share_helper.rb
|
67
|
+
- app/helpers/decidim/design/tab_panels_helper.rb
|
68
|
+
- app/helpers/decidim/design/typography_helper.rb
|
69
|
+
- app/packs/entrypoints/decidim_design.js
|
70
|
+
- app/packs/stylesheets/design.scss
|
71
|
+
- app/views/decidim/design/components/accordions.html.erb
|
72
|
+
- app/views/decidim/design/components/activities.html.erb
|
73
|
+
- app/views/decidim/design/components/activities/_static-activities.html.erb
|
74
|
+
- app/views/decidim/design/components/activities/_static-activity.html.erb
|
75
|
+
- app/views/decidim/design/components/address.html.erb
|
76
|
+
- app/views/decidim/design/components/address/_static-address-online.html.erb
|
77
|
+
- app/views/decidim/design/components/address/_static-address-person.html.erb
|
78
|
+
- app/views/decidim/design/components/announcement.html.erb
|
79
|
+
- app/views/decidim/design/components/author.html.erb
|
80
|
+
- app/views/decidim/design/components/author/_static-avatar.html.erb
|
81
|
+
- app/views/decidim/design/components/author/_static-compact.html.erb
|
82
|
+
- app/views/decidim/design/components/author/_static-default.html.erb
|
83
|
+
- app/views/decidim/design/components/buttons.html.erb
|
84
|
+
- app/views/decidim/design/components/cards.html.erb
|
85
|
+
- app/views/decidim/design/components/cards/_static-card-g-highlight.html.erb
|
86
|
+
- app/views/decidim/design/components/cards/_static-card-g-metadata-2.html.erb
|
87
|
+
- app/views/decidim/design/components/cards/_static-card-g-metadata.html.erb
|
88
|
+
- app/views/decidim/design/components/cards/_static-card-g.html.erb
|
89
|
+
- app/views/decidim/design/components/cards/_static-card-l-description.html.erb
|
90
|
+
- app/views/decidim/design/components/cards/_static-card-l-extra-data-2.html.erb
|
91
|
+
- app/views/decidim/design/components/cards/_static-card-l-extra-data.html.erb
|
92
|
+
- app/views/decidim/design/components/cards/_static-card-l-image.html.erb
|
93
|
+
- app/views/decidim/design/components/cards/_static-card-l-meetings.html.erb
|
94
|
+
- app/views/decidim/design/components/cards/_static-card-l.html.erb
|
95
|
+
- app/views/decidim/design/components/cards/_static-card-s.html.erb
|
96
|
+
- app/views/decidim/design/components/dialogs.html.erb
|
97
|
+
- app/views/decidim/design/components/dropdowns.html.erb
|
98
|
+
- app/views/decidim/design/components/follow.html.erb
|
99
|
+
- app/views/decidim/design/components/follow/_static-follow-default.html.erb
|
100
|
+
- app/views/decidim/design/components/follow/_static-follow-unfollow.html.erb
|
101
|
+
- app/views/decidim/design/components/forms.html.erb
|
102
|
+
- app/views/decidim/design/components/report.html.erb
|
103
|
+
- app/views/decidim/design/components/report/_static-report.html.erb
|
104
|
+
- app/views/decidim/design/components/share.html.erb
|
105
|
+
- app/views/decidim/design/components/tab_panels.html.erb
|
106
|
+
- app/views/decidim/design/foundations/accessibility.html.erb
|
107
|
+
- app/views/decidim/design/foundations/color.html.erb
|
108
|
+
- app/views/decidim/design/foundations/color/_table.html.erb
|
109
|
+
- app/views/decidim/design/foundations/iconography.html.erb
|
110
|
+
- app/views/decidim/design/foundations/iconography/_icons.html.erb
|
111
|
+
- app/views/decidim/design/foundations/layout.html.erb
|
112
|
+
- app/views/decidim/design/foundations/typography.html.erb
|
113
|
+
- app/views/decidim/design/home/index.html.erb
|
114
|
+
- app/views/decidim/design/shared/_card_grid.html.erb
|
115
|
+
- app/views/decidim/design/shared/_cell_snippet.html.erb
|
116
|
+
- app/views/decidim/design/shared/_sections.html.erb
|
117
|
+
- app/views/decidim/design/shared/_table.html.erb
|
118
|
+
- app/views/layouts/decidim/design/_head.html.erb
|
119
|
+
- app/views/layouts/decidim/design/_layout.html.erb
|
120
|
+
- app/views/layouts/decidim/design/application.html.erb
|
121
|
+
- config/assets.rb
|
122
|
+
- config/routes.rb
|
123
|
+
- lib/decidim/design.rb
|
124
|
+
- lib/decidim/design/engine.rb
|
125
|
+
- lib/decidim/design/version.rb
|
126
|
+
homepage: https://decidim.org
|
127
|
+
licenses:
|
128
|
+
- AGPL-3.0
|
129
|
+
metadata:
|
130
|
+
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
131
|
+
documentation_uri: https://docs.decidim.org/
|
132
|
+
funding_uri: https://opencollective.com/decidim
|
133
|
+
homepage_uri: https://decidim.org
|
134
|
+
source_code_uri: https://github.com/decidim/decidim
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '3.1'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: 1.3.1
|
149
|
+
requirements: []
|
150
|
+
rubygems_version: 3.4.20
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: Decidim Design Guide (DDG) module
|
154
|
+
test_files: []
|