Skip to content

Commit

Permalink
release: new version
Browse files Browse the repository at this point in the history
### New Features
- **Black Friday Preparations**: Get ready for exciting Black Friday updates and offers!

### Improvements
- **Update Google Fonts**: Get the freshest updates from the public font library from Google.
  • Loading branch information
cristian-ungureanu committed Oct 23, 2023
2 parents 6bb9a79 + ca8f87a commit 950449e
Show file tree
Hide file tree
Showing 12 changed files with 478 additions and 2 deletions.
13 changes: 13 additions & 0 deletions assets/apps/customizer-controls/src/@types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ declare global {
nonce: string;
hideConditionalHeaderSelector: boolean;
dashUpdatesMessage: string;
deal?: {
active?: boolean;
dealSlug?: string;
urgencyText?: string;
remaningTime?: string;
bannerUrl?: string;
customizerBannerUrl?: string;
linkDashboard?: string;
linkGlobal?: string;
linkCustomizer?: string;
customizerBannerAlt?: string;
bannerAlt?: string;
};
};
NeveProReactCustomize: undefined | StringObjectKeys;
}
Expand Down
25 changes: 25 additions & 0 deletions assets/apps/customizer-controls/src/builder-upsell/Upsells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@ const Upsells: React.FC<Props> = ({ control }) => {
const { params } = control;
const { title, url } = params;

if (window?.NeveReactCustomize?.deal?.active) {
return (
<div className="upsell-inner">
<a
href={window?.NeveReactCustomize?.deal?.linkCustomizer}
target="_blank"
rel="external noreferrer noopener"
style={{ width: '100%', lineHeight: '0' }}
>
<img
src={
window?.NeveReactCustomize?.deal
?.customizerBannerUrl
}
alt={
window?.NeveReactCustomize?.deal
?.customizerBannerAlt
}
style={{ width: '100%' }}
/>
</a>
</div>
);
}

return (
<div className="upsell-inner">
{title && (
Expand Down
2 changes: 2 additions & 0 deletions assets/apps/dashboard/src/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { fetchOptions } from '../utils/rest';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { useState, Fragment, useEffect } from '@wordpress/element';
import Deal from './Deal';

const App = ({ setSettings, toast, currentTab, setTab }) => {
const [loading, setLoading] = useState(true);
Expand All @@ -27,6 +28,7 @@ const App = ({ setSettings, toast, currentTab, setTab }) => {
<div className="content-wrap">
<div className="container content">
<div className="main">
<Deal />
{'starter-sites' !== currentTab && <Notifications />}
<TabsContent currentTab={currentTab} setTab={setTab} />
</div>
Expand Down
25 changes: 25 additions & 0 deletions assets/apps/dashboard/src/Components/Deal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* global neveDash */

const Deal = () => {
if (!Boolean(window.neveDash?.deal?.active)) {
return <></>;
}

return (
<div className="nv-deal">
<a
href={neveDash?.deal?.linkDashboard}
target="_blank"
rel="external noreferrer noopener"
>
<img
src={neveDash?.deal?.bannerUrl}
alt={neveDash?.deal?.bannerAlt}
/>
<div className="nv-urgency">{neveDash?.deal?.urgencyText}</div>
</a>
</div>
);
};

export default Deal;
43 changes: 43 additions & 0 deletions assets/apps/dashboard/src/scss/content/_start.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,46 @@
}
}
}

.nv-deal {
margin-bottom: 10px;
display: flex;

a {
position: relative;
width: 100%;
}

img {
width: 100%;
}

.nv-urgency {
position: absolute;

top: 10%;
left: 2.7%;

color: #FFF;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: normal;
letter-spacing: 0.3px;
text-transform: uppercase;
}
}

@media(max-width: 480px) {
.nv-deal .nv-urgency {
font-size: 7px;
}
}

@media (min-width: 481px) and (max-width: 1024px) {
.nv-deal .nv-urgency {
font-size: 10px;
}
}

Binary file added assets/img/dashboard/black-friday-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions globals/google-fonts.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Updated on 02/10/23
* Updated on 23/10/23
*
* @package neve
*/
Expand Down Expand Up @@ -1211,6 +1211,7 @@
'Playfair' => array( '300', '400', '500', '600', '700', '800', '900', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
'Playfair Display' => array( '400', '500', '600', '700', '800', '900', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
'Playfair Display SC' => array( '400', '700', '900', '400italic', '700italic', '900italic',),
'Playpen Sans' => array( '100', '200', '300', '400', '500', '600', '700', '800',),
'Plus Jakarta Sans' => array( '200', '300', '400', '500', '600', '700', '800', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic',),
'Podkova' => array( '400', '500', '600', '700', '800',),
'Poiret One' => array( '400',),
Expand Down Expand Up @@ -1290,7 +1291,7 @@
'Risque' => array( '400',),
'Road Rage' => array( '400',),
'Roboto' => array( '100', '300', '400', '500', '700', '900', '100italic', '300italic', '400italic', '500italic', '700italic', '900italic',),
'Roboto Condensed' => array( '300', '400', '700', '300italic', '400italic', '700italic',),
'Roboto Condensed' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
'Roboto Flex' => array( '400',),
'Roboto Mono' => array( '100', '200', '300', '400', '500', '600', '700', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic',),
'Roboto Serif' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
Expand Down Expand Up @@ -1422,6 +1423,7 @@
'Sofia Sans Semi Condensed' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',),
'Solitreo' => array( '400',),
'Solway' => array( '300', '400', '500', '700', '800',),
'Sometype Mono' => array( '400', '500', '600', '700', '400italic', '500italic', '600italic', '700italic',),
'Song Myung' => array( '400',),
'Sono' => array( '200', '300', '400', '500', '600', '700', '800',),
'Sonsie One' => array( '400',),
Expand Down
5 changes: 5 additions & 0 deletions inc/admin/dashboard/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Neve\Admin\Dashboard;

use Neve\Core\Limited_Offers;
use Neve\Core\Theme_Info;
/**
* Class Main
Expand Down Expand Up @@ -315,6 +316,9 @@ public function enqueue() {
* @return array
*/
private function get_localization() {

$offer = new Limited_Offers();

$old_about_config = apply_filters( 'ti_about_config_filter', [ 'useful_plugins' => true ] );
$theme_name = apply_filters( 'ti_wl_theme_name', $this->theme_args['name'] );
$plugin_name = apply_filters( 'ti_wl_plugin_name', 'Neve Pro' );
Expand Down Expand Up @@ -376,6 +380,7 @@ private function get_localization() {
'getPluginStateBaseURL' => esc_url( rest_url( '/nv/v1/dashboard/plugin-state/' ) ),
'canInstallPlugins' => current_user_can( 'install_plugins' ),
'canActivatePlugins' => current_user_can( 'activate_plugins' ),
'deal' => ! defined( 'NEVE_PRO_VERSION' ) ? $offer->get_localized_data() : array(),
];

if ( defined( 'NEVE_PRO_PATH' ) ) {
Expand Down
8 changes: 8 additions & 0 deletions inc/core/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ function () {

add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
add_filter( 'neve_pro_react_controls_localization', [ $this, 'adapt_conditional_headers' ] );


if ( ! defined( 'NEVE_PRO_VERSION' ) ) {
$offer = new Limited_Offers();
if ( $offer->can_show_dashboard_banner() && $offer->is_active() ) {
$offer->load_dashboard_hooks();
}
}
}

/**
Expand Down
Loading

0 comments on commit 950449e

Please sign in to comment.