-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge branch 'master' into feature/routes_wizard_layout"
- Loading branch information
1 parent
0444e27
commit d788cfa
Showing
233 changed files
with
2,368 additions
and
2,189 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,20 @@ | ||
class Blog::TagController < ApplicationController | ||
include PaginatablePosts | ||
|
||
layout "layouts/blog/index" | ||
|
||
POSTS_PER_PAGE = 10 | ||
|
||
def show | ||
@front_matter = { | ||
"title" => "Blog posts about #{params[:id].tr('-', ' ')}", | ||
"noindex" => true, | ||
} | ||
|
||
breadcrumb "Blog", blog_index_path | ||
breadcrumb @front_matter["title"], request.path | ||
|
||
@tag = params[:id] | ||
@posts = paginate_posts(::Pages::Blog.posts(@tag)) | ||
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,35 @@ | ||
class BlogController < ApplicationController | ||
include PaginatablePosts | ||
|
||
caches_page :show | ||
|
||
layout "layouts/blog/index" | ||
|
||
def index | ||
@front_matter = { | ||
"title" => "Get Into Teaching Blog", | ||
"description" => "Read about the real life experiences of teachers and teachers in training, as well as tips on how to start your journey into the classroom.", | ||
} | ||
|
||
breadcrumb "Blog", blog_index_path | ||
|
||
@posts = paginate_posts(::Pages::Blog.posts) | ||
end | ||
|
||
def show | ||
@post = ::Pages::Blog.find(request.path) | ||
|
||
begin | ||
@post.validate! | ||
rescue ::Pages::ContentError => e | ||
raise e unless helpers.display_content_errors? | ||
|
||
add_content_error(e) | ||
end | ||
|
||
breadcrumb "Blog", blog_index_path | ||
breadcrumb @post.title, request.path | ||
|
||
render template: @post.template, layout: "layouts/blog/post" | ||
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
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
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
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,15 @@ | ||
module BlogHelper | ||
def format_blog_date(date_string) | ||
Date.parse(date_string).to_formatted_s(:govuk_zero_pad) | ||
end | ||
|
||
def thumbnail_image_from_post(images) | ||
first_image_params = images.values.first.symbolize_keys | ||
|
||
if first_image_params.key?(:thumbnail_path) | ||
first_image_params[:path] = first_image_params[:thumbnail_path] | ||
end | ||
|
||
render Content::ImageComponent.new(**first_image_params.slice(:path)) | ||
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
Oops, something went wrong.