alchemy-demo_kit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/README.md +12 -0
  2. data/Rakefile +8 -0
  3. data/app/assets/stylesheets/alchemy/demo_kit.scss +440 -0
  4. data/app/views/alchemy/elements/_article_editor.html.erb +11 -0
  5. data/app/views/alchemy/elements/_article_view.html.erb +25 -0
  6. data/app/views/alchemy/elements/_bild_editor.html.erb +1 -0
  7. data/app/views/alchemy/elements/_bild_text_editor.html.erb +7 -0
  8. data/app/views/alchemy/elements/_bild_text_view.html.erb +9 -0
  9. data/app/views/alchemy/elements/_bild_view.html.erb +9 -0
  10. data/app/views/alchemy/elements/_claim_editor.html.erb +1 -0
  11. data/app/views/alchemy/elements/_claim_view.html.erb +1 -0
  12. data/app/views/alchemy/elements/_contactform_editor.html.erb +4 -0
  13. data/app/views/alchemy/elements/_contactform_view.html.erb +78 -0
  14. data/app/views/alchemy/elements/_download_editor.html.erb +4 -0
  15. data/app/views/alchemy/elements/_download_view.html.erb +7 -0
  16. data/app/views/alchemy/elements/_footnote_editor.html.erb +1 -0
  17. data/app/views/alchemy/elements/_footnote_view.html.erb +5 -0
  18. data/app/views/alchemy/elements/_header_editor.html.erb +1 -0
  19. data/app/views/alchemy/elements/_header_view.html.erb +1 -0
  20. data/app/views/alchemy/elements/_headline_editor.html.erb +1 -0
  21. data/app/views/alchemy/elements/_headline_view.html.erb +1 -0
  22. data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +3 -0
  23. data/app/views/alchemy/elements/_image_mosaic_view.html.erb +14 -0
  24. data/app/views/alchemy/elements/_intro_editor.html.erb +1 -0
  25. data/app/views/alchemy/elements/_intro_image_text_editor.html.erb +3 -0
  26. data/app/views/alchemy/elements/_intro_image_text_view.html.erb +16 -0
  27. data/app/views/alchemy/elements/_intro_view.html.erb +3 -0
  28. data/app/views/alchemy/elements/_news_editor.html.erb +3 -0
  29. data/app/views/alchemy/elements/_news_view.html.erb +11 -0
  30. data/app/views/alchemy/elements/_searchresult_editor.html.erb +4 -0
  31. data/app/views/alchemy/elements/_searchresult_view.html.erb +4 -0
  32. data/app/views/alchemy/elements/_sitemap_editor.html.erb +3 -0
  33. data/app/views/alchemy/elements/_sitemap_view.html.erb +38 -0
  34. data/app/views/alchemy/elements/_sitename_editor.html.erb +1 -0
  35. data/app/views/alchemy/elements/_sitename_view.html.erb +1 -0
  36. data/app/views/alchemy/elements/_subheadline_editor.html.erb +1 -0
  37. data/app/views/alchemy/elements/_subheadline_view.html.erb +5 -0
  38. data/app/views/alchemy/elements/_text_editor.html.erb +1 -0
  39. data/app/views/alchemy/elements/_text_view.html.erb +3 -0
  40. data/app/views/alchemy/page_layouts/_contact.html.erb +14 -0
  41. data/app/views/alchemy/page_layouts/_intro.html.erb +14 -0
  42. data/app/views/alchemy/page_layouts/_layout_footer.html.erb +14 -0
  43. data/app/views/alchemy/page_layouts/_layout_header.html.erb +14 -0
  44. data/app/views/alchemy/page_layouts/_news.html.erb +14 -0
  45. data/app/views/alchemy/page_layouts/_newsletter_layout.html.erb +1 -0
  46. data/app/views/alchemy/page_layouts/_search.html.erb +14 -0
  47. data/app/views/alchemy/page_layouts/_standard.html.erb +14 -0
  48. data/app/views/layouts/application.html.erb +50 -0
  49. data/config/alchemy/elements.yml +274 -0
  50. data/config/alchemy/page_layouts.yml +74 -0
  51. data/lib/alchemy/demo_kit.rb +6 -0
  52. data/lib/alchemy/demo_kit/engine.rb +6 -0
  53. data/lib/alchemy/demo_kit/version.rb +5 -0
  54. data/lib/rails/generators/alchemy/demo_kit_generator.rb +34 -0
  55. data/lib/tasks/alchemy/demo_kit/install.rake +10 -0
  56. metadata +124 -0
@@ -0,0 +1,11 @@
1
+ <%= render_essence_editor_by_name(element, 'intro') %>
2
+ <%= render_essence_editor_by_name(element, 'image', {
3
+ :image_size => "450x300",
4
+ :crop => true,
5
+ :image_float_selector => true,
6
+ :fixed_ratio => false
7
+ }) %>
8
+ <% element.contents.where(:name => ['headline', 'text']).each do |content| %>
9
+ <%= render_essence_editor content %>
10
+ <% end %>
11
+ <%= render_new_content_link(element) %>
@@ -0,0 +1,25 @@
1
+ <div class="article" id="<%= element_dom_id(element) %>"<%= element_preview_code(element) -%><%= element_tags(element) %>>
2
+ <%- intro = render_essence_view_by_name(element, 'intro') -%>
3
+ <%- if !intro.blank? -%>
4
+ <div class="intro">
5
+ <%= intro %>
6
+ </div>
7
+ <%- end -%>
8
+ <% element.contents.where(:name => 'headline').each do |content| %>
9
+ <% next if content.ingredient.blank? %>
10
+ <h1 class="headline"><%= render_essence content %></h1>
11
+ <% end %>
12
+ <div class="text_bild_container">
13
+ <%- content = element.contents.find_by_essence_type("Alchemy::EssencePicture") -%>
14
+ <%- if content -%>
15
+ <div class="image <%= content.essence.css_class %>">
16
+ <%= render_essence_view(content, :image_size => "450x1000", :crop => true) %>
17
+ </div>
18
+ <%- end -%>
19
+ <% element.contents.where(:name => 'text').each do |content| %>
20
+ <div class="text">
21
+ <%= render_essence content %>
22
+ </div>
23
+ <% end %>
24
+ </div>
25
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'image', :image_size => "900x300", :crop => true) %>
@@ -0,0 +1,7 @@
1
+ <%= render_essence_editor_by_name(element, 'image', {
2
+ :image_float_selector => true,
3
+ :image_size => "450x300",
4
+ :crop => true,
5
+ :fixed_ratio => false
6
+ }) %>
7
+ <%= render_essence_editor_by_name(element, 'text') %>
@@ -0,0 +1,9 @@
1
+ <div class="bild_text" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <%- image = element.contents.find_by_name("image") -%>
3
+ <div class="image <%= image.essence.css_class %>">
4
+ <%= render_essence_view(image, :image_size => "450x1000", :crop => true) %>
5
+ </div>
6
+ <div class="text">
7
+ <%= render_essence_view_by_name(element, 'text') %>
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="bild" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <div class="bild_images">
3
+ <%- element.contents.find_all_by_essence_type("Alchemy::EssencePicture").each do |essence| -%>
4
+ <div class="bild_image">
5
+ <%= render_essence_view(essence, :image_size => "900x300", :crop => true) %>
6
+ </div>
7
+ <%- end -%>
8
+ </div>
9
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'claim') %>
@@ -0,0 +1 @@
1
+ <%= render_essence_view_by_name(element, 'claim') %>
@@ -0,0 +1,4 @@
1
+ <%= render_essence_editor_by_name(element, 'mail_from') %>
2
+ <%= render_essence_editor_by_name(element, 'mail_to') %>
3
+ <%= render_essence_editor_by_name(element, 'subject') %>
4
+ <%= page_selector(element, 'success_page', :page_attribute => :urlname) %>
@@ -0,0 +1,78 @@
1
+ <%= form_for(@message ||= Alchemy::Message.new, :html => {:id => "contact", "data-alchemy-element" => (@preview_mode ? element.id : nil)}) do |f| %>
2
+ <%= f.error_messages %>
3
+ <%= f.hidden_field "contact_form_id", :value => element.id %>
4
+ <table class="contactform">
5
+ <tr>
6
+ <td class="label">
7
+ <%= f.label :salutation, t('contactform.labels.salutation') %>
8
+ </td>
9
+ <td class="field">
10
+ <%= f.select(
11
+ :salutation,
12
+ [
13
+ [t('contactform.labels.mr')],
14
+ [t('contactform.labels.mrs')]
15
+ ],
16
+ :prompt => t('contactform.labels.choose'),
17
+ :class => "select"
18
+ ) %>
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <td class="label">
23
+ <%= f.label :firstname, t('contactform.labels.firstname') %>
24
+ </td>
25
+ <td class="field">
26
+ <%= f.text_field(:firstname, :class => "field") %>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td class="label">
31
+ <%= f.label :lastname, t('contactform.labels.lastname') + '*' %>
32
+ </td>
33
+ <td class="field">
34
+ <%= f.text_field(:lastname, :class => "field", :required => true) %>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td class="label">
39
+ <%= f.label :address, t('contactform.labels.address') %>
40
+ </td>
41
+ <td class="field">
42
+ <%= f.text_field :address, :class => 'field' %>
43
+ </td>
44
+ </tr>
45
+ <tr>
46
+ <td class="label">
47
+ <%= f.label :zip, t('contactform.labels.zip') %>
48
+ </td>
49
+ <td class="field">
50
+ <%= f.text_field :zip, :class => 'field short' %>
51
+ <%= f.text_field :city, :class => 'field medium' %>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td class="label">
56
+ <%= f.label :phone, t('contactform.labels.phone') %>
57
+ </td>
58
+ <td class="field">
59
+ <%= f.text_field :phone, :class => 'field' %>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td class="label">
64
+ <%= f.label :email, t('contactform.labels.email') + '*' %>
65
+ </td>
66
+ <td class="field">
67
+ <%= f.email_field :email, :class => 'field', :required => true %>
68
+ </td>
69
+ </tr>
70
+ </table>
71
+ <div id="message">
72
+ <%= f.text_area :message %>
73
+ </div>
74
+ <p class="foot_notice">*) <%= t('contactform.labels.mandatory_fields') %></p>
75
+ <p class="right">
76
+ <%= f.button t('contactform.labels.send'), :name => nil, :class => 'button' %>
77
+ </p>
78
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <% element.contents.each do |content| %>
2
+ <%= render_essence_editor(content) %>
3
+ <% end %>
4
+ <%= render_create_content_link(element, 'file') %>
@@ -0,0 +1,7 @@
1
+ <div class="downloads" <%= element_preview_code(element) %>>
2
+ <% element.contents.each do |content| %>
3
+ <div class="download">
4
+ <%= render_essence(content) %>
5
+ </div>
6
+ <% end %>
7
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'note') %>
@@ -0,0 +1,5 @@
1
+ <div class="footnote" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <div class="note">
3
+ <%= render_essence_view_by_name(element, 'note') %>
4
+ </div>
5
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'image', :image_size => '900x300', :crop => true) %>
@@ -0,0 +1 @@
1
+ <span class="header_image" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>><%= render_essence_view_by_type(element, "Alchemy::EssencePicture", 1, {:image_size => '900x300', :crop => true}) %></span>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'headline') %>
@@ -0,0 +1 @@
1
+ <h1 id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>><%= render_essence_view_by_name(element, 'headline') %></h1>
@@ -0,0 +1,3 @@
1
+ <%= render_picture_gallery_editor(element, :image_size => '300x200', :crop => true) %>
2
+ <%= render_essence_editor_by_name(element, 'caption') %>
3
+ <%= render_essence_editor_by_name(element, 'show_caption', :default_value => true) %>
@@ -0,0 +1,14 @@
1
+ <div class="image_mosaic" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <div class="image_mosaic_images">
3
+ <%- element.contents.gallery_pictures.each do |image| -%>
4
+ <div class="image_mosaic_image">
5
+ <%= render_essence_view(image, :image_size => '300x200', :crop => true) %>
6
+ </div>
7
+ <%- end -%>
8
+ </div>
9
+ <% if element.ingredient(:show_caption) %>
10
+ <div class="caption">
11
+ <%= render_essence_view_by_name(element, 'caption') %>
12
+ </div>
13
+ <% end %>
14
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'intro') %>
@@ -0,0 +1,3 @@
1
+ <%= render_essence_editor_by_name(element, 'headline') %>
2
+ <%= render_essence_editor_by_name(element, 'image', :image_float_selector => true, :image_size => "450x300", :crop => true) %>
3
+ <%= render_essence_editor_by_name(element, 'text') %>
@@ -0,0 +1,16 @@
1
+ <div class="article" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <h1 class="headline">
3
+ <%= render_essence_view_by_name(element, 'headline') %>
4
+ </h1>
5
+ <div class="text_bild_container">
6
+ <%- image = element.contents.essence_pictures.first -%>
7
+ <%- if image -%>
8
+ <div class="image <%= image.essence.css_class %>">
9
+ <%= render_essence_view(image, :image_size => "450x300", :crop => true) %>
10
+ </div>
11
+ <%- end -%>
12
+ <div class="text">
13
+ <%= render_essence_view_by_name(element, 'text') %>
14
+ </div>
15
+ </div>
16
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="intro" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <%= render_essence_view_by_name(element, 'intro') %>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <%= render_essence_editor_by_name(element, 'date') %>
2
+ <%= render_essence_editor_by_name(element, 'news_headline') %>
3
+ <%= render_essence_editor_by_name(element, 'body') %>
@@ -0,0 +1,11 @@
1
+ <div class="news" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <div class="date">
3
+ <%= render_essence_view_by_name(element, 'date', :date_format => "%d.%m.%Y") %>
4
+ </div>
5
+ <h2>
6
+ <%= render_essence_view_by_name(element, 'news_headline') %>
7
+ </h2>
8
+ <div class="body">
9
+ <%= render_essence_view_by_name(element, 'body') %>
10
+ </div>
11
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="info">
2
+ <%= render_icon('info') %>
3
+ <%= t(:searchresults_editor_info) %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="searchresult" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <%= render_search_form %>
3
+ <%= render_search_results %>
4
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="content_editor">
2
+ <p><%= t(:sitemap_editor_info) %></p>
3
+ </div>
@@ -0,0 +1,38 @@
1
+ <ul id="<%= element_dom_id(element) %>" class="sitemap" <%= element_preview_code(element) -%>>
2
+ <%- pages ||= [@root_page] -%>
3
+ <%- pages.each do |page| -%>
4
+ <%- position = "" -%>
5
+ <%- position = position + "last" if pages.last == page -%>
6
+ <%- position = position + "first" if pages.first == page -%>
7
+ <%- if page.public? -%>
8
+ <%- if (configuration(:sitemap)[:show_flag] == true && page.sitemap? ) -%>
9
+ <li id="sitemap_item_<%= page.urlname %>" <%= render_classes([position, page.page_layout]) %>>
10
+ <%= link_to(
11
+ h(page.name),
12
+ {
13
+ :controller => "pages",
14
+ :action => 'show',
15
+ :urlname => page.urlname
16
+ }
17
+ ) %>
18
+ <%- elsif configuration(:sitemap)[:show_flag] == false -%>
19
+ <li id="sitemap_item_<%= page.urlname %>" <%= render_classes([position, page.page_layout]) %>>
20
+ <%= link_to(
21
+ h(page.name),
22
+ {
23
+ :controller => "pages",
24
+ :action => 'show',
25
+ :urlname => page.urlname
26
+ }
27
+ ) %>
28
+ <%- end -%>
29
+ <%= render(:partial => "alchemy/elements/sitemap_view", :locals => {:pages => page.children, :element => element}) unless page.children.empty? %>
30
+ </li>
31
+ <%- else #page not public -%>
32
+ <li>
33
+ <span><%= page.sitemap? ? page.name : "&nbsp;" %></span>
34
+ <%= render(:partial => "alchemy/elements/sitemap_view", :locals => {:pages => page.children, :element => element}) unless page.children.empty? %>
35
+ </li>
36
+ <%- end -%>
37
+ <%- end -%>
38
+ </ul>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'name') %>
@@ -0,0 +1 @@
1
+ <%= render_essence_view_by_name(element, 'name') -%>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'subheadline') %>
@@ -0,0 +1,5 @@
1
+ <div class="subheadline" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <div class="headline">
3
+ <%= render_essence_view_by_name(element, 'subheadline') %>
4
+ </div>
5
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_essence_editor_by_name(element, 'text') %>
@@ -0,0 +1,3 @@
1
+ <div class="text" id="<%= element_dom_id(element) %>" <%= element_preview_code(element) -%>>
2
+ <%= render_essence_view_by_name(element, 'text') %>
3
+ </div>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content">
13
+ <%= render_elements %>
14
+ </div>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content" class="intropage">
13
+ <%= render_elements(:except => ['header', 'claim']) %>
14
+ </div>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content">
13
+
14
+ </div>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content">
13
+
14
+ </div>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content">
13
+ <%= render_elements %>
14
+ </div>
@@ -0,0 +1 @@
1
+ <%= render_elements %>
@@ -0,0 +1,14 @@
1
+ <div id="header">
2
+ <div id="header_image">
3
+ <%= render_elements(:only => 'header', :fallback => {:for => 'header', :from => 'layout_header'}) %>
4
+ </div>
5
+ <%- claim = render_elements :only => ["claim"] -%>
6
+ <%- if !claim.blank? -%>
7
+ <div id="claim">
8
+ <%= claim %>
9
+ </div>
10
+ <%- end -%>
11
+ </div>
12
+ <div id="content">
13
+ <%= render_elements %>
14
+ </div>