Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Template updates

  • Loading branch information...
commit 41dec85fc36057aef0b591964807212b23c49c6c 1 parent 047a1a8
Ryan Wachtl authored
4 composer.json
View
@@ -1,8 +1,8 @@
{
"name": "rywa/silverstripe-foundation-theme",
"type": "silverstripe-theme",
- "description": "SilverStripe prototyping theme based on Zurb Foundation",
- "keywords": ["silverstripe", "foundation", "foundation 5", "responsive", "prototyping", "theme"],
+ "description": "Foundation 5 Prototyping Theme for SilverStripe",
+ "keywords": ["foundation", "silverstripe", "responsive", "prototyping", "theme"],
"license": "MIT Open Source License",
"authors": [
{
14 templates/BreadcrumbsTemplate.ss
View
@@ -1,8 +1,10 @@
-<% if Pages %>
- <% if InSection(home) %><% else %>
- <a href="home/">Home</a>
- <% end_if %>
- <% loop Pages %>
- <% if Last %><a class="current">$Title.XML</a><% else %><a href="$Link">$MenuTitle.XML</a><% end_if %>
+<% if $Pages %>
+ <% if not $InSection(home) %><li><a href="/home">Home</a></li><% end_if %>
+ <% loop $Pages %>
+ <% if $Last %>
+ <li class="current" title="Go to the $Title.ATT">$MenuTitle</li>
+ <% else %>
+ <li><a href="$Link" title="Go to the $Title.ATT">$MenuTitle</a></li>
+ <% end_if %>
<% end_loop %>
<% end_if %>
4 templates/Includes/Breadcrumbs.ss
View
@@ -1,3 +1,3 @@
-<nav class="breadcrumbs">
+<ul class="breadcrumbs">
$Breadcrumbs
-</nav>
+</ul>
2  templates/Includes/SideBar.ss
View
@@ -1 +1 @@
-SIDEBAR
+<%--this template is not used in the Foundation theme--%>
5 templates/Includes/SideNav.ss
View
@@ -0,0 +1,5 @@
+<ul class="side-nav">
+ <% loop Menu(1) %>
+ <li class="<% if $LinkingMode == current || $LinkingMode == section %>active<% end_if %>"><a href="$Link">$MenuTitle</a></li>
+ <% end_loop %>
+</ul>
45 templates/Includes/TopBar.ss
View
@@ -1,28 +1,26 @@
-<nav class="top-bar" data-topbar>
+<nav class="top-bar" role="navigation" data-topbar>
<ul class="title-area">
<li class="name">
- <h1><a href="/">$SiteConfig.Title</a></h1>
+ <h1><a href="/home">$SiteConfig.Title</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href=""><span>Menu</span></a></li>
</ul>
-
<section class="top-bar-section">
-
- <!-- Left Nav Section -->
+ <%-- Left Nav Section --%>
<ul class="left">
<% loop Menu(1) %>
- <li class="<% if LinkingMode == current %>active<% end_if %><% if LinkingMode == section %>active<% end_if %><% if Children %> has-dropdown<% end_if %>">
- <a href="$Link" title="Go to the $Title.XML page">$MenuTitle.XML</a>
- <% if Children %>
+ <li class="<% if $LinkingMode == current || $LinkingMode == section %>active<% end_if %><% if $Children %> has-dropdown<% end_if %>">
+ <a href="$Link" title="Go to the $Title.ATT">$MenuTitle</a>
+ <% if $Children %>
<ul class="dropdown">
- <li><label>$MenuTitle.XML</label></li>
- <% loop Children %>
- <li class="<% if LinkingMode == current %>active<% end_if %><% if Children %> has-dropdown<% end_if %>">
- <a href="$Link" title="Go to the $Title.XML page">$MenuTitle.XML</a>
- <% if Children %>
+ <li><label>$MenuTitle</label></li>
+ <% loop $Children %>
+ <li class="<% if $LinkingMode == current || $LinkingMode == section %>active<% end_if %><% if $Children %> has-dropdown<% end_if %>">
+ <a href="$Link" title="Go to the $Title.ATT">$MenuTitle</a>
+ <% if $Children %>
<ul class="dropdown">
- <% loop Children %>
- <li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle.XML</a></li>
+ <% loop $Children %>
+ <li class="<% if $LinkingMode == current || $LinkingMode == section %>active<% end_if %>"><a href="$Link" title="Go to the $Title.ATT">$MenuTitle</a></li>
<% end_loop %>
</ul>
<% end_if %>
@@ -32,20 +30,23 @@
</ul>
<% end_if %>
</li>
- <% if Last %><% else %>
- <li class="divider"></li>
- <% end_if %>
+ <% if not $Last %><li class="divider"></li><% end_if %>
<% end_loop %>
</ul>
-
- <!-- Right Nav Section -->
+ <%-- Right Nav Section --%>
<ul class="right">
<% if $CurrentMember %>
- <li><a href="Security/logout">Logout</a></li>
+ <li class="has-dropdown">
+ <a href="admin/myprofile">Hi $CurrentMember.Name</a>
+ <ul class="dropdown">
+ <li><a href="admin/">Admin</a></li>
+ <li><a href="admin/myprofile">My Profile</a></li>
+ <li><a href="Security/logout">Logout</a></li>
+ </ul>
+ </li>
<% else %>
<li><a href="Security/login?BackURL=%2Fadmin" data-reveal-id="login-form-modal">Login</a></li>
<% end_if %>
</ul>
-
</section>
</nav>
7 templates/Layout/HomePage.ss
View
@@ -0,0 +1,7 @@
+<div class="large-12 columns">
+ <article>
+ <h2>$Title<h2>
+ $Content
+ $Form
+ </article>
+</div>
16 templates/Layout/Page.ss
View
@@ -1,7 +1,11 @@
-<div class="row">
- <div class="large-12 columns">
- <h2>$Title<h2>
- $Content
- $Form
- </div>
+<div class="large-9 large-push-3 columns">
+ <article>
+ <h2>$Title<h2>
+ $Content
+ $Form
+ </article>
+</div>
+<div class="large-3 large-pull-9 columns">
+ <h2>Section<h2>
+ <% include SideNav %>
</div>
51 templates/Page.ss
View
@@ -1,45 +1,60 @@
<!doctype html>
-<html class="no-js" lang="en">
+<html class="no-js" lang="$ContentLocale.ATT" dir="$i18nScriptDirection.ATT">
<head>
<% base_tag %>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> - $SiteConfig.Title</title>
- <link rel="icon" type="image/png" href="$ThemeDir/favicon.ico">
+ <meta name="description" content="$MetaDescription.ATT" />
+ <%--http://ogp.me/--%>
+ <meta property="og:site_name" content="$SiteConfig.Title.ATT" />
+ <meta property="og:type" content="website" />
+ <meta property="og:title" content="$Title.ATT" />
+ <meta property="og:description" content="$MetaDescription.ATT" />
+ <meta property="og:url" content="$AbsoluteLink.ATT" />
+ <% if $Image %>
+ <meta property="og:image" content="<% with $Image.SetSize(500,500) %>$AbsoluteURL.ATT<% end_with %>" />
+ <% end_if %>
+ <link rel="icon" type="image/png" href="$ThemeDir/favicon.ico" />
+ <%--See [Requirements](http://doc.silverstripe.org/framework/en/reference/requirements) for loading from controller--%>
<link rel="stylesheet" href="$ThemeDir/css/app.css" />
<script src="$ThemeDir/bower_components/modernizr/modernizr.js"></script>
</head>
-<body>
- <div class="row">
- <div class="large-12 columns">
- <% include TopBar %>
- </div>
- </div>
+<body class="$ClassName.ATT">
+ <header class="header" role="banner">
+ <% include TopBar %>
+ </header>
- <div class="main" role="main">
- <div class="typography">
+ <div class="main typography" role="main">
+ <div class="row">
$Layout
</div>
</div>
- <div class="row">
- <div class="large-12 columns">
- <% include Breadcrumbs %>
+ <nav role="navigation">
+ <div class="row">
+ <div class="large-12 columns">
+ <% include Breadcrumbs %>
+ </div>
</div>
- </div>
+ </nav>
- <div class="row">
- <div class="large-12 columns">
- <p><small>&copy; $Now.Year $SiteConfig.Title</small></p>
+ <footer class="footer" role="contentinfo">
+ <div class="row">
+ <div class="large-12 columns">
+ <p>&copy; $Now.Year $SiteConfig.Title</p>
+ </div>
</div>
- </div>
+ </footer>
+ <%--Login Modal--%>
<div id="login-form-modal" class="reveal-modal medium" data-reveal>
<h2>Login</h2>
$LoginForm
<a class="close-reveal-modal">&#215;</a>
</div>
+ <%--See [Requirements](http://doc.silverstripe.org/framework/en/reference/requirements) for loading from controller--%>
<script src="$ThemeDir/bower_components/jquery/jquery.js"></script>
<script src="$ThemeDir/bower_components/foundation/js/foundation.min.js"></script>
<script src="$ThemeDir/javascript/app.js"></script>
Please sign in to comment.
Something went wrong with that request. Please try again.