-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
spec/dummy/app/views/alchemy/elements/_article_view.html.erb
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,10 +1,8 @@ | ||
<%- cache(element) do -%> | ||
<%= element_view_for(element) do |el| -%> | ||
<% if element.has_ingredient?(:intro) %> | ||
<div class="intro"><%= el.render :intro %></div> | ||
<% end %> | ||
<h1 class="headline"><%= el.render :headline %></h1> | ||
<%= el.render :image, size: "450x1000", crop: true %> | ||
<%= element_view_for(element, class: 'blog-post') do |el| -%> | ||
<h2 class="blog-post-title"><%= el.render :headline %></h2> | ||
<p class="blog-post-meta"><%= el.render :intro %></p> | ||
<%= el.render :text %> | ||
<%= el.render :image, size: "450x1000", crop: true %> | ||
<%- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<% if page.redirects_to_external? %> | ||
<%= link_to( | ||
h(page.name), | ||
page.external_urlname, | ||
target: configuration(:open_external_links_in_new_tab) ? '_blank' : nil, | ||
class: external_page_css_class(page) | ||
) %> | ||
<% else %> | ||
<%= link_to( | ||
h(page.name), | ||
@preview_mode ? 'javascript: void(0)' : show_alchemy_page_path(page), | ||
class: (page_active?(page) ? 'active text-muted' : 'text-muted') | ||
) %> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<% if pages.present? %> | ||
<nav class="nav justify-content-between"> | ||
<% pages.each do |page| %> | ||
<%= render options[:navigation_link_partial], page: page, options: options %> | ||
<% end %> | ||
</nav> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<%= render "alchemy/pages/meta_data" %> | ||
<%= stylesheet_link_tag 'application' %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
</head> | ||
<body> | ||
<%= yield %> | ||
<div id="navigation"> | ||
<%= render_navigation(:all_sub_menues => true) %> | ||
</div> | ||
<%= render "alchemy/edit_mode" %> | ||
</body> | ||
<!doctype html> | ||
<html lang="<%= @page.language_code %>"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="description" content="<%= @page.meta_description %>"> | ||
<meta name="keywords" content="<%= @page.meta_keywords %>"> | ||
<meta name="author" content="<%= @page.creator.try(:fullname) %>"> | ||
<link rel="icon" href="/favicon.ico"> | ||
<title><%= @page.title %></title> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<header class="blog-header py-3"> | ||
<div class="row flex-nowrap justify-content-between align-items-center"> | ||
<div class="col-4 pt-1"> | ||
</div> | ||
<div class="col-4 text-center"> | ||
<a class="blog-header-logo text-dark" href="#">AlchemyCMS Demo</a> | ||
</div> | ||
<div class="col-4 d-flex justify-content-end align-items-center"> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<div class="nav-scroller py-1 mb-2"> | ||
<%= render_navigation %> | ||
</div> | ||
</div> | ||
|
||
<main role="main" class="container"> | ||
<div class="row"> | ||
<div class="col-md-8 blog-main"> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
<footer class="blog-footer"> | ||
<p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p> | ||
<p> | ||
<a href="#">Back to top</a> | ||
</p> | ||
</footer> | ||
<%= render 'alchemy/preview_mode_code' %> | ||
<%= render 'alchemy/menubar' %> | ||
</body> | ||
</html> |
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