mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge in templates from @Makreig #145
This commit is contained in:
commit
21443e2ca8
22
css/blog.css
22
css/blog.css
@ -1,11 +1,18 @@
|
||||
.blog-sidebar {
|
||||
margin-top: 12px;
|
||||
.no-sidebar .content-container.size3of4 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.blog-sidebar .secondary {
|
||||
margin-bottom: 35px;
|
||||
.blog-entry .post-image img {
|
||||
width: 98.75%;
|
||||
}
|
||||
|
||||
.blog-sidebar .WidgetHolder ul {
|
||||
margin-left: 0;
|
||||
}
|
||||
.blog-sidebar .WidgetHolder ul li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#Form_CommentsForm + h4 {
|
||||
clear: both;
|
||||
padding-top: 35px;
|
||||
@ -34,10 +41,3 @@
|
||||
.commenting-rss-feed {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 640px) {
|
||||
.blog-sidebar {
|
||||
width: 100%; /* sidenav is now shown above the page content */
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
93
lang/en.yml
93
lang/en.yml
@ -1,38 +1,65 @@
|
||||
en:
|
||||
Blog:
|
||||
Archive: Archive
|
||||
Categories: Categories
|
||||
Category: Category
|
||||
Comments: Comments
|
||||
DESCRIPTION: 'Adds a blog to your website.'
|
||||
LumberjackTitle: 'Blog Posts'
|
||||
NoPosts: 'There are no posts'
|
||||
PLURALNAME: Blogs
|
||||
Posted: Posted
|
||||
PostedIn: 'Posted in'
|
||||
PostsPerPage: 'Posts Per Page'
|
||||
ReadMoreAbout: 'Read more about ''{title}''...'
|
||||
SINGULARNAME: Blog
|
||||
Tag: Tag
|
||||
Tagged: Tagged
|
||||
Tags: Tags
|
||||
BlogArchiveWidget:
|
||||
Blog: Blog
|
||||
NumberToDisplay: 'No. to Display'
|
||||
PLURALNAME: 'Blog Archive Widgets'
|
||||
SINGULARNAME: 'Blog Archive Widget'
|
||||
Type: Type
|
||||
BlogCategoriesWidget:
|
||||
Blog: Blog
|
||||
PLURALNAME: 'Blog Categories Widgets'
|
||||
SINGULARNAME: 'Blog Categories Widget'
|
||||
BlogCategory:
|
||||
PLURALNAME: 'Blog Categories'
|
||||
SINGULARNAME: 'Blog Category'
|
||||
Title: Title
|
||||
BlogPost:
|
||||
Categories: Categories
|
||||
DESCRIPTION: 'Generic content page'
|
||||
FeaturedImage: 'Featured Image'
|
||||
PLURALNAME: 'Blog Posts'
|
||||
PageTitleLabel: 'Post Title'
|
||||
PublishDate: 'Publish Date'
|
||||
SINGULARNAME: 'Blog Post'
|
||||
Tags: Tags
|
||||
BlogRecentPostsWidget:
|
||||
Blog: Blog
|
||||
NumberOfPosts: 'Number of Posts'
|
||||
PLURALNAME: 'Blog Recent Posts Widgets'
|
||||
SINGULARNAME: 'Blog Recent Posts Widget'
|
||||
BlogTag:
|
||||
PLURALNAME: 'Blog Tags'
|
||||
SINGULARNAME: 'Blog Tag'
|
||||
Title: Title
|
||||
BlogTagsWidget:
|
||||
Blog: Blog
|
||||
PLURALNAME: 'Blog Tags Widgets'
|
||||
SINGULARNAME: 'Blog Tags Widget'
|
||||
GridFieldAddByDBField:
|
||||
Add: 'Add {name}'
|
||||
AddFail: 'Unable to save {class} to the database.'
|
||||
PermissionFail: 'You don''t have permission to create a {class}.'
|
||||
Add: 'Add {name}'
|
||||
GridFieldBlogPostState:
|
||||
StateTitle: 'State'
|
||||
Draft: '<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft on {date}'
|
||||
Published: '<i class="btn-icon blog-icon btn-icon-accept"></i> Published on {date}'
|
||||
Timer: '<i class="blog-icon blog-icon-timer"></i> Publish at {date}'
|
||||
Modified: 'Modified'
|
||||
BlogPost:
|
||||
PublishDate: 'Publish Date'
|
||||
Categories: 'Categories'
|
||||
Tags: 'Tags'
|
||||
FeaturedImage: 'Featured Image'
|
||||
PageTitleLabel: 'Post Title'
|
||||
Blog:
|
||||
BlogPosts: 'Blog Posts'
|
||||
Categories: 'Categories'
|
||||
Tags: 'Tags'
|
||||
PostsPerPage: 'Posts Per Page'
|
||||
BlogTag:
|
||||
Title: 'Title'
|
||||
BlogCategory:
|
||||
Title: 'Title'
|
||||
BlogRecentPostsWidget:
|
||||
Blog: 'Blog'
|
||||
NumberOfPosts: 'Number of Posts'
|
||||
BlogCategoriesWidget:
|
||||
Blog: 'Blog'
|
||||
BlogArchiveWidget:
|
||||
Blog: 'Blog'
|
||||
Monthly: 'Monthly'
|
||||
Yearly: 'Yearly'
|
||||
NumberToDisplay: 'Number to Display'
|
||||
BlogTagsWidget:
|
||||
Blog: 'Blog'
|
||||
Draft: '<i class="btn-icon gridfield-icon btn-icon-pencil"></i> Saved as Draft on {date}'
|
||||
Published: '<i class="btn-icon gridfield-icon btn-icon-accept"></i> Published on {date}'
|
||||
Timer: '<i class="gridfield-icon blog-icon-timer"></i> Publish at {date}'
|
||||
SiteTree:
|
||||
PLURALNAME: Pages
|
||||
SINGULARNAME: Page
|
||||
|
@ -1,3 +1,5 @@
|
||||
<aside class="blog-sidebar unit size1of4">
|
||||
<% if $SideBarView %>
|
||||
<div class="blog-sidebar typography unit size1of4 lastUnit">
|
||||
$SideBarView
|
||||
</aside>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
@ -1,17 +1,25 @@
|
||||
<p>
|
||||
This entry was
|
||||
<% if Categories %>
|
||||
posted in
|
||||
<p class="blog-post-meta">
|
||||
<% if $Categories.exists %>
|
||||
<%t Blog.PostedIn "Posted in" %>
|
||||
<% loop Categories %>
|
||||
<a href="$Link" title="$Title">$Title</a><% if not Last %>, <% else_if Up.Tags %>, <% else %> and<% end_if %>
|
||||
<a href="$Link" title="$Title">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
<% if Tags %>
|
||||
tagged
|
||||
|
||||
<% if $Tags.exists %>
|
||||
<%t Blog.Tagged "Tagged" %>
|
||||
<% loop Tags %>
|
||||
<a href="$Link" title="$Title">$Title</a><% if not Last %>, <% end_if %>
|
||||
<a href="$Link" title="$Title">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
and
|
||||
<% end_if %>
|
||||
posted on <a href="$MonthlyArchiveLink">$PublishDate.format("F j, Y")</a>
|
||||
|
||||
<% if $Comments.exists %>
|
||||
<a href="{$Link}#comments-holder">
|
||||
<%t Blog.Comments "Comments" %>
|
||||
$Comments.count
|
||||
</a>;
|
||||
<% end_if %>
|
||||
|
||||
<%t Blog.Posted "Posted" %>
|
||||
<a href="$MonthlyArchiveLink">$PublishDate.ago</a>
|
||||
</p>
|
25
templates/Includes/Pagination.ss
Normal file
25
templates/Includes/Pagination.ss
Normal file
@ -0,0 +1,25 @@
|
||||
<%-- NOTE: Before including this, you will need to wrap the include in a with block --%>
|
||||
|
||||
<% if $MoreThanOnePage %>
|
||||
<p class="pagination">
|
||||
<% if $NotFirstPage %>
|
||||
<a class="prev" href="{$PrevLink}">←</a>
|
||||
<% end_if %>
|
||||
|
||||
<% loop $Pages %>
|
||||
<% if $CurrentBool %>
|
||||
<span>$PageNum</span>
|
||||
<% else %>
|
||||
<% if $Link %>
|
||||
<a href="$Link">$PageNum</a>
|
||||
<% else %>
|
||||
<span>...</span>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
|
||||
<% if $NotLastPage %>
|
||||
<a class="next" href="{$NextLink}">→</a>
|
||||
<% end_if %>
|
||||
</p>
|
||||
<% end_if %>
|
@ -1,64 +1,72 @@
|
||||
<% require css(themes/simple_blog/css/blog.css) %>
|
||||
<% require css(blog/css/blog.css) %>
|
||||
|
||||
<% include BlogSideBar %>
|
||||
<div class="unit size3of4 lastUnit searchResults">
|
||||
<div class="blog-entry content-container <% if $SideBarView %>unit size3of4<% end_if %>">
|
||||
|
||||
<article>
|
||||
<h1>
|
||||
<% if ArchiveYear %>
|
||||
Archive: <% if ArchiveDay %>$ArchiveDate.Nice<% else_if ArchiveMonth %>$ArchiveDate.format("F, Y")<% else %>$ArchiveDate.format(Y)<% end_if %>
|
||||
<%t Blog.Archive "Archive" %>:
|
||||
<% if ArchiveDay %>
|
||||
$ArchiveDate.Nice
|
||||
<% else_if ArchiveMonth %>
|
||||
$ArchiveDate.format("F, Y")
|
||||
<% else %>
|
||||
$ArchiveDate.format(Y)
|
||||
<% end_if %>
|
||||
<% else_if CurrentTag %>
|
||||
Tag: $CurrentTag.Title
|
||||
<%t Blog.Tag "Tag" %>: $CurrentTag.Title
|
||||
<% else_if CurrentCategory %>
|
||||
Category: $CurrentCategory.Title
|
||||
<%t Blog.Category "Category" %>: $CurrentCategory.Title
|
||||
<% else %>
|
||||
$Title
|
||||
<% end_if %>
|
||||
</h1>
|
||||
|
||||
<% if PaginatedList %>
|
||||
<ul id="SearchResults">
|
||||
<% loop PaginatedList %>
|
||||
<li class="clear">
|
||||
<% if FeaturedImage %>
|
||||
<img src="$FeaturedImage.CroppedImage(200, 120).URL" alt="$FeaturedImage.Title" class="left" />
|
||||
<% end_if %>
|
||||
<h4>
|
||||
<a href="$Link">
|
||||
<% if $MenuTitle %>
|
||||
$MenuTitle
|
||||
<% else %>
|
||||
$Title
|
||||
<% end_if %>
|
||||
<div class="content">$Content</div>
|
||||
|
||||
<% if $PaginatedList.Exists %>
|
||||
<% loop $PaginatedList %>
|
||||
<div class="post-summary">
|
||||
<h2>
|
||||
<a href="$Link" title="<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>">
|
||||
<% if $MenuTitle %>$MenuTitle
|
||||
<% else %>$Title<% end_if %>
|
||||
</a>
|
||||
</h4>
|
||||
</h2>
|
||||
|
||||
<p class="post-image">
|
||||
<a href="$Link" <%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>>
|
||||
$FeaturedImage.setWidth(795)
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<% if $Excerpt %>
|
||||
<p>$Excerpt</p>
|
||||
<% end_if %>
|
||||
<a class="readMoreLink" href="$Link" title="Read more about "{$Title}"">Read more about "{$Title}"...</a>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
<p>
|
||||
$Excerpt
|
||||
<a href="$Link">
|
||||
<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>
|
||||
</a>
|
||||
</p>
|
||||
<% else %>
|
||||
<div class="content"><p>No Posts</p></div>
|
||||
<p><a href="$Link">
|
||||
<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>
|
||||
</a></p>
|
||||
<% end_if %>
|
||||
|
||||
<% if PaginatedList.MoreThanOnePage %>
|
||||
<div id="PageNumbers">
|
||||
<div class="pagination">
|
||||
<% if PaginatedList.NotFirstPage %>
|
||||
<a class="prev" href="$PaginatedList.PrevLink" title="View the previous page">←</a>
|
||||
<% end_if %>
|
||||
<% loop PaginatedList.Pages %>
|
||||
<% if $CurrentBool %>
|
||||
$PageNum
|
||||
<% else %>
|
||||
<a href="$Link" title="View page number $PageNum" class="go-to-page">$PageNum</a>
|
||||
<% end_if %>
|
||||
<% include EntryMeta %>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<% if PaginatedList.NotLastPage %>
|
||||
<a class="next" href="$PaginatedList.NextLink" title="View the next page">→</a>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<p>Page $PaginatedList.CurrentPage of $PaginatedList.TotalPages</p>
|
||||
</div>
|
||||
<% else %>
|
||||
<p><%t Blog.NoPosts "There are no posts" %></p>
|
||||
<% end_if %>
|
||||
</article>
|
||||
|
||||
$Form
|
||||
$PageComments
|
||||
|
||||
<% with $PaginatedList %>
|
||||
<% include Pagination %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
|
||||
<% include BlogSideBar %>
|
||||
|
@ -1,17 +1,20 @@
|
||||
<% require css(themes/simple_blog/css/blog.css) %>
|
||||
<% require css(blog/css/blog.css) %>
|
||||
|
||||
<% include BlogSideBar %>
|
||||
<div class="unit size3of4 lastUnit">
|
||||
<div class="blog-entry content-container <% if $SideBarView %>unit size3of4<% end_if %>">
|
||||
<article>
|
||||
<h1>$Title</h1>
|
||||
|
||||
<% if FeaturedImage %>
|
||||
<img src="$FeaturedImage.URL" alt="$FeaturedImage.Title" class="center" />
|
||||
<% if $FeaturedImage %>
|
||||
<p class="post-image">$FeaturedImage.setWidth(795)</p>
|
||||
<% end_if %>
|
||||
|
||||
<div class="content">$Content</div>
|
||||
|
||||
<% include EntryMeta %>
|
||||
</article>
|
||||
|
||||
$Form
|
||||
$PageComments
|
||||
</div>
|
||||
|
||||
<% include BlogSideBar %>
|
||||
|
Loading…
Reference in New Issue
Block a user