mirror of
https://github.com/silverstripe/silverstripe-simple
synced 2024-10-22 11:05:50 +02:00
Compare commits
57 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
88fe457a90 | ||
|
64680a4683 | ||
|
12309dd08f | ||
|
d1a0e9ac7c | ||
|
ac99fc50e6 | ||
|
30a6fca74a | ||
|
38e53dccb2 | ||
|
dcb26096f5 | ||
|
dd28f3f3c2 | ||
|
295e85fa5d | ||
|
cec5126dbc | ||
|
319197a30e | ||
|
0328ca9155 | ||
|
179fe14554 | ||
|
b32fe38ea2 | ||
|
ca2e630a12 | ||
|
374679f873 | ||
|
64ec4e16e0 | ||
|
5a6b34cd00 | ||
|
bb4c7d2aa0 | ||
|
88a48f799b | ||
|
5f4b528394 | ||
|
ea81cd7022 | ||
|
3f71bdcce1 | ||
|
e4b3aa2d6c | ||
|
d8eb29e57c | ||
|
4d546a4e52 | ||
|
4f723b68e4 | ||
|
0266065973 | ||
|
096eaf4808 | ||
|
dd0b1a5352 | ||
|
451d22badd | ||
|
c2fdd14e9a | ||
|
09c670976e | ||
|
71653cf97b | ||
|
ef3573434c | ||
|
b0458e071d | ||
|
44a6eabbd5 | ||
|
9c2b75be7c | ||
|
509dfe9ddc | ||
|
7e3932c5d5 | ||
|
302878a132 | ||
|
b0cf4c88fb | ||
|
67cd1e08a6 | ||
|
fb408144d1 | ||
|
06cc25449f | ||
|
c8f07c500f | ||
|
4e5f2c9755 | ||
|
98c08b5905 | ||
|
fb4f0ae1dc | ||
|
9f471eb4cc | ||
|
3018fa95a9 | ||
|
8138203167 | ||
|
4d116e54a2 | ||
|
5bf81665d7 | ||
|
52e9280c8e | ||
|
294c6e5c42 |
17
.editorconfig
Normal file
17
.editorconfig
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# For more information about the properties used in this file,
|
||||||
|
# please see the EditorConfig documentation:
|
||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[{*.yml,package.json}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# The indent size used in the package.json file cannot be changed:
|
||||||
|
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
@ -1,6 +1,6 @@
|
|||||||
# Using the Simple theme
|
# Using the Simple theme
|
||||||
|
|
||||||
* Copy the theme into the `themes/` directory of your SilverStripe project. If you've named it correctly, there should be a directory called `themes/simple/templates`.
|
* Copy the theme into the `themes/` directory of your Silverstripe project. If you've named it correctly, there should be a directory called `themes/simple/templates`.
|
||||||
|
|
||||||
* Add the following to your `mysite/_config.php` file. Remove any existing `SSViewer::set_theme` lines.
|
* Add the following to your `mysite/_config.php` file. Remove any existing `SSViewer::set_theme` lines.
|
||||||
|
|
||||||
|
1
code-of-conduct.md
Normal file
1
code-of-conduct.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
When having discussions about this module in issues or pull request please adhere to the [SilverStripe Community Code of Conduct](https://docs.silverstripe.org/en/contributing/code_of_conduct).
|
@ -2,16 +2,27 @@
|
|||||||
"name": "silverstripe-themes/simple",
|
"name": "silverstripe-themes/simple",
|
||||||
"description": "The SilverStripe simple theme (default SilverStripe 3 theme)",
|
"description": "The SilverStripe simple theme (default SilverStripe 3 theme)",
|
||||||
"type": "silverstripe-theme",
|
"type": "silverstripe-theme",
|
||||||
"keywords": ["silverstripe", "theme"],
|
"keywords": [
|
||||||
|
"silverstripe",
|
||||||
|
"theme"
|
||||||
|
],
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Sara Tušar (Innovaif)",
|
"name": "Sara Tu\u0161ar (Innovaif)",
|
||||||
"homepage": "http://www.saratusar.com"
|
"homepage": "http://www.saratusar.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"composer/installers": "*",
|
"composer/installers": "*",
|
||||||
"silverstripe/framework": ">=3.0"
|
"silverstripe/framework": ">=3.5"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"expose": [
|
||||||
|
"css",
|
||||||
|
"images",
|
||||||
|
"javascript",
|
||||||
|
"webfonts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
css/form.css
10
css/form.css
@ -88,7 +88,9 @@ form .message {
|
|||||||
background-color: #ecf9d0;
|
background-color: #ecf9d0;
|
||||||
border-color: #8fbe00;
|
border-color: #8fbe00;
|
||||||
}
|
}
|
||||||
form .bad, form .required {
|
form .bad,
|
||||||
|
form .required,
|
||||||
|
form .error {
|
||||||
background-color: #f9d0d0;
|
background-color: #f9d0d0;
|
||||||
border-color: #cf0000;
|
border-color: #cf0000;
|
||||||
color: #b80000;
|
color: #b80000;
|
||||||
@ -99,7 +101,7 @@ form .message {
|
|||||||
.Actions {
|
.Actions {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
a.btn, button, input[type="submit"], .Actions .action {
|
a.btn, button, input[type="submit"], input[type="reset"], .Actions .action {
|
||||||
background: #b80000;
|
background: #b80000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -196,7 +198,7 @@ form .date .middleColumn input {
|
|||||||
font-size: 13px; /* reset to default */
|
font-size: 13px; /* reset to default */
|
||||||
color: #333; /* reset to default */
|
color: #333; /* reset to default */
|
||||||
}
|
}
|
||||||
form .requiredField label.left:after { /* pseudo element adds an asterisk to a required fields label */
|
form .requiredField label.left:after, form .requiredField legend.left:after { /* pseudo element adds an asterisk to a required fields label */
|
||||||
color: #B94A48;
|
color: #B94A48;
|
||||||
content: "*";
|
content: "*";
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -244,8 +246,6 @@ form input.holder-required { /* This class needs to be changed - is used
|
|||||||
input:invalid,
|
input:invalid,
|
||||||
textarea:invalid {
|
textarea:invalid {
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
-moz-box-shadow: 0px 0px 5px red;
|
|
||||||
-webkit-box-shadow: 0px 0px 5px red;
|
|
||||||
box-shadow: 0px 0px 5px red;
|
box-shadow: 0px 0px 5px red;
|
||||||
}
|
}
|
||||||
.no-boxshadow input:invalid,
|
.no-boxshadow input:invalid,
|
||||||
|
@ -183,7 +183,6 @@ body {
|
|||||||
color: #888;
|
color: #888;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border: none;
|
border: none;
|
||||||
-moz-border-radius: 14px;
|
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
@ -425,14 +424,14 @@ body h1 span.amp {
|
|||||||
|
|
||||||
/* FOOTER */
|
/* FOOTER */
|
||||||
.footer {
|
.footer {
|
||||||
color: #999;
|
color: #6B6B6B;
|
||||||
background: #ededed;
|
background: #ededed;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
.footer a {
|
.footer a {
|
||||||
color: #999;
|
color: #6B6B6B;
|
||||||
}
|
}
|
||||||
.footer a:hover {
|
.footer a:hover {
|
||||||
color: #B90000;
|
color: #B90000;
|
||||||
@ -522,7 +521,7 @@ body h1 span.amp {
|
|||||||
display:table; /* displays the pagination as a table so that elements stay inline and the middle column adjusts its size to accomodate and the right arrow stays to the right */
|
display:table; /* displays the pagination as a table so that elements stay inline and the middle column adjusts its size to accomodate and the right arrow stays to the right */
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
.searchResults #PageNumbers .pagination span{
|
.searchResults #PageNumbers .pagination button{
|
||||||
display:table-cell; /* each element in the pagination div displays as a table cell */
|
display:table-cell; /* each element in the pagination div displays as a table cell */
|
||||||
}
|
}
|
||||||
.searchResults #PageNumbers p {
|
.searchResults #PageNumbers p {
|
||||||
@ -594,7 +593,7 @@ body h1 span.amp {
|
|||||||
padding-right: 100px; /* padding stops .brand text from overlapping the search and nav buttons */
|
padding-right: 100px; /* padding stops .brand text from overlapping the search and nav buttons */
|
||||||
}
|
}
|
||||||
.tablet-nav .header {
|
.tablet-nav .header {
|
||||||
padding: 0px;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.tablet-nav .header .inner {
|
.tablet-nav .header .inner {
|
||||||
padding: 20px 0 0 0;
|
padding: 20px 0 0 0;
|
||||||
@ -612,6 +611,9 @@ body h1 span.amp {
|
|||||||
font-family: 'WebSymbolsRegular';
|
font-family: 'WebSymbolsRegular';
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #ededed;
|
color: #ededed;
|
||||||
|
background: #000;
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
.tablet-nav .header .primary ul {
|
.tablet-nav .header .primary ul {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
@ -719,8 +721,7 @@ body h1 span.amp {
|
|||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
-moz-border-radius: 20px; /* increase border radius due to increased padding */
|
border-radius: 20px; /* increase border radius due to increased padding */
|
||||||
border-radius: 20px;
|
|
||||||
}
|
}
|
||||||
.search-bar form input.action {
|
.search-bar form input.action {
|
||||||
right: 5%;
|
right: 5%;
|
||||||
|
@ -144,13 +144,13 @@ body {
|
|||||||
|
|
||||||
/* WYSIWYG EDITOR ALIGNMENT CLASSES
|
/* WYSIWYG EDITOR ALIGNMENT CLASSES
|
||||||
-------------------------------------------- */
|
-------------------------------------------- */
|
||||||
.typography .left {
|
.typography .text-left {
|
||||||
text-align: left
|
text-align: left
|
||||||
}
|
}
|
||||||
.typography .center {
|
.typography .text-center {
|
||||||
text-align: center
|
text-align: center
|
||||||
}
|
}
|
||||||
.typography .right {
|
.typography .text-right {
|
||||||
text-align: right
|
text-align: right
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,26 +2,13 @@ jQuery.noConflict();
|
|||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
/* removes text from search form on focus and replaces it on unfocus - if text is entered then it does not get replaced with default on unfocus */
|
// L is a magnifying glass icon in the font
|
||||||
$('#SearchForm_SearchForm_action_results').val('L');
|
$('#SearchForm_SearchForm_action_results').val('L');
|
||||||
var searchField = $('#SearchForm_SearchForm_Search');
|
|
||||||
var default_value = searchField.val();
|
|
||||||
searchField.focus(function() {
|
|
||||||
$(this).addClass('active');
|
|
||||||
if(searchField.val() == default_value) {
|
|
||||||
searchField.val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
searchField.blur(function() {
|
|
||||||
if(searchField.val() == '') {
|
|
||||||
searchField.val(default_value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!$.browser.msie || ($.browser.msie && (parseInt($.browser.version, 10) > 8))) {
|
if (!$.browser.msie || ($.browser.msie && (parseInt($.browser.version, 10) > 8))) {
|
||||||
var searchBarButton = $("span.search-dropdown-icon");
|
var searchBarButton = $("button.search-dropdown-icon");
|
||||||
var searchBar = $('div.search-bar');
|
var searchBar = $('div.search-bar');
|
||||||
var menuButton = $("span.nav-open-button");
|
var menuButton = $("button.nav-open-button");
|
||||||
var menu = $('.header .primary ul');
|
var menu = $('.header .primary ul');
|
||||||
var mobile = false;
|
var mobile = false;
|
||||||
var changed = false;
|
var changed = false;
|
||||||
@ -84,4 +71,65 @@ jQuery.noConflict();
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// Use of jQuery.browser is frowned upon.
|
||||||
|
// More details: http://api.jquery.com/jQuery.browser
|
||||||
|
// jQuery.uaMatch maintained for back-compat
|
||||||
|
|
||||||
|
jQuery.uaMatch = function( ua ) {
|
||||||
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
|
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
|
||||||
|
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
|
||||||
|
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
|
||||||
|
/(msie) ([\w.]+)/.exec( ua ) ||
|
||||||
|
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
|
||||||
|
[];
|
||||||
|
|
||||||
|
return {
|
||||||
|
browser: match[ 1 ] || "",
|
||||||
|
version: match[ 2 ] || "0"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
matched = jQuery.uaMatch( navigator.userAgent );
|
||||||
|
browser = {};
|
||||||
|
|
||||||
|
if ( matched.browser ) {
|
||||||
|
browser[ matched.browser ] = true;
|
||||||
|
browser.version = matched.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chrome is Webkit, but Webkit is also Safari.
|
||||||
|
if ( browser.chrome ) {
|
||||||
|
browser.webkit = true;
|
||||||
|
} else if ( browser.webkit ) {
|
||||||
|
browser.safari = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery.browser = browser;
|
||||||
|
|
||||||
|
jQuery.sub = function() {
|
||||||
|
function jQuerySub( selector, context ) {
|
||||||
|
return new jQuerySub.fn.init( selector, context );
|
||||||
|
}
|
||||||
|
jQuery.extend( true, jQuerySub, this );
|
||||||
|
jQuerySub.superclass = this;
|
||||||
|
jQuerySub.fn = jQuerySub.prototype = this();
|
||||||
|
jQuerySub.fn.constructor = jQuerySub;
|
||||||
|
jQuerySub.sub = this.sub;
|
||||||
|
jQuerySub.fn.init = function init( selector, context ) {
|
||||||
|
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
||||||
|
context = jQuerySub( context );
|
||||||
|
}
|
||||||
|
|
||||||
|
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||||
|
};
|
||||||
|
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
||||||
|
var rootjQuerySub = jQuerySub(document);
|
||||||
|
return jQuerySub;
|
||||||
|
};
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="left">
|
<div class="left">
|
||||||
<a href="$BaseHref" class="brand" rel="home">$SiteConfig.Title</a>
|
<a href="$BaseHref" class="brand" rel="home">$SiteConfig.Title</a>
|
||||||
<span class="arrow">→</span> <% include Navigation %></div>
|
<span class="arrow">→</span> <% include Navigation %></div>
|
||||||
<small class="right"><a href="http://simple.innovatif.com/about/">Theme</a> by <a href="http://www.saratusar.com">Sara</a> (Innovatif) / Powered by <a href="http://silverstripe.org">SilverStripe</a></small>
|
<small class="right"><a href="http://simple.innovatif.com/about/">Theme</a> by Sara (Innovatif) / Powered by <a href="http://silverstripe.org">SilverStripe</a></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
@ -8,7 +8,7 @@
|
|||||||
<% end_if %>
|
<% end_if %>
|
||||||
</a>
|
</a>
|
||||||
<% if $SearchForm %>
|
<% if $SearchForm %>
|
||||||
<span class="search-dropdown-icon">L</span>
|
<button class="search-dropdown-icon">L</button>
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
$SearchForm
|
$SearchForm
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<nav class="primary">
|
<nav class="primary">
|
||||||
<span class="nav-open-button">²</span>
|
<button class="nav-open-button">²</button>
|
||||||
<ul>
|
<ul>
|
||||||
<% loop $Menu(1) %>
|
<% loop $Menu(1) %>
|
||||||
<li class="$LinkingMode"><a href="$Link" title="$Title.XML">$MenuTitle.XML</a></li>
|
<li class="$LinkingMode"><a href="$Link" title="$Title.XML">$MenuTitle.XML</a></li>
|
||||||
|
@ -16,7 +16,7 @@ Change it, enhance it and most importantly enjoy it!
|
|||||||
<% base_tag %>
|
<% base_tag %>
|
||||||
<title><% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> » $SiteConfig.Title</title>
|
<title><% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> » $SiteConfig.Title</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
$MetaTags(false)
|
$MetaTags(false)
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@ -26,9 +26,9 @@ Change it, enhance it and most importantly enjoy it!
|
|||||||
<% require themedCSS('typography') %>
|
<% require themedCSS('typography') %>
|
||||||
<% require themedCSS('form') %>
|
<% require themedCSS('form') %>
|
||||||
<% require themedCSS('layout') %>
|
<% require themedCSS('layout') %>
|
||||||
<link rel="shortcut icon" href="$ThemeDir/images/favicon.ico" />
|
<link rel="shortcut icon" href="$resourceURL('themes/simple/images/favicon.ico')" />
|
||||||
</head>
|
</head>
|
||||||
<body class="$ClassName<% if not $Menu(2) %> no-sidebar<% end_if %>" <% if $i18nScriptDirection %>dir="$i18nScriptDirection"<% end_if %>>
|
<body class="$ClassName.ShortName<% if not $Menu(2) %> no-sidebar<% end_if %>" <% if $i18nScriptDirection %>dir="$i18nScriptDirection"<% end_if %>>
|
||||||
<% include Header %>
|
<% include Header %>
|
||||||
<div class="main" role="main">
|
<div class="main" role="main">
|
||||||
<div class="inner typography line">
|
<div class="inner typography line">
|
||||||
@ -37,9 +37,8 @@ Change it, enhance it and most importantly enjoy it!
|
|||||||
</div>
|
</div>
|
||||||
<% include Footer %>
|
<% include Footer %>
|
||||||
|
|
||||||
<% require javascript('framework/thirdparty/jquery/jquery.js') %>
|
<% require javascript('//code.jquery.com/jquery-3.3.1.min.js') %>
|
||||||
<%-- Please move: Theme javascript (below) should be moved to mysite/code/page.php --%>
|
<% require themedJavascript('script') %>
|
||||||
<script type="text/javascript" src="{$ThemeDir}/javascript/script.js"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user