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
24
css/blog.css
24
css/blog.css
@ -1,11 +1,18 @@
|
|||||||
.blog-sidebar {
|
.no-sidebar .content-container.size3of4 {
|
||||||
margin-top: 12px;
|
width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blog-sidebar .secondary {
|
.blog-entry .post-image img {
|
||||||
margin-bottom: 35px;
|
width: 98.75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blog-sidebar .WidgetHolder ul {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.blog-sidebar .WidgetHolder ul li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
#Form_CommentsForm + h4 {
|
#Form_CommentsForm + h4 {
|
||||||
clear: both;
|
clear: both;
|
||||||
padding-top: 35px;
|
padding-top: 35px;
|
||||||
@ -33,11 +40,4 @@
|
|||||||
|
|
||||||
.commenting-rss-feed {
|
.commenting-rss-feed {
|
||||||
clear: both;
|
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:
|
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:
|
GridFieldAddByDBField:
|
||||||
|
Add: 'Add {name}'
|
||||||
AddFail: 'Unable to save {class} to the database.'
|
AddFail: 'Unable to save {class} to the database.'
|
||||||
PermissionFail: 'You don''t have permission to create a {class}.'
|
PermissionFail: 'You don''t have permission to create a {class}.'
|
||||||
Add: 'Add {name}'
|
|
||||||
GridFieldBlogPostState:
|
GridFieldBlogPostState:
|
||||||
StateTitle: 'State'
|
Draft: '<i class="btn-icon gridfield-icon btn-icon-pencil"></i> Saved as Draft on {date}'
|
||||||
Draft: '<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft on {date}'
|
Published: '<i class="btn-icon gridfield-icon btn-icon-accept"></i> Published on {date}'
|
||||||
Published: '<i class="btn-icon blog-icon btn-icon-accept"></i> Published on {date}'
|
Timer: '<i class="gridfield-icon blog-icon-timer"></i> Publish at {date}'
|
||||||
Timer: '<i class="blog-icon blog-icon-timer"></i> Publish at {date}'
|
SiteTree:
|
||||||
Modified: 'Modified'
|
PLURALNAME: Pages
|
||||||
BlogPost:
|
SINGULARNAME: Page
|
||||||
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'
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
<aside class="blog-sidebar unit size1of4">
|
<% if $SideBarView %>
|
||||||
$SideBarView
|
<div class="blog-sidebar typography unit size1of4 lastUnit">
|
||||||
</aside>
|
$SideBarView
|
||||||
|
</div>
|
||||||
|
<% end_if %>
|
||||||
|
@ -1,17 +1,25 @@
|
|||||||
<p>
|
<p class="blog-post-meta">
|
||||||
This entry was
|
<% if $Categories.exists %>
|
||||||
<% if Categories %>
|
<%t Blog.PostedIn "Posted in" %>
|
||||||
posted in
|
|
||||||
<% loop Categories %>
|
<% 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_loop %>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% if Tags %>
|
|
||||||
tagged
|
<% if $Tags.exists %>
|
||||||
|
<%t Blog.Tagged "Tagged" %>
|
||||||
<% loop Tags %>
|
<% 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 %>
|
<% end_loop %>
|
||||||
and
|
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
posted on <a href="$MonthlyArchiveLink">$PublishDate.format("F j, Y")</a>
|
|
||||||
</p>
|
<% 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="blog-entry content-container <% if $SideBarView %>unit size3of4<% end_if %>">
|
||||||
<div class="unit size3of4 lastUnit searchResults">
|
|
||||||
<h1>
|
<article>
|
||||||
<% if ArchiveYear %>
|
<h1>
|
||||||
Archive: <% if ArchiveDay %>$ArchiveDate.Nice<% else_if ArchiveMonth %>$ArchiveDate.format("F, Y")<% else %>$ArchiveDate.format(Y)<% end_if %>
|
<% if ArchiveYear %>
|
||||||
<% else_if CurrentTag %>
|
<%t Blog.Archive "Archive" %>:
|
||||||
Tag: $CurrentTag.Title
|
<% if ArchiveDay %>
|
||||||
<% else_if CurrentCategory %>
|
$ArchiveDate.Nice
|
||||||
Category: $CurrentCategory.Title
|
<% else_if ArchiveMonth %>
|
||||||
<% else %>
|
$ArchiveDate.format("F, Y")
|
||||||
$Title
|
<% else %>
|
||||||
<% end_if %>
|
$ArchiveDate.format(Y)
|
||||||
</h1>
|
<% end_if %>
|
||||||
|
<% else_if CurrentTag %>
|
||||||
<% if PaginatedList %>
|
<%t Blog.Tag "Tag" %>: $CurrentTag.Title
|
||||||
<ul id="SearchResults">
|
<% else_if CurrentCategory %>
|
||||||
<% loop PaginatedList %>
|
<%t Blog.Category "Category" %>: $CurrentCategory.Title
|
||||||
<li class="clear">
|
<% else %>
|
||||||
<% if FeaturedImage %>
|
$Title
|
||||||
<img src="$FeaturedImage.CroppedImage(200, 120).URL" alt="$FeaturedImage.Title" class="left" />
|
<% end_if %>
|
||||||
<% end_if %>
|
</h1>
|
||||||
<h4>
|
|
||||||
<a href="$Link">
|
<div class="content">$Content</div>
|
||||||
<% if $MenuTitle %>
|
|
||||||
$MenuTitle
|
<% if $PaginatedList.Exists %>
|
||||||
<% else %>
|
<% loop $PaginatedList %>
|
||||||
$Title
|
<div class="post-summary">
|
||||||
<% end_if %>
|
<h2>
|
||||||
</a>
|
<a href="$Link" title="<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>">
|
||||||
</h4>
|
<% if $MenuTitle %>$MenuTitle
|
||||||
<% if $Excerpt %>
|
<% else %>$Title<% end_if %>
|
||||||
<p>$Excerpt</p>
|
</a>
|
||||||
<% end_if %>
|
</h2>
|
||||||
<a class="readMoreLink" href="$Link" title="Read more about "{$Title}"">Read more about "{$Title}"...</a>
|
|
||||||
</li>
|
<p class="post-image">
|
||||||
<% end_loop %>
|
<a href="$Link" <%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>>
|
||||||
</ul>
|
$FeaturedImage.setWidth(795)
|
||||||
<% else %>
|
</a>
|
||||||
<div class="content"><p>No Posts</p></div>
|
</p>
|
||||||
<% end_if %>
|
|
||||||
|
<% if $Excerpt %>
|
||||||
<% if PaginatedList.MoreThanOnePage %>
|
<p>
|
||||||
<div id="PageNumbers">
|
$Excerpt
|
||||||
<div class="pagination">
|
<a href="$Link">
|
||||||
<% if PaginatedList.NotFirstPage %>
|
<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>
|
||||||
<a class="prev" href="$PaginatedList.PrevLink" title="View the previous page">←</a>
|
</a>
|
||||||
<% end_if %>
|
</p>
|
||||||
<% loop PaginatedList.Pages %>
|
<% else %>
|
||||||
<% if $CurrentBool %>
|
<p><a href="$Link">
|
||||||
$PageNum
|
<%t Blog.ReadMoreAbout "Read more about '{title}'..." title=$Title %>
|
||||||
<% else %>
|
</a></p>
|
||||||
<a href="$Link" title="View page number $PageNum" class="go-to-page">$PageNum</a>
|
<% end_if %>
|
||||||
<% end_if %>
|
|
||||||
<% end_loop %>
|
<% include EntryMeta %>
|
||||||
<% if PaginatedList.NotLastPage %>
|
</div>
|
||||||
<a class="next" href="$PaginatedList.NextLink" title="View the next page">→</a>
|
<% end_loop %>
|
||||||
<% end_if %>
|
<% else %>
|
||||||
</div>
|
<p><%t Blog.NoPosts "There are no posts" %></p>
|
||||||
<p>Page $PaginatedList.CurrentPage of $PaginatedList.TotalPages</p>
|
<% end_if %>
|
||||||
</div>
|
</article>
|
||||||
<% end_if %>
|
|
||||||
|
$Form
|
||||||
|
$PageComments
|
||||||
|
|
||||||
|
<% with $PaginatedList %>
|
||||||
|
<% include Pagination %>
|
||||||
|
<% end_with %>
|
||||||
</div>
|
</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="blog-entry content-container <% if $SideBarView %>unit size3of4<% end_if %>">
|
||||||
<div class="unit size3of4 lastUnit">
|
|
||||||
<article>
|
<article>
|
||||||
<h1>$Title</h1>
|
<h1>$Title</h1>
|
||||||
|
|
||||||
<% if FeaturedImage %>
|
<% if $FeaturedImage %>
|
||||||
<img src="$FeaturedImage.URL" alt="$FeaturedImage.Title" class="center" />
|
<p class="post-image">$FeaturedImage.setWidth(795)</p>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<div class="content">$Content</div>
|
<div class="content">$Content</div>
|
||||||
|
|
||||||
<% include EntryMeta %>
|
<% include EntryMeta %>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
$Form
|
||||||
$PageComments
|
$PageComments
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% include BlogSideBar %>
|
||||||
|
Loading…
Reference in New Issue
Block a user