Yuzu Theme
from meowapps.com
This commit is contained in:
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"liveServer.settings.port": 5501
|
||||||
|
}
|
||||||
60
404.php
Normal file
60
404.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying 404 pages (not found)
|
||||||
|
*
|
||||||
|
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<section class="error-404 not-found">
|
||||||
|
<header class="page-header">
|
||||||
|
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.', 'yuzu' ); ?></h1>
|
||||||
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'yuzu' ); ?></p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_search_form();
|
||||||
|
|
||||||
|
the_widget( 'WP_Widget_Recent_Posts' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="widget widget_categories">
|
||||||
|
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'yuzu' ); ?></h2>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
wp_list_categories( array(
|
||||||
|
'orderby' => 'count',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'show_count' => 1,
|
||||||
|
'title_li' => '',
|
||||||
|
'number' => 10,
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div><!-- .widget -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/* translators: %1$s: smiley */
|
||||||
|
$yuzu_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'yuzu' ), convert_smilies( ':)' ) ) . '</p>';
|
||||||
|
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$yuzu_archive_content" );
|
||||||
|
|
||||||
|
the_widget( 'WP_Widget_Tag_Cloud' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div><!-- .page-content -->
|
||||||
|
</section><!-- .error-404 -->
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
339
LICENSE
Normal file
339
LICENSE
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
{description}
|
||||||
|
Copyright (C) {year} {fullname}
|
||||||
|
|
||||||
|
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
{signature of Ty Coon}, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
||||||
75
archive.php
Normal file
75
archive.php
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Archive', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_the_archive_title(); ?></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="articles-list large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) :
|
||||||
|
|
||||||
|
/* Start the Loop */
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
endwhile;
|
||||||
|
|
||||||
|
the_posts_navigation();
|
||||||
|
|
||||||
|
else :
|
||||||
|
|
||||||
|
_e('No posts found!', 'yuzu');
|
||||||
|
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
60
assets/css/custom-properties.css
Normal file
60
assets/css/custom-properties.css
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
body {
|
||||||
|
--shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
--deeper_shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
--lato: 'Lato', sans-serif;
|
||||||
|
--fjalla: 'Fjalla One', sans-serif;
|
||||||
|
}
|
||||||
|
body.light-theme {
|
||||||
|
--top_bar_color: #2E3B4F;
|
||||||
|
--body_color: #2E3B4F;
|
||||||
|
--footer_color: #2E3B4F;
|
||||||
|
--card_color: #2E3B4F;
|
||||||
|
--link_color: #4B828E;
|
||||||
|
--link_hover_color: #39636d;
|
||||||
|
--tag_color: #4B828E;
|
||||||
|
--tag_hover_color: #39636d;
|
||||||
|
--search_widget_color: #2E3B4F;
|
||||||
|
--read_more_btn_color: #2E3B4F;
|
||||||
|
--comment_form_color: #2E3B4F;
|
||||||
|
--comment_color: #2E3B4F;
|
||||||
|
--post_comment_btn_color: #2E3B4F;
|
||||||
|
--top_bar_bg: #FFF;
|
||||||
|
--body_bg: #FAFBFB;
|
||||||
|
--very_opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.9));
|
||||||
|
--opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.6));
|
||||||
|
--less_opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.4));
|
||||||
|
--footer_bg: #FFF;
|
||||||
|
--card_bg: #FFF;
|
||||||
|
--search_widget_bg: #f5f4f4;
|
||||||
|
--read_more_btn_bg: #F5F5F5;
|
||||||
|
--comment_form_bg: #FFF;
|
||||||
|
--comment_bg: #FFF;
|
||||||
|
--post_comment_btn_bg: #FFF;
|
||||||
|
}
|
||||||
|
body.dark-theme {
|
||||||
|
--top_bar_color: #F7F9FE;
|
||||||
|
--body_color: #F7F9FE;
|
||||||
|
--footer_color: #F7F9FE;
|
||||||
|
--card_color: #2E3B4F;
|
||||||
|
--link_color: #6db1c0;
|
||||||
|
--link_hover_color: #4b9daf;
|
||||||
|
--tag_color: #6db1c0;
|
||||||
|
--tag_hover_color: #4b9daf;
|
||||||
|
--search_widget_color: #F7F9FE;
|
||||||
|
--read_more_btn_color: #F7F9FE;
|
||||||
|
--comment_form_color: #2E3B4F;
|
||||||
|
--comment_color: #2E3B4F;
|
||||||
|
--post_comment_btn_color: #2E3B4F;
|
||||||
|
--top_bar_bg: #232730;
|
||||||
|
--body_bg: #1d2027;
|
||||||
|
--very_opaque_header_bg: linear-gradient(to top, #1d2027, rgba(29, 32, 39, 0.9));
|
||||||
|
--opaque_header_bg: linear-gradient(to top, #1d2027, rgba(29, 32, 39, 0.6));
|
||||||
|
--less_opaque_header_bg: linear-gradient(to top, #1d2027, rgba(29, 32, 39, 0.4));
|
||||||
|
--footer_bg: #232730;
|
||||||
|
--card_bg: #FFF;
|
||||||
|
--search_widget_bg: #15181d;
|
||||||
|
--read_more_btn_bg: #38435a;
|
||||||
|
--comment_form_bg: #FFF;
|
||||||
|
--comment_bg: #FFF;
|
||||||
|
--post_comment_btn_bg: #FFF;
|
||||||
|
}
|
||||||
9
assets/css/editor-style.css
Normal file
9
assets/css/editor-style.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css?family=Lato:400&display=swap');
|
||||||
|
.edit-post-visual-editor {
|
||||||
|
font-family: 'Lato', sans-serif !important;
|
||||||
|
}
|
||||||
|
.edit-post-visual-editor p {
|
||||||
|
font-size: 18px !important;
|
||||||
|
line-height: 180% !important;
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
1
assets/icons/inline-arrow_up.svg.php
Normal file
1
assets/icons/inline-arrow_up.svg.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title>Arrow Up</title> <desc>Icon of a arrow pointing up</desc> <path d="M18 9l-6-6-6 6"/> <path d="M12 21V4"/> <path stroke-linecap="round" d="M12 3v1"/> </svg>
|
||||||
|
After Width: | Height: | Size: 371 B |
1
assets/icons/inline-camera.svg.php
Normal file
1
assets/icons/inline-camera.svg.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title class="cameraIconTitle">Camera</title> <desc class="cameraIconDesc">Icon of a photographic camera</desc> <path d="M8 7l.74-1.11A2 2 0 0 1 10.404 5h3.192a2 2 0 0 1 1.664.89L16 7h5v11H3V7h5z"/> <circle cx="12" cy="12" r="3"/> </svg>
|
||||||
|
After Width: | Height: | Size: 446 B |
1
assets/icons/inline-close.svg.php
Normal file
1
assets/icons/inline-close.svg.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title class="closeIconTitle">Close</title> <desc class="closeIconDesc">Icon of a cross (x)</desc> <path d="M6.34314575 6.34314575L17.6568542 17.6568542M6.34314575 17.6568542L17.6568542 6.34314575"/> </svg>
|
||||||
|
After Width: | Height: | Size: 415 B |
1
assets/icons/inline-hamburger.svg.php
Normal file
1
assets/icons/inline-hamburger.svg.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title class="hamburgerIconTitle">Menu</title> <desc class="hamburgerIconDesc">Icon of a menu made of three horizontal lines</desc> <path d="M6 7L18 7M6 12L18 12M6 17L18 17"/> </svg>
|
||||||
|
After Width: | Height: | Size: 391 B |
1
assets/icons/inline-search.svg.php
Normal file
1
assets/icons/inline-search.svg.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title class="searchIconTitle">Search</title> <desc class="searchIconDesc">Icon of a magnifying glass</desc> <path d="M14.4121122,14.4121122 L20,20"/> <circle cx="10" cy="10" r="6"/> </svg>
|
||||||
|
After Width: | Height: | Size: 398 B |
93
assets/js/main.js
Normal file
93
assets/js/main.js
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
jQuery(document).ready(function ($) {
|
||||||
|
|
||||||
|
// Top Search Bar Opening/Closing
|
||||||
|
$('.open-top-bar-search').on('click', function() {
|
||||||
|
$(this).hide();
|
||||||
|
$('.close-top-bar-search').show();
|
||||||
|
$('.top-search-bar-container').addClass('opened');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close-top-bar-search').on('click', function () {
|
||||||
|
$(this).hide();
|
||||||
|
$('.open-top-bar-search').show();
|
||||||
|
$('.top-search-bar-container').removeClass('opened');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Blog cards size equalizer
|
||||||
|
function equalizeArticleCardsHeights() {
|
||||||
|
if(php_vars.enable_posts_height_equalizer) {
|
||||||
|
$('.articles-list .row').each(function (index) {
|
||||||
|
if ($(this).css('display') == "inline") {
|
||||||
|
$('.article-card-container .article-meta').css('height', 'auto');
|
||||||
|
} else {
|
||||||
|
var max_height = 0;
|
||||||
|
$(this).find('.article-card-container').each(function () {
|
||||||
|
var height = $(this).find('.article-meta').outerHeight();
|
||||||
|
if (height > max_height) {
|
||||||
|
max_height = height;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(this).find('.article-card-container').find('.article-meta').css('height', max_height + 'px')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
equalizeArticleCardsHeights();
|
||||||
|
|
||||||
|
// Rewrite Search Widget
|
||||||
|
$('.widget_search .search-field').attr('type', 'text');
|
||||||
|
$('.widget_search .search-submit').remove();
|
||||||
|
$('.widget_search .search-form').append('<label><input type="submit" class="hidden-submit"/><svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title>Search</title> <desc>Icon of a magnifying glass</desc> <path d="M14.4121122,14.4121122 L20,20"/> <circle cx="10" cy="10" r="6"/> </svg></label>');
|
||||||
|
|
||||||
|
// Rewrite Meow Search Block
|
||||||
|
$('.mwt-search .mwt-search').attr('type', 'text');
|
||||||
|
$('.mwt-search .search-submit').remove();
|
||||||
|
$('.mwt-search form.search-form').append('<label><input type="submit" class="hidden-submit" style="display:none;"/><svg role="img" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" stroke="#2329D6" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#2329D6"> <title>Search</title> <desc >Icon of a magnifying glass</desc> <path d="M14.4121122,14.4121122 L20,20"/> <circle cx="10" cy="10" r="6"/> </svg></label>');
|
||||||
|
|
||||||
|
// Mobile Navigation Init
|
||||||
|
$('.mobile-navigation').css('margin-top', - $('.mobile-navigation').outerHeight() + 'px')
|
||||||
|
// Mobile Navigation Toggle
|
||||||
|
$('.mobile-navigation-toggle').on('click', function() {
|
||||||
|
if($(this).hasClass('active')) {
|
||||||
|
$('.mobile-navigation').animate({ marginTop: - $('.mobile-navigation').outerHeight() + 'px'}, 200);
|
||||||
|
$(this).removeClass('active')
|
||||||
|
} else {
|
||||||
|
$('.mobile-navigation').animate({ marginTop: 0 }, 200);
|
||||||
|
$(this).addClass('active')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// On window resize
|
||||||
|
var resizeTimer
|
||||||
|
$(window).on('resize', function() {
|
||||||
|
clearTimeout(resizeTimer);
|
||||||
|
resizeTimer = setTimeout(function () {
|
||||||
|
$('.article-card-container .article-meta').css('height', 'auto');
|
||||||
|
equalizeArticleCardsHeights();
|
||||||
|
}, 250);
|
||||||
|
})
|
||||||
|
|
||||||
|
// On infinite scroll loading more posts
|
||||||
|
$(document.body).on('post-load', function () {
|
||||||
|
equalizeArticleCardsHeights();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Scroll back to top button
|
||||||
|
if ($('.scroll-back-to-top-btn').length > -1) {
|
||||||
|
$(window).on('scroll', function() {
|
||||||
|
var scrollTop = $(this).scrollTop();
|
||||||
|
if(scrollTop > 100) {
|
||||||
|
$('.scroll-back-to-top-btn').addClass('visible');
|
||||||
|
}
|
||||||
|
if(scrollTop <= 100) {
|
||||||
|
$('.scroll-back-to-top-btn').removeClass('visible');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.scroll-back-to-top-btn').on('click', function() {
|
||||||
|
$("html, body").animate({ scrollTop: 0 }, 300);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
193
assets/less/_article-cards.less
Normal file
193
assets/less/_article-cards.less
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
.row {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-card-container {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 30px 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
background: @card_bg;
|
||||||
|
background: var(--card_bg);
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
color: var(--card_color);
|
||||||
|
transition: .2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-featured-image {
|
||||||
|
display: block;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
|
||||||
|
.article-categories {
|
||||||
|
|
||||||
|
.article-category {
|
||||||
|
display: inline-block;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 14px;
|
||||||
|
color: @card_color;
|
||||||
|
color: var(--card_color);
|
||||||
|
opacity: .3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-title {
|
||||||
|
display: block;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
color: @card_color;
|
||||||
|
color: var(--card_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-excerpt {
|
||||||
|
line-height: 160%;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-more-btn {
|
||||||
|
display: inline-block;
|
||||||
|
color: @read_more_btn_color;
|
||||||
|
color: var(--read_more_btn_color);
|
||||||
|
background: @read_more_btn_bg;
|
||||||
|
background: var(--read_more_btn_bg);
|
||||||
|
padding: 15px 0;
|
||||||
|
width: 140px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 22px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -70px;
|
||||||
|
margin-bottom: -26px;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
border-radius: 25px;
|
||||||
|
transition: .2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .3s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.large {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.article-featured-image {
|
||||||
|
display: flex;
|
||||||
|
width: 60%;
|
||||||
|
padding-bottom: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
width: 50%;
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.article-featured-image {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
padding: 30px;
|
||||||
|
padding-bottom: 90px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.medium {
|
||||||
|
width: 50%;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
|
||||||
|
.article-featured-image {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
padding: 30px;
|
||||||
|
padding-bottom: 90px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
width: 33.33%;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
|
||||||
|
.article-featured-image {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
padding: 30px;
|
||||||
|
padding-bottom: 90px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
310
assets/less/_blog.less
Normal file
310
assets/less/_blog.less
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.articles-list {
|
||||||
|
font-size: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.posts-navigation {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 60px;
|
||||||
|
|
||||||
|
.nav-links {
|
||||||
|
|
||||||
|
.nav-previous, .nav-next {
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
a {
|
||||||
|
margin: 10px 4px;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 30px;
|
||||||
|
//text-transform: uppercase;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background: @card_bg;
|
||||||
|
background: var(--card_bg);
|
||||||
|
color: @card_color;
|
||||||
|
color: var(--card_color);
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
transition: .2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .2s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-article, .single-page {
|
||||||
|
|
||||||
|
.entry-content {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 180%;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
padding-bottom: 60px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
|
||||||
|
p {
|
||||||
|
padding-left: 20px;
|
||||||
|
border-left: 2px solid @body_color;
|
||||||
|
border-left: 2px solid var(--body_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-article {
|
||||||
|
|
||||||
|
.related-posts {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.previous-post, .next-post {
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
height: 300px;
|
||||||
|
flex: 1;
|
||||||
|
align-items: center;
|
||||||
|
color: white !important;
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.background {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.filter {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #000;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
padding: 40px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 400;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 38px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.comments-section {
|
||||||
|
background: @body_bg;
|
||||||
|
background: var(--body_bg);
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
padding-top: 60px;
|
||||||
|
|
||||||
|
#disqus_thread {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-reply-title {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-form {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
padding-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
display: block;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 0;
|
||||||
|
background: @comment_form_bg;
|
||||||
|
background: var(--comment_form_bg);
|
||||||
|
color: @comment_form_color;
|
||||||
|
color: var(--comment_form_color);
|
||||||
|
border: 1px solid rgba(0,0,0,.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-form-comment {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-infos {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
input {
|
||||||
|
flex: 1;
|
||||||
|
border: 1px solid rgba(0,0,0,.4);
|
||||||
|
border-top: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 10px;
|
||||||
|
background: @comment_form_bg;
|
||||||
|
background: var(--comment_form_bg);
|
||||||
|
color: @comment_form_color;
|
||||||
|
color: var(--comment_form_color);
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-submit {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
input {
|
||||||
|
display: inline-block;
|
||||||
|
background: @post_comment_btn_bg;
|
||||||
|
background: var(--post_comment_btn_bg);
|
||||||
|
border: 2px solid rgba(0,0,0,0);
|
||||||
|
color: @post_comment_btn_color;
|
||||||
|
color: var(--post_comment_btn_color);
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
font-size: 16px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 220px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 25px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 20px;
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.comments-list-container {
|
||||||
|
padding: 60px 10px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
padding: 30px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.comment-list {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: auto;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li.comment {
|
||||||
|
display: block;
|
||||||
|
background: @comment_bg;
|
||||||
|
background: var(--comment_bg);
|
||||||
|
color: @comment_color;
|
||||||
|
color: var(--comment_color);
|
||||||
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
box-shadow: 0 2px 4px rgba(0,0,0,.2);
|
||||||
|
margin: 30px 0;
|
||||||
|
|
||||||
|
|
||||||
|
&.bypostauthor {
|
||||||
|
border-left: 4px solid @comment_color;
|
||||||
|
border-left: 4px solid var(--comment_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.comment-author-profil-picture {
|
||||||
|
img {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-meta {
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-top: -5px;
|
||||||
|
|
||||||
|
.author-name {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posted-on {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.children {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
margin-left: 30px;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li.comment {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
71
assets/less/_custom-properties.less
Normal file
71
assets/less/_custom-properties.less
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
// out: ../css/custom-properties.css
|
||||||
|
|
||||||
|
body {
|
||||||
|
|
||||||
|
// SHADOW
|
||||||
|
--shadow: 0px 2px 4px rgba(0,0,0,.1);
|
||||||
|
--deeper_shadow: 0px 2px 8px rgba(0,0,0,.15);
|
||||||
|
// FONTS
|
||||||
|
--lato: 'Lato', sans-serif;
|
||||||
|
--fjalla: 'Fjalla One', sans-serif;
|
||||||
|
|
||||||
|
&.light-theme {
|
||||||
|
// COLORS
|
||||||
|
--top_bar_color: #2E3B4F;
|
||||||
|
--body_color: #2E3B4F;
|
||||||
|
--footer_color: #2E3B4F;
|
||||||
|
--card_color: #2E3B4F;
|
||||||
|
--link_color: #4B828E;
|
||||||
|
--link_hover_color: darken(#4B828E, 10%);
|
||||||
|
--tag_color: #4B828E;
|
||||||
|
--tag_hover_color: darken(#4B828E, 10%);
|
||||||
|
--search_widget_color: #2E3B4F;
|
||||||
|
--read_more_btn_color: #2E3B4F;
|
||||||
|
--comment_form_color: #2E3B4F;
|
||||||
|
--comment_color: #2E3B4F;
|
||||||
|
--post_comment_btn_color: #2E3B4F;
|
||||||
|
// BACKGROUNDS
|
||||||
|
--top_bar_bg: #FFF;
|
||||||
|
--body_bg: #FAFBFB;
|
||||||
|
--very_opaque_header_bg: linear-gradient(to top, rgba(250, 251, 251, 1), rgba(250, 251, 251, 0.9));
|
||||||
|
--opaque_header_bg: linear-gradient(to top, rgba(250, 251, 251, 1), rgba(250, 251, 251, 0.6));
|
||||||
|
--less_opaque_header_bg: linear-gradient(to top, rgba(250, 251, 251, 1), rgba(250, 251, 251, 0.4));
|
||||||
|
--footer_bg: #FFF;
|
||||||
|
--card_bg: #FFF;
|
||||||
|
--search_widget_bg: #f5f4f4;
|
||||||
|
--read_more_btn_bg: #F5F5F5;
|
||||||
|
--comment_form_bg: #FFF;
|
||||||
|
--comment_bg: #FFF;
|
||||||
|
--post_comment_btn_bg: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.dark-theme {
|
||||||
|
// COLORS
|
||||||
|
--top_bar_color: #F7F9FE;
|
||||||
|
--body_color: #F7F9FE;
|
||||||
|
--footer_color: #F7F9FE;
|
||||||
|
--card_color: #2E3B4F;
|
||||||
|
--link_color: #6db1c0;
|
||||||
|
--link_hover_color: darken(#6db1c0, 10%);
|
||||||
|
--tag_color: #6db1c0;
|
||||||
|
--tag_hover_color: darken(#6db1c0, 10%);
|
||||||
|
--search_widget_color: #F7F9FE;
|
||||||
|
--read_more_btn_color: #F7F9FE;
|
||||||
|
--comment_form_color: #2E3B4F;
|
||||||
|
--comment_color: #2E3B4F;
|
||||||
|
--post_comment_btn_color: #2E3B4F;
|
||||||
|
// BACKGROUNDS
|
||||||
|
--top_bar_bg: #232730;
|
||||||
|
--body_bg: #1d2027;
|
||||||
|
--very_opaque_header_bg: linear-gradient(to top, rgba(29, 32, 39, 1), rgba(29, 32, 39, 0.9));
|
||||||
|
--opaque_header_bg: linear-gradient(to top, rgba(29, 32, 39, 1), rgba(29, 32, 39, 0.6));
|
||||||
|
--less_opaque_header_bg: linear-gradient(to top, rgba(29, 32, 39, 1), rgba(29, 32, 39, 0.4));
|
||||||
|
--footer_bg: #232730;
|
||||||
|
--card_bg: #FFF;
|
||||||
|
--search_widget_bg: #15181d;
|
||||||
|
--read_more_btn_bg: rgb(56, 67, 90);
|
||||||
|
--comment_form_bg: #FFF;
|
||||||
|
--comment_bg: #FFF;
|
||||||
|
--post_comment_btn_bg: #FFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
149
assets/less/_footer.less
Normal file
149
assets/less/_footer.less
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.site-footer {
|
||||||
|
width: 100%;
|
||||||
|
padding: 60px 0;
|
||||||
|
background: @footer_bg;
|
||||||
|
background: var(--footer_bg);
|
||||||
|
color: @footer_color;
|
||||||
|
color: var(--footer_color);
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
|
||||||
|
.widgets-area {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 1260px;
|
||||||
|
margin: auto;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widgets-column {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0px 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.widget-title {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 22px;
|
||||||
|
//font-family: var(--fjalla);
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tagcloud {
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-size: 16px !important;
|
||||||
|
color: @tag_color;
|
||||||
|
color: var(--tag_color);
|
||||||
|
border: 1px solid @tag_color;
|
||||||
|
border: 1px solid var(--tag_color);
|
||||||
|
padding: 5px 8px;
|
||||||
|
line-height: 38px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: @tag_hover_color;
|
||||||
|
color: var(--tag_hover_color);
|
||||||
|
border: 1px solid @tag_hover_color;
|
||||||
|
border: 1px solid var(--tag_hover_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget_search {
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.search-field {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 30px;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
color: @search_widget_color;
|
||||||
|
color: var(--search_widget_color);
|
||||||
|
background: @search_widget_bg;
|
||||||
|
background: var(--search_widget_bg);
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
right: 15px;
|
||||||
|
stroke: @search_widget_color;
|
||||||
|
stroke: var(--search_widget_color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden-submit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright-area {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-back-to-top-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
background: @card_bg;
|
||||||
|
background: var(--card_bg);
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
transition: .1s;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
stroke: @card_color;
|
||||||
|
stroke: var(--card_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.visible {
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
|
transition: .3s;
|
||||||
|
}
|
||||||
|
}
|
||||||
52
assets/less/_general-elements.less
Normal file
52
assets/less/_general-elements.less
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
margin: 0;
|
||||||
|
background: @body_bg;
|
||||||
|
background: var(--body_bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullwidth-container, .super-large-container, .large-container, .medium-container {
|
||||||
|
&.top-and-bottom-margin {
|
||||||
|
margin: 60px auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullwidth-container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.super-large-container {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 1260px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large-container {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.medium-container {
|
||||||
|
position: relative;
|
||||||
|
width: 95%;
|
||||||
|
max-width: 660px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @link_color;
|
||||||
|
color: var(--link_color);
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:visited, &:focus {
|
||||||
|
color: @link_color;
|
||||||
|
color: var(--link_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: @link_hover_color;
|
||||||
|
color: var(--link_hover_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
assets/less/_gutenberg.less
Normal file
26
assets/less/_gutenberg.less
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.entry-content {
|
||||||
|
> *:not(.alignfull), > *:not(.alignwide) {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin-left: auto !important;
|
||||||
|
margin-right: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignfull {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignwide {
|
||||||
|
max-width: 1160px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-block-cover {
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
139
assets/less/_header.less
Normal file
139
assets/less/_header.less
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.article-header {
|
||||||
|
text-align: center;
|
||||||
|
margin: 120px auto;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
|
||||||
|
@media screen and (max-width: @phone) {
|
||||||
|
margin: 70px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-categories {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.article-category {
|
||||||
|
display: inline-block;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: .3;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: .6;
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-title {
|
||||||
|
font-size: 48px;
|
||||||
|
line-height: 160%;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @phone) {
|
||||||
|
font-size: 42px;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
opacity: 1;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
|
||||||
|
.author-picture {
|
||||||
|
display: inline-block;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-article {
|
||||||
|
.article-featured-image {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
text-align: center;
|
||||||
|
margin: 120px auto;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
|
||||||
|
@media screen and (max-width: @phone) {
|
||||||
|
margin: 70px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: .3;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.meow-breadcrumb .breadcrumb-items-container {
|
||||||
|
|
||||||
|
.breadcrumb-item {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: .3;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: .6;
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
opacity: .3;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
font-size: 48px;
|
||||||
|
line-height: 160%;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @phone) {
|
||||||
|
font-size: 42px;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-featured-image {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
253
assets/less/_meow-blocks.less
Normal file
253
assets/less/_meow-blocks.less
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.mwt-section-header {
|
||||||
|
width: 90% !important;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
position: relative;
|
||||||
|
width: auto !important;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28px;
|
||||||
|
color: @body_color;
|
||||||
|
color: var(--body_color);
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
z-index: -9;
|
||||||
|
bottom: -5px;
|
||||||
|
width: 120%;
|
||||||
|
left: -10%;
|
||||||
|
height: 20px;
|
||||||
|
background: @body_color;
|
||||||
|
background: var(--body_color);
|
||||||
|
opacity: .05;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.collections-list {
|
||||||
|
margin-left: -10px;
|
||||||
|
margin-right: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-card-container {
|
||||||
|
display: inline-block;
|
||||||
|
width: 25%;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
width: 33.33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-card {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.background {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
|
||||||
|
color: white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 18px;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 140%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-meta {
|
||||||
|
font-size: 13px;
|
||||||
|
opacity: .5;
|
||||||
|
margin-top: -5px;
|
||||||
|
line-height: 1em;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
stroke: white;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-top: -3px;
|
||||||
|
margin-right: 5px;
|
||||||
|
height: 22px;
|
||||||
|
width: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.folders-list {
|
||||||
|
margin-left: -10px;
|
||||||
|
margin-right: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder-card-container {
|
||||||
|
display: inline-block;
|
||||||
|
width: 25%;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
@media screen and (max-width: @tablet) {
|
||||||
|
width: 33.33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @big_phone) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder-card {
|
||||||
|
width: 100%;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: @deeper_shadow;
|
||||||
|
box-shadow: var(--deeper_shadow);
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 66.66%;
|
||||||
|
|
||||||
|
a {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
background: #222;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
background: @card_bg;
|
||||||
|
background: var(--card_bg);
|
||||||
|
padding: 10px 20px;
|
||||||
|
height: 110px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 140%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @card_color;
|
||||||
|
color: var(--card_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.folder-meta {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1em;
|
||||||
|
opacity: .5;
|
||||||
|
margin-top: -5px;
|
||||||
|
color: @card_color;
|
||||||
|
color: var(--card_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mwt-keywords {
|
||||||
|
width: 90% !important;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
.mwt-tags-cloud {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 16px !important;
|
||||||
|
color: @tag_color;
|
||||||
|
color: var(--tag_color);
|
||||||
|
border: 1px solid @tag_color;
|
||||||
|
border: 1px solid var(--tag_color);
|
||||||
|
padding: 0px 10px;
|
||||||
|
line-height: 38px;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin: 3px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: @tag_hover_color;
|
||||||
|
color: var(--tag_hover_color);
|
||||||
|
border: 1px solid @tag_hover_color;
|
||||||
|
border: 1px solid var(--tag_hover_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mwt-search {
|
||||||
|
position: relative;
|
||||||
|
width: 90% !important;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
form.search-form {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.mwt-search {
|
||||||
|
width: 100% !important;
|
||||||
|
border-radius: 30px;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
background: @search_widget_bg;
|
||||||
|
background: var(--search_widget_bg);
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
right: 15px;
|
||||||
|
stroke: @footer_color;
|
||||||
|
stroke: var(--footer_color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden-submit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
34
assets/less/_photography.less
Normal file
34
assets/less/_photography.less
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.opaque-featured-image-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 400px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
|
.featured-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter {
|
||||||
|
width: 100%;
|
||||||
|
height: 400px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
background: @opaque_header_bg;
|
||||||
|
background: var(--opaque_header_bg);
|
||||||
|
|
||||||
|
&.less-opaque {
|
||||||
|
background: @less_opaque_header_bg;
|
||||||
|
background: var(--less_opaque_header_bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.very-opaque {
|
||||||
|
background: @very_opaque_header_bg;
|
||||||
|
background: var(--very_opaque_header_bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
assets/less/_theme-info.less
Normal file
23
assets/less/_theme-info.less
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Theme Name: Yuzu
|
||||||
|
Theme URI: https://meowapps.con/themes/yuzu/
|
||||||
|
Author: MeowApps
|
||||||
|
Author URI: https://meowapps.con/
|
||||||
|
Description: Fresh, small but not yellow, this theme has been designed for photographers, by photographers!
|
||||||
|
Version: 0.1.0
|
||||||
|
License: GNU General Public License v2 or later
|
||||||
|
License URI: LICENSE
|
||||||
|
Text Domain: yuzu
|
||||||
|
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
|
||||||
|
|
||||||
|
This theme, like WordPress, is licensed under the GPL.
|
||||||
|
Use it to make something cool, have fun, and share what you've learned with others.
|
||||||
|
|
||||||
|
Yuzu is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc.
|
||||||
|
Underscores is distributed under the terms of the GNU GPL v2 or later.
|
||||||
|
|
||||||
|
Normalizing styles have been helped along thanks to the fine work of
|
||||||
|
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
|
||||||
|
*/
|
||||||
389
assets/less/_top-bar.less
Normal file
389
assets/less/_top-bar.less
Normal file
@@ -0,0 +1,389 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
.top-search-bar-container {
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
width: 100%;
|
||||||
|
height: 60px;
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
border-bottom: 1px solid rgba(0,0,0,.1);
|
||||||
|
margin-top: -60px;
|
||||||
|
transition: .2s;
|
||||||
|
|
||||||
|
&.opened {
|
||||||
|
margin-top: 0px;
|
||||||
|
transition: .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.super-large-container {
|
||||||
|
position: relative;
|
||||||
|
height: 60px;
|
||||||
|
|
||||||
|
form {
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 60px;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
outline: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-top-bar-search {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
height: 30px;
|
||||||
|
margin-top: -15px;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: .5;
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
stroke: @top_bar_color;
|
||||||
|
stroke: var(--top_bar_color);
|
||||||
|
stroke-width: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-header {
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
@header_height: 60px;
|
||||||
|
width: 100%;
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
height: @header_height;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
|
||||||
|
.top-bar-content {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.site-branding {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 300px;
|
||||||
|
|
||||||
|
.site-logo {
|
||||||
|
height: 50px;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
a, img {
|
||||||
|
height: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: @header_height;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @top_bar_color;
|
||||||
|
color: var(--top_bar_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-navigation {
|
||||||
|
flex: 1;
|
||||||
|
line-height: @header_height;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
.menu-main-menu-container {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
@media screen and (max-width: 860px) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
list-style: none;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
&.current-menu-item {
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @top_bar_color;
|
||||||
|
color: var(--top_bar_color);
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
li a {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
right: 0;
|
||||||
|
margin-top: -1px;
|
||||||
|
margin-right: -20px;
|
||||||
|
transition: .1s;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
&.current-menu-item {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, &.current-menu-item > ul, &:hover > ul {
|
||||||
|
position: relative;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-left: 1px solid rgba(0,0,0,.4);
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
a {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.current-menu-item {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, &.current-menu-item > ul, &:hover > ul {
|
||||||
|
position: relative;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-left: 1px solid rgba(0,0,0,.4);
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
a {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.current-menu-item {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
a {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: -2px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.open-top-bar-search, .close-top-bar-search {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 20px;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: @header_height;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: .5;
|
||||||
|
transition: .1s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
display: inline-block;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
line-height: @header_height;
|
||||||
|
stroke: @top_bar_color;
|
||||||
|
stroke: var(--top_bar_color);
|
||||||
|
stroke-width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
stroke-width: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-navigation {
|
||||||
|
position: relative;
|
||||||
|
z-index: 9;
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
//background: var(--top_bar_bg);
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
@media screen and (max-width: 860px) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-navigation {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 30px 0;
|
||||||
|
margin: auto;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
line-height: 200%;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @top_bar_color;
|
||||||
|
color: var(--top_bar_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding-left: 30px;
|
||||||
|
border-left: 1px dashed #e6e6e6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-navigation-toggle {
|
||||||
|
position: absolute;
|
||||||
|
height: 40px;
|
||||||
|
width: 60px;
|
||||||
|
background: @top_bar_bg;
|
||||||
|
background: var(--top_bar_bg);
|
||||||
|
color: @top_bar_color;
|
||||||
|
color: var(--top_bar_color);
|
||||||
|
bottom: -40px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -30px;
|
||||||
|
line-height: 40px;
|
||||||
|
box-shadow: @shadow;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 0 0 8px 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.open-icon, .close-icon {
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
stroke: @top_bar_color;
|
||||||
|
stroke: var(--top_bar_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
.close-icon {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.open-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
39
assets/less/_variables.less
Normal file
39
assets/less/_variables.less
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
// RESPONSIVENESS
|
||||||
|
@phone: 320px; // iPhone 6,7,8
|
||||||
|
@big_phone: 376px; // iPhone X
|
||||||
|
@tablet: 768px; // iPad
|
||||||
|
@big_tablet: 1024px; // iPad Pro
|
||||||
|
|
||||||
|
|
||||||
|
// These variables will be used by browsers that can't support custom properties ( IE )
|
||||||
|
@shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
@deeper_shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
@lato: 'Lato', sans-serif;
|
||||||
|
@top_bar_color: #2E3B4F;
|
||||||
|
@body_color: #2E3B4F;
|
||||||
|
@footer_color: #2E3B4F;
|
||||||
|
@card_color: #2E3B4F;
|
||||||
|
@link_color: #4B828E;
|
||||||
|
@link_hover_color: #39636d;
|
||||||
|
@tag_color: #4B828E;
|
||||||
|
@tag_hover_color: #39636d;
|
||||||
|
@search_widget_color: #2E3B4F;
|
||||||
|
@read_more_btn_color: #2E3B4F;
|
||||||
|
@comment_form_color: #2E3B4F;
|
||||||
|
@comment_color: #2E3B4F;
|
||||||
|
@post_comment_btn_color: #2E3B4F;
|
||||||
|
@top_bar_bg: #FFF;
|
||||||
|
@body_bg: #FAFBFB;
|
||||||
|
@very_opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.9));
|
||||||
|
@opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.6));
|
||||||
|
@less_opaque_header_bg: linear-gradient(to top, #fafbfb, rgba(250, 251, 251, 0.4));
|
||||||
|
@footer_bg: #FFF;
|
||||||
|
@card_bg: #FFF;
|
||||||
|
@search_widget_bg: #f5f4f4;
|
||||||
|
@read_more_btn_bg: #F5F5F5;
|
||||||
|
@comment_form_bg: #FFF;
|
||||||
|
@comment_bg: #FFF;
|
||||||
|
@post_comment_btn_bg: #FFF;
|
||||||
|
|
||||||
955
assets/less/_wordpress.less
Normal file
955
assets/less/_wordpress.less
Normal file
@@ -0,0 +1,955 @@
|
|||||||
|
// main: style.less
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
>>> TABLE OF CONTENTS:
|
||||||
|
----------------------------------------------------------------
|
||||||
|
# Normalize
|
||||||
|
# Typography
|
||||||
|
# Elements
|
||||||
|
# Forms
|
||||||
|
# Navigation
|
||||||
|
## Links
|
||||||
|
## Menus
|
||||||
|
# Accessibility
|
||||||
|
# Alignments
|
||||||
|
# Clearings
|
||||||
|
# Widgets
|
||||||
|
# Content
|
||||||
|
## Posts and pages
|
||||||
|
## Comments
|
||||||
|
# Infinite scroll
|
||||||
|
# Media
|
||||||
|
## Captions
|
||||||
|
## Galleries
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Normalize
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/* normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||||
|
|
||||||
|
/* Document
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the line height in all browsers.
|
||||||
|
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1.15; /* 1 */
|
||||||
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sections
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the margin in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct the font size and margin on `h1` elements within `section` and
|
||||||
|
* `article` contexts in Chrome, Firefox, and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Grouping content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Add the correct box sizing in Firefox.
|
||||||
|
* 2. Show the overflow in Edge and IE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box; /* 1 */
|
||||||
|
height: 0; /* 1 */
|
||||||
|
overflow: visible; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||||
|
* 2. Correct the odd `em` font sizing in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
font-family: monospace, monospace; /* 1 */
|
||||||
|
font-size: 1em; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Text-level semantics
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the gray background on active links in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Remove the bottom border in Chrome 57-
|
||||||
|
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: none; /* 1 */
|
||||||
|
text-decoration: underline; /* 2 */
|
||||||
|
text-decoration: underline dotted; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||||
|
* 2. Correct the odd `em` font sizing in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, monospace; /* 1 */
|
||||||
|
font-size: 1em; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the correct font size in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||||
|
* all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Embedded content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the border on images inside links in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Change the font styles in all browsers.
|
||||||
|
* 2. Remove the margin in Firefox and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
optgroup,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-family: inherit; /* 1 */
|
||||||
|
font-size: 100%; /* 1 */
|
||||||
|
line-height: 1.15; /* 1 */
|
||||||
|
margin: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the overflow in IE.
|
||||||
|
* 1. Show the overflow in Edge.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input { /* 1 */
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||||
|
* 1. Remove the inheritance of text transform in Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
select { /* 1 */
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct the inability to style clickable types in iOS and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type="button"],
|
||||||
|
[type="reset"],
|
||||||
|
[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the inner border and padding in Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
|
border-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restore the focus styles unset by the previous rule.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button:-moz-focusring,
|
||||||
|
[type="button"]:-moz-focusring,
|
||||||
|
[type="reset"]:-moz-focusring,
|
||||||
|
[type="submit"]:-moz-focusring {
|
||||||
|
outline: 1px dotted ButtonText;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct the padding in Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
padding: 0.35em 0.75em 0.625em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the text wrapping in Edge and IE.
|
||||||
|
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||||
|
* 3. Remove the padding so developers are not caught out when they zero out
|
||||||
|
* `fieldset` elements in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
legend {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
color: inherit; /* 2 */
|
||||||
|
display: table; /* 1 */
|
||||||
|
max-width: 100%; /* 1 */
|
||||||
|
padding: 0; /* 3 */
|
||||||
|
white-space: normal; /* 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||||
|
*/
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the default vertical scrollbar in IE 10+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Add the correct box sizing in IE 10.
|
||||||
|
* 2. Remove the padding in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[type="checkbox"],
|
||||||
|
[type="radio"] {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the odd appearance in Chrome and Safari.
|
||||||
|
* 2. Correct the outline style in Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
-webkit-appearance: textfield; /* 1 */
|
||||||
|
outline-offset: -2px; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the inner padding in Chrome and Safari on macOS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||||
|
* 2. Change font properties to `inherit` in Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
-webkit-appearance: button; /* 1 */
|
||||||
|
font: inherit; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Interactive
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
details {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add the correct display in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Misc
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the correct display in IE 10+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the correct display in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Typography
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
body,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
color: #404040;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 16px;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dfn, cite, em, i {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: #eee;
|
||||||
|
font-family: "Courier 10 Pitch", Courier, monospace;
|
||||||
|
font-size: 15px;
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin-bottom: 1.6em;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 1.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
code, kbd, tt, var {
|
||||||
|
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
|
||||||
|
font-size: 15px;
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr, acronym {
|
||||||
|
border-bottom: 1px dotted #666;
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark, ins {
|
||||||
|
background: #fff9c0;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
big {
|
||||||
|
font-size: 125%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Elements
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
html {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*:before,
|
||||||
|
*:after {
|
||||||
|
/* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: #fff;
|
||||||
|
/* Fallback for when there is no custom background color defined. */
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
background-color: #ccc;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin: 0 0 1.5em 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
li > ul,
|
||||||
|
li > ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin: 0 1.5em 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: auto;
|
||||||
|
/* Make sure images are scaled correctly. */
|
||||||
|
max-width: 100%;
|
||||||
|
/* Adhere to container width. */
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 1em 0;
|
||||||
|
/* Extra wide images within figure tags don't overflow the content area. */
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Forms
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
button,
|
||||||
|
input[type="button"],
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="submit"] {
|
||||||
|
border: 1px solid;
|
||||||
|
border-color: #ccc #ccc #bbb;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #e6e6e6;
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
font-size: 12px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1;
|
||||||
|
padding: .6em 1em .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover,
|
||||||
|
input[type="button"]:hover,
|
||||||
|
input[type="reset"]:hover,
|
||||||
|
input[type="submit"]:hover {
|
||||||
|
border-color: #ccc #bbb #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active, button:focus,
|
||||||
|
input[type="button"]:active,
|
||||||
|
input[type="button"]:focus,
|
||||||
|
input[type="reset"]:active,
|
||||||
|
input[type="reset"]:focus,
|
||||||
|
input[type="submit"]:active,
|
||||||
|
input[type="submit"]:focus {
|
||||||
|
border-color: #aaa #bbb #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"],
|
||||||
|
input[type="email"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="password"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="range"],
|
||||||
|
input[type="date"],
|
||||||
|
input[type="month"],
|
||||||
|
input[type="week"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="datetime"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="color"],
|
||||||
|
textarea {
|
||||||
|
color: #666;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]:focus,
|
||||||
|
input[type="email"]:focus,
|
||||||
|
input[type="url"]:focus,
|
||||||
|
input[type="password"]:focus,
|
||||||
|
input[type="search"]:focus,
|
||||||
|
input[type="number"]:focus,
|
||||||
|
input[type="tel"]:focus,
|
||||||
|
input[type="range"]:focus,
|
||||||
|
input[type="date"]:focus,
|
||||||
|
input[type="month"]:focus,
|
||||||
|
input[type="week"]:focus,
|
||||||
|
input[type="time"]:focus,
|
||||||
|
input[type="datetime"]:focus,
|
||||||
|
input[type="datetime-local"]:focus,
|
||||||
|
input[type="color"]:focus,
|
||||||
|
textarea:focus {
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Navigation
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Links
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
a {
|
||||||
|
color: royalblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: purple;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover, a:focus, a:active {
|
||||||
|
color: midnightblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
outline: thin dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover, a:active {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Menus
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.main-navigation {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul {
|
||||||
|
display: none;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul ul {
|
||||||
|
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
|
||||||
|
float: left;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: -999em;
|
||||||
|
z-index: 99999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul ul ul {
|
||||||
|
left: -999em;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul ul li:hover > ul,
|
||||||
|
.main-navigation ul ul li.focus > ul {
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul ul a {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul li:hover > ul,
|
||||||
|
.main-navigation ul li.focus > ul {
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation li {
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Small menu. */
|
||||||
|
.menu-toggle,
|
||||||
|
.main-navigation.toggled ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 37.5em) {
|
||||||
|
.menu-toggle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.main-navigation ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-main .comment-navigation, .site-main
|
||||||
|
.posts-navigation, .site-main
|
||||||
|
.post-navigation {
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-navigation .nav-previous,
|
||||||
|
.posts-navigation .nav-previous,
|
||||||
|
.post-navigation .nav-previous {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-navigation .nav-next,
|
||||||
|
.posts-navigation .nav-next,
|
||||||
|
.post-navigation .nav-next {
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Accessibility
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/* Text meant only for screen readers. */
|
||||||
|
.screen-reader-text {
|
||||||
|
border: 0;
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
clip-path: inset(50%);
|
||||||
|
height: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute !important;
|
||||||
|
width: 1px;
|
||||||
|
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-reader-text:focus {
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
||||||
|
clip: auto !important;
|
||||||
|
clip-path: none;
|
||||||
|
color: #21759b;
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: bold;
|
||||||
|
height: auto;
|
||||||
|
left: 5px;
|
||||||
|
line-height: normal;
|
||||||
|
padding: 15px 23px 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
top: 5px;
|
||||||
|
width: auto;
|
||||||
|
z-index: 100000;
|
||||||
|
/* Above WP toolbar. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Do not show the outline on the skip link target. */
|
||||||
|
#content[tabindex="-1"]:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Alignments
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.alignleft {
|
||||||
|
display: inline;
|
||||||
|
float: left;
|
||||||
|
margin-right: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignright {
|
||||||
|
display: inline;
|
||||||
|
float: right;
|
||||||
|
margin-left: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aligncenter {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Clearings
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.clear:before,
|
||||||
|
.clear:after,
|
||||||
|
.entry-content:before,
|
||||||
|
.entry-content:after,
|
||||||
|
.comment-content:before,
|
||||||
|
.comment-content:after,
|
||||||
|
.site-header:before,
|
||||||
|
.site-header:after,
|
||||||
|
.site-content:before,
|
||||||
|
.site-content:after,
|
||||||
|
.site-footer:before,
|
||||||
|
.site-footer:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear:after,
|
||||||
|
.entry-content:after,
|
||||||
|
.comment-content:after,
|
||||||
|
.site-header:after,
|
||||||
|
.site-content:after,
|
||||||
|
.site-footer:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Widgets
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.widget {
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
/* Make sure select elements fit in widgets. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget select {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Content
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Posts and pages
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.sticky {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updated:not(.published) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-links {
|
||||||
|
clear: both;
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Comments
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.comment-content a {
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bypostauthor {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Infinite scroll
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
/* Globally hidden elements when Infinite Scroll is supported and in use. */
|
||||||
|
.infinite-scroll .posts-navigation,
|
||||||
|
.infinite-scroll.neverending .site-footer {
|
||||||
|
/* Theme Footer (when set to scrolling) */
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before. */
|
||||||
|
.infinity-end.neverending .site-footer {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
# Media
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.page-content .wp-smiley,
|
||||||
|
.entry-content .wp-smiley,
|
||||||
|
.comment-content .wp-smiley {
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure embeds and iframes fit their containers. */
|
||||||
|
embed,
|
||||||
|
iframe,
|
||||||
|
object {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure logo link wraps around logo image. */
|
||||||
|
.custom-logo-link {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Captions
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.wp-caption {
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-caption img[class*="wp-image-"] {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-caption .wp-caption-text {
|
||||||
|
margin: 0.8075em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-caption-text {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------
|
||||||
|
## Galleries
|
||||||
|
--------------------------------------------------------------*/
|
||||||
|
.gallery {
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-item {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-2 .gallery-item {
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-3 .gallery-item {
|
||||||
|
max-width: 33.33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-4 .gallery-item {
|
||||||
|
max-width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-5 .gallery-item {
|
||||||
|
max-width: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-6 .gallery-item {
|
||||||
|
max-width: 16.66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-7 .gallery-item {
|
||||||
|
max-width: 14.28%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-8 .gallery-item {
|
||||||
|
max-width: 12.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-columns-9 .gallery-item {
|
||||||
|
max-width: 11.11%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery-caption {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
13
assets/less/editor-style.less
Normal file
13
assets/less/editor-style.less
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// out: ../css/editor-style.css
|
||||||
|
|
||||||
|
@import url('https://fonts.googleapis.com/css?family=Lato:400&display=swap');
|
||||||
|
|
||||||
|
.edit-post-visual-editor {
|
||||||
|
font-family: 'Lato', sans-serif !important;
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 18px !important;
|
||||||
|
line-height: 180% !important;
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
assets/less/style.less
Normal file
19
assets/less/style.less
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// out: ../../style.css
|
||||||
|
|
||||||
|
// Importing Google Fonts
|
||||||
|
@import url('https://fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap');
|
||||||
|
|
||||||
|
// Importing LESS
|
||||||
|
@import '_theme-info';
|
||||||
|
@import '_variables';
|
||||||
|
@import '_wordpress';
|
||||||
|
@import '_general-elements';
|
||||||
|
@import '_gutenberg';
|
||||||
|
@import '_blog';
|
||||||
|
@import '_photography';
|
||||||
|
@import '_meow-blocks';
|
||||||
|
@import '_article-cards';
|
||||||
|
@import '_footer';
|
||||||
|
|
||||||
|
@import '_top-bar';
|
||||||
|
@import '_header';
|
||||||
65
attachment.php
Normal file
65
attachment.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-attachment large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
$image_meta = wp_get_attachment_metadata($post->ID);
|
||||||
|
$image_infos = get_post($post->ID);
|
||||||
|
$image_src = wp_get_attachment_image_src($post->ID, 'full')[0];
|
||||||
|
$image_title = $post->post_title;
|
||||||
|
$image_description = $post->post_content;
|
||||||
|
|
||||||
|
$image_tags = get_the_terms($post, 'attachment_keyword');
|
||||||
|
$tag_cloud_markup = "";
|
||||||
|
if(count($image_tags) > 1) {
|
||||||
|
$tag_cloud_markup = "<div class='mwt-keywords'><div class='mwt-tags-cloud'>";
|
||||||
|
foreach($image_tags as $tag) {
|
||||||
|
$tag_cloud_markup .= "<a class='tag' href='".get_term_link($tag)."'>
|
||||||
|
".$tag->name."
|
||||||
|
</a>";
|
||||||
|
}
|
||||||
|
$tag_cloud_markup .= "</div></div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Keyword', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_the_title(); ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-content">
|
||||||
|
<img src="<?php echo $image_src; ?>" style="display: block; margin: auto">
|
||||||
|
<p>
|
||||||
|
<?php if( has_excerpt() ) {
|
||||||
|
echo get_the_excerpt();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<div class="mwt-section-header">
|
||||||
|
<h3><?php _e('Description', 'yuzu'); ?></h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<?= $image_description; ?>
|
||||||
|
</p>
|
||||||
|
<div class="mwt-section-header">
|
||||||
|
<h3><?php _e('Keywords', 'yuzu'); ?></h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<?php echo $tag_cloud_markup; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
|
?>
|
||||||
75
author.php
Normal file
75
author.php
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Articles written by', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_user_by( 'slug', get_query_var( 'author_name' ) )->display_name; ?></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="articles-list large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) :
|
||||||
|
|
||||||
|
/* Start the Loop */
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
endwhile;
|
||||||
|
|
||||||
|
the_posts_navigation();
|
||||||
|
|
||||||
|
else :
|
||||||
|
|
||||||
|
_e('No posts found!', 'yuzu');
|
||||||
|
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
83
category.php
Normal file
83
category.php
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying a category
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Category', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="articles-list large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) :
|
||||||
|
|
||||||
|
/* Start the Loop */
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
endwhile;
|
||||||
|
|
||||||
|
the_posts_navigation();
|
||||||
|
|
||||||
|
else :
|
||||||
|
|
||||||
|
_e('No posts found!', 'yuzu');
|
||||||
|
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
3853
class-tgm-plugin-activation.php
Normal file
3853
class-tgm-plugin-activation.php
Normal file
File diff suppressed because it is too large
Load Diff
55
comments.php
Normal file
55
comments.php
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* If the current post is protected by a password and
|
||||||
|
* the visitor has not yet entered the password we will
|
||||||
|
* return early without loading the comments.
|
||||||
|
*/
|
||||||
|
if ( post_password_required() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="comments" class="comments-area">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$args = array(
|
||||||
|
'fields' => apply_filters(
|
||||||
|
'comment_form_default_fields', array(
|
||||||
|
'author' =>'<input id="author" name="author" type="text" placeholder="Name" value="' . esc_attr( $commenter['comment_author'] ) . '" />',
|
||||||
|
'email' => '<input id="email" name="email" type="text" placeholder="Email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" />',
|
||||||
|
'url' => '<input id="url" name="url" type="text" placeholder="Website" value="' . esc_attr( $commenter['comment_author_url'] ) . '" /></div>'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'comment_field' => '<p class="comment-form-comment">' .
|
||||||
|
'<textarea id="comment" name="comment" placeholder="'.__('Write an answer ...', 'yuzu').'" cols="45" rows="7" aria-required="true"></textarea>' .
|
||||||
|
'</p>',
|
||||||
|
'comment_notes' => '',
|
||||||
|
'comment_notes_after' => '<div class="user-infos"><button type="submit" class="submit-button"><span>'.__('Post', 'yuzu').'</span></button>',
|
||||||
|
'title_reply' => ''
|
||||||
|
);
|
||||||
|
comment_form($args);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ( have_comments() ) : ?>
|
||||||
|
|
||||||
|
<?php the_comments_navigation(); ?>
|
||||||
|
|
||||||
|
<div class="comments-list-container">
|
||||||
|
<ol class="comment-list">
|
||||||
|
<?php
|
||||||
|
wp_list_comments( array(
|
||||||
|
'style' => 'ol',
|
||||||
|
'short_ping' => true,
|
||||||
|
'callback' => 'yuzu_comment_template'
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php the_comments_navigation();
|
||||||
|
|
||||||
|
endif; // Check for have_comments().
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div><!-- #comments -->
|
||||||
28
components/article-cards/large-article-card.php
Normal file
28
components/article-cards/large-article-card.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<div class="article-card-container large">
|
||||||
|
<div class="article-card">
|
||||||
|
<?php $featured_image = get_the_post_thumbnail_url(get_the_ID(),'large'); ?>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-featured-image" style="background-image: url(<?= $featured_image; ?>)"></a>
|
||||||
|
<div class="article-meta">
|
||||||
|
<div class="article-categories">
|
||||||
|
<?php
|
||||||
|
$post_categories = wp_get_post_categories( get_the_ID() );
|
||||||
|
foreach($post_categories as $c){
|
||||||
|
$cat = get_category( $c );
|
||||||
|
?>
|
||||||
|
<a href="<?= get_term_link($c); ?>" class="article-category">
|
||||||
|
<?= $cat->name; ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-title"><?= get_the_title(); ?></a>
|
||||||
|
<div class="article-excerpt">
|
||||||
|
<?= get_the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="read-more-btn">
|
||||||
|
<?php _e('Read More', 'yuzu'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
28
components/article-cards/medium-article-card.php
Normal file
28
components/article-cards/medium-article-card.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<div class="article-card-container medium">
|
||||||
|
<div class="article-card">
|
||||||
|
<?php $featured_image = get_the_post_thumbnail_url(get_the_ID(),'large'); ?>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-featured-image" style="background-image: url(<?= $featured_image; ?>)"></a>
|
||||||
|
<div class="article-meta">
|
||||||
|
<div class="article-categories">
|
||||||
|
<?php
|
||||||
|
$post_categories = wp_get_post_categories( get_the_ID() );
|
||||||
|
foreach($post_categories as $c){
|
||||||
|
$cat = get_category( $c );
|
||||||
|
?>
|
||||||
|
<a href="<?= get_term_link($c); ?>" class="article-category">
|
||||||
|
<?= $cat->name; ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-title"><?= get_the_title(); ?></a>
|
||||||
|
<div class="article-excerpt">
|
||||||
|
<?= get_the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="read-more-btn">
|
||||||
|
<?php _e('Read More', 'yuzu'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
28
components/article-cards/small-article-card.php
Normal file
28
components/article-cards/small-article-card.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<div class="article-card-container small">
|
||||||
|
<div class="article-card">
|
||||||
|
<?php $featured_image = get_the_post_thumbnail_url(get_the_ID(),'large'); ?>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-featured-image" style="background-image: url(<?= $featured_image; ?>)"></a>
|
||||||
|
<div class="article-meta">
|
||||||
|
<div class="article-categories">
|
||||||
|
<?php
|
||||||
|
$post_categories = wp_get_post_categories( get_the_ID() );
|
||||||
|
foreach($post_categories as $c){
|
||||||
|
$cat = get_category( $c );
|
||||||
|
?>
|
||||||
|
<a href="<?= get_term_link($c); ?>" class="article-category">
|
||||||
|
<?= $cat->name; ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="article-title"><?= get_the_title(); ?></a>
|
||||||
|
<div class="article-excerpt">
|
||||||
|
<?= get_the_excerpt(); ?>
|
||||||
|
</div>
|
||||||
|
<a href="<?= get_the_permalink(); ?>" class="read-more-btn">
|
||||||
|
<?php _e('Read More', 'yuzu'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
17
components/collection-card.php
Normal file
17
components/collection-card.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="collection-card-container">
|
||||||
|
<a href="<?= get_the_permalink( $collection['id'] ); ?>"
|
||||||
|
class="collection-card <?= get_theme_mod('collection-card-header-ratio', 'three-two'); ?>">
|
||||||
|
|
||||||
|
<div class="background" style="background-image: url('<?= get_the_post_thumbnail_url($collection['id'],'large'); ?>')"></div>
|
||||||
|
<div class="content">
|
||||||
|
<h3>
|
||||||
|
<?= $collection['name']; ?>
|
||||||
|
</h3>
|
||||||
|
<div class="collection-meta">
|
||||||
|
<?php get_template_part('assets/icons/inline', 'camera.svg'); ?>
|
||||||
|
<?= $collection['photos']; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
19
components/folder-card.php
Normal file
19
components/folder-card.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
$featured_image = wp_get_attachment_image_src($folder['thumbnail_id'], 'large')[0];
|
||||||
|
$term_object = get_term($folder['id']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="folder-card-container">
|
||||||
|
<div class="folder-card">
|
||||||
|
<div class="card-header">
|
||||||
|
<a href="<?= get_term_link($term_object); ?>" class="background three-two" style="background-image: url('<?= $featured_image; ?>')"></a>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h3><a href="<?= get_term_link($term_object); ?>"><?= $folder['name']; ?></a></h3>
|
||||||
|
<div class="folder-meta">
|
||||||
|
<?php $collections_count = $folder['collections']; ?>
|
||||||
|
<?php printf( esc_html( _n( '%d Collection', '%d Collections', $collections_count, 'yuzu' ) ), $folder['collections'] ); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
5
components/opaque-featured-image.php
Normal file
5
components/opaque-featured-image.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php $opacity_level = get_theme_mod('header_background_opacity', 'normal-opaque'); ?>
|
||||||
|
<div class="opaque-featured-image-container">
|
||||||
|
<div class="featured-image" style="background-image: url('<?= $featured_image; ?>');"></div>
|
||||||
|
<div class="filter <?= $opacity_level; ?>"></div>
|
||||||
|
</div>
|
||||||
46
footer.php
Normal file
46
footer.php
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
</div><!-- #content -->
|
||||||
|
|
||||||
|
<footer id="colophon" class="site-footer">
|
||||||
|
<div class="widgets-area">
|
||||||
|
<?php
|
||||||
|
$footer_left_active = is_active_sidebar( 'footer-left' );
|
||||||
|
$footer_middle_active = is_active_sidebar( 'footer-middle' );
|
||||||
|
$footer_right_active = is_active_sidebar( 'footer-right' );
|
||||||
|
if($footer_left_active) { ?>
|
||||||
|
<div class="widgets-column">
|
||||||
|
<?php dynamic_sidebar( 'footer-left' ); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($footer_middle_active) { ?>
|
||||||
|
<div class="widgets-column">
|
||||||
|
<?php dynamic_sidebar( 'footer-middle' ); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($footer_right_active) { ?>
|
||||||
|
<div class="widgets-column">
|
||||||
|
<?php dynamic_sidebar( 'footer-right' ); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="copyright-area">
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
$default_copyright_text = ' © '.get_bloginfo('name').' '.date('Y');
|
||||||
|
echo get_theme_mod('copyright_text', $default_copyright_text );
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer><!-- #colophon -->
|
||||||
|
</div><!-- #page -->
|
||||||
|
|
||||||
|
<?php if(get_theme_mod('enable_scroll_back_to_top_btn', true)) { ?>
|
||||||
|
<div class="scroll-back-to-top-btn">
|
||||||
|
<?php get_template_part('assets/icons/inline', 'arrow_up.svg'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
367
functions.php
Normal file
367
functions.php
Normal file
@@ -0,0 +1,367 @@
|
|||||||
|
<?php
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Yuzu functions and definitions
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_setup' ) ) :
|
||||||
|
/**
|
||||||
|
* Sets up theme defaults and registers support for various WordPress features.
|
||||||
|
*
|
||||||
|
* Note that this function is hooked into the after_setup_theme hook, which
|
||||||
|
* runs before the init hook. The init hook is too late for some features, such
|
||||||
|
* as indicating support for post thumbnails.
|
||||||
|
*/
|
||||||
|
function yuzu_setup() {
|
||||||
|
/*
|
||||||
|
* Make theme available for translation.
|
||||||
|
* Translations can be filed in the /languages/ directory.
|
||||||
|
* If you're building a theme based on Yuzu, use a find and replace
|
||||||
|
* to change 'yuzu' to the name of your theme in all the template files.
|
||||||
|
*/
|
||||||
|
load_theme_textdomain( 'yuzu', get_template_directory() . '/languages' );
|
||||||
|
|
||||||
|
// Add default posts and comments RSS feed links to head.
|
||||||
|
add_theme_support( 'automatic-feed-links' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Let WordPress manage the document title.
|
||||||
|
* By adding theme support, we declare that this theme does not use a
|
||||||
|
* hard-coded <title> tag in the document head, and expect WordPress to
|
||||||
|
* provide it for us.
|
||||||
|
*/
|
||||||
|
add_theme_support( 'title-tag' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gutenberg Align wide support.
|
||||||
|
*/
|
||||||
|
add_theme_support( 'align-wide' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable support for Post Thumbnails on posts and pages.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
|
||||||
|
*/
|
||||||
|
add_theme_support( 'post-thumbnails' );
|
||||||
|
|
||||||
|
// This theme uses wp_nav_menu() in one location.
|
||||||
|
register_nav_menus( array(
|
||||||
|
'menu-1' => esc_html__( 'Primary', 'yuzu' ),
|
||||||
|
) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Switch default core markup for search form, comment form, and comments
|
||||||
|
* to output valid HTML5.
|
||||||
|
*/
|
||||||
|
add_theme_support( 'html5', array(
|
||||||
|
'search-form',
|
||||||
|
'comment-form',
|
||||||
|
'comment-list',
|
||||||
|
'gallery',
|
||||||
|
'caption',
|
||||||
|
) );
|
||||||
|
|
||||||
|
// Set up the WordPress core custom background feature.
|
||||||
|
add_theme_support( 'custom-background', apply_filters( 'yuzu_custom_background_args', array(
|
||||||
|
'default-color' => 'ffffff',
|
||||||
|
'default-image' => '',
|
||||||
|
) ) );
|
||||||
|
|
||||||
|
// Add theme support for selective refresh for widgets.
|
||||||
|
add_theme_support( 'customize-selective-refresh-widgets' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add support for core custom logo.
|
||||||
|
*
|
||||||
|
* @link https://codex.wordpress.org/Theme_Logo
|
||||||
|
*/
|
||||||
|
add_theme_support( 'custom-logo', array(
|
||||||
|
'height' => 120,
|
||||||
|
'flex-width' => true,
|
||||||
|
'flex-height' => true,
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
add_action( 'after_setup_theme', 'yuzu_setup' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the content width in pixels, based on the theme's design and stylesheet.
|
||||||
|
*
|
||||||
|
* Priority 0 to make it available to lower priority callbacks.
|
||||||
|
*
|
||||||
|
* @global int $content_width
|
||||||
|
*/
|
||||||
|
function yuzu_content_width() {
|
||||||
|
// This variable is intended to be overruled from themes.
|
||||||
|
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
|
||||||
|
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
|
||||||
|
$GLOBALS['content_width'] = apply_filters( 'yuzu_content_width', 640 );
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'yuzu_content_width', 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register widget area.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
|
||||||
|
*/
|
||||||
|
function yuzu_widgets_init() {
|
||||||
|
register_sidebar( array(
|
||||||
|
'name' => esc_html__( 'Footer · Left', 'yuzu' ),
|
||||||
|
'id' => 'footer-left',
|
||||||
|
'description' => esc_html__( 'Add widgets here.', 'yuzu' ),
|
||||||
|
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||||
|
'after_widget' => '</section>',
|
||||||
|
'before_title' => '<h3 class="widget-title">',
|
||||||
|
'after_title' => '</h3>',
|
||||||
|
) );
|
||||||
|
register_sidebar( array(
|
||||||
|
'name' => esc_html__( 'Footer · Middle', 'yuzu' ),
|
||||||
|
'id' => 'footer-middle',
|
||||||
|
'description' => esc_html__( 'Add widgets here.', 'yuzu' ),
|
||||||
|
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||||
|
'after_widget' => '</section>',
|
||||||
|
'before_title' => '<h3 class="widget-title">',
|
||||||
|
'after_title' => '</h3>',
|
||||||
|
) );
|
||||||
|
register_sidebar( array(
|
||||||
|
'name' => esc_html__( 'Footer · Right', 'yuzu' ),
|
||||||
|
'id' => 'footer-right',
|
||||||
|
'description' => esc_html__( 'Add widgets here.', 'yuzu' ),
|
||||||
|
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||||
|
'after_widget' => '</section>',
|
||||||
|
'before_title' => '<h3 class="widget-title">',
|
||||||
|
'after_title' => '</h3>',
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
add_action( 'widgets_init', 'yuzu_widgets_init' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enqueue scripts and styles.
|
||||||
|
*/
|
||||||
|
function yuzu_scripts() {
|
||||||
|
$ver_num = mt_rand();
|
||||||
|
|
||||||
|
wp_enqueue_style( 'yuzu-custom-properties', get_template_directory_uri() . '/assets/css/custom-properties.css', array(), $ver_num );
|
||||||
|
|
||||||
|
wp_enqueue_style( 'yuzu-style', get_stylesheet_uri(), array(), $ver_num );
|
||||||
|
|
||||||
|
wp_enqueue_script( 'jquery' );
|
||||||
|
|
||||||
|
wp_enqueue_script( 'main-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), $ver_num, true );
|
||||||
|
|
||||||
|
$dataToBePassed = array(
|
||||||
|
'enable_posts_height_equalizer' => get_theme_mod('enable_posts_height_equalizer', true),
|
||||||
|
'test' => 'test'
|
||||||
|
);
|
||||||
|
wp_localize_script( 'main-js', 'php_vars', $dataToBePassed );
|
||||||
|
|
||||||
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
|
wp_enqueue_script( 'comment-reply' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'wp_enqueue_scripts', 'yuzu_scripts' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers an editor stylesheet for the theme.
|
||||||
|
*/
|
||||||
|
function yuzu_add_editor_styles() {
|
||||||
|
add_editor_style( 'editor-style.css' );
|
||||||
|
}
|
||||||
|
add_action( 'admin_init', 'yuzu_add_editor_styles' );
|
||||||
|
|
||||||
|
function legit_block_editor_styles() {
|
||||||
|
wp_enqueue_style( 'legit-editor-styles', get_theme_file_uri( '/assets/css/editor-style.css' ), false, '1.0', 'all' );
|
||||||
|
}
|
||||||
|
add_action( 'enqueue_block_editor_assets', 'legit_block_editor_styles' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply Color Scheme Class
|
||||||
|
*/
|
||||||
|
add_filter( 'body_class', 'apply_theme_color_scheme');
|
||||||
|
function apply_theme_color_scheme( $classes ) {
|
||||||
|
$classes[] = get_theme_mod('color_scheme', 'light') . '-theme';
|
||||||
|
return $classes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reduce excerpt length
|
||||||
|
*/
|
||||||
|
add_filter( 'excerpt_length', function($length) {
|
||||||
|
return 25;
|
||||||
|
} );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Meow Blocks Output
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/meow-blocks-output.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement the Custom Header feature.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/custom-header.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom template tags for this theme.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/template-tags.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Functions which enhance the theme by hooking into WordPress.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/template-functions.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customizer additions.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/custom-controls.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customizer additions.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/customizer.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply Customizer Colors.
|
||||||
|
*/
|
||||||
|
require get_template_directory() . '/inc/apply-colors.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Jetpack compatibility file.
|
||||||
|
*/
|
||||||
|
if ( defined( 'JETPACK__VERSION' ) ) {
|
||||||
|
require get_template_directory() . '/inc/jetpack.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom comment template
|
||||||
|
*/
|
||||||
|
function yuzu_comment_template($comment, $args, $depth) {
|
||||||
|
$GLOBALS['comment'] = $comment; ?>
|
||||||
|
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
||||||
|
<div id="comment-<?php comment_ID(); ?>">
|
||||||
|
<div class='comment-header'>
|
||||||
|
<div class='comment-author-profil-picture'>
|
||||||
|
<?php echo get_avatar($comment,$size='48'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="comment-meta">
|
||||||
|
<div class="author-name"><?php echo get_comment_author_link(); ?></div>
|
||||||
|
<div class="posted-on"><?php echo get_comment_date(); ?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='comment-content'>
|
||||||
|
<?php if ($comment->comment_approved == '0') : ?>
|
||||||
|
<em><?php _e('Your comment is awaiting moderation.', 'yuzu') ?></em>
|
||||||
|
<br />
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php comment_text() ?>
|
||||||
|
</div>
|
||||||
|
<div class='reply-link'>
|
||||||
|
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve search results to include collections and attachments.
|
||||||
|
*/
|
||||||
|
function attachment_search( $query ) {
|
||||||
|
if ( $query->is_search ) {
|
||||||
|
$query->set( 'post_type', array( 'post', 'attachment', 'meow_collection' ) );
|
||||||
|
$query->set( 'post_status', array( 'publish', 'inherit' ) );
|
||||||
|
$query->set( 'posts_per_page', '-1');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
add_filter( 'pre_get_posts', 'attachment_search' );
|
||||||
|
|
||||||
|
|
||||||
|
require_once( get_template_directory() . '/class-tgm-plugin-activation.php');
|
||||||
|
|
||||||
|
add_action( 'tgmpa_register', 'yuzu_register_required_plugins' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the required plugins for this theme.
|
||||||
|
*
|
||||||
|
* <snip />
|
||||||
|
*
|
||||||
|
* This function is hooked into tgmpa_init, which is fired within the
|
||||||
|
* TGM_Plugin_Activation class constructor.
|
||||||
|
*/
|
||||||
|
function yuzu_register_required_plugins() {
|
||||||
|
/*
|
||||||
|
* Array of plugin arrays. Required keys are name and slug.
|
||||||
|
* If the source is NOT from the .org repo, then source is also required.
|
||||||
|
*/
|
||||||
|
$plugins = array(
|
||||||
|
// This is an example of how to include a plugin from the WordPress Plugin Repository.
|
||||||
|
array(
|
||||||
|
'name' => 'Photography Core',
|
||||||
|
'slug' => 'photography-core',
|
||||||
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'WP/LR Sync',
|
||||||
|
'slug' => 'wplr-sync',
|
||||||
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'Meow Gallery',
|
||||||
|
'slug' => 'meow-gallery',
|
||||||
|
'is_callable' => array( 'Meow_Gallery_Core', 'installed' ),
|
||||||
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'Meow Lightbox',
|
||||||
|
'slug' => 'meow-lightbox',
|
||||||
|
'is_callable' => array( 'Meow_Lightbox_Core', 'installed' ),
|
||||||
|
'required' => false,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Array of configuration settings. Amend each line as needed.
|
||||||
|
*
|
||||||
|
* TGMPA will start providing localized text strings soon. If you already have translations of our standard
|
||||||
|
* strings available, please help us make TGMPA even better by giving us access to these translations or by
|
||||||
|
* sending in a pull-request with .po file(s) with the translations.
|
||||||
|
*
|
||||||
|
* Only uncomment the strings in the config array if you want to customize the strings.
|
||||||
|
*/
|
||||||
|
$config = array(
|
||||||
|
'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.
|
||||||
|
'default_path' => '', // Default absolute path to bundled plugins.
|
||||||
|
'menu' => 'tgmpa-install-plugins', // Menu slug.
|
||||||
|
'parent_slug' => 'themes.php', // Parent menu slug.
|
||||||
|
'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
|
||||||
|
'has_notices' => true, // Show admin notices or not.
|
||||||
|
'dismissable' => true, // If false, a user cannot dismiss the nag message.
|
||||||
|
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
|
||||||
|
'is_automatic' => false, // Automatically activate plugins after installation or not.
|
||||||
|
'message' => '', // Message to output right before the plugins table.
|
||||||
|
);
|
||||||
|
|
||||||
|
tgmpa( $plugins, $config );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MEOW APPS LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
|
global $meowapps_theme_version;
|
||||||
|
$meowapps_theme_version = '0.1.0';
|
||||||
|
|
||||||
|
function prefix_theme_updater() {
|
||||||
|
require( get_template_directory() . '/updater/yuzu-updater.php' );
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'prefix_theme_updater' );
|
||||||
96
header.php
Normal file
96
header.php
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The header for our theme
|
||||||
|
*
|
||||||
|
* This is the template that displays all of the <head> section and everything up until <div id="content">
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="profile" href="https://gmpg.org/xfn/11">
|
||||||
|
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
<div id="page" class="site">
|
||||||
|
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'yuzu' ); ?></a>
|
||||||
|
|
||||||
|
<div class="top-search-bar-container">
|
||||||
|
<div class="super-large-container">
|
||||||
|
<form role="search" method="get" class="searchform group"
|
||||||
|
action="<?php echo home_url('/'); ?>">
|
||||||
|
<input name="s" type="text" placeholder="<?php _e('What are you looking for ... ?', 'yuzu'); ?>">
|
||||||
|
|
||||||
|
<div class="submit-top-bar-search">
|
||||||
|
<label>
|
||||||
|
<input type="submit" style="display: none;" class="hidden-submit"/>
|
||||||
|
<?php get_template_part('assets/icons/inline', 'search.svg'); ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<header id="masthead" class="site-header">
|
||||||
|
<div class="top-bar-content super-large-container">
|
||||||
|
<div class="site-branding">
|
||||||
|
<?php
|
||||||
|
if ( has_custom_logo() ) {
|
||||||
|
?>
|
||||||
|
<div class="site-logo">
|
||||||
|
<a href="<?= get_home_url(); ?>">
|
||||||
|
<?= get_custom_logo(); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="site-navigation">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu( array(
|
||||||
|
'theme_location' => 'menu-1',
|
||||||
|
'menu_id' => 'primary-menu',
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
<?php if(get_theme_mod('enable_search_in_top_bar', true)) { ?>
|
||||||
|
<div class="open-top-bar-search">
|
||||||
|
<?php get_template_part('assets/icons/inline', 'search.svg'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="close-top-bar-search" style="display: none">
|
||||||
|
<?php get_template_part('assets/icons/inline', 'close.svg'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</header><!-- #masthead -->
|
||||||
|
|
||||||
|
<div class="mobile-navigation">
|
||||||
|
<nav class="site-navigation">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu( array(
|
||||||
|
'theme_location' => 'menu-1',
|
||||||
|
'menu_id' => 'mobile-primary-menu',
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
</nav>
|
||||||
|
<div class="mobile-navigation-toggle">
|
||||||
|
<div class="open-icon"><?php get_template_part('assets/icons/inline', 'hamburger.svg'); ?></div>
|
||||||
|
<div class="close-icon"><?php get_template_part('assets/icons/inline', 'close.svg'); ?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content" class="site-content">
|
||||||
73
inc/apply-colors.php
Normal file
73
inc/apply-colors.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
function convert_hex_to_rgba($color, $opacity = false) {
|
||||||
|
$default = 'rgb(0,0,0)';
|
||||||
|
|
||||||
|
//Return default if no color provided
|
||||||
|
if(empty($color))
|
||||||
|
return $default;
|
||||||
|
|
||||||
|
//Sanitize $color if "#" is provided
|
||||||
|
if ($color[0] == '#' ) {
|
||||||
|
$color = substr( $color, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check if color has 6 or 3 characters and get values
|
||||||
|
if (strlen($color) == 6) {
|
||||||
|
$hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
|
||||||
|
} elseif ( strlen( $color ) == 3 ) {
|
||||||
|
$hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
|
||||||
|
} else {
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Convert hexadec to rgb
|
||||||
|
$rgb = array_map('hexdec', $hex);
|
||||||
|
|
||||||
|
//Check if opacity is set(rgba or rgb)
|
||||||
|
if($opacity){
|
||||||
|
if(abs($opacity) > 1)
|
||||||
|
$opacity = 1.0;
|
||||||
|
$output = 'rgba('.implode(",",$rgb).','.$opacity.')';
|
||||||
|
} else {
|
||||||
|
$output = 'rgb('.implode(",",$rgb).')';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Return rgb(a) color string
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
function yuzu_customizer_head_styles() {
|
||||||
|
?>
|
||||||
|
<style type="text/css" class="customizer-colors">
|
||||||
|
body.custom-theme {
|
||||||
|
--top_bar_color: <?= get_theme_mod('top_bar_color', '#2E3B4F'); ?>;
|
||||||
|
--body_color: <?= get_theme_mod('body_color', '#2E3B4F'); ?>;
|
||||||
|
--footer_color: <?= get_theme_mod('footer_color', '#2E3B4F'); ?>;
|
||||||
|
--card_color: <?= get_theme_mod('card_color', '#2E3B4F'); ?>;
|
||||||
|
--link_color: <?= get_theme_mod('link_color', '#4B828E'); ?>;
|
||||||
|
--link_hover_color: <?= get_theme_mod('link_hover_color', '#39636D'); ?>;
|
||||||
|
--tag_color: <?= get_theme_mod('tag_color', '#4B828E'); ?>;
|
||||||
|
--tag_hover_color: <?= get_theme_mod('tag_hover_color', '#39636D'); ?>;
|
||||||
|
--search_widget_color: <?= get_theme_mod('search_widget_color', '#2E3B4F'); ?>;
|
||||||
|
--read_more_btn_color: <?= get_theme_mod('read_more_btn_color', '#2E3B4F'); ?>;
|
||||||
|
--comment_color: <?= get_theme_mod('comment_color', '#2E3B4F'); ?>;
|
||||||
|
--comment_form_color: <?= get_theme_mod('comment_form_color', '#2E3B4F'); ?>;
|
||||||
|
--post_comment_btn_color: <?= get_theme_mod('comment_form_color', '#2E3B4F'); ?>;
|
||||||
|
|
||||||
|
--top_bar_bg: <?= get_theme_mod('top_bar_bg', '#fff'); ?>;
|
||||||
|
--body_bg: <?= get_theme_mod('body_bg', '#FAFBFB'); ?>;
|
||||||
|
--very_opaque_header_bg: linear-gradient(to top, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), 1) ?>, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), .9) ?>);
|
||||||
|
--opaque_header_bg: linear-gradient(to top, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), 1) ?>, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), .6) ?>);
|
||||||
|
--less_opaque_header_bg: linear-gradient(to top, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), 1) ?>, <?= convert_hex_to_rgba(get_theme_mod('body_bg', '#FAFBFB'), .4) ?>);
|
||||||
|
--footer_bg: <?= get_theme_mod('footer_bg', '#FFF'); ?>;
|
||||||
|
--card_bg: <?= get_theme_mod('card_bg', '#FFF'); ?>;
|
||||||
|
--search_widget_bg: <?= get_theme_mod('search_widget_bg', '#f5f4f4'); ?>;
|
||||||
|
--read_more_btn_bg: <?= get_theme_mod('read_more_btn_bg', '#F5F5F5'); ?>;
|
||||||
|
--comment_bg: <?= get_theme_mod('comment_bg', '#FFF'); ?>;
|
||||||
|
--comment_form_bg: <?= get_theme_mod('comment_form_bg', '#FFF'); ?>;
|
||||||
|
--post_comment_btn_bg: <?= get_theme_mod('comment_form_bg', '#FFF'); ?>;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'yuzu_customizer_head_styles' );
|
||||||
1061
inc/custom-controls.php
Normal file
1061
inc/custom-controls.php
Normal file
File diff suppressed because it is too large
Load Diff
72
inc/custom-header.php
Normal file
72
inc/custom-header.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Sample implementation of the Custom Header feature
|
||||||
|
*
|
||||||
|
* You can add an optional custom header image to header.php like so ...
|
||||||
|
*
|
||||||
|
<?php the_header_image_tag(); ?>
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/functionality/custom-headers/
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up the WordPress core custom header feature.
|
||||||
|
*
|
||||||
|
* @uses yuzu_header_style()
|
||||||
|
*/
|
||||||
|
function yuzu_custom_header_setup() {
|
||||||
|
add_theme_support( 'custom-header', apply_filters( 'yuzu_custom_header_args', array(
|
||||||
|
'default-image' => '',
|
||||||
|
'default-text-color' => '000000',
|
||||||
|
'width' => 1000,
|
||||||
|
'height' => 250,
|
||||||
|
'flex-height' => true,
|
||||||
|
'wp-head-callback' => 'yuzu_header_style',
|
||||||
|
) ) );
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'yuzu_custom_header_setup' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_header_style' ) ) :
|
||||||
|
/**
|
||||||
|
* Styles the header image and text displayed on the blog.
|
||||||
|
*
|
||||||
|
* @see yuzu_custom_header_setup().
|
||||||
|
*/
|
||||||
|
function yuzu_header_style() {
|
||||||
|
$header_text_color = get_header_textcolor();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If no custom options for text are set, let's bail.
|
||||||
|
* get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ).
|
||||||
|
*/
|
||||||
|
if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we get this far, we have custom styles. Let's do this.
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
<?php
|
||||||
|
// Has the text been hidden?
|
||||||
|
if ( ! display_header_text() ) :
|
||||||
|
?>
|
||||||
|
.site-title,
|
||||||
|
.site-description {
|
||||||
|
position: absolute;
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
// If the user has set a custom color for the text use that.
|
||||||
|
else :
|
||||||
|
?>
|
||||||
|
.site-title a,
|
||||||
|
.site-description {
|
||||||
|
color: #<?php echo esc_attr( $header_text_color ); ?>;
|
||||||
|
}
|
||||||
|
<?php endif; ?>
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
endif;
|
||||||
402
inc/customizer-sections/colors-section.php
Normal file
402
inc/customizer-sections/colors-section.php
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
<?php
|
||||||
|
function create_color_control( $args, $wp_customize ) {
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
$args['setting'], array(
|
||||||
|
'default' => $args['default'],
|
||||||
|
'transport' => 'refresh'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new WP_Customize_Color_Control(
|
||||||
|
$wp_customize,
|
||||||
|
$args['setting'],
|
||||||
|
array(
|
||||||
|
'label' => $args['label'],
|
||||||
|
'description' => $args['description'],
|
||||||
|
'section' => $args['section'],
|
||||||
|
'settings' => $args['setting'],
|
||||||
|
'active_callback' => $args['active_callback']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// # COLORS SECTION
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_section( 'colors_section', array(
|
||||||
|
'priority' => 10,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'theme_supports' => '',
|
||||||
|
'title' => __( 'Colors', 'yuzu' ),
|
||||||
|
'description' => '',
|
||||||
|
'panel' => 'theme_settings',
|
||||||
|
) );
|
||||||
|
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Scheme
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-color-sheme-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => __( 'Color Scheme', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'color_scheme', array(
|
||||||
|
'default' => 'light',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'color_scheme',
|
||||||
|
array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'label' => __('Color Scheme', 'yuzu'),
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'choices' => array(
|
||||||
|
'light' => __('Light Theme (default)', 'yuzu'),
|
||||||
|
'dark' => __('Dark Theme', 'yuzu'),
|
||||||
|
'custom' => __('Custom Theme', 'yuzu'),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
function is_custom_scheme_callback( $control ) {
|
||||||
|
if ( $control->manager->get_setting('color_scheme')->value() == 'custom' ) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Backgrounds
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-backgrounds-colors-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => __( 'Backgrounds', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'bg_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'postMessage',
|
||||||
|
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'bg_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'label' => __( 'Unavailable', 'yuzu' ),
|
||||||
|
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'active_callback' => function(){
|
||||||
|
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'top_bar_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Top Bar Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#FFF',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'body_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Body Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#FAFBFB',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'footer_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Footer Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F6F7FB',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'card_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Cards Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F6F7FB',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'search_widget_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Search Field Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#f5f4f4',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'comment_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Comment Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F6F7FB',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'comment_form_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Comment Form Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F6F7FB',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Texts
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-text-colors-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => __( 'Font Colors', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'color_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'postMessage',
|
||||||
|
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'color_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'label' => __( 'Unavailable', 'yuzu' ),
|
||||||
|
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'active_callback' => function(){
|
||||||
|
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'link_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Link Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#4B828E',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'link_hover_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Hovered Link Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#39636D',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'top_bar_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Top Bar Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback',
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'body_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Body Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'footer_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Footer Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'card_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Cards Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'search_widget_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Search Field Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'comment_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Comment Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'comment_form_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Comment Form Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Others
|
||||||
|
/* =============================================== */
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-other-colors-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => __( 'Others', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'other_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'postMessage',
|
||||||
|
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'other_not_editable_notice',
|
||||||
|
array(
|
||||||
|
'label' => __( 'Unavailable', 'yuzu' ),
|
||||||
|
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'active_callback' => function(){
|
||||||
|
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'tag_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Tags Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#4B828E',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'tag_hover_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Hovered Tag Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#39636D',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'read_more_btn_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Read More Button Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F5F5F5',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'read_more_btn_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Read More Button Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'post_comment_btn_bg',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Post Comment Button Background',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#F5F5F5',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'setting' => 'post_comment_btn_color',
|
||||||
|
'section' => 'colors_section',
|
||||||
|
'label' => 'Post Comment Button Color',
|
||||||
|
'description' => '',
|
||||||
|
'default' => '#2E3B4F',
|
||||||
|
'active_callback' => 'is_custom_scheme_callback'
|
||||||
|
);
|
||||||
|
create_color_control( $args, $wp_customize );
|
||||||
131
inc/customizer-sections/general-section.php
Normal file
131
inc/customizer-sections/general-section.php
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<?php
|
||||||
|
/* =============================================== */
|
||||||
|
// # GENERAL SECTION
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_section( 'general_section', array(
|
||||||
|
'priority' => 10,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'theme_supports' => '',
|
||||||
|
'title' => __( 'General', 'yuzu' ),
|
||||||
|
'description' => '',
|
||||||
|
'panel' => 'theme_settings',
|
||||||
|
) );
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## SOCIAL NETWORKS
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-social-networks-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'general_section',
|
||||||
|
'label' => __( 'Social Networks', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'instagram_url',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'instagram_url',
|
||||||
|
array(
|
||||||
|
'label' => __('Instagram URL', 'yuzu'),
|
||||||
|
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||||
|
'section' => 'general_section',
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'facebook_url',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'facebook_url',
|
||||||
|
array(
|
||||||
|
'label' => __('Facebook URL', 'yuzu'),
|
||||||
|
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||||
|
'section' => 'general_section',
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'twitter_url',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'twitter_url',
|
||||||
|
array(
|
||||||
|
'label' => __('Twitter URL', 'yuzu'),
|
||||||
|
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||||
|
'section' => 'general_section',
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'flickr_url',
|
||||||
|
array(
|
||||||
|
'default' => '',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'flickr_url',
|
||||||
|
array(
|
||||||
|
'label' => __('Flickr URL', 'yuzu'),
|
||||||
|
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||||
|
'section' => 'general_section',
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## COPYRIGHT
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-copyright-infos-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'general_section',
|
||||||
|
'label' => __( 'Copyright', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'copyright_text',
|
||||||
|
array(
|
||||||
|
'default' => '© Yuzu Theme 2018',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'wp_kses_post',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'copyright_text',
|
||||||
|
array(
|
||||||
|
'label' => __('Copyright Text', 'yuzu'),
|
||||||
|
'section' => 'general_section',
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
127
inc/customizer-sections/layout-section.php
Normal file
127
inc/customizer-sections/layout-section.php
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
/* =============================================== */
|
||||||
|
// # LAYOUT SECTION
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_section( 'layout_section', array(
|
||||||
|
'priority' => 10,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'theme_supports' => '',
|
||||||
|
'title' => __( 'Layout', 'yuzu' ),
|
||||||
|
'description' => '',
|
||||||
|
'panel' => 'theme_settings',
|
||||||
|
) );
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Top Bar
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-top-bar-layout-setting-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'layout_section',
|
||||||
|
'label' => __( 'Top Bar', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'enable_search_in_top_bar', array(
|
||||||
|
'default' => true,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'enable_search_in_top_bar',
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __('Enable search in the top bar.', 'yuzu'),
|
||||||
|
'section' => 'layout_section',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Blog
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-blog-layout-setting-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'layout_section',
|
||||||
|
'label' => __( 'Blog', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'enable_posts_height_equalizer', array(
|
||||||
|
'default' => true,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'enable_posts_height_equalizer',
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __('Equalize articles cards height.', 'yuzu'),
|
||||||
|
'section' => 'layout_section',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'display_posts_navigation', array(
|
||||||
|
'default' => true,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'display_posts_navigation',
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __('Display previous/next articles at the bottom of articles.', 'yuzu'),
|
||||||
|
'section' => 'layout_section',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'display_posts_meta', array(
|
||||||
|
'default' => true,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'display_posts_meta',
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __('Display article metadata.', 'yuzu'),
|
||||||
|
'section' => 'layout_section',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Other
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-other-layout-setting-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'layout_section',
|
||||||
|
'label' => __( 'Others', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'enable_scroll_back_to_top_btn', array(
|
||||||
|
'default' => true,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'enable_scroll_back_to_top_btn',
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __('Display a button to scroll back to top of the page.', 'yuzu'),
|
||||||
|
'section' => 'layout_section',
|
||||||
|
)
|
||||||
|
);
|
||||||
46
inc/customizer-sections/style-section.php
Normal file
46
inc/customizer-sections/style-section.php
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
/* =============================================== */
|
||||||
|
// # STYLE SECTION
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_section( 'style_section', array(
|
||||||
|
'priority' => 10,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'theme_supports' => '',
|
||||||
|
'title' => __( 'Style', 'yuzu' ),
|
||||||
|
'description' => '',
|
||||||
|
'panel' => 'theme_settings',
|
||||||
|
) );
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
// ## Headers
|
||||||
|
/* =============================================== */
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new yuzu_Customizer_Accordion(
|
||||||
|
$wp_customize,
|
||||||
|
'yuzu-headers-style-sheme-accordion',
|
||||||
|
array(
|
||||||
|
'section' => 'style_section',
|
||||||
|
'label' => __( 'Headers', 'yuzu' ),
|
||||||
|
'type' => 'accordion'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting( 'header_background_opacity', array(
|
||||||
|
'default' => 'normal-opaque',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control(
|
||||||
|
'header_background_opacity',
|
||||||
|
array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'label' => __('Header Background Opacity', 'yuzu'),
|
||||||
|
'section' => 'style_section',
|
||||||
|
'choices' => array(
|
||||||
|
'less-opaque' => __('Less opaque', 'yuzu'),
|
||||||
|
'normal-opaque' => __('Normal', 'yuzu'),
|
||||||
|
'very-opaque' => __('Very opaque', 'yuzu'),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
65
inc/customizer.php
Normal file
65
inc/customizer.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'yuzu_Customizer_Header' ) ) :
|
||||||
|
class yuzu_Customizer_Title extends WP_Customize_Control {
|
||||||
|
public $settings = 'blogname';
|
||||||
|
public $description = '';
|
||||||
|
|
||||||
|
public function render_content() {
|
||||||
|
switch ( $this->type ) {
|
||||||
|
default:
|
||||||
|
case 'heading':
|
||||||
|
echo '<span class="customize-control-title">' . esc_html( $this->label ) . '</span>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class yuzu_Customizer_Accordion extends WP_Customize_Control {
|
||||||
|
public $settings = 'blogname';
|
||||||
|
public $description = '';
|
||||||
|
|
||||||
|
public function render_content() {
|
||||||
|
switch ( $this->type ) {
|
||||||
|
default:
|
||||||
|
case 'accordion':
|
||||||
|
echo '
|
||||||
|
<div class="accordion-title" style="width: 100%; background: white; padding: 0px 14px; box-sizing: border-box; border: 1px solid #ddd; border-left: 3px solid #0073aa; margin: 10px 0;">
|
||||||
|
<h3>'. esc_html( $this->label ) .'</h3>
|
||||||
|
</div>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add postMessage support for site title and description for the Theme Customizer.
|
||||||
|
*
|
||||||
|
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||||
|
*/
|
||||||
|
function yuzu_customize_register( $wp_customize ) {
|
||||||
|
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||||
|
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||||
|
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
|
||||||
|
|
||||||
|
$wp_customize->remove_section('colors');
|
||||||
|
$wp_customize->remove_section('header_image');
|
||||||
|
$wp_customize->remove_section('background_image');
|
||||||
|
|
||||||
|
$wp_customize->remove_control('blogdescription');
|
||||||
|
$wp_customize->remove_control('display_header_text');
|
||||||
|
|
||||||
|
$wp_customize->add_panel( 'theme_settings', array(
|
||||||
|
'priority' => 10,
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
'theme_supports' => '',
|
||||||
|
'title' => __( 'Yuzu Theme Settings', 'yuzu' ),
|
||||||
|
'description' => __( 'All the settings for yuzu Theme', 'yuzu' ),
|
||||||
|
) );
|
||||||
|
|
||||||
|
require get_template_directory() . '/inc/customizer-sections/general-section.php';
|
||||||
|
require get_template_directory() . '/inc/customizer-sections/layout-section.php';
|
||||||
|
require get_template_directory() . '/inc/customizer-sections/style-section.php';
|
||||||
|
require get_template_directory() . '/inc/customizer-sections/colors-section.php';
|
||||||
|
}
|
||||||
|
add_action( 'customize_register', 'yuzu_customize_register' );
|
||||||
|
|
||||||
80
inc/jetpack.php
Normal file
80
inc/jetpack.php
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jetpack Compatibility File
|
||||||
|
*
|
||||||
|
* @link https://jetpack.com/
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Jetpack setup function.
|
||||||
|
*
|
||||||
|
* See: https://jetpack.com/support/infinite-scroll/
|
||||||
|
* See: https://jetpack.com/support/responsive-videos/
|
||||||
|
* See: https://jetpack.com/support/content-options/
|
||||||
|
*/
|
||||||
|
function yuzu_jetpack_setup() {
|
||||||
|
// Add theme support for Infinite Scroll.
|
||||||
|
add_theme_support( 'infinite-scroll', array(
|
||||||
|
'container' => 'articles-list',
|
||||||
|
'posts_per_page' => 6,
|
||||||
|
'render' => 'yuzu_infinite_scroll_render',
|
||||||
|
'footer' => 'page',
|
||||||
|
) );
|
||||||
|
|
||||||
|
// Add theme support for Responsive Videos.
|
||||||
|
add_theme_support( 'jetpack-responsive-videos' );
|
||||||
|
|
||||||
|
// Add theme support for Content Options.
|
||||||
|
add_theme_support( 'jetpack-content-options', array(
|
||||||
|
'featured-images' => array(
|
||||||
|
'archive' => true,
|
||||||
|
'post' => true,
|
||||||
|
'page' => true,
|
||||||
|
),
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'yuzu_jetpack_setup' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom render function for Infinite Scroll.
|
||||||
|
*/
|
||||||
|
function yuzu_infinite_scroll_render() {
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) {
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
inc/meow-blocks-output.php
Normal file
32
inc/meow-blocks-output.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Filters to override default outputs in the Photography Core
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Collections Blocks
|
||||||
|
*/
|
||||||
|
function yuzu_mwt_collections_output( $html, $collections ) {
|
||||||
|
$output = "<div class='collections-list'>";
|
||||||
|
foreach( $collections as $collection ) {
|
||||||
|
ob_start();
|
||||||
|
require(locate_template('components/collection-card.php'));
|
||||||
|
$output .= ob_get_clean();
|
||||||
|
}
|
||||||
|
$output .= "</div>";
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
add_filter( 'mwt_collections_output', 'yuzu_mwt_collections_output', 10, 2 );
|
||||||
|
|
||||||
|
|
||||||
|
function yuzu_mwt_folders_output( $html, $folders ) {
|
||||||
|
$output = "<div class='folders-list'>";
|
||||||
|
foreach( $folders as $folder ) {
|
||||||
|
ob_start();
|
||||||
|
require(locate_template('components/folder-card.php'));
|
||||||
|
$output .= ob_get_clean();
|
||||||
|
}
|
||||||
|
$output .= "</div>";
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
add_filter( 'mwt_folders_output', 'yuzu_mwt_folders_output', 10, 2 );
|
||||||
37
inc/template-functions.php
Normal file
37
inc/template-functions.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Functions which enhance the theme by hooking into WordPress
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds custom classes to the array of body classes.
|
||||||
|
*
|
||||||
|
* @param array $classes Classes for the body element.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function yuzu_body_classes( $classes ) {
|
||||||
|
// Adds a class of hfeed to non-singular pages.
|
||||||
|
if ( ! is_singular() ) {
|
||||||
|
$classes[] = 'hfeed';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds a class of no-sidebar when there is no sidebar present.
|
||||||
|
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
||||||
|
$classes[] = 'no-sidebar';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $classes;
|
||||||
|
}
|
||||||
|
add_filter( 'body_class', 'yuzu_body_classes' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a pingback url auto-discovery header for single posts, pages, or attachments.
|
||||||
|
*/
|
||||||
|
function yuzu_pingback_header() {
|
||||||
|
if ( is_singular() && pings_open() ) {
|
||||||
|
printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'yuzu_pingback_header' );
|
||||||
148
inc/template-tags.php
Normal file
148
inc/template-tags.php
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Custom template tags for this theme
|
||||||
|
*
|
||||||
|
* Eventually, some of the functionality here could be replaced by core features.
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_posted_on' ) ) :
|
||||||
|
/**
|
||||||
|
* Prints HTML with meta information for the current post-date/time.
|
||||||
|
*/
|
||||||
|
function yuzu_posted_on() {
|
||||||
|
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
|
||||||
|
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
|
||||||
|
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$time_string = sprintf( $time_string,
|
||||||
|
esc_attr( get_the_date( DATE_W3C ) ),
|
||||||
|
esc_html( get_the_date() ),
|
||||||
|
esc_attr( get_the_modified_date( DATE_W3C ) ),
|
||||||
|
esc_html( get_the_modified_date() )
|
||||||
|
);
|
||||||
|
|
||||||
|
$posted_on = sprintf(
|
||||||
|
/* translators: %s: post date. */
|
||||||
|
esc_html_x( 'Posted on %s', 'post date', 'yuzu' ),
|
||||||
|
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
|
||||||
|
);
|
||||||
|
|
||||||
|
echo '<span class="posted-on">' . $posted_on . '</span>'; // WPCS: XSS OK.
|
||||||
|
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_posted_by' ) ) :
|
||||||
|
/**
|
||||||
|
* Prints HTML with meta information for the current author.
|
||||||
|
*/
|
||||||
|
function yuzu_posted_by() {
|
||||||
|
$byline = sprintf(
|
||||||
|
/* translators: %s: post author. */
|
||||||
|
esc_html_x( 'by %s', 'post author', 'yuzu' ),
|
||||||
|
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
|
||||||
|
);
|
||||||
|
|
||||||
|
echo '<span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK.
|
||||||
|
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_entry_footer' ) ) :
|
||||||
|
/**
|
||||||
|
* Prints HTML with meta information for the categories, tags and comments.
|
||||||
|
*/
|
||||||
|
function yuzu_entry_footer() {
|
||||||
|
// Hide category and tag text for pages.
|
||||||
|
if ( 'post' === get_post_type() ) {
|
||||||
|
/* translators: used between list items, there is a space after the comma */
|
||||||
|
$categories_list = get_the_category_list( esc_html__( ', ', 'yuzu' ) );
|
||||||
|
if ( $categories_list ) {
|
||||||
|
/* translators: 1: list of categories. */
|
||||||
|
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'yuzu' ) . '</span>', $categories_list ); // WPCS: XSS OK.
|
||||||
|
}
|
||||||
|
|
||||||
|
/* translators: used between list items, there is a space after the comma */
|
||||||
|
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'yuzu' ) );
|
||||||
|
if ( $tags_list ) {
|
||||||
|
/* translators: 1: list of tags. */
|
||||||
|
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'yuzu' ) . '</span>', $tags_list ); // WPCS: XSS OK.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
|
||||||
|
echo '<span class="comments-link">';
|
||||||
|
comments_popup_link(
|
||||||
|
sprintf(
|
||||||
|
wp_kses(
|
||||||
|
/* translators: %s: post title */
|
||||||
|
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'yuzu' ),
|
||||||
|
array(
|
||||||
|
'span' => array(
|
||||||
|
'class' => array(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
get_the_title()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_post_link(
|
||||||
|
sprintf(
|
||||||
|
wp_kses(
|
||||||
|
/* translators: %s: Name of current post. Only visible to screen readers */
|
||||||
|
__( 'Edit <span class="screen-reader-text">%s</span>', 'yuzu' ),
|
||||||
|
array(
|
||||||
|
'span' => array(
|
||||||
|
'class' => array(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
get_the_title()
|
||||||
|
),
|
||||||
|
'<span class="edit-link">',
|
||||||
|
'</span>'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if ( ! function_exists( 'yuzu_post_thumbnail' ) ) :
|
||||||
|
/**
|
||||||
|
* Displays an optional post thumbnail.
|
||||||
|
*
|
||||||
|
* Wraps the post thumbnail in an anchor element on index views, or a div
|
||||||
|
* element when on single views.
|
||||||
|
*/
|
||||||
|
function yuzu_post_thumbnail() {
|
||||||
|
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_singular() ) :
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="post-thumbnail">
|
||||||
|
<?php the_post_thumbnail(); ?>
|
||||||
|
</div><!-- .post-thumbnail -->
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
|
||||||
|
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
|
||||||
|
<?php
|
||||||
|
the_post_thumbnail( 'post-thumbnail', array(
|
||||||
|
'alt' => the_title_attribute( array(
|
||||||
|
'echo' => false,
|
||||||
|
) ),
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
endif; // End is_singular().
|
||||||
|
}
|
||||||
|
endif;
|
||||||
66
index.php
Normal file
66
index.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div id="articles-list" class="articles-list large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) :
|
||||||
|
|
||||||
|
/* Start the Loop */
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
endwhile;
|
||||||
|
|
||||||
|
the_posts_navigation();
|
||||||
|
|
||||||
|
else :
|
||||||
|
|
||||||
|
_e('No posts found!', 'yuzu');
|
||||||
|
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
BIN
languages/fr_FR.mo
Normal file
BIN
languages/fr_FR.mo
Normal file
Binary file not shown.
519
languages/fr_FR.po
Normal file
519
languages/fr_FR.po
Normal file
@@ -0,0 +1,519 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Yuzu Theme\n"
|
||||||
|
"POT-Creation-Date: 2019-06-14 13:13+0900\n"
|
||||||
|
"PO-Revision-Date: 2019-06-14 13:16+0900\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr_FR\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 2.2.3\n"
|
||||||
|
"X-Poedit-Basepath: ..\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
"X-Poedit-KeywordsList: __;_e\n"
|
||||||
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
|
#: archive.php:11
|
||||||
|
msgid "Archive"
|
||||||
|
msgstr "Archive"
|
||||||
|
|
||||||
|
#: archive.php:65 author.php:65 category.php:73 index.php:56 tag.php:73
|
||||||
|
msgid "No posts found!"
|
||||||
|
msgstr "Aucun article trouvé!"
|
||||||
|
|
||||||
|
#: attachment.php:31 taxonomy-attachment_keyword.php:37
|
||||||
|
msgid "Keyword"
|
||||||
|
msgstr "Mot-clé"
|
||||||
|
|
||||||
|
#: attachment.php:45
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Description"
|
||||||
|
|
||||||
|
#: attachment.php:52
|
||||||
|
msgid "Keywords"
|
||||||
|
msgstr "Mots-clés"
|
||||||
|
|
||||||
|
#: author.php:11
|
||||||
|
msgid "Articles written by"
|
||||||
|
msgstr "Articles écrits par"
|
||||||
|
|
||||||
|
#: category.php:19
|
||||||
|
msgid "Category"
|
||||||
|
msgstr "Catégorie"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:334
|
||||||
|
msgid "Install Required Plugins"
|
||||||
|
msgstr "Installer les extensions requises"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:335
|
||||||
|
msgid "Install Plugins"
|
||||||
|
msgstr "Installer les extensions"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:337
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing Plugin: %s"
|
||||||
|
msgstr "Installation de l'extension: %s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:339
|
||||||
|
#, php-format
|
||||||
|
msgid "Updating Plugin: %s"
|
||||||
|
msgstr "Mise-à-jour de l'extension: %s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:340
|
||||||
|
msgid "Something went wrong with the plugin API."
|
||||||
|
msgstr "Il y a eu une erreur avec l'API de l'extension."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:392
|
||||||
|
msgid "Return to Required Plugins Installer"
|
||||||
|
msgstr "Retourner à l'installateur des extensions requises"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:393
|
||||||
|
msgid "Return to the Dashboard"
|
||||||
|
msgstr "Retourner au tableau de bord"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:394 class-tgm-plugin-activation.php:3252
|
||||||
|
msgid "Plugin activated successfully."
|
||||||
|
msgstr "Extension activée avec succès."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:395
|
||||||
|
msgid "The following plugin was activated successfully:"
|
||||||
|
msgstr "Les extensions suivantes ont correctement été activées:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:397
|
||||||
|
#, php-format
|
||||||
|
msgid "No action taken. Plugin %1$s was already active."
|
||||||
|
msgstr "Aucun action réalisée. L'extension %1s était déjà active."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:399
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Plugin not activated. A higher version of %s is needed for this theme. "
|
||||||
|
"Please update the plugin."
|
||||||
|
msgstr ""
|
||||||
|
"Extension non activée. Une version supérieure de %s est nécéssaire pour ce "
|
||||||
|
"thème. Veuillez mettre-à-jour l'extension."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:401
|
||||||
|
#, php-format
|
||||||
|
msgid "All plugins installed and activated successfully. %1$s"
|
||||||
|
msgstr ""
|
||||||
|
"Toutes les extensions ont été installées et activées correctement. %1$s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:402
|
||||||
|
msgid "Dismiss this notice"
|
||||||
|
msgstr "Fermer cette notification"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:403
|
||||||
|
msgid ""
|
||||||
|
"There are one or more required or recommended plugins to install, update or "
|
||||||
|
"activate."
|
||||||
|
msgstr ""
|
||||||
|
"Il y a au moins une extension requise ou recommandée à installer, veuillez "
|
||||||
|
"mettre à jour ou activer."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:404
|
||||||
|
msgid "Please contact the administrator of this site for help."
|
||||||
|
msgstr "Veuillez contacter l'administrateur du site pour de l'aide."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2075
|
||||||
|
#, php-format
|
||||||
|
msgid "TGMPA v%s"
|
||||||
|
msgstr "TGMP v%s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2366
|
||||||
|
msgid "Required"
|
||||||
|
msgstr "Requis"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2369
|
||||||
|
msgid "Recommended"
|
||||||
|
msgstr "Recommandé"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2385
|
||||||
|
msgid "WordPress Repository"
|
||||||
|
msgstr "Annuaire WordPress"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2388
|
||||||
|
msgid "External Source"
|
||||||
|
msgstr "Source externe"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2391
|
||||||
|
msgid "Pre-Packaged"
|
||||||
|
msgstr "Pré-assemblé"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2408
|
||||||
|
msgid "Not Installed"
|
||||||
|
msgstr "Non installé"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2412
|
||||||
|
msgid "Installed But Not Activated"
|
||||||
|
msgstr "Installé mais non activé"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2414
|
||||||
|
msgid "Active"
|
||||||
|
msgstr "Actif"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2420
|
||||||
|
msgid "Required Update not Available"
|
||||||
|
msgstr "Mise-à-jour requise non disponible"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2423
|
||||||
|
msgid "Requires Update"
|
||||||
|
msgstr "Requiert une mise-à-jour"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2426
|
||||||
|
msgid "Update recommended"
|
||||||
|
msgstr "Mise-à-jour recommandée"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2583
|
||||||
|
msgid "Installed version:"
|
||||||
|
msgstr "Version installée:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2591
|
||||||
|
msgid "Minimum required version:"
|
||||||
|
msgstr "Version minimale requise:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2603
|
||||||
|
msgid "Available version:"
|
||||||
|
msgstr "Version disponible:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2640
|
||||||
|
msgid "Plugin"
|
||||||
|
msgstr "Extension"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2641
|
||||||
|
msgid "Source"
|
||||||
|
msgstr "Source"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2642
|
||||||
|
msgid "Type"
|
||||||
|
msgstr "Type"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2646
|
||||||
|
msgid "Version"
|
||||||
|
msgstr "Version"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2647
|
||||||
|
msgid "Status"
|
||||||
|
msgstr "Statut"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2696
|
||||||
|
#, php-format
|
||||||
|
msgid "Install %2$s"
|
||||||
|
msgstr "Installer %2$s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2701
|
||||||
|
#, php-format
|
||||||
|
msgid "Update %2$s"
|
||||||
|
msgstr "Mettre-à-jour %2$s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2707
|
||||||
|
#, php-format
|
||||||
|
msgid "Activate %2$s"
|
||||||
|
msgstr "Activer %2$s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2810
|
||||||
|
msgid "Install"
|
||||||
|
msgstr "Installer"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2816
|
||||||
|
msgid "Update"
|
||||||
|
msgstr "Mettre-à-jour"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2819
|
||||||
|
msgid "Activate"
|
||||||
|
msgstr "Activer"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2850
|
||||||
|
msgid "No plugins were selected to be installed. No action taken."
|
||||||
|
msgstr ""
|
||||||
|
"Aucune extension n’a été sélectionnée pour être installée. Aucune action n’a "
|
||||||
|
"été effectuée."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2852
|
||||||
|
msgid "No plugins were selected to be updated. No action taken."
|
||||||
|
msgstr ""
|
||||||
|
"Aucune extension n’a été sélectionnée pour être mise à jour. Aucune action "
|
||||||
|
"n’a été effectuée."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2893
|
||||||
|
msgid "No plugins are available to be installed at this time."
|
||||||
|
msgstr "Aucune extension à installer pour le moment."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2895
|
||||||
|
msgid "No plugins are available to be updated at this time."
|
||||||
|
msgstr "Aucune extension à mettre à jour pour le moment."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3251
|
||||||
|
msgid "Plugin activation failed."
|
||||||
|
msgstr "L’activation de l’extension a échoué."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3591
|
||||||
|
#, php-format
|
||||||
|
msgid "Updating Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "Mise à jour de l’extension %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3594
|
||||||
|
#, php-format
|
||||||
|
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
|
||||||
|
msgstr ""
|
||||||
|
"Une erreur est survenue lors de l’installation de %1$s: <strong>%2$s</"
|
||||||
|
"strong>."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3596
|
||||||
|
#, php-format
|
||||||
|
msgid "The installation of %1$s failed."
|
||||||
|
msgstr "L’installation de %1$s a échoué."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3600
|
||||||
|
msgid ""
|
||||||
|
"The installation and activation process is starting. This process may take a "
|
||||||
|
"while on some hosts, so please be patient."
|
||||||
|
msgstr ""
|
||||||
|
"Le processus d’installation et d’activation a démarré. Cette opération peut "
|
||||||
|
"prendre du temps selon votre hébergeur, merci de bien vouloir patienter."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3602
|
||||||
|
#, php-format
|
||||||
|
msgid "%1$s installed and activated successfully."
|
||||||
|
msgstr "%1$s installé et activé avec succès."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3603
|
||||||
|
msgid "All installations and activations have been completed."
|
||||||
|
msgstr "Toutes les installations et activations sont terminées."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3605
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "Mise à jour et activation de l’extension %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3608
|
||||||
|
msgid ""
|
||||||
|
"The installation process is starting. This process may take a while on some "
|
||||||
|
"hosts, so please be patient."
|
||||||
|
msgstr ""
|
||||||
|
"Le processus d’installation a démarré. Cette opération peut prendre du temps "
|
||||||
|
"selon votre hébergeur, merci de bien vouloir patienter."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3611
|
||||||
|
msgid "All installations have been completed."
|
||||||
|
msgstr "Toutes les installations sont terminées."
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3613
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "Installation de l’extension %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: comments.php:24
|
||||||
|
msgid "Write an answer ..."
|
||||||
|
msgstr "Écrire une réponse ..."
|
||||||
|
|
||||||
|
#: comments.php:27
|
||||||
|
msgid "Post"
|
||||||
|
msgstr "Poster"
|
||||||
|
|
||||||
|
#: components/article-cards/large-article-card.php:24
|
||||||
|
#: components/article-cards/medium-article-card.php:24
|
||||||
|
#: components/article-cards/small-article-card.php:24
|
||||||
|
msgid "Read More"
|
||||||
|
msgstr "Lire la suite"
|
||||||
|
|
||||||
|
#: functions.php:260
|
||||||
|
msgid "Your comment is awaiting moderation."
|
||||||
|
msgstr "Votre commentaire est en attente de modération."
|
||||||
|
|
||||||
|
#: header.php:31
|
||||||
|
msgid "What are you looking for ... ?"
|
||||||
|
msgstr "Que cherchez-vous ... ?"
|
||||||
|
|
||||||
|
#: inc/custom-controls.php:358
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Ajouter"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:33
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Couleurs"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:48
|
||||||
|
#: inc/customizer-sections/colors-section.php:63
|
||||||
|
msgid "Color Scheme"
|
||||||
|
msgstr "Schéma de couleur"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:66
|
||||||
|
msgid "Light Theme (default)"
|
||||||
|
msgstr "Thème clair ( par défaut )"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:67
|
||||||
|
msgid "Dark Theme"
|
||||||
|
msgstr "Thème sombre"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:68
|
||||||
|
msgid "Custom Theme"
|
||||||
|
msgstr "Thème personnalisé"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:90
|
||||||
|
msgid "Backgrounds"
|
||||||
|
msgstr "Fonds"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:105
|
||||||
|
#: inc/customizer-sections/colors-section.php:209
|
||||||
|
#: inc/customizer-sections/colors-section.php:334
|
||||||
|
msgid "Unavailable"
|
||||||
|
msgstr "Indisponible"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:106
|
||||||
|
#: inc/customizer-sections/colors-section.php:210
|
||||||
|
#: inc/customizer-sections/colors-section.php:335
|
||||||
|
msgid ""
|
||||||
|
"Please select \"Custom Scheme\" in order to be able to edit colors "
|
||||||
|
"individually."
|
||||||
|
msgstr ""
|
||||||
|
"Veuillez choisir \"Thème personnalisé\" pour pouvoir modifier les couleurs "
|
||||||
|
"individuellements."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:194
|
||||||
|
msgid "Font Colors"
|
||||||
|
msgstr "Couleur des textes"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:319
|
||||||
|
#: inc/customizer-sections/layout-section.php:109
|
||||||
|
msgid "Others"
|
||||||
|
msgstr "Autre"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:9
|
||||||
|
msgid "General"
|
||||||
|
msgstr "Général"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:23
|
||||||
|
msgid "Social Networks"
|
||||||
|
msgstr "Réseaux sociaux"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:40
|
||||||
|
msgid "Instagram URL"
|
||||||
|
msgstr "URL Instagram"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:41
|
||||||
|
#: inc/customizer-sections/general-section.php:59
|
||||||
|
#: inc/customizer-sections/general-section.php:77
|
||||||
|
#: inc/customizer-sections/general-section.php:95
|
||||||
|
msgid "To hide it, leave it blank."
|
||||||
|
msgstr "Pour ne pas le montrer, laisser vide."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:58
|
||||||
|
msgid "Facebook URL"
|
||||||
|
msgstr "URL Facebook"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:76
|
||||||
|
msgid "Twitter URL"
|
||||||
|
msgstr "URL Twitter"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:94
|
||||||
|
msgid "Flickr URL"
|
||||||
|
msgstr "URL Flickr"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:110
|
||||||
|
msgid "Copyright"
|
||||||
|
msgstr "Copyright"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:127
|
||||||
|
msgid "Copyright Text"
|
||||||
|
msgstr "Texte du copyright"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:9
|
||||||
|
msgid "Layout"
|
||||||
|
msgstr "Mise-en-page"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:23
|
||||||
|
msgid "Top Bar"
|
||||||
|
msgstr "Barre supérieure"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:38
|
||||||
|
msgid "Enable search in the top bar."
|
||||||
|
msgstr "Activer la recherche dans la barre supérieure."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:52
|
||||||
|
msgid "Blog"
|
||||||
|
msgstr "Blog"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:67
|
||||||
|
msgid "Equalize articles cards height."
|
||||||
|
msgstr "Égaliser la hauteur des conteneurs des articles."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:81
|
||||||
|
msgid "Display previous/next articles at the bottom of articles."
|
||||||
|
msgstr "Afficher les articles suivants/précédents en bas des articles."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:95
|
||||||
|
msgid "Display article metadata."
|
||||||
|
msgstr "Afficher les métadonnées de l'article."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:124
|
||||||
|
msgid "Display a button to scroll back to top of the page."
|
||||||
|
msgstr "Afficher un bouton pour remonter en haut de la page."
|
||||||
|
|
||||||
|
#: inc/customizer.php:44
|
||||||
|
msgid "Initials"
|
||||||
|
msgstr "Initiales"
|
||||||
|
|
||||||
|
#: inc/customizer.php:72
|
||||||
|
msgid "Yuzu Theme Settings"
|
||||||
|
msgstr "Réglages du thème yuzu"
|
||||||
|
|
||||||
|
#: inc/customizer.php:73
|
||||||
|
msgid "All the settings for yuzu Theme"
|
||||||
|
msgstr "Tous les réglages du thème Yuzu"
|
||||||
|
|
||||||
|
#: inc/template-tags.php:82
|
||||||
|
#, php-format
|
||||||
|
msgid "Leave a Comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||||
|
msgstr "Laisse un commentaire<span class=\"screen-reader-text\"> on %s</span>"
|
||||||
|
|
||||||
|
#: inc/template-tags.php:99
|
||||||
|
#, php-format
|
||||||
|
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
|
||||||
|
msgstr "Modifier <span class=\"screen-reader-text\">%s</span>"
|
||||||
|
|
||||||
|
#: search.php:12
|
||||||
|
msgid "Search Results For"
|
||||||
|
msgstr "Résultat de la recherche pour"
|
||||||
|
|
||||||
|
#: search.php:38
|
||||||
|
msgid "Articles"
|
||||||
|
msgstr "Articles"
|
||||||
|
|
||||||
|
#: search.php:62
|
||||||
|
msgid "Collections"
|
||||||
|
msgstr "Collections"
|
||||||
|
|
||||||
|
#: search.php:79
|
||||||
|
msgid "Images"
|
||||||
|
msgstr "Images"
|
||||||
|
|
||||||
|
#: single-meow_collection.php:22
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Acceuil"
|
||||||
|
|
||||||
|
#: single.php:74
|
||||||
|
msgid "Previous Post"
|
||||||
|
msgstr "Article précédent"
|
||||||
|
|
||||||
|
#: single.php:89
|
||||||
|
msgid "Next Post"
|
||||||
|
msgstr "Article suivant"
|
||||||
|
|
||||||
|
#: tag.php:19
|
||||||
|
msgid "Tag"
|
||||||
|
msgstr "Tag"
|
||||||
|
|
||||||
|
#: taxonomy-meow_folder.php:22
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but it seems you haven't installed the Photography Core plugin ? "
|
||||||
|
"Please install it to use photography related features on this theme."
|
||||||
|
msgstr ""
|
||||||
|
"Désolé, mais il semblerait que vous n'ayez pas installé l'extension "
|
||||||
|
"Photography Core? Veuillez l'installer pour pouvoir utiliser des "
|
||||||
|
"fonctionalités liées à la photographie sur ce thème."
|
||||||
|
|
||||||
|
#~ msgid "Schemes"
|
||||||
|
#~ msgstr "Schémas"
|
||||||
BIN
languages/ja.mo
Normal file
BIN
languages/ja.mo
Normal file
Binary file not shown.
501
languages/ja.po
Normal file
501
languages/ja.po
Normal file
@@ -0,0 +1,501 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: \n"
|
||||||
|
"POT-Creation-Date: 2019-06-14 14:43+0900\n"
|
||||||
|
"PO-Revision-Date: 2019-06-14 14:58+0900\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: ja_JP\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 2.2.3\n"
|
||||||
|
"X-Poedit-Basepath: ..\n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
"X-Poedit-KeywordsList: __;_e\n"
|
||||||
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
|
#: archive.php:11
|
||||||
|
msgid "Archive"
|
||||||
|
msgstr "アーカイブ"
|
||||||
|
|
||||||
|
#: archive.php:65 author.php:65 category.php:73 index.php:56 tag.php:73
|
||||||
|
msgid "No posts found!"
|
||||||
|
msgstr "投稿ではありません!"
|
||||||
|
|
||||||
|
#: attachment.php:31 taxonomy-attachment_keyword.php:37
|
||||||
|
msgid "Keyword"
|
||||||
|
msgstr "キーワード"
|
||||||
|
|
||||||
|
#: attachment.php:45
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "説明"
|
||||||
|
|
||||||
|
#: attachment.php:52
|
||||||
|
msgid "Keywords"
|
||||||
|
msgstr "キーワード"
|
||||||
|
|
||||||
|
#: author.php:11
|
||||||
|
msgid "Articles written by"
|
||||||
|
msgstr "によって書かれた"
|
||||||
|
|
||||||
|
#: category.php:19
|
||||||
|
msgid "Category"
|
||||||
|
msgstr "カテゴリー"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:334
|
||||||
|
msgid "Install Required Plugins"
|
||||||
|
msgstr "必須プラグインのインストール"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:335
|
||||||
|
msgid "Install Plugins"
|
||||||
|
msgstr "プラグインのインストール"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:337
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing Plugin: %s"
|
||||||
|
msgstr "プラグインのインストール中: %s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:339
|
||||||
|
#, php-format
|
||||||
|
msgid "Updating Plugin: %s"
|
||||||
|
msgstr "プラグインを更新中: %s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:340
|
||||||
|
msgid "Something went wrong with the plugin API."
|
||||||
|
msgstr "プラグイン API で問題が発生しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:392
|
||||||
|
msgid "Return to Required Plugins Installer"
|
||||||
|
msgstr "必須プラグインのインストール画面に戻る"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:393
|
||||||
|
msgid "Return to the Dashboard"
|
||||||
|
msgstr "ダッシュボードに戻る"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:394 class-tgm-plugin-activation.php:3252
|
||||||
|
msgid "Plugin activated successfully."
|
||||||
|
msgstr "プラグインを有効化しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:395
|
||||||
|
msgid "The following plugin was activated successfully:"
|
||||||
|
msgstr "次のプラグインを有効化しました:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:397
|
||||||
|
#, php-format
|
||||||
|
msgid "No action taken. Plugin %1$s was already active."
|
||||||
|
msgstr "操作を実行しませんでした。プラグイン %1$s はすでに有効化されています。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:399
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Plugin not activated. A higher version of %s is needed for this theme. "
|
||||||
|
"Please update the plugin."
|
||||||
|
msgstr ""
|
||||||
|
"プラグインを有効化できませんでした。このテーマはプラグイン %s の現在のバー"
|
||||||
|
"ジョンをサポートしていません。プラグインを更新してください。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:401
|
||||||
|
#, php-format
|
||||||
|
msgid "All plugins installed and activated successfully. %1$s"
|
||||||
|
msgstr "すべてのプラグインを正常にインストールし、有効化しました。 %1$s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:402
|
||||||
|
msgid "Dismiss this notice"
|
||||||
|
msgstr "通知を無視"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:403
|
||||||
|
msgid ""
|
||||||
|
"There are one or more required or recommended plugins to install, update or "
|
||||||
|
"activate."
|
||||||
|
msgstr ""
|
||||||
|
"インストール、更新、有効化可能な必須、または推奨のプラグインがあります。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:404
|
||||||
|
msgid "Please contact the administrator of this site for help."
|
||||||
|
msgstr "ヘルプが必要な場合はこのサイトの管理者にお問い合わせください。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2075
|
||||||
|
#, php-format
|
||||||
|
msgid "TGMPA v%s"
|
||||||
|
msgstr "TGMPA v%s"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2366
|
||||||
|
msgid "Required"
|
||||||
|
msgstr "必須"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2369
|
||||||
|
msgid "Recommended"
|
||||||
|
msgstr "推奨"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2385
|
||||||
|
msgid "WordPress Repository"
|
||||||
|
msgstr "WordPress 公式ディレクトリ"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2388
|
||||||
|
msgid "External Source"
|
||||||
|
msgstr "外部ソース"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2391
|
||||||
|
msgid "Pre-Packaged"
|
||||||
|
msgstr "プリパッケージ"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2408
|
||||||
|
msgid "Not Installed"
|
||||||
|
msgstr "未インストール"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2412
|
||||||
|
msgid "Installed But Not Activated"
|
||||||
|
msgstr "停止中"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2414
|
||||||
|
msgid "Active"
|
||||||
|
msgstr "有効"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2420
|
||||||
|
msgid "Required Update not Available"
|
||||||
|
msgstr "必要な更新が利用不可"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2423
|
||||||
|
msgid "Requires Update"
|
||||||
|
msgstr "更新が必要"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2426
|
||||||
|
msgid "Update recommended"
|
||||||
|
msgstr "更新を推奨"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2583
|
||||||
|
msgid "Installed version:"
|
||||||
|
msgstr "インストール済みバージョン:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2591
|
||||||
|
msgid "Minimum required version:"
|
||||||
|
msgstr "最低要求バージョン:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2603
|
||||||
|
msgid "Available version:"
|
||||||
|
msgstr "利用可能なバージョン:"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2640
|
||||||
|
msgid "Plugin"
|
||||||
|
msgstr "プラグイン"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2641
|
||||||
|
msgid "Source"
|
||||||
|
msgstr "取得元"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2642
|
||||||
|
msgid "Type"
|
||||||
|
msgstr "タイプ"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2646
|
||||||
|
msgid "Version"
|
||||||
|
msgstr "バージョン"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2647
|
||||||
|
msgid "Status"
|
||||||
|
msgstr "状態"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2696
|
||||||
|
#, php-format
|
||||||
|
msgid "Install %2$s"
|
||||||
|
msgstr "%2$s インストール"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2701
|
||||||
|
#, php-format
|
||||||
|
msgid "Update %2$s"
|
||||||
|
msgstr "%2$s 更新"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2707
|
||||||
|
#, php-format
|
||||||
|
msgid "Activate %2$s"
|
||||||
|
msgstr "%2$s 有効化"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2810
|
||||||
|
msgid "Install"
|
||||||
|
msgstr "インストール"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2816
|
||||||
|
msgid "Update"
|
||||||
|
msgstr "更新"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2819
|
||||||
|
msgid "Activate"
|
||||||
|
msgstr "有効化"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2850
|
||||||
|
msgid "No plugins were selected to be installed. No action taken."
|
||||||
|
msgstr "インストールするプラグインが選択されていません。処理を中断しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2852
|
||||||
|
msgid "No plugins were selected to be updated. No action taken."
|
||||||
|
msgstr "更新するプラグインが選択されていません。処理を中断しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2893
|
||||||
|
msgid "No plugins are available to be installed at this time."
|
||||||
|
msgstr "現在インストール可能なプラグインはありません。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:2895
|
||||||
|
msgid "No plugins are available to be updated at this time."
|
||||||
|
msgstr "現在更新可能なプラグインはありません。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3251
|
||||||
|
msgid "Plugin activation failed."
|
||||||
|
msgstr "プラグインの有効化に失敗しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3591
|
||||||
|
#, php-format
|
||||||
|
msgid "Updating Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "プラグインを更新中 %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3594
|
||||||
|
#, php-format
|
||||||
|
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
|
||||||
|
msgstr "<strong>%2$s</strong>%1$s のインストール中にエラーが発生しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3596
|
||||||
|
#, php-format
|
||||||
|
msgid "The installation of %1$s failed."
|
||||||
|
msgstr "%1$s のインストールに失敗しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3600
|
||||||
|
msgid ""
|
||||||
|
"The installation and activation process is starting. This process may take a "
|
||||||
|
"while on some hosts, so please be patient."
|
||||||
|
msgstr ""
|
||||||
|
"インストールと有効化を開始しました。環境によっては時間がかかる場合がありま"
|
||||||
|
"す。しばらくお待ちください。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3602
|
||||||
|
#, php-format
|
||||||
|
msgid "%1$s installed and activated successfully."
|
||||||
|
msgstr "%1$s を正常にインストールし、有効化しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3603
|
||||||
|
msgid "All installations and activations have been completed."
|
||||||
|
msgstr "すべてのインストールと有効化が完了しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3605
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "プラグインをインストール、有効化中 %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3608
|
||||||
|
msgid ""
|
||||||
|
"The installation process is starting. This process may take a while on some "
|
||||||
|
"hosts, so please be patient."
|
||||||
|
msgstr ""
|
||||||
|
"更新プロセスを開始しました。環境によっては時間がかかる場合があります。しばら"
|
||||||
|
"くお待ちください。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3611
|
||||||
|
msgid "All installations have been completed."
|
||||||
|
msgstr "すべてのインストールが完了しました。"
|
||||||
|
|
||||||
|
#: class-tgm-plugin-activation.php:3613
|
||||||
|
#, php-format
|
||||||
|
msgid "Installing Plugin %1$s (%2$d/%3$d)"
|
||||||
|
msgstr "プラグインをインストール中 %1$s (%2$d/%3$d)"
|
||||||
|
|
||||||
|
#: comments.php:24
|
||||||
|
msgid "Write an answer ..."
|
||||||
|
msgstr "コメントを残す ..."
|
||||||
|
|
||||||
|
#: comments.php:27
|
||||||
|
msgid "Post"
|
||||||
|
msgstr "投稿"
|
||||||
|
|
||||||
|
#: components/article-cards/large-article-card.php:24
|
||||||
|
#: components/article-cards/medium-article-card.php:24
|
||||||
|
#: components/article-cards/small-article-card.php:24
|
||||||
|
msgid "Read More"
|
||||||
|
msgstr "続きを読む"
|
||||||
|
|
||||||
|
#: functions.php:260
|
||||||
|
msgid "Your comment is awaiting moderation."
|
||||||
|
msgstr "あなたのコメントは現在承認待ちです。"
|
||||||
|
|
||||||
|
#: header.php:31
|
||||||
|
msgid "What are you looking for ... ?"
|
||||||
|
msgstr "何を探していますか...?"
|
||||||
|
|
||||||
|
#: inc/custom-controls.php:358
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "付け足す"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:33
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "色"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:48
|
||||||
|
#: inc/customizer-sections/colors-section.php:63
|
||||||
|
msgid "Color Scheme"
|
||||||
|
msgstr "配色"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:66
|
||||||
|
msgid "Light Theme (default)"
|
||||||
|
msgstr "明るい"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:67
|
||||||
|
msgid "Dark Theme"
|
||||||
|
msgstr "暗闇"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:68
|
||||||
|
msgid "Custom Theme"
|
||||||
|
msgstr "風習"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:90
|
||||||
|
msgid "Backgrounds"
|
||||||
|
msgstr "背景"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:105
|
||||||
|
#: inc/customizer-sections/colors-section.php:209
|
||||||
|
#: inc/customizer-sections/colors-section.php:334
|
||||||
|
msgid "Unavailable"
|
||||||
|
msgstr "無効"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:106
|
||||||
|
#: inc/customizer-sections/colors-section.php:210
|
||||||
|
#: inc/customizer-sections/colors-section.php:335
|
||||||
|
msgid ""
|
||||||
|
"Please select \"Custom Scheme\" in order to be able to edit colors "
|
||||||
|
"individually."
|
||||||
|
msgstr "風習を選べて下さい。"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:194
|
||||||
|
msgid "Font Colors"
|
||||||
|
msgstr "テキスト色"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/colors-section.php:319
|
||||||
|
#: inc/customizer-sections/layout-section.php:109
|
||||||
|
msgid "Others"
|
||||||
|
msgstr "その他"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:9
|
||||||
|
msgid "General"
|
||||||
|
msgstr "一般"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:23
|
||||||
|
msgid "Social Networks"
|
||||||
|
msgstr "SNS"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:40
|
||||||
|
msgid "Instagram URL"
|
||||||
|
msgstr "インスタグラムのURL"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:41
|
||||||
|
#: inc/customizer-sections/general-section.php:59
|
||||||
|
#: inc/customizer-sections/general-section.php:77
|
||||||
|
#: inc/customizer-sections/general-section.php:95
|
||||||
|
msgid "To hide it, leave it blank."
|
||||||
|
msgstr "虚しいだったら見せません。"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:58
|
||||||
|
msgid "Facebook URL"
|
||||||
|
msgstr "FacebookのURL"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:76
|
||||||
|
msgid "Twitter URL"
|
||||||
|
msgstr "ツイッターのURL"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:94
|
||||||
|
msgid "Flickr URL"
|
||||||
|
msgstr "FlickrのURL"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:110
|
||||||
|
msgid "Copyright"
|
||||||
|
msgstr "著作権"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/general-section.php:127
|
||||||
|
msgid "Copyright Text"
|
||||||
|
msgstr "著作権"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:9
|
||||||
|
msgid "Layout"
|
||||||
|
msgstr "設計"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:23
|
||||||
|
msgid "Top Bar"
|
||||||
|
msgstr "上部分"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:38
|
||||||
|
msgid "Enable search in the top bar."
|
||||||
|
msgstr "上部分の検索フィールドを見せます。"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:52
|
||||||
|
msgid "Blog"
|
||||||
|
msgstr "ブロッグ"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:67
|
||||||
|
msgid "Equalize articles cards height."
|
||||||
|
msgstr "投稿の高さを平等にする."
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:81
|
||||||
|
msgid "Display previous/next articles at the bottom of articles."
|
||||||
|
msgstr "過去の投稿/次の投稿を見せます。"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:95
|
||||||
|
msgid "Display article metadata."
|
||||||
|
msgstr "投稿のメタを見せます。"
|
||||||
|
|
||||||
|
#: inc/customizer-sections/layout-section.php:124
|
||||||
|
msgid "Display a button to scroll back to top of the page."
|
||||||
|
msgstr "ページの上部までスクロールしてくれるボタンを見せる。"
|
||||||
|
|
||||||
|
#: inc/customizer.php:55
|
||||||
|
msgid "Yuzu Theme Settings"
|
||||||
|
msgstr "Yuzuテーマの設定"
|
||||||
|
|
||||||
|
#: inc/customizer.php:56
|
||||||
|
msgid "All the settings for yuzu Theme"
|
||||||
|
msgstr "Yuzuテーマの設定"
|
||||||
|
|
||||||
|
#: inc/template-tags.php:82
|
||||||
|
#, php-format
|
||||||
|
msgid "Leave a Comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||||
|
msgstr "%sにコメントを残す"
|
||||||
|
|
||||||
|
#: inc/template-tags.php:99
|
||||||
|
#, php-format
|
||||||
|
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
|
||||||
|
msgstr "編集 <span class=\"screen-reader-text\">%s</span>"
|
||||||
|
|
||||||
|
#: search.php:12
|
||||||
|
msgid "Search Results For"
|
||||||
|
msgstr "検索結果"
|
||||||
|
|
||||||
|
#: search.php:38
|
||||||
|
msgid "Articles"
|
||||||
|
msgstr "投稿"
|
||||||
|
|
||||||
|
#: search.php:62
|
||||||
|
msgid "Collections"
|
||||||
|
msgstr "コレクション"
|
||||||
|
|
||||||
|
#: search.php:79
|
||||||
|
msgid "Images"
|
||||||
|
msgstr "写真"
|
||||||
|
|
||||||
|
#: single-meow_collection.php:22
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "トップ"
|
||||||
|
|
||||||
|
#: single.php:74
|
||||||
|
msgid "Previous Post"
|
||||||
|
msgstr "過去の投稿"
|
||||||
|
|
||||||
|
#: single.php:89
|
||||||
|
msgid "Next Post"
|
||||||
|
msgstr "次の投稿"
|
||||||
|
|
||||||
|
#: tag.php:19
|
||||||
|
msgid "Tag"
|
||||||
|
msgstr "タグ"
|
||||||
|
|
||||||
|
#: taxonomy-meow_folder.php:22
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but it seems you haven't installed the Photography Core plugin ? "
|
||||||
|
"Please install it to use photography related features on this theme."
|
||||||
|
msgstr ""
|
||||||
|
"ごめんなさいですけど「Photography Core」と言うプラグイン見つからないようで"
|
||||||
|
"す。インストール下さい。"
|
||||||
7
languages/readme.txt
Normal file
7
languages/readme.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Place your theme language files in this directory.
|
||||||
|
|
||||||
|
Please visit the following links to learn more about translating WordPress themes:
|
||||||
|
|
||||||
|
https://make.wordpress.org/polyglots/teams/
|
||||||
|
https://developer.wordpress.org/themes/functionality/localization/
|
||||||
|
https://developer.wordpress.org/reference/functions/load_theme_textdomain/
|
||||||
186
languages/yuzu.pot
Normal file
186
languages/yuzu.pot
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
# Copyright (C) 2017 Automattic
|
||||||
|
# This file is distributed under the GNU General Public License v2 or later.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: _s 1.0.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
|
||||||
|
"POT-Creation-Date: 2016-12-23 16:00+0100\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator:\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
||||||
|
|
||||||
|
#: 404.php:17
|
||||||
|
msgid "Oops! That page can’t be found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:21
|
||||||
|
msgid ""
|
||||||
|
"It looks like nothing was found at this location. Maybe try one of the "
|
||||||
|
"links below or a search?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:30
|
||||||
|
msgid "Most Used Categories"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: 404.php:47
|
||||||
|
#. translators: %1$s: smiley
|
||||||
|
msgid "Try looking in the monthly archives. %1$s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:34
|
||||||
|
#. translators: 1: title.
|
||||||
|
msgid "One thought on “%1$s”"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:67
|
||||||
|
msgid "Comments are closed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: footer.php:18
|
||||||
|
msgid "https://wordpress.org/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: footer.php:20
|
||||||
|
#. translators: %s: CMS name, i.e. WordPress.
|
||||||
|
msgid "Proudly powered by %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: footer.php:25
|
||||||
|
#. translators: 1: Theme name, 2: Theme author.
|
||||||
|
msgid "Theme: %1$s by %2$s."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:47
|
||||||
|
msgid "Primary"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:105
|
||||||
|
msgid "Sidebar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php:107
|
||||||
|
msgid "Add widgets here."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:24
|
||||||
|
msgid "Skip to content"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:45
|
||||||
|
msgid "Primary Menu"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:52
|
||||||
|
#. translators: used between list items, there is a space after the comma
|
||||||
|
msgid ", "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:55
|
||||||
|
#. translators: 1: list of categories.
|
||||||
|
msgid "Posted in %1$s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:62
|
||||||
|
#. translators: 1: list of tags.
|
||||||
|
msgid "Tagged %1$s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:72
|
||||||
|
#. translators: %s: post title
|
||||||
|
msgid "Leave a Comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:89 template-parts/content-page.php:35
|
||||||
|
#. translators: %s: Name of current post. Only visible to screen readers
|
||||||
|
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: search.php:21
|
||||||
|
#. translators: %s: search query.
|
||||||
|
msgid "Search Results for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content-none.php:14
|
||||||
|
msgid "Nothing Found"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content-none.php:25
|
||||||
|
#. translators: 1: link to WP admin new post page.
|
||||||
|
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content-none.php:38
|
||||||
|
msgid ""
|
||||||
|
"Sorry, but nothing matched your search terms. Please try again with some "
|
||||||
|
"different keywords."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content-none.php:44
|
||||||
|
msgid ""
|
||||||
|
"It seems we can’t find what you’re looking for. Perhaps "
|
||||||
|
"searching can help."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content-page.php:22 template-parts/content.php:45
|
||||||
|
msgid "Pages:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: template-parts/content.php:34
|
||||||
|
#. translators: %s: Name of current post. Only visible to screen readers
|
||||||
|
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Theme Name of the plugin/theme
|
||||||
|
msgid "_s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Theme URI of the plugin/theme
|
||||||
|
msgid "https://underscores.me/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Description of the plugin/theme
|
||||||
|
msgid ""
|
||||||
|
"Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if "
|
||||||
|
"you like. I'm a theme meant for hacking so don't use me as a <em>Parent "
|
||||||
|
"Theme</em>. Instead try turning me into the next, most awesome, WordPress "
|
||||||
|
"theme out there. That's what I'm here for."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author of the plugin/theme
|
||||||
|
msgid "Automattic"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author URI of the plugin/theme
|
||||||
|
msgid "https://automattic.com/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: comments.php:40
|
||||||
|
#. translators: 1: comment count number, 2: title.
|
||||||
|
msgctxt "comments title"
|
||||||
|
msgid "%1$s thought on “%2$s”"
|
||||||
|
msgid_plural "%1$s thoughts on “%2$s”"
|
||||||
|
msgstr[0] ""
|
||||||
|
msgstr[1] ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:29
|
||||||
|
#. translators: %s: post date.
|
||||||
|
msgctxt "post date"
|
||||||
|
msgid "Posted on %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:35
|
||||||
|
#. translators: %s: post author.
|
||||||
|
msgctxt "post author"
|
||||||
|
msgid "by %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: inc/template-tags.php:59
|
||||||
|
#. translators: used between list items, there is a space after the comma
|
||||||
|
msgctxt "list item separator"
|
||||||
|
msgid ", "
|
||||||
|
msgstr ""
|
||||||
44
page-templates/template-no-header-page.php
Normal file
44
page-templates/template-no-header-page.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
Template Name: Page Without Header
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<?php
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="entry-content fullwidth-container">
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
|
if ( comments_open() || get_comments_number() ) :
|
||||||
|
?>
|
||||||
|
<div class="comments-section">
|
||||||
|
<?php
|
||||||
|
comments_template();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
endwhile; // End of the loop.
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
52
page.php
Normal file
52
page.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<?php
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
?>
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<h1 class="page-title"><?= get_the_title(); ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$featured_image = get_the_post_thumbnail_url(get_the_ID(),'large');
|
||||||
|
if($featured_image) { ?>
|
||||||
|
<div class="page-featured-image fullwidth-container">
|
||||||
|
<img src="<?= $featured_image; ?>">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="entry-content fullwidth-container">
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
|
if ( comments_open() || get_comments_number() ) :
|
||||||
|
?>
|
||||||
|
<div class="comments-section">
|
||||||
|
<?php
|
||||||
|
comments_template();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
endwhile; // End of the loop.
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
132
phpcs.xml.dist
Normal file
132
phpcs.xml.dist
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="WordPress Theme Coding Standards">
|
||||||
|
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
||||||
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
|
||||||
|
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki -->
|
||||||
|
<!-- See https://github.com/wimg/PHPCompatibility -->
|
||||||
|
|
||||||
|
<!-- Set a description for this ruleset. -->
|
||||||
|
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
#############################################################################
|
||||||
|
COMMAND LINE ARGUMENTS
|
||||||
|
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
|
||||||
|
#############################################################################
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Pass some flags to PHPCS:
|
||||||
|
p flag: Show progress of the run.
|
||||||
|
s flag: Show sniff codes in all reports.
|
||||||
|
-->
|
||||||
|
<arg value="ps"/>
|
||||||
|
|
||||||
|
<!-- Strip the filepaths down to the relevant bit. -->
|
||||||
|
<arg name="basepath" value="./"/>
|
||||||
|
|
||||||
|
<!-- Check up to 8 files simultanously. -->
|
||||||
|
<arg name="parallel" value="8"/>
|
||||||
|
|
||||||
|
<!-- Only check the PHP, CSS and SCSS files. JS files are checked separately with JSCS and JSHint. -->
|
||||||
|
<arg name="extensions" value="php,css,scss/css"/>
|
||||||
|
|
||||||
|
<!-- Check all files in this directory and the directories below it. -->
|
||||||
|
<file>.</file>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
#############################################################################
|
||||||
|
USE THE WordPress RULESET
|
||||||
|
#############################################################################
|
||||||
|
-->
|
||||||
|
|
||||||
|
<rule ref="WordPress"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
#############################################################################
|
||||||
|
SNIFF SPECIFIC CONFIGURATION
|
||||||
|
#############################################################################
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Verify that the text_domain is set to the desired text-domain.
|
||||||
|
Multiple valid text domains can be provided as a comma-delimited list. -->
|
||||||
|
<rule ref="WordPress.WP.I18n">
|
||||||
|
<properties>
|
||||||
|
<property name="text_domain" type="array" value="_s"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Allow for theme specific exceptions to the file name rules based
|
||||||
|
on the theme hierarchy. -->
|
||||||
|
<rule ref="WordPress.Files.FileName">
|
||||||
|
<properties>
|
||||||
|
<property name="is_theme" value="true"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Set the minimum supported WP version. This is used by several sniffs.
|
||||||
|
The minimum version set here should be in line with the minimum WP version
|
||||||
|
as set in the "Requires at least" tag in the readme.txt file. -->
|
||||||
|
<config name="minimum_supported_wp_version" value="4.5"/>
|
||||||
|
|
||||||
|
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
|
||||||
|
<properties>
|
||||||
|
<!-- No need to adjust alignment of large arrays when the item with the largest key is removed. -->
|
||||||
|
<property name="exact" value="false"/>
|
||||||
|
<!-- Don't align multi-line items if ALL items in the array are multi-line. -->
|
||||||
|
<property name="alignMultilineItems" value="!=100"/>
|
||||||
|
<!-- Array assignment operator should always be on the same line as the array key. -->
|
||||||
|
<property name="ignoreNewlines" value="false"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Verify that everything in the global namespace is prefixed with a theme specific prefix.
|
||||||
|
Multiple valid prefixes can be provided as a comma-delimited list. -->
|
||||||
|
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
||||||
|
<properties>
|
||||||
|
<property name="prefixes" type="array" value="_s" />
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
#############################################################################
|
||||||
|
USE THE PHPCompatibility RULESET
|
||||||
|
#############################################################################
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<config name="testVersion" value="5.2-99.0"/>
|
||||||
|
<rule ref="PHPCompatibility">
|
||||||
|
<!-- Whitelist PHP native classes, interfaces, functions and constants which
|
||||||
|
are back-filled by WP.
|
||||||
|
|
||||||
|
Based on:
|
||||||
|
* /wp-includes/compat.php
|
||||||
|
* /wp-includes/random_compat/random.php
|
||||||
|
-->
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewClasses.errorFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewClasses.typeerrorFound"/>
|
||||||
|
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewConstants.json_pretty_printFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewConstants.php_version_idFound"/>
|
||||||
|
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewFunctions.hash_equalsFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewFunctions.json_last_error_msgFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewFunctions.random_intFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewFunctions.random_bytesFound"/>
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewFunctions.array_replace_recursiveFound"/>
|
||||||
|
|
||||||
|
<exclude name="PHPCompatibility.PHP.NewInterfaces.jsonserializableFound"/>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- Whitelist the WP Core mysql_to_rfc3339() function. -->
|
||||||
|
<rule ref="PHPCompatibility.PHP.RemovedExtensions">
|
||||||
|
<properties>
|
||||||
|
<property name="functionWhitelist" type="array" value="mysql_to_rfc3339"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
</ruleset>
|
||||||
17
rtl.css
Normal file
17
rtl.css
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Theme Name: Yuzu
|
||||||
|
|
||||||
|
Adding support for languages written in a Right To Left (RTL) direction is easy -
|
||||||
|
it's just a matter of overwriting all the horizontal positioning attributes
|
||||||
|
of your CSS stylesheet in a separate stylesheet file named rtl.css.
|
||||||
|
|
||||||
|
https://codex.wordpress.org/Right-to-Left_Language_Support
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
body {
|
||||||
|
direction: rtl;
|
||||||
|
unicode-bidi: embed;
|
||||||
|
}
|
||||||
|
*/
|
||||||
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 712 KiB |
100
search.php
Normal file
100
search.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
global $photocore;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Search Results For', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title">"<?= get_search_query(); ?>"</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) {
|
||||||
|
/* Start the Loop to check what's in the results */
|
||||||
|
if (have_posts()) {
|
||||||
|
while (have_posts()) : the_post();
|
||||||
|
if(get_post_type() == "post") {
|
||||||
|
$post_exists = true;
|
||||||
|
}
|
||||||
|
if(get_post_type() == "meow_collection") {
|
||||||
|
$collection_exists = true;
|
||||||
|
}
|
||||||
|
if(get_post_type() == "attachment") {
|
||||||
|
$attachment_exists = true;
|
||||||
|
}
|
||||||
|
endwhile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($post_exists) { ?>
|
||||||
|
<div class="mwt-section-header">
|
||||||
|
<h3><?php _e('Articles', 'yuzu'); ?></h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<div class="articles-list">
|
||||||
|
<?php
|
||||||
|
$count = 0;
|
||||||
|
while (have_posts()) : the_post();
|
||||||
|
if(get_post_type() == "post") {
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
}
|
||||||
|
if($count == 2) {
|
||||||
|
$count = 0;
|
||||||
|
} else {
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($collection_exists) { ?>
|
||||||
|
<div class="mwt-section-header">
|
||||||
|
<h3><?php _e('Collections', 'yuzu'); ?></h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<div class="collections-list">
|
||||||
|
<?php
|
||||||
|
while (have_posts()) : the_post();
|
||||||
|
if(get_post_type() == "meow_collection") {
|
||||||
|
$collection = $photocore->get_collection($post->ID);
|
||||||
|
require get_template_directory() . '/components/collection-card.php';
|
||||||
|
}
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if($attachment_exists) { ?>
|
||||||
|
<div class="mwt-section-header">
|
||||||
|
<h3><?php _e('Images', 'yuzu'); ?></h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<div class="attachments-list">
|
||||||
|
<?php
|
||||||
|
while (have_posts()) : the_post();
|
||||||
|
if(get_post_type() == "attachment") {
|
||||||
|
$ids_array[] = $post->ID;
|
||||||
|
}
|
||||||
|
endwhile;
|
||||||
|
$ids = implode(',',$ids_array);
|
||||||
|
echo do_shortcode('[gallery mgl-layout="default" ids="'.$ids.'"]');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
79
single-meow_collection.php
Normal file
79
single-meow_collection.php
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-collection top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
$featured_image = get_the_post_thumbnail_url(get_the_ID(),'large');
|
||||||
|
require get_template_directory() . '/components/opaque-featured-image.php';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<?php
|
||||||
|
global $photocore;
|
||||||
|
$breadcrumb = $photocore->get_breadcrumbs_from_collection( $post->ID );
|
||||||
|
$home_item = [
|
||||||
|
'url' => get_home_url(),
|
||||||
|
'name' => __('Home', 'yuzu')
|
||||||
|
];
|
||||||
|
array_unshift($breadcrumb, $home_item);
|
||||||
|
|
||||||
|
if(count( $breadcrumb ) > 1 && get_theme_mod('display_breadcrumb', true)) {
|
||||||
|
?>
|
||||||
|
<div class="meow-breadcrumb">
|
||||||
|
<div class="breadcrumb-items-container">
|
||||||
|
<?php
|
||||||
|
foreach($breadcrumb as $key=>$value) {
|
||||||
|
if($key != count($breadcrumb) - 1) {
|
||||||
|
?>
|
||||||
|
<a href="<?php echo $value['url']; ?>" class="breadcrumb-item">
|
||||||
|
<?php echo $value['name']; ?>
|
||||||
|
</a>
|
||||||
|
<span class="divider">/</span>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
?>
|
||||||
|
<span class="breadcrumb-item active">
|
||||||
|
<?php echo $value['name']; ?>
|
||||||
|
</span>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<h1 class="page-title"><?= get_the_title(); ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-content fullwidth-container">
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
|
if ( comments_open() || get_comments_number() ) :
|
||||||
|
?>
|
||||||
|
<div class="comments-section">
|
||||||
|
<?php
|
||||||
|
comments_template();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
endwhile; // End of the loop.
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
120
single.php
Normal file
120
single.php
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying all single posts
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div <?php post_class("single-article top-and-bottom-margin"); ?>>
|
||||||
|
<?php
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
?>
|
||||||
|
<div class="article-header medium-container">
|
||||||
|
<div class="article-categories">
|
||||||
|
<?php
|
||||||
|
$post_categories = wp_get_post_categories( get_the_ID() );
|
||||||
|
foreach($post_categories as $c){
|
||||||
|
$cat = get_category( $c );
|
||||||
|
?>
|
||||||
|
<a href="<?= get_term_link($c); ?>" class="article-category">
|
||||||
|
<?= $cat->name; ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<h1 class="article-title"><?= get_the_title(); ?></h1>
|
||||||
|
<?php if(get_theme_mod('display_posts_meta', true)) { ?>
|
||||||
|
<div class="article-meta">
|
||||||
|
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" class="author-picture" style="background-image: url(<?= get_avatar_url(get_the_author_meta('ID')) ?>"></a>
|
||||||
|
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a>
|
||||||
|
|
|
||||||
|
<?= get_the_date(); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$featured_image = get_the_post_thumbnail_url(get_the_ID(),'large');
|
||||||
|
if($featured_image) { ?>
|
||||||
|
<div class="article-featured-image fullwidth-container">
|
||||||
|
<img src="<?= $featured_image; ?>">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="entry-content fullwidth-container">
|
||||||
|
<?php
|
||||||
|
the_content();
|
||||||
|
wp_link_pages();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if(get_theme_mod('display_posts_navigation', true)) { ?>
|
||||||
|
<div class="related-posts">
|
||||||
|
<?php
|
||||||
|
$prev_post = get_previous_post();
|
||||||
|
if (!empty( $prev_post )){ ?>
|
||||||
|
<a href="<?= get_permalink($prev_post->ID); ?>" class="previous-post">
|
||||||
|
<div class="background"
|
||||||
|
style="background-image: url(<?= get_the_post_thumbnail_url($prev_post->ID,'large'); ?>"></div>
|
||||||
|
<div class="filter"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Previous Post', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h3 class="post-title"><?= $prev_post->post_title; ?></h3>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
$next_post = get_next_post();
|
||||||
|
if (!empty( $next_post )){ ?>
|
||||||
|
<a href="<?= get_permalink($next_post->ID); ?>" class="next-post">
|
||||||
|
<div class="background"
|
||||||
|
style="background-image: url(<?= get_the_post_thumbnail_url($next_post->ID,'large'); ?>"></div>
|
||||||
|
<div class="filter"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Next Post', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h3 class="post-title"><?= $next_post->post_title; ?></h3>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
|
if ( comments_open() || get_comments_number() ) :
|
||||||
|
?>
|
||||||
|
<div class="comments-section">
|
||||||
|
<?php
|
||||||
|
comments_template();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
endwhile; // End of the loop.
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
83
tag.php
Normal file
83
tag.php
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying a tag
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||||
|
*
|
||||||
|
* @package Yuzu
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-page">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Tag', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="articles-list large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if ( have_posts() ) :
|
||||||
|
|
||||||
|
/* Start the Loop */
|
||||||
|
$count = 0;
|
||||||
|
while ( have_posts() ) :
|
||||||
|
the_post();
|
||||||
|
switch($count) {
|
||||||
|
case 0:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
echo '<div class="row">';
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
$count++;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||||
|
echo '</div>';
|
||||||
|
$count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
endwhile;
|
||||||
|
|
||||||
|
the_posts_navigation();
|
||||||
|
|
||||||
|
else :
|
||||||
|
|
||||||
|
_e('No posts found!', 'yuzu');
|
||||||
|
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
53
taxonomy-attachment_keyword.php
Normal file
53
taxonomy-attachment_keyword.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
global $photocore;
|
||||||
|
$term_id = get_queried_object()->term_id;
|
||||||
|
$current_term = get_term($term_id);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query_images_args = array(
|
||||||
|
'post_type' => 'attachment',
|
||||||
|
'post_mime_type' =>'image',
|
||||||
|
'post_status' => 'inherit',
|
||||||
|
'posts_per_page' => -1,
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'attachment_keyword',
|
||||||
|
'field' => 'slug',
|
||||||
|
'terms' => $current_term->slug,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$query_images = new WP_Query( $query_images_args );
|
||||||
|
|
||||||
|
while ( $query_images->have_posts() ) : $query_images->the_post();
|
||||||
|
$ids_array[] = $post->ID;
|
||||||
|
endwhile;
|
||||||
|
$ids = implode(',', $ids_array);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<div class="single-attachment_keyword large-container top-and-bottom-margin">
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<div class="label">
|
||||||
|
<?php _e('Keyword', 'yuzu'); ?>
|
||||||
|
</div>
|
||||||
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="attachments-list">
|
||||||
|
<?php
|
||||||
|
echo do_shortcode('[gallery mgl-layout="default" ids="'.$ids.'"]');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
81
taxonomy-meow_folder.php
Normal file
81
taxonomy-meow_folder.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
get_header();
|
||||||
|
global $photocore;
|
||||||
|
$term_id = get_queried_object()->term_id;
|
||||||
|
$current_term = get_term($term_id);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="primary" class="content-area">
|
||||||
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$featured_image_id = $photocore->get_folder_thumbnail( $term_id );
|
||||||
|
if($featured_image_id) {
|
||||||
|
$featured_image = wp_get_attachment_image_src($featured_image_id, 'kantan-hero-image')[0];
|
||||||
|
require get_template_directory() . '/components/opaque-featured-image.php';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="single-folder large-container top-and-bottom-margin">
|
||||||
|
<?php
|
||||||
|
if(!class_exists("Photography_Core")) {
|
||||||
|
_e("Sorry, but it seems you haven't installed the Photography Core plugin ? Please install it to use photography related features on this theme.", "yuzu");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
?>
|
||||||
|
<div class="page-header medium-container">
|
||||||
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$collections = $photocore->get_collections($term_id);
|
||||||
|
if( count( $collections ) != 0 ) {
|
||||||
|
?>
|
||||||
|
<div class="large-container">
|
||||||
|
<div class="collections-list">
|
||||||
|
<div class="wp-block-photography-core-section-header mwt-section-header">
|
||||||
|
<h3>Collections</h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
foreach( $collections as $collection ) {
|
||||||
|
|
||||||
|
require get_template_directory() . '/components/collection-card.php';
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$folders = $photocore->get_folders($term_id);
|
||||||
|
if( count( $folders ) != 0 ) {
|
||||||
|
?>
|
||||||
|
<div class="large-container">
|
||||||
|
<div class="folders-list">
|
||||||
|
<div class="wp-block-photography-core-section-header mwt-section-header">
|
||||||
|
<h3>Folders</h3>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
foreach( $folders as $folder ) {
|
||||||
|
|
||||||
|
require get_template_directory() . '/components/folder-card.php';
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main><!-- #main -->
|
||||||
|
</div><!-- #primary -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
626
updater/theme-updater-admin.php
Normal file
626
updater/theme-updater-admin.php
Normal file
@@ -0,0 +1,626 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Theme updater admin page and functions.
|
||||||
|
*
|
||||||
|
* @package EDD Sample Theme
|
||||||
|
*/
|
||||||
|
|
||||||
|
class EDD_Theme_Updater_Admin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Variables required for the theme updater
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @type string
|
||||||
|
*/
|
||||||
|
protected $remote_api_url = null;
|
||||||
|
protected $theme_slug = null;
|
||||||
|
protected $version = null;
|
||||||
|
protected $author = null;
|
||||||
|
protected $download_id = null;
|
||||||
|
protected $renew_url = null;
|
||||||
|
protected $strings = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the class.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function __construct( $config = array(), $strings = array() ) {
|
||||||
|
|
||||||
|
$config = wp_parse_args( $config, array(
|
||||||
|
'remote_api_url' => 'http://easydigitaldownloads.com',
|
||||||
|
'theme_slug' => get_template(),
|
||||||
|
'item_name' => '',
|
||||||
|
'license' => '',
|
||||||
|
'version' => '',
|
||||||
|
'author' => '',
|
||||||
|
'download_id' => '',
|
||||||
|
'renew_url' => '',
|
||||||
|
'beta' => false,
|
||||||
|
) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after the theme $config is setup.
|
||||||
|
*
|
||||||
|
* @since x.x.x
|
||||||
|
*
|
||||||
|
* @param array $config Array of EDD SL theme data.
|
||||||
|
*/
|
||||||
|
do_action( 'post_edd_sl_theme_updater_setup', $config );
|
||||||
|
|
||||||
|
// Set config arguments
|
||||||
|
$this->remote_api_url = $config['remote_api_url'];
|
||||||
|
$this->item_name = $config['item_name'];
|
||||||
|
$this->theme_slug = sanitize_key( $config['theme_slug'] );
|
||||||
|
$this->version = $config['version'];
|
||||||
|
$this->author = $config['author'];
|
||||||
|
$this->download_id = $config['download_id'];
|
||||||
|
$this->renew_url = $config['renew_url'];
|
||||||
|
$this->beta = $config['beta'];
|
||||||
|
|
||||||
|
// Populate version fallback
|
||||||
|
if ( '' == $config['version'] ) {
|
||||||
|
$theme = wp_get_theme( $this->theme_slug );
|
||||||
|
$this->version = $theme->get( 'Version' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Strings passed in from the updater config
|
||||||
|
$this->strings = $strings;
|
||||||
|
|
||||||
|
add_action( 'init', array( $this, 'updater' ) );
|
||||||
|
add_action( 'admin_init', array( $this, 'register_option' ) );
|
||||||
|
add_action( 'admin_init', array( $this, 'license_action' ) );
|
||||||
|
add_action( 'admin_menu', array( $this, 'license_menu' ) );
|
||||||
|
add_action( 'update_option_' . $this->theme_slug . '_license_key', array( $this, 'activate_license' ), 10, 2 );
|
||||||
|
add_filter( 'http_request_args', array( $this, 'disable_wporg_request' ), 5, 2 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the updater class.
|
||||||
|
*
|
||||||
|
* since 1.0.0
|
||||||
|
*/
|
||||||
|
function updater() {
|
||||||
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If there is no valid license key status, don't allow updates. */
|
||||||
|
if ( get_option( $this->theme_slug . '_license_key_status', false) != 'valid' ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !class_exists( 'EDD_Theme_Updater' ) ) {
|
||||||
|
// Load our custom theme updater
|
||||||
|
include( dirname( __FILE__ ) . '/theme-updater-class.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
new EDD_Theme_Updater(
|
||||||
|
array(
|
||||||
|
'remote_api_url' => $this->remote_api_url,
|
||||||
|
'version' => $this->version,
|
||||||
|
'license' => trim( get_option( $this->theme_slug . '_license_key' ) ),
|
||||||
|
'item_name' => $this->item_name,
|
||||||
|
'author' => $this->author,
|
||||||
|
'beta' => $this->beta
|
||||||
|
),
|
||||||
|
$this->strings
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a menu item for the theme license under the appearance menu.
|
||||||
|
*
|
||||||
|
* since 1.0.0
|
||||||
|
*/
|
||||||
|
function license_menu() {
|
||||||
|
|
||||||
|
$strings = $this->strings;
|
||||||
|
|
||||||
|
add_theme_page(
|
||||||
|
$strings['theme-license'],
|
||||||
|
$strings['theme-license'],
|
||||||
|
'manage_options',
|
||||||
|
$this->theme_slug . '-license',
|
||||||
|
array( $this, 'license_page' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs the markup used on the theme license page.
|
||||||
|
*
|
||||||
|
* since 1.0.0
|
||||||
|
*/
|
||||||
|
function license_page() {
|
||||||
|
|
||||||
|
$strings = $this->strings;
|
||||||
|
|
||||||
|
$license = trim( get_option( $this->theme_slug . '_license_key' ) );
|
||||||
|
$status = get_option( $this->theme_slug . '_license_key_status', false );
|
||||||
|
|
||||||
|
// Checks license status to display under license key
|
||||||
|
if ( ! $license ) {
|
||||||
|
$message = $strings['enter-key'];
|
||||||
|
} else {
|
||||||
|
// delete_transient( $this->theme_slug . '_license_message' );
|
||||||
|
if ( ! get_transient( $this->theme_slug . '_license_message', false ) ) {
|
||||||
|
set_transient( $this->theme_slug . '_license_message', $this->check_license(), ( 60 * 60 * 24 ) );
|
||||||
|
}
|
||||||
|
$message = get_transient( $this->theme_slug . '_license_message' );
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="wrap">
|
||||||
|
<h2><?php echo $strings['theme-license'] ?></h2>
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
|
||||||
|
<?php settings_fields( $this->theme_slug . '-license' ); ?>
|
||||||
|
|
||||||
|
<table class="form-table">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr valign="top">
|
||||||
|
<th scope="row" valign="top">
|
||||||
|
<?php echo $strings['license-key']; ?>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<input id="<?php echo $this->theme_slug; ?>_license_key" name="<?php echo $this->theme_slug; ?>_license_key" type="text" class="regular-text" value="<?php echo esc_attr( $license ); ?>" />
|
||||||
|
<p class="description">
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php if ( $license ) { ?>
|
||||||
|
<tr valign="top">
|
||||||
|
<th scope="row" valign="top">
|
||||||
|
<?php echo $strings['license-action']; ?>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
wp_nonce_field( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' );
|
||||||
|
if ( 'valid' == $status ) { ?>
|
||||||
|
<input type="submit" class="button-secondary" name="<?php echo $this->theme_slug; ?>_license_deactivate" value="<?php esc_attr_e( $strings['deactivate-license'] ); ?>"/>
|
||||||
|
<?php } else { ?>
|
||||||
|
<input type="submit" class="button-secondary" name="<?php echo $this->theme_slug; ?>_license_activate" value="<?php esc_attr_e( $strings['activate-license'] ); ?>"/>
|
||||||
|
<?php }
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php submit_button(); ?>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers the option used to store the license key in the options table.
|
||||||
|
*
|
||||||
|
* since 1.0.0
|
||||||
|
*/
|
||||||
|
function register_option() {
|
||||||
|
register_setting(
|
||||||
|
$this->theme_slug . '-license',
|
||||||
|
$this->theme_slug . '_license_key',
|
||||||
|
array( $this, 'sanitize_license' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sanitizes the license key.
|
||||||
|
*
|
||||||
|
* since 1.0.0
|
||||||
|
*
|
||||||
|
* @param string $new License key that was submitted.
|
||||||
|
* @return string $new Sanitized license key.
|
||||||
|
*/
|
||||||
|
function sanitize_license( $new ) {
|
||||||
|
|
||||||
|
$old = get_option( $this->theme_slug . '_license_key' );
|
||||||
|
|
||||||
|
if ( $old && $old != $new ) {
|
||||||
|
// New license has been entered, so must reactivate
|
||||||
|
delete_option( $this->theme_slug . '_license_key_status' );
|
||||||
|
delete_transient( $this->theme_slug . '_license_message' );
|
||||||
|
}
|
||||||
|
|
||||||
|
return $new;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes a call to the API.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @param array $api_params to be used for wp_remote_get.
|
||||||
|
* @return array $response decoded JSON response.
|
||||||
|
*/
|
||||||
|
function get_api_response( $api_params ) {
|
||||||
|
|
||||||
|
// Call the custom API.
|
||||||
|
$verify_ssl = (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true );
|
||||||
|
$response = wp_remote_post( $this->remote_api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activates the license key.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function activate_license() {
|
||||||
|
|
||||||
|
$license = trim( get_option( $this->theme_slug . '_license_key' ) );
|
||||||
|
|
||||||
|
// Data to send in our API request.
|
||||||
|
$api_params = array(
|
||||||
|
'edd_action' => 'activate_license',
|
||||||
|
'license' => $license,
|
||||||
|
'item_name' => urlencode( $this->item_name ),
|
||||||
|
'url' => home_url()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = $this->get_api_response( $api_params );
|
||||||
|
|
||||||
|
// make sure the response came back okay
|
||||||
|
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
||||||
|
|
||||||
|
if ( is_wp_error( $response ) ) {
|
||||||
|
$message = $response->get_error_message();
|
||||||
|
} else {
|
||||||
|
$message = __( 'An error occurred, please try again.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$base_url = admin_url( 'themes.php?page=' . $this->theme_slug . '-license' );
|
||||||
|
$redirect = add_query_arg( array( 'sl_theme_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
||||||
|
|
||||||
|
wp_redirect( $redirect );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
|
if ( false === $license_data->success ) {
|
||||||
|
|
||||||
|
switch( $license_data->error ) {
|
||||||
|
|
||||||
|
case 'expired' :
|
||||||
|
|
||||||
|
$message = sprintf(
|
||||||
|
__( 'Your license key expired on %s.' ),
|
||||||
|
date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'disabled':
|
||||||
|
case 'revoked' :
|
||||||
|
|
||||||
|
$message = __( 'Your license key has been disabled.' );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'missing' :
|
||||||
|
|
||||||
|
$message = __( 'Invalid license.' );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'invalid' :
|
||||||
|
case 'site_inactive' :
|
||||||
|
|
||||||
|
$message = __( 'Your license is not active for this URL.' );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'item_name_mismatch' :
|
||||||
|
|
||||||
|
$message = sprintf( __( 'This appears to be an invalid license key for %s.' ), $this->item_name );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'no_activations_left':
|
||||||
|
|
||||||
|
$message = __( 'Your license key has reached its activation limit.' );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default :
|
||||||
|
|
||||||
|
$message = __( 'An error occurred, please try again.' );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $message ) ) {
|
||||||
|
$base_url = admin_url( 'themes.php?page=' . $this->theme_slug . '-license' );
|
||||||
|
$redirect = add_query_arg( array( 'sl_theme_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
||||||
|
|
||||||
|
wp_redirect( $redirect );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// $response->license will be either "active" or "inactive"
|
||||||
|
if ( $license_data && isset( $license_data->license ) ) {
|
||||||
|
update_option( $this->theme_slug . '_license_key_status', $license_data->license );
|
||||||
|
delete_transient( $this->theme_slug . '_license_message' );
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_redirect( admin_url( 'themes.php?page=' . $this->theme_slug . '-license' ) );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deactivates the license key.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function deactivate_license() {
|
||||||
|
|
||||||
|
// Retrieve the license from the database.
|
||||||
|
$license = trim( get_option( $this->theme_slug . '_license_key' ) );
|
||||||
|
|
||||||
|
// Data to send in our API request.
|
||||||
|
$api_params = array(
|
||||||
|
'edd_action' => 'deactivate_license',
|
||||||
|
'license' => $license,
|
||||||
|
'item_name' => urlencode( $this->item_name ),
|
||||||
|
'url' => home_url()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = $this->get_api_response( $api_params );
|
||||||
|
|
||||||
|
// make sure the response came back okay
|
||||||
|
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
||||||
|
|
||||||
|
if ( is_wp_error( $response ) ) {
|
||||||
|
$message = $response->get_error_message();
|
||||||
|
} else {
|
||||||
|
$message = __( 'An error occurred, please try again.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$base_url = admin_url( 'themes.php?page=' . $this->theme_slug . '-license' );
|
||||||
|
$redirect = add_query_arg( array( 'sl_theme_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
||||||
|
|
||||||
|
wp_redirect( $redirect );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
|
// $license_data->license will be either "deactivated" or "failed"
|
||||||
|
if ( $license_data && ( $license_data->license == 'deactivated' ) ) {
|
||||||
|
delete_option( $this->theme_slug . '_license_key_status' );
|
||||||
|
delete_transient( $this->theme_slug . '_license_message' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $message ) ) {
|
||||||
|
$base_url = admin_url( 'themes.php?page=' . $this->theme_slug . '-license' );
|
||||||
|
$redirect = add_query_arg( array( 'sl_theme_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
||||||
|
|
||||||
|
wp_redirect( $redirect );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_redirect( admin_url( 'themes.php?page=' . $this->theme_slug . '-license' ) );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a renewal link
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function get_renewal_link() {
|
||||||
|
|
||||||
|
// If a renewal link was passed in the config, use that
|
||||||
|
if ( '' != $this->renew_url ) {
|
||||||
|
return $this->renew_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If download_id was passed in the config, a renewal link can be constructed
|
||||||
|
$license_key = trim( get_option( $this->theme_slug . '_license_key', false ) );
|
||||||
|
if ( '' != $this->download_id && $license_key ) {
|
||||||
|
$url = esc_url( $this->remote_api_url );
|
||||||
|
$url .= '/checkout/?edd_license_key=' . $license_key . '&download_id=' . $this->download_id;
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise return the remote_api_url
|
||||||
|
return $this->remote_api_url;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a license action was submitted.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function license_action() {
|
||||||
|
|
||||||
|
if ( isset( $_POST[ $this->theme_slug . '_license_activate' ] ) ) {
|
||||||
|
if ( check_admin_referer( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' ) ) {
|
||||||
|
$this->activate_license();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $_POST[$this->theme_slug . '_license_deactivate'] ) ) {
|
||||||
|
if ( check_admin_referer( $this->theme_slug . '_nonce', $this->theme_slug . '_nonce' ) ) {
|
||||||
|
$this->deactivate_license();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if license is valid and gets expire date.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @return string $message License status message.
|
||||||
|
*/
|
||||||
|
function check_license() {
|
||||||
|
|
||||||
|
$license = trim( get_option( $this->theme_slug . '_license_key' ) );
|
||||||
|
$strings = $this->strings;
|
||||||
|
|
||||||
|
$api_params = array(
|
||||||
|
'edd_action' => 'check_license',
|
||||||
|
'license' => $license,
|
||||||
|
'item_name' => urlencode( $this->item_name ),
|
||||||
|
'url' => home_url()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = $this->get_api_response( $api_params );
|
||||||
|
|
||||||
|
// make sure the response came back okay
|
||||||
|
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
||||||
|
|
||||||
|
if ( is_wp_error( $response ) ) {
|
||||||
|
$message = $response->get_error_message();
|
||||||
|
} else {
|
||||||
|
$message = $strings['license-status-unknown'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$base_url = admin_url( 'themes.php?page=' . $this->theme_slug . '-license' );
|
||||||
|
$redirect = add_query_arg( array( 'sl_theme_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
||||||
|
|
||||||
|
wp_redirect( $redirect );
|
||||||
|
exit();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
|
// If response doesn't include license data, return
|
||||||
|
if ( !isset( $license_data->license ) ) {
|
||||||
|
$message = $strings['license-status-unknown'];
|
||||||
|
return $message;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to update the license status at the same time the message is updated
|
||||||
|
if ( $license_data && isset( $license_data->license ) ) {
|
||||||
|
update_option( $this->theme_slug . '_license_key_status', $license_data->license );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get expire date
|
||||||
|
$expires = false;
|
||||||
|
if ( isset( $license_data->expires ) && 'lifetime' != $license_data->expires ) {
|
||||||
|
$expires = date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) );
|
||||||
|
$renew_link = '<a href="' . esc_url( $this->get_renewal_link() ) . '" target="_blank">' . $strings['renew'] . '</a>';
|
||||||
|
} elseif ( isset( $license_data->expires ) && 'lifetime' == $license_data->expires ) {
|
||||||
|
$expires = 'lifetime';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get site counts
|
||||||
|
$site_count = $license_data->site_count;
|
||||||
|
$license_limit = $license_data->license_limit;
|
||||||
|
|
||||||
|
// If unlimited
|
||||||
|
if ( 0 == $license_limit ) {
|
||||||
|
$license_limit = $strings['unlimited'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $license_data->license == 'valid' ) {
|
||||||
|
$message = $strings['license-key-is-active'] . ' ';
|
||||||
|
if ( isset( $expires ) && 'lifetime' != $expires ) {
|
||||||
|
$message .= sprintf( $strings['expires%s'], $expires ) . ' ';
|
||||||
|
}
|
||||||
|
if ( isset( $expires ) && 'lifetime' == $expires ) {
|
||||||
|
$message .= $strings['expires-never'];
|
||||||
|
}
|
||||||
|
if ( $site_count && $license_limit ) {
|
||||||
|
$message .= sprintf( $strings['%1$s/%2$-sites'], $site_count, $license_limit );
|
||||||
|
}
|
||||||
|
} else if ( $license_data->license == 'expired' ) {
|
||||||
|
if ( $expires ) {
|
||||||
|
$message = sprintf( $strings['license-key-expired-%s'], $expires );
|
||||||
|
} else {
|
||||||
|
$message = $strings['license-key-expired'];
|
||||||
|
}
|
||||||
|
if ( $renew_link ) {
|
||||||
|
$message .= ' ' . $renew_link;
|
||||||
|
}
|
||||||
|
} else if ( $license_data->license == 'invalid' ) {
|
||||||
|
$message = $strings['license-keys-do-not-match'];
|
||||||
|
} else if ( $license_data->license == 'inactive' ) {
|
||||||
|
$message = $strings['license-is-inactive'];
|
||||||
|
} else if ( $license_data->license == 'disabled' ) {
|
||||||
|
$message = $strings['license-key-is-disabled'];
|
||||||
|
} else if ( $license_data->license == 'site_inactive' ) {
|
||||||
|
// Site is inactive
|
||||||
|
$message = $strings['site-is-inactive'];
|
||||||
|
} else {
|
||||||
|
$message = $strings['license-status-unknown'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable requests to wp.org repository for this theme.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
function disable_wporg_request( $r, $url ) {
|
||||||
|
|
||||||
|
// If it's not a theme update request, bail.
|
||||||
|
if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/1.1/' ) ) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decode the JSON response
|
||||||
|
$themes = json_decode( $r['body']['themes'] );
|
||||||
|
|
||||||
|
// Remove the active parent and child themes from the check
|
||||||
|
$parent = get_option( 'template' );
|
||||||
|
$child = get_option( 'stylesheet' );
|
||||||
|
unset( $themes->themes->$parent );
|
||||||
|
unset( $themes->themes->$child );
|
||||||
|
|
||||||
|
// Encode the updated JSON response
|
||||||
|
$r['body']['themes'] = json_encode( $themes );
|
||||||
|
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a means of catching errors from the activation method above and displyaing it to the customer
|
||||||
|
*/
|
||||||
|
function edd_sample_theme_admin_notices() {
|
||||||
|
if ( isset( $_GET['sl_theme_activation'] ) && ! empty( $_GET['message'] ) ) {
|
||||||
|
|
||||||
|
switch( $_GET['sl_theme_activation'] ) {
|
||||||
|
|
||||||
|
case 'false':
|
||||||
|
$message = urldecode( $_GET['message'] );
|
||||||
|
?>
|
||||||
|
<div class="error">
|
||||||
|
<p><?php echo $message; ?></p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'true':
|
||||||
|
default:
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'admin_notices', 'edd_sample_theme_admin_notices' );
|
||||||
192
updater/theme-updater-class.php
Normal file
192
updater/theme-updater-class.php
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Theme updater class.
|
||||||
|
*
|
||||||
|
* @package EDD Sample Theme
|
||||||
|
* @version 1.0.3
|
||||||
|
*/
|
||||||
|
|
||||||
|
class EDD_Theme_Updater {
|
||||||
|
|
||||||
|
private $remote_api_url;
|
||||||
|
private $request_data;
|
||||||
|
private $response_key;
|
||||||
|
private $theme_slug;
|
||||||
|
private $license_key;
|
||||||
|
private $version;
|
||||||
|
private $author;
|
||||||
|
protected $strings = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initiate the Theme updater
|
||||||
|
*
|
||||||
|
* @param array $args Array of arguments from the theme requesting an update check
|
||||||
|
* @param array $strings Strings for the update process
|
||||||
|
*/
|
||||||
|
function __construct( $args = array(), $strings = array() ) {
|
||||||
|
|
||||||
|
$defaults = array(
|
||||||
|
'remote_api_url' => 'http://easydigitaldownloads.com',
|
||||||
|
'request_data' => array(),
|
||||||
|
'theme_slug' => get_template(), // use get_stylesheet() for child theme updates
|
||||||
|
'item_name' => '',
|
||||||
|
'license' => '',
|
||||||
|
'version' => '',
|
||||||
|
'author' => '',
|
||||||
|
'beta' => false,
|
||||||
|
);
|
||||||
|
|
||||||
|
$args = wp_parse_args( $args, $defaults );
|
||||||
|
|
||||||
|
$this->license = $args['license'];
|
||||||
|
$this->item_name = $args['item_name'];
|
||||||
|
$this->version = $args['version'];
|
||||||
|
$this->theme_slug = sanitize_key( $args['theme_slug'] );
|
||||||
|
$this->author = $args['author'];
|
||||||
|
$this->beta = $args['beta'];
|
||||||
|
$this->remote_api_url = $args['remote_api_url'];
|
||||||
|
$this->response_key = $this->theme_slug . '-' . $this->beta . '-update-response';
|
||||||
|
$this->strings = $strings;
|
||||||
|
|
||||||
|
add_filter( 'site_transient_update_themes', array( $this, 'theme_update_transient' ) );
|
||||||
|
add_filter( 'delete_site_transient_update_themes', array( $this, 'delete_theme_update_transient' ) );
|
||||||
|
add_action( 'load-update-core.php', array( $this, 'delete_theme_update_transient' ) );
|
||||||
|
add_action( 'load-themes.php', array( $this, 'delete_theme_update_transient' ) );
|
||||||
|
add_action( 'load-themes.php', array( $this, 'load_themes_screen' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the update notification when neecessary
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function load_themes_screen() {
|
||||||
|
add_thickbox();
|
||||||
|
add_action( 'admin_notices', array( $this, 'update_nag' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the update notifications
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function update_nag() {
|
||||||
|
|
||||||
|
$strings = $this->strings;
|
||||||
|
$theme = wp_get_theme( $this->theme_slug );
|
||||||
|
$api_response = get_transient( $this->response_key );
|
||||||
|
|
||||||
|
if ( false === $api_response ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->theme_slug ), 'upgrade-theme_' . $this->theme_slug );
|
||||||
|
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( $strings['update-notice'] ) . '\') ) {return true;}return false;"';
|
||||||
|
|
||||||
|
if ( version_compare( $this->version, $api_response->new_version, '<' ) ) {
|
||||||
|
|
||||||
|
echo '<div id="update-nag">';
|
||||||
|
printf(
|
||||||
|
$strings['update-available'],
|
||||||
|
$theme->get( 'Name' ),
|
||||||
|
$api_response->new_version,
|
||||||
|
'#TB_inline?width=640&inlineId=' . $this->theme_slug . '_changelog',
|
||||||
|
$theme->get( 'Name' ),
|
||||||
|
$update_url,
|
||||||
|
$update_onclick
|
||||||
|
);
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div id="' . $this->theme_slug . '_' . 'changelog" style="display:none;">';
|
||||||
|
echo wpautop( $api_response->sections['changelog'] );
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the theme update transient with the response from the version check
|
||||||
|
*
|
||||||
|
* @param array $value The default update values.
|
||||||
|
* @return array|boolean If an update is available, returns the update parameters, if no update is needed returns false, if
|
||||||
|
* the request fails returns false.
|
||||||
|
*/
|
||||||
|
function theme_update_transient( $value ) {
|
||||||
|
$update_data = $this->check_for_update();
|
||||||
|
if ( $update_data ) {
|
||||||
|
|
||||||
|
// Make sure the theme property is set. See issue 1463 on Github in the Software Licensing Repo.
|
||||||
|
$update_data['theme'] = $this->theme_slug;
|
||||||
|
|
||||||
|
$value->response[ $this->theme_slug ] = $update_data;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the update data for the theme
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function delete_theme_update_transient() {
|
||||||
|
delete_transient( $this->response_key );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call the EDD SL API (using the URL in the construct) to get the latest version information
|
||||||
|
*
|
||||||
|
* @return array|boolean If an update is available, returns the update parameters, if no update is needed returns false, if
|
||||||
|
* the request fails returns false.
|
||||||
|
*/
|
||||||
|
function check_for_update() {
|
||||||
|
|
||||||
|
$update_data = get_transient( $this->response_key );
|
||||||
|
|
||||||
|
if ( false === $update_data ) {
|
||||||
|
$failed = false;
|
||||||
|
|
||||||
|
$api_params = array(
|
||||||
|
'edd_action' => 'get_version',
|
||||||
|
'license' => $this->license,
|
||||||
|
'name' => $this->item_name,
|
||||||
|
'slug' => $this->theme_slug,
|
||||||
|
'version' => $this->version,
|
||||||
|
'author' => $this->author,
|
||||||
|
'beta' => $this->beta
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = wp_remote_post( $this->remote_api_url, array( 'timeout' => 15, 'body' => $api_params ) );
|
||||||
|
|
||||||
|
// Make sure the response was successful
|
||||||
|
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$update_data = json_decode( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
|
if ( ! is_object( $update_data ) ) {
|
||||||
|
$failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the response failed, try again in 30 minutes
|
||||||
|
if ( $failed ) {
|
||||||
|
$data = new stdClass;
|
||||||
|
$data->new_version = $this->version;
|
||||||
|
set_transient( $this->response_key, $data, strtotime( '+30 minutes', time() ) );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the status is 'ok', return the update arguments
|
||||||
|
if ( ! $failed ) {
|
||||||
|
$update_data->sections = maybe_unserialize( $update_data->sections );
|
||||||
|
set_transient( $this->response_key, $update_data, strtotime( '+12 hours', time() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( version_compare( $this->version, $update_data->new_version, '>=' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (array) $update_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
49
updater/yuzu-updater.php
Normal file
49
updater/yuzu-updater.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if ( !class_exists( 'EDD_Theme_Updater_Admin' ) ) {
|
||||||
|
include( dirname( __FILE__ ) . '/theme-updater-admin.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
global $meowapps_theme_version;
|
||||||
|
|
||||||
|
$updater = new EDD_Theme_Updater_Admin(
|
||||||
|
|
||||||
|
// Config settings
|
||||||
|
$config = array(
|
||||||
|
'remote_api_url' => 'https://store.meowapps.com', // Site where EDD is hosted
|
||||||
|
'item_name' => 'Yuzu Theme', // Name of theme
|
||||||
|
'theme_slug' => 'yuzu-theme', // Theme slug
|
||||||
|
'version' => $meowapps_theme_version, // The current version of this theme
|
||||||
|
'author' => 'Meow Apps', // The author of this theme
|
||||||
|
'download_id' => '', // Optional, used for generating a license renewal link
|
||||||
|
'renew_url' => '', // Optional, allows for a custom license renewal link
|
||||||
|
'beta' => false, // Optional, set to true to opt into beta versions
|
||||||
|
),
|
||||||
|
|
||||||
|
// Strings
|
||||||
|
$strings = array(
|
||||||
|
'theme-license' => __( 'Theme License', 'edd-theme-updater' ),
|
||||||
|
'enter-key' => __( 'Enter your theme license key.', 'edd-theme-updater' ),
|
||||||
|
'license-key' => __( 'License Key', 'edd-theme-updater' ),
|
||||||
|
'license-action' => __( 'License Action', 'edd-theme-updater' ),
|
||||||
|
'deactivate-license' => __( 'Deactivate License', 'edd-theme-updater' ),
|
||||||
|
'activate-license' => __( 'Activate License', 'edd-theme-updater' ),
|
||||||
|
'status-unknown' => __( 'License status is unknown.', 'edd-theme-updater' ),
|
||||||
|
'renew' => __( 'Renew?', 'edd-theme-updater' ),
|
||||||
|
'unlimited' => __( 'unlimited', 'edd-theme-updater' ),
|
||||||
|
'license-key-is-active' => __( 'License key is active.', 'edd-theme-updater' ),
|
||||||
|
'expires%s' => __( 'Expires %s.', 'edd-theme-updater' ),
|
||||||
|
'expires-never' => __( 'Lifetime License.', 'edd-theme-updater' ),
|
||||||
|
'%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'edd-theme-updater' ),
|
||||||
|
'license-key-expired-%s' => __( 'License key expired %s.', 'edd-theme-updater' ),
|
||||||
|
'license-key-expired' => __( 'License key has expired.', 'edd-theme-updater' ),
|
||||||
|
'license-keys-do-not-match' => __( 'License keys do not match.', 'edd-theme-updater' ),
|
||||||
|
'license-is-inactive' => __( 'License is inactive.', 'edd-theme-updater' ),
|
||||||
|
'license-key-is-disabled' => __( 'License key is disabled.', 'edd-theme-updater' ),
|
||||||
|
'site-is-inactive' => __( 'Site is inactive.', 'edd-theme-updater' ),
|
||||||
|
'license-status-unknown' => __( 'License status is unknown.', 'edd-theme-updater' ),
|
||||||
|
'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'edd-theme-updater' ),
|
||||||
|
'update-available' => __('<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.', 'edd-theme-updater' ),
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user