Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
2e6b1bdc
Commit
2e6b1bdc
authored
Apr 18, 2017
by
lucha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[auto] theme: vanilla 1.6.3
parent
1f9521b8
Changes
73
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
7054 additions
and
313 deletions
+7054
-313
wp-content/themes/vanilla/LICENSE
wp-content/themes/vanilla/LICENSE
+15
-0
wp-content/themes/vanilla/assets/images/default-header.jpg
wp-content/themes/vanilla/assets/images/default-header.jpg
+0
-0
wp-content/themes/vanilla/assets/images/parlor.jpg
wp-content/themes/vanilla/assets/images/parlor.jpg
+0
-0
wp-content/themes/vanilla/assets/images/vanilla.jpg
wp-content/themes/vanilla/assets/images/vanilla.jpg
+0
-0
wp-content/themes/vanilla/assets/scripts/AppLayout/ContentSpacer.js
.../themes/vanilla/assets/scripts/AppLayout/ContentSpacer.js
+32
-0
wp-content/themes/vanilla/assets/scripts/AppLayout/HeaderClassController.js
...vanilla/assets/scripts/AppLayout/HeaderClassController.js
+64
-0
wp-content/themes/vanilla/assets/scripts/AppLayout/HeaderEscaper.js
.../themes/vanilla/assets/scripts/AppLayout/HeaderEscaper.js
+34
-0
wp-content/themes/vanilla/assets/scripts/Drawer.js
wp-content/themes/vanilla/assets/scripts/Drawer.js
+67
-0
wp-content/themes/vanilla/assets/scripts/customizer/color.js
wp-content/themes/vanilla/assets/scripts/customizer/color.js
+47
-0
wp-content/themes/vanilla/assets/scripts/customizer/controls.js
...tent/themes/vanilla/assets/scripts/customizer/controls.js
+19
-0
wp-content/themes/vanilla/assets/scripts/customizer/preview.js
...ntent/themes/vanilla/assets/scripts/customizer/preview.js
+132
-0
wp-content/themes/vanilla/assets/scripts/skip-link-focus-fix.js
...tent/themes/vanilla/assets/scripts/skip-link-focus-fix.js
+33
-0
wp-content/themes/vanilla/assets/scripts/theme.js
wp-content/themes/vanilla/assets/scripts/theme.js
+66
-0
wp-content/themes/vanilla/assets/styles/Base/embed.styl
wp-content/themes/vanilla/assets/styles/Base/embed.styl
+29
-0
wp-content/themes/vanilla/assets/styles/Base/form.styl
wp-content/themes/vanilla/assets/styles/Base/form.styl
+78
-0
wp-content/themes/vanilla/assets/styles/Base/heading.styl
wp-content/themes/vanilla/assets/styles/Base/heading.styl
+54
-0
wp-content/themes/vanilla/assets/styles/Base/hr.styl
wp-content/themes/vanilla/assets/styles/Base/hr.styl
+7
-0
wp-content/themes/vanilla/assets/styles/Base/links.styl
wp-content/themes/vanilla/assets/styles/Base/links.styl
+26
-0
wp-content/themes/vanilla/assets/styles/Base/list.styl
wp-content/themes/vanilla/assets/styles/Base/list.styl
+27
-0
wp-content/themes/vanilla/assets/styles/Base/table.styl
wp-content/themes/vanilla/assets/styles/Base/table.styl
+42
-0
wp-content/themes/vanilla/assets/styles/Base/typography.styl
wp-content/themes/vanilla/assets/styles/Base/typography.styl
+39
-0
wp-content/themes/vanilla/assets/styles/Components/archive-header.styl
...emes/vanilla/assets/styles/Components/archive-header.styl
+15
-0
wp-content/themes/vanilla/assets/styles/Components/comment-form.styl
...themes/vanilla/assets/styles/Components/comment-form.styl
+34
-0
wp-content/themes/vanilla/assets/styles/Components/comment.styl
...tent/themes/vanilla/assets/styles/Components/comment.styl
+91
-0
wp-content/themes/vanilla/assets/styles/Components/comments-navigation.styl
...vanilla/assets/styles/Components/comments-navigation.styl
+0
-0
wp-content/themes/vanilla/assets/styles/Components/content-area.styl
...themes/vanilla/assets/styles/Components/content-area.styl
+4
-0
wp-content/themes/vanilla/assets/styles/Components/custom-header.styl
...hemes/vanilla/assets/styles/Components/custom-header.styl
+108
-0
wp-content/themes/vanilla/assets/styles/Components/dashicons.styl
...nt/themes/vanilla/assets/styles/Components/dashicons.styl
+6
-0
wp-content/themes/vanilla/assets/styles/Components/entry-meta.styl
...t/themes/vanilla/assets/styles/Components/entry-meta.styl
+20
-0
wp-content/themes/vanilla/assets/styles/Components/entry.styl
...ontent/themes/vanilla/assets/styles/Components/entry.styl
+45
-0
wp-content/themes/vanilla/assets/styles/Components/gallery.styl
...tent/themes/vanilla/assets/styles/Components/gallery.styl
+66
-0
wp-content/themes/vanilla/assets/styles/Components/navbar.styl
...ntent/themes/vanilla/assets/styles/Components/navbar.styl
+68
-0
wp-content/themes/vanilla/assets/styles/Components/pagination.styl
...t/themes/vanilla/assets/styles/Components/pagination.styl
+58
-0
wp-content/themes/vanilla/assets/styles/Components/panel.styl
...ontent/themes/vanilla/assets/styles/Components/panel.styl
+30
-0
wp-content/themes/vanilla/assets/styles/Components/postlist.styl
...ent/themes/vanilla/assets/styles/Components/postlist.styl
+32
-0
wp-content/themes/vanilla/assets/styles/Components/primary-menu.styl
...themes/vanilla/assets/styles/Components/primary-menu.styl
+105
-0
wp-content/themes/vanilla/assets/styles/Components/search-form.styl
.../themes/vanilla/assets/styles/Components/search-form.styl
+16
-0
wp-content/themes/vanilla/assets/styles/Components/site-branding.styl
...hemes/vanilla/assets/styles/Components/site-branding.styl
+35
-0
wp-content/themes/vanilla/assets/styles/Components/site-footer.styl
.../themes/vanilla/assets/styles/Components/site-footer.styl
+10
-0
wp-content/themes/vanilla/assets/styles/Components/site-main.styl
...nt/themes/vanilla/assets/styles/Components/site-main.styl
+7
-0
wp-content/themes/vanilla/assets/styles/Components/widget.styl
...ntent/themes/vanilla/assets/styles/Components/widget.styl
+11
-0
wp-content/themes/vanilla/assets/styles/Objects/app-layout.styl
...tent/themes/vanilla/assets/styles/Objects/app-layout.styl
+85
-0
wp-content/themes/vanilla/assets/styles/Objects/container.styl
...ntent/themes/vanilla/assets/styles/Objects/container.styl
+15
-0
wp-content/themes/vanilla/assets/styles/Objects/drawer.styl
wp-content/themes/vanilla/assets/styles/Objects/drawer.styl
+73
-0
wp-content/themes/vanilla/assets/styles/Objects/grid.styl
wp-content/themes/vanilla/assets/styles/Objects/grid.styl
+109
-0
wp-content/themes/vanilla/assets/styles/Objects/hamburger-btn.styl
...t/themes/vanilla/assets/styles/Objects/hamburger-btn.styl
+80
-0
wp-content/themes/vanilla/assets/styles/Settings/setting.styl
...ontent/themes/vanilla/assets/styles/Settings/setting.styl
+25
-0
wp-content/themes/vanilla/assets/styles/Tools/logical-props.styl
...ent/themes/vanilla/assets/styles/Tools/logical-props.styl
+7
-0
wp-content/themes/vanilla/assets/styles/Tools/mixin.styl
wp-content/themes/vanilla/assets/styles/Tools/mixin.styl
+37
-0
wp-content/themes/vanilla/assets/styles/Tools/mq.styl
wp-content/themes/vanilla/assets/styles/Tools/mq.styl
+37
-0
wp-content/themes/vanilla/assets/styles/Trumps/embed.styl
wp-content/themes/vanilla/assets/styles/Trumps/embed.styl
+8
-0
wp-content/themes/vanilla/assets/styles/Trumps/text.styl
wp-content/themes/vanilla/assets/styles/Trumps/text.styl
+30
-0
wp-content/themes/vanilla/assets/styles/Trumps/visibility.styl
...ntent/themes/vanilla/assets/styles/Trumps/visibility.styl
+86
-0
wp-content/themes/vanilla/assets/styles/Trumps/wp.styl
wp-content/themes/vanilla/assets/styles/Trumps/wp.styl
+79
-0
wp-content/themes/vanilla/assets/styles/style.styl
wp-content/themes/vanilla/assets/styles/style.styl
+96
-0
wp-content/themes/vanilla/bundle.js
wp-content/themes/vanilla/bundle.js
+443
-0
wp-content/themes/vanilla/comments.php
wp-content/themes/vanilla/comments.php
+75
-20
wp-content/themes/vanilla/footer.php
wp-content/themes/vanilla/footer.php
+35
-17
wp-content/themes/vanilla/functions.php
wp-content/themes/vanilla/functions.php
+152
-187
wp-content/themes/vanilla/header.php
wp-content/themes/vanilla/header.php
+90
-20
wp-content/themes/vanilla/inc/custom-background.php
wp-content/themes/vanilla/inc/custom-background.php
+21
-0
wp-content/themes/vanilla/inc/custom-header.php
wp-content/themes/vanilla/inc/custom-header.php
+93
-0
wp-content/themes/vanilla/inc/customizer.php
wp-content/themes/vanilla/inc/customizer.php
+342
-0
wp-content/themes/vanilla/inc/template-tags.php
wp-content/themes/vanilla/inc/template-tags.php
+118
-0
wp-content/themes/vanilla/index.php
wp-content/themes/vanilla/index.php
+60
-20
wp-content/themes/vanilla/readme.txt
wp-content/themes/vanilla/readme.txt
+148
-0
wp-content/themes/vanilla/screenshot.png
wp-content/themes/vanilla/screenshot.png
+0
-0
wp-content/themes/vanilla/searchform.php
wp-content/themes/vanilla/searchform.php
+23
-0
wp-content/themes/vanilla/singular.php
wp-content/themes/vanilla/singular.php
+55
-0
wp-content/themes/vanilla/style.css
wp-content/themes/vanilla/style.css
+2857
-49
wp-content/themes/vanilla/template-parts/content-front-page-panels.php
...emes/vanilla/template-parts/content-front-page-panels.php
+77
-0
wp-content/themes/vanilla/template-parts/content-none.php
wp-content/themes/vanilla/template-parts/content-none.php
+39
-0
wp-content/themes/vanilla/template-parts/content.php
wp-content/themes/vanilla/template-parts/content.php
+87
-0
No files found.
wp-content/themes/vanilla/LICENSE
0 → 100644
View file @
2e6b1bdc
Copyright 2016 Toro_Unit (email : mail@torounit.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
wp-content/themes/vanilla/assets/images/default-header.jpg
0 → 100644
View file @
2e6b1bdc
337 KB
wp-content/themes/vanilla/assets/images/parlor.jpg
0 → 100644
View file @
2e6b1bdc
284 KB
wp-content/themes/vanilla/assets/images/vanilla.jpg
0 → 100644
View file @
2e6b1bdc
203 KB
wp-content/themes/vanilla/assets/scripts/AppLayout/ContentSpacer.js
0 → 100644
View file @
2e6b1bdc
import
$
from
'
jquery
'
;
export
default
class
ContentSpacer
{
/**
*
* @param {jQuery} $el
*/
constructor
(
$el
)
{
this
.
$el
=
$el
;
let
header
=
$el
.
data
(
'
app-layout-header
'
);
let
content
=
$el
.
data
(
'
app-layout-spacer
'
);
this
.
$header
=
$
(
header
);
this
.
$content
=
$
(
content
);
this
.
on
();
}
on
()
{
$
(
window
).
on
(
'
load resize
'
,
()
=>
{
this
.
setPadding
()
}
);
}
setPadding
()
{
this
.
$content
.
css
({
paddingTop
:
this
.
getHeaderHeight
()
+
'
px
'
});
}
getHeaderHeight
()
{
return
this
.
$header
.
height
();
}
}
\ No newline at end of file
wp-content/themes/vanilla/assets/scripts/AppLayout/HeaderClassController.js
0 → 100644
View file @
2e6b1bdc
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
export
default
class
AppLayoutClassController
{
/**
*
* @param $el
* @param classString
* @param threshold クラスの設定をするためのスクロール位置
*/
constructor
(
$el
,
classString
,
threshold
)
{
this
.
classString
=
classString
;
this
.
threshold
=
threshold
;
this
.
$el
=
$el
;
let
header
=
$el
.
data
(
'
app-layout-header
'
);
let
content
=
$el
.
data
(
'
app-layout-scroll-area
'
);
this
.
$header
=
$
(
header
);
if
(
content
&&
content
!=
'
window
'
)
{
this
.
$content
=
$
(
content
);
}
else
{
this
.
$content
=
$
(
window
);
}
this
.
initialize
();
this
.
on
();
}
initialize
()
{
//for override
}
on
()
{
this
.
$content
.
on
(
'
scroll resize
'
,
_
.
throttle
(
function
(){
this
.
toggleClass
();
},
1
).
bind
(
this
)
);
}
toggleClass
()
{
if
(
this
.
isExceedsThreshold
()
)
{
this
.
$header
.
addClass
(
this
.
classString
);
}
else
{
this
.
$header
.
removeClass
(
this
.
classString
);
}
}
getThreshold
()
{
if
(
typeof
this
.
threshold
==
"
function
"
)
{
return
this
.
threshold
();
}
else
{
return
this
.
threshold
;
}
}
isExceedsThreshold
()
{
let
scrollTop
=
this
.
$content
.
scrollTop
();
return
(
scrollTop
>
this
.
getThreshold
()
);
}
}
wp-content/themes/vanilla/assets/scripts/AppLayout/HeaderEscaper.js
0 → 100644
View file @
2e6b1bdc
import
HeaderClassController
from
'
./HeaderClassController
'
;
export
default
class
extends
HeaderClassController
{
initialize
()
{
this
.
scrollPos
=
this
.
getScrollPosition
();
}
getScrollPosition
()
{
return
this
.
$content
.
scrollTop
();
}
toggleClass
()
{
let
currentPos
=
this
.
getScrollPosition
();
if
(
!
this
.
isExceedsThreshold
()
)
{
this
.
$header
.
removeClass
(
this
.
classString
);
this
.
$header
.
attr
(
'
aria-hidden
'
,
'
false
'
);
}
else
if
(
currentPos
-
this
.
scrollPos
>
5
)
{
//scroll to down
this
.
$header
.
addClass
(
this
.
classString
);
this
.
$header
.
attr
(
'
aria-hidden
'
,
'
true
'
);
}
else
if
(
currentPos
-
this
.
scrollPos
<
-
5
)
{
//scroll to up
this
.
$header
.
removeClass
(
this
.
classString
);
this
.
$header
.
attr
(
'
aria-hidden
'
,
'
false
'
);
}
this
.
scrollPos
=
currentPos
;
}
}
wp-content/themes/vanilla/assets/scripts/Drawer.js
0 → 100644
View file @
2e6b1bdc
import
$
from
'
jquery
'
;
export
default
class
Drawer
{
constructor
(
$el
)
{
this
.
$el
=
$el
;
this
.
$container
=
$
(
$el
.
data
(
"
drawer-container-selector
"
));
this
.
id
=
$el
.
attr
(
'
id
'
);
this
.
$controller
=
$
(
'
[aria-controls="
'
+
this
.
id
+
'
" ]
'
);
this
.
$container
.
addClass
(
"
drawer-container
"
);
this
.
on
();
}
on
()
{
this
.
$controller
.
on
(
'
click
'
,
this
.
toggle
.
bind
(
this
));
this
.
$el
.
on
(
'
click
'
,
this
.
close
.
bind
(
this
));
this
.
$el
.
children
().
on
(
'
click
'
,
function
(
event
){
event
.
stopPropagation
();
})
$
(
document
).
on
(
'
keyup
'
,
(
event
)
=>
{
if
(
event
.
keyCode
==
27
)
{
this
.
close
();
}
})
this
.
$el
.
on
(
'
transitionend
'
,
this
.
transitionend
.
bind
(
this
));
}
transitionend
()
{
this
.
$el
.
removeClass
(
'
is-animated
'
);
}
toggle
(
event
)
{
event
.
preventDefault
();
if
(
this
.
$el
.
attr
(
'
aria-expanded
'
)
==
"
false
"
)
{
this
.
open
();
}
else
{
this
.
close
();
}
}
open
()
{
this
.
$el
.
addClass
(
'
is-animated
'
);
this
.
$el
.
attr
(
'
aria-expanded
'
,
"
true
"
);
this
.
$el
.
attr
(
'
aria-hidden
'
,
"
false
"
);
this
.
$controller
.
attr
(
'
aria-expanded
'
,
"
true
"
);
this
.
$container
.
addClass
(
"
is-drawer-open
"
);
}
close
()
{
this
.
$el
.
addClass
(
'
is-animated
'
);
this
.
$el
.
attr
(
'
aria-expanded
'
,
"
false
"
);
this
.
$el
.
attr
(
'
aria-hidden
'
,
"
true
"
);
this
.
$controller
.
attr
(
'
aria-expanded
'
,
"
false
"
);
this
.
$container
.
removeClass
(
"
is-drawer-open
"
);
}
static
init
()
{
$
(
"
[data-drawer]
"
).
each
(
function
(){
new
Drawer
(
$
(
this
));
});
}
}
\ No newline at end of file
wp-content/themes/vanilla/assets/scripts/customizer/color.js
0 → 100644
View file @
2e6b1bdc
(
function
(
api
)
{
var
cssTemplate
=
wp
.
template
(
'
vanilla-color
'
);
var
colorSchemeKeys
=
[
'
background_color
'
,
'
link_color
'
,
'
text_color
'
,
'
header_textcolor
'
,
'
navbar_textcolor
'
,
'
navbar_background_color
'
,
'
archive_header_textcolor
'
,
'
archive_header_background_color
'
,
'
post_thumbnail_background_color
'
,
'
footer_textcolor
'
,
'
footer_background_color
'
,
];
function
updateCSS
()
{
var
css
,
colors
=
colorSchemeKeys
;
// Merge in color scheme overrides.
_
.
each
(
colorSchemeKeys
,
function
(
setting
)
{
var
color
=
api
(
setting
)();
if
(
!
color
)
{
if
(
setting
.
indexOf
(
'
background_color
'
)
)
{
color
=
'
transparent
'
}
else
{
color
=
'
inherit
'
}
}
colors
[
setting
]
=
color
;
});
css
=
cssTemplate
(
colors
);
api
.
previewer
.
send
(
'
update-color-css
'
,
css
);
}
// Update the CSS whenever a color setting is changed.
_
.
each
(
colorSchemeKeys
,
function
(
setting
)
{
api
(
setting
,
function
(
setting
)
{
setting
.
bind
(
updateCSS
);
});
});
})(
wp
.
customize
);
wp-content/themes/vanilla/assets/scripts/customizer/controls.js
0 → 100644
View file @
2e6b1bdc
/**
* Live-update changed settings in real time in the Customizer preview.
*/
(
function
(
$
)
{
var
api
=
wp
.
customize
;
api
.
bind
(
'
ready
'
,
function
()
{
"
use strict
"
;
//Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly.
api
.
section
(
'
theme_options
'
,
function
(
section
)
{
section
.
expanded
.
bind
(
function
(
isExpanding
)
{
// Value of isExpanding will = true if you're entering the section, false if you're leaving it.
api
.
previewer
.
send
(
'
section-highlight
'
,
{
expanded
:
isExpanding
});
}
);
}
);
});
}
)(
jQuery
);
wp-content/themes/vanilla/assets/scripts/customizer/preview.js
0 → 100644
View file @
2e6b1bdc
/**
* Live-update changed settings in real time in the Customizer preview.
*/
(
function
(
$
)
{
var
style
=
$
(
'
#vanilla-color-css
'
),
api
=
wp
.
customize
;
api
.
bind
(
'
preview-ready
'
,
function
()
{
"
use strict
"
;
$
(
'
.panel--placeholder
'
).
hide
();
api
.
preview
.
bind
(
'
section-highlight
'
,
function
(
data
)
{
// When the section is expanded, show and scroll to the content placeholders, exposing the edit links.
if
(
true
===
data
.
expanded
)
{
$
(
'
body
'
).
addClass
(
'
highlight-front-sections
'
);
$
(
'
.panel--placeholder
'
).
slideDown
(
200
,
function
()
{
$
(
"
html, body
"
).
animate
({
scrollTop
:
$
(
'
#panel1
'
).
offset
().
top
},
600
);
});
// If we've left the panel, hide the placeholders and scroll back to the top.
}
else
{
$
(
'
body
'
).
removeClass
(
'
highlight-front-sections
'
);
// Don't change scroll when leaving - it's likely to have unintended consequences.
$
(
'
.panel--placeholder
'
).
slideUp
(
200
);
}
});
});
if
(
!
style
.
length
)
{
style
=
$
(
'
head
'
).
append
(
'
<style type="text/css" id="vanilla-color-css" />
'
)
.
find
(
'
#vanilla-color-css
'
);
}
// Color Scheme CSS.
api
.
bind
(
'
preview-ready
'
,
function
()
{
api
.
preview
.
bind
(
'
update-color-css
'
,
function
(
css
)
{
style
.
html
(
css
);
//$("#vanilla-color-css").remove();
}
);
}
);
// Page layouts.
api
(
'
posts_layout_on_front_page
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
if
(
'
list
'
===
to
)
{
$
(
'
body
'
).
addClass
(
'
postlist-style-list
'
).
removeClass
(
'
postlist-style-block
'
);
}
else
{
$
(
'
body
'
).
removeClass
(
'
postlist-style-list
'
).
addClass
(
'
postlist-style-block
'
);
}
}
);
}
);
// Site title.
api
(
'
blogname
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
$
(
'
.site-title a
'
).
text
(
to
);
}
);
}
);
// Site tagline.
api
(
'
blogdescription
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
$
(
'
.site-description
'
).
text
(
to
);
}
);
}
);
// Add custom-background-image body class when background image is added.
api
(
'
background_image
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
$
(
'
body
'
).
toggleClass
(
'
custom-background-image
'
,
''
!==
to
);
}
);
}
);
// Header text color.
api
(
'
header_textcolor
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
if
(
'
blank
'
===
to
)
{
$
(
'
.custom-header__branding
'
).
css
({
clip
:
'
rect(1px, 1px, 1px, 1px)
'
,
position
:
'
absolute
'
});
// Add class for different logo styles if title and description are hidden.
$
(
'
body
'
).
addClass
(
'
title-tagline-hidden
'
);
}
else
{
// Check if the text color has been removed and use default colors in theme stylesheet.
if
(
!
to
.
length
)
{
$
(
'
#vanilla-custom-header-styles
'
).
remove
();
}
// $( '.custom-header__branding' ).css({
// clip: 'auto',
// position: 'relative'
// });
$
(
'
.custom-header
'
).
css
({
color
:
to
});
// Add class for different logo styles if title and description are visible.
$
(
'
body
'
).
removeClass
(
'
title-tagline-hidden
'
);
}
});
});
// Whether a header image is available.
function
hasHeaderImage
()
{
var
image
=
api
(
'
header_image
'
)();
return
''
!==
image
&&
'
remove-header
'
!==
image
;
}
// Toggle a body class if a custom header exists.
$
.
each
(
[
'
header_image
'
],
function
(
index
,
settingId
)
{
wp
.
customize
(
settingId
,
function
(
setting
)
{
setting
.
bind
(
function
()
{
if
(
hasHeaderImage
()
)
{
$
(
"
.custom-header
"
).
addClass
(
'
custom-header--has-image
'
);
}
else
{
$
(
"
.custom-header
"
).
removeClass
(
'
custom-header--has-image
'
);
}
}
);
}
);
}
);
}
)(
jQuery
);
wp-content/themes/vanilla/assets/scripts/skip-link-focus-fix.js
0 → 100644
View file @
2e6b1bdc
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
(
function
()
{
var
isWebkit
=
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
webkit
'
)
>
-
1
,
isOpera
=
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
opera
'
)
>
-
1
,
isIe
=
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
msie
'
)
>
-
1
;
if
(
(
isWebkit
||
isOpera
||
isIe
)
&&
document
.
getElementById
&&
window
.
addEventListener
)
{
window
.
addEventListener
(
'
hashchange
'
,
function
()
{
var
id
=
location
.
hash
.
substring
(
1
),
element
;
if
(
!
(
/^
[
A-z0-9_-
]
+$/
.
test
(
id
)
)
)
{
return
;
}
element
=
document
.
getElementById
(
id
);
if
(
element
)
{
if
(
!
(
/^
(?:
a|select|input|button|textarea
)
$/i
.
test
(
element
.
tagName
)
)
)
{
element
.
tabIndex
=
-
1
;
}
element
.
focus
();
}
},
false
);
}
})();
wp-content/themes/vanilla/assets/scripts/theme.js
0 → 100644
View file @
2e6b1bdc
import
$
from
'
jquery
'
;
import
Drawer
from
'
./Drawer
'
;
import
HeaderClassController
from
'
./AppLayout/HeaderClassController
'
;
import
HeaderEscaper
from
'
./AppLayout/HeaderEscaper
'
;
import
ContentSpacer
from
'
./AppLayout/ContentSpacer
'
;
import
'
./skip-link-focus-fix
'
;
$
(
function
()
{
$
(
"
[data-drawer]
"
).
each
(
function
(){
new
Drawer
(
$
(
this
));
});
});
$
(
function
()
{
let
$toplevelMenuItems
=
$
(
'
.primary-menu .menu-item-has-children, .primary-menu .page_item_has_children
'
);
// Add dropdown toggle that displays child menu items.
let
$dropdownToggle
=
$
(
'
<button />
'
,
{
'
class
'
:
'
dropdown-toggle
'
,
'
aria-expanded
'
:
false
}
).
append
(
$
(
'
<span />
'
,
{
'
class
'
:
'
screen-reader-text
'
,
text
:
screenReaderText
.
expand
}
)
);
$toplevelMenuItems
.
children
(
'
a
'
).
after
(
$dropdownToggle
);
$
(
"
.primary-menu .sub-menu, .primary-menu .children
"
).
each
(
function
()
{
$
(
this
).
attr
(
'
aria-expanded
'
,
"
false
"
);
});
$toplevelMenuItems
.
find
(
'
.dropdown-toggle
'
).
on
(
'
click
'
,
function
(
event
)
{
let
self
=
$
(
this
);
let
expanded
=
''
;
if
(
'
true
'
==
self
.
attr
(
'
aria-expanded
'
)
)
{
expanded
=
'
false
'
;
self
.
find
(
'
.screen-reader-text
'
).
text
(
screenReaderText
.
expand
);
}
else
{
expanded
=
'
true
'
;
self
.
find
(
'
.screen-reader-text
'
).
text
(
screenReaderText
.
collapse
);
}
self
.
attr
(
'
aria-expanded
'
,
expanded
);
self
.
siblings
(
'
.sub-menu,.children
'
).
attr
(
'
aria-expanded
'
,
expanded
);
})
});
$
(
function
()
{
let
$appLayout
=
$
(
"
.app-layout
"
);
$
(
window
).
on
(
'
load resize
'
,
()
=>
{
$appLayout
.
removeClass
(
"
app-layout--disable
"
);
}
);
new
HeaderClassController
(
$appLayout
,
"
app-layout__header--fixed
"
,
46
);
new
HeaderEscaper
(
$appLayout
,
"
app-layout__header--escape
"
,
64
);
new
ContentSpacer
(
$appLayout
);
});
wp-content/themes/vanilla/assets/styles/Base/embed.styl
0 → 100644
View file @
2e6b1bdc
// Embed
//
// Styleguide 1.5
img,
svg {
max-width: 100%;
height: auto;
}
iframe {
max-width: 100%;
}
video {
margin-bottom: 1em;
}
figure {
margin: 1em 0;
figcaption {
text-align: center;
font-size: 1em;
}
}
wp-content/themes/vanilla/assets/styles/Base/form.styl
0 → 100644
View file @
2e6b1bdc
// Form
//
// Styleguide 1.6
select {
line-height: inherit;
box-sizing: border-box;
padding: 6px 12px;
color: #555;
background-image: none;
border: none;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
select {
height: 1.75em;
}
select,
input[type="text"],
input[type="date"],
input[type="tel"],