Skip to content

Create new widget for footer section #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
@import "bootstrap";

.cover-bg-blue{background-color:#2275CA;}
.cover-text-white{color:#FFFFFF;}
.cover-text-white{color:#FFFFFF;}
.a {color:#FFFFF;}
4 changes: 4 additions & 0 deletions app/models/footer_widget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class FooterWidget < Widget
attribute :headline, :html
attribute :paragraph, :html
end
4 changes: 4 additions & 0 deletions app/views/footer_widget/details.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%= scrivito_medium_dialog do %>
<%= scrivito_details_for FooterWidget.description_for_editor do %>
<% end %>
<% end %>
7 changes: 7 additions & 0 deletions app/views/footer_widget/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="col-12">
<div class="col-3 cover-bg-blue">
<%= scrivito_tag :h5, widget, :headline, class:'cover-text-white', style:'padding-top:20px;' %>
<%= scrivito_tag :p, widget, :paragraph, class:'cover-text-white', style:'padding-bottom:60; padding-top:20px;' %>
</div>
</div>

1 change: 1 addition & 0 deletions app/views/footer_widget/thumbnail.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= scrivito_thumbnail FooterWidget.description_for_editor %>
6 changes: 4 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
</head>
<body>
<center>
<%= yield %>
<%= scrivito_body_tags %>
<row>
<%= yield %>
<%= scrivito_body_tags %>
</row>
</center>
</body>
</html>
14 changes: 6 additions & 8 deletions app/views/paragraph_widget/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<div class="row">
<div class="col-12">
<div class="col-3 cover-bg-blue ">
<%= scrivito_image_tag widget, :image, class:'image-responsive'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'cover-text-white' %>
<%= scrivito_tag :p, widget, :text, class:'cover-text-white', style:'padding-bottom:25px;'%>
</div>
<div class="col-12">
<div class="col-3 cover-bg-blue ">
<%= scrivito_image_tag widget, :image, class:'image-responsive'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'cover-text-white' %>
<%= scrivito_tag :p, widget, :text, class:'cover-text-white', style:'padding-bottom:30px;'%>
</div>
</div>
</div>