瀏覽代碼

fix bug

master
jefry 3 年之前
父節點
當前提交
8d559efb18
共有 14 個文件被更改,包括 182 次插入59 次删除
  1. +25
    -0
      api/subscription/subscription.js
  2. +2
    -2
      components/Home/BusineesPartner.js
  3. +23
    -3
      components/Home/NewsletterStyleTwo.js
  4. +1
    -1
      components/Yamaha/AboutUs/AboutUs.js
  5. +74
    -17
      components/_App/Footer.js
  6. +17
    -12
      components/_App/FooterYamaha.js
  7. +6
    -6
      components/_App/NavbarHome.js
  8. +4
    -5
      components/_App/NavbarYamaha.js
  9. +1
    -1
      config/apollo-config.js
  10. +1
    -2
      env-example
  11. +3
    -3
      lib/apollo.js
  12. +13
    -3
      public/css/style.css
  13. +12
    -3
      public/css/style.scss
  14. +0
    -1
      server.js

+ 25
- 0
api/subscription/subscription.js 查看文件

@@ -0,0 +1,25 @@
import apollo from "../../lib/apollo.js";

async function subscribe(email,token="") {
var res = await apollo.mutation(
`
mutation($input: SubscriptionInput!){
createSubscription(input:{data:$input}){
subscription{
email
}
}
}
`,
token,
{
input: {
email:email
},
}
);
return res;
}


module.exports = {subscribe};

+ 2
- 2
components/Home/BusineesPartner.js 查看文件

@@ -217,7 +217,7 @@ const OurServices = () => {

<h3>Bank Perkreditan Rakyat <br /> Berkat Sejati</h3>
<Link href="bprberkatsejati.com">
<Link href="http://bprberkatsejati.com">
<a><Icon.ArrowRight /></a>
</Link>
</div>
@@ -231,7 +231,7 @@ const OurServices = () => {

<h3>Thamrin Homes</h3><br/>
<Link href="homes.thamrin.xyz">
<Link href="http://homes.thamrin.xyz">
<a><Icon.ArrowRight /></a>
</Link>
</div>


+ 23
- 3
components/Home/NewsletterStyleTwo.js 查看文件

@@ -1,8 +1,10 @@
import React from 'react';
import subscription from '../../api/subscription/subscription';

const Newsletter = () => {
const [email, setEmail] = React.useState("");
return (
<div id="about-us" className="free-trial-area">
<div id="subscribe" className="free-trial-area">
<div className="container-fluid">
<div className="row align-items-center">
<div className="col-lg-6 col-md-12">
@@ -15,8 +17,26 @@ const Newsletter = () => {
<div className="free-trial-content">
<h2>Enter Your Email For Get Info & Promo</h2>

<form className="newsletter-form">
<input type="email" className="input-newsletter" placeholder="Enter your business email here" />
<form className="newsletter-form" onSubmit={async (e)=>{
e.preventDefault();
// var data = new FormData(e.target);
// var obj = {};
// for (const [name,value] of data) {
// obj[name] = value;
// }
if(email&&email!=""){
var res = await subscription.subscribe(email);
setEmail("");
if(res["STATUS"]==1){
alert("Email Subscribed!!");
}else{
if(res["DATA"].toUpperCase().includes("DUPLICATE")){
alert("Email Already Subscribed!");
}
}
}
}}>
<input onChange={(e)=>setEmail(e.target.value)}name="email" type="email" className="input-newsletter" value={email} placeholder="Enter your business email here" />
<button type="submit">Sign Up Free</button>
</form>
</div>


+ 1
- 1
components/Yamaha/AboutUs/AboutUs.js 查看文件

@@ -54,7 +54,7 @@ const About1 = () => {
<h3>Ingin Info Lebih Lanjut ?</h3>
<p>Tanyakan Kepada Pihak Kami Untuk Info Lebih Lanjutnya</p>
<Link href="/contact">
<Link href="/yamaha/ContactUs">
<a className="btn btn-primary">Contact Us</a>
</Link>



+ 74
- 17
components/_App/Footer.js 查看文件

@@ -1,5 +1,6 @@
import React from 'react';
import Link from 'next/link';
// import Link from 'next/link';
import { Link } from 'react-scroll';
import * as Icon from 'react-feather';

const Footer = () => {
@@ -13,7 +14,7 @@ const Footer = () => {
<div className="col-lg-3 col-md-6">
<div className="single-footer-widget">
<div className="logo">
<Link href="/it-startup">
<Link offset={100} href="/it-startup">
<a>
<img src="/images/TBG-Home/White.png" width="250px" alt="logo" />
</a>
@@ -28,35 +29,91 @@ const Footer = () => {
<h3>Menu</h3>
<ul className="list">
<li>
<Link href="/about-1">
<Link href="/#" to="home" spy={true} smooth={true}>
<a>Home</a>
</Link>
</li>
<li>
<Link href="/services-1">
<Link offset={-100} href="/#" to="business_partner" spy={true} smooth={true}>
<a>Businees Partner</a>
</Link>
</li>
<li>
<Link href="/features">
<Link offset={-100} href="/#" to="industri" spy={true} smooth={true}>
<a>Industri</a>
</Link>
</li>
<li>
<Link offset={-100} href="/#" to="gallery" spy={true} smooth={true}>
<a>Gallery</a>
</Link>
</li>
<li>
<Link href="/pricing">
<a>Founder</a>
<Link offset={-100} href="/#" to="subscribe" spy={true} smooth={true}>
<a>Subscribe</a>
</Link>
</li>

{/* <li>
<Link href="/#">
<a onClick={e=>{
e.preventDefault();
window.scroll({
top: document.getElementById('home').getBoundingClientRect().top+window.pageYOffset - 100,
behavior: "smooth"
});
}}>Home</a>
</Link>
</li>
<li>
<Link href="/blog-1">
<a>Gallery</a>
<Link href="/#" to="business_partner" spy={true} smooth={true}>
<a onClick={e => {
e.preventDefault();
window.scroll({
top: document.getElementById('business_partner').getBoundingClientRect().top+window.pageYOffset - 100,
behavior: "smooth"
});
}}>Businees Partner</a>
</Link>
</li>
<li>
<Link href="/#" to="industri" spy={true} smooth={true}>
<a onClick={e => {
e.preventDefault();
window.scroll({
top: document.getElementById('industri').getBoundingClientRect().top+window.pageYOffset - 100,
behavior: "smooth"
});
}}>Industri</a>
</Link>
</li>
<li>
<Link href="/#" to="gallery" spy={true} smooth={true}>
<a onClick={e => {
e.preventDefault();
window.scroll({
top: document.getElementById('gallery').getBoundingClientRect().top+window.pageYOffset - 100,
behavior: "smooth"
});
}}>Gallery</a>
</Link>
</li>
<li>
<Link href="/#" to="about-us" spy={true} smooth={true}>
<a onClick={e => {
e.preventDefault();
window.scroll({
top: document.getElementById('about-us').getBoundingClientRect().top+window.pageYOffset - 100,
behavior: "smooth"
});
}}>About us</a>
</Link>
</li> */}
</ul>
</div>
</div>

<div className="col-lg-3 col-md-6">
{/* <div className="col-lg-3 col-md-6">
<div className="single-footer-widget">
<h3>Support</h3>
<ul className="list">
@@ -87,9 +144,9 @@ const Footer = () => {
</li>
</ul>
</div>
</div>
</div> */}

<div className="col-lg-3 col-md-6">
<div className="col-lg-6 col-md-6">
<div className="single-footer-widget">
<h3>Address</h3>
@@ -109,23 +166,23 @@ const Footer = () => {
</ul>
<ul className="social-links">
<li>
<Link href="#">
<Link href="https://www.facebook.com/thamrin.group">
<a className="facebook" target="_blank"><Icon.Facebook /></a>
</Link>
</li>
<li>
<Link href="#">
<Link href="https://twitter.com/ThamrinGroup">
<a className="twitter" target="_blank"><Icon.Twitter /></a>
</Link>
</li>
<li>
<Link href="#">
<Link href="https://www.instagram.com/thamrin.co.id/">
<a className="instagram" target="_blank"><Icon.Instagram /></a>
</Link>
</li>
<li>
<Link href="#">
<a className="linkedin" target="_blank"><Icon.Youtube /></a>
<Link href="https://www.youtube.com/channel/UCRUULlhLxKUpXK1Ti4Jrjkw">
<a className="youtube" target="_blank"><Icon.Youtube /></a>
</Link>
</li>
</ul>


+ 17
- 12
components/_App/FooterYamaha.js 查看文件

@@ -42,21 +42,26 @@ const Footer = () => {
<a>Latest News</a>
</Link>
</li>
<li>
{/* <li>
<Link href="/pricing">
<a>Carrer</a>
</Link>
</li>
</li> */}
<li>
<Link href="/yamaha/AboutUs">
<a>About Us</a>
</Link>
</li>
<li>
<Link href="/yamaha/ContactUs">
<a>Contact Us</a>
</Link>
</li>
</ul>
</div>
</div>

<div className="col-lg-3 col-md-6">
{/* <div className="col-lg-3 col-md-6">
<div className="single-footer-widget">
<h3>Support</h3>
<ul className="list">
@@ -64,7 +69,7 @@ const Footer = () => {
<Link href="/faq">
<a>FAQ's</a>
</Link>
</li>
</li>
<li>
<Link href="/privacy-policy">
<a>Privacy Policy</a>
@@ -81,15 +86,15 @@ const Footer = () => {
</Link>
</li>
<li>
<Link href="/contact">
<Link href="/yamaha/ContactUs">
<a>Contact Us</a>
</Link>
</li>
</ul>
</div>
</div>
</div> */}

<div className="col-lg-3 col-md-6">
<div className="col-lg-6 col-md-6">
<div className="single-footer-widget">
<h3>Address</h3>
@@ -109,23 +114,23 @@ const Footer = () => {
</ul>
<ul className="social-links">
<li>
<Link href="#">
<Link href="https://www.facebook.com/thamrin.group">
<a className="facebook" target="_blank"><Icon.Facebook /></a>
</Link>
</li>
<li>
<Link href="#">
<Link href="https://twitter.com/ThamrinGroup">
<a className="twitter" target="_blank"><Icon.Twitter /></a>
</Link>
</li>
<li>
<Link href="#">
<Link href="https://www.instagram.com/thamrin.co.id/">
<a className="instagram" target="_blank"><Icon.Instagram /></a>
</Link>
</li>
<li>
<Link href="#">
<a className="linkedin" target="_blank"><Icon.Youtube /></a>
<Link href="https://www.youtube.com/channel/UCRUULlhLxKUpXK1Ti4Jrjkw">
<a className="youtube" target="_blank"><Icon.Youtube /></a>
</Link>
</li>
</ul>


+ 6
- 6
components/_App/NavbarHome.js 查看文件

@@ -31,7 +31,7 @@ const NavbarStyleFour = () => {
<div className="startp-nav">
<div className="container">
<nav className="navbar navbar-expand-md navbar-light">
<Link to="business_partner" href="/#">
<Link offset={-100} to="business_partner" href="/#">
<a onClick={toggleNavbar} className="navbar-brand">
<img src="/images/TBG-Home/Blue.png" width="250px" alt="logo" />
</a>
@@ -62,7 +62,7 @@ const NavbarStyleFour = () => {
</li>

<li className="nav-item">
<Link href="/#" to="business_partner" spy={true} smooth={true}>
<Link offset={-100} href="/#" to="business_partner" spy={true} smooth={true}>
<a onClick={e => e.preventDefault()} className="nav-link">
Business Partner
</a>
@@ -126,7 +126,7 @@ const NavbarStyleFour = () => {
</li>

<li className="nav-item">
<Link href="/#" to="industri" spy={true} smooth={true}>
<Link offset={-100} href="/#" to="industri" spy={true} smooth={true}>
<a onClick={e => e.preventDefault()} className="nav-link">
Industri We Serve
</a>
@@ -150,7 +150,7 @@ const NavbarStyleFour = () => {
</li> */}

<li className="nav-item">
<Link href="/#" to="gallery" spy={true} smooth={true}>
<Link offset={-100} href="/#" to="gallery" spy={true} smooth={true}>
<a onClick={e => e.preventDefault()} className="nav-link">
Gallery
</a>
@@ -158,9 +158,9 @@ const NavbarStyleFour = () => {
</li>

<li className="nav-item">
<Link href="/#" to="about-us" spy={true} smooth={true}>
<Link offset={-100} href="/#" to="subscribe" spy={true} smooth={true}>
<a onClick={e => e.preventDefault()} className="nav-link">
About Us
Subscribe
</a>
</Link>
</li>


+ 4
- 5
components/_App/NavbarYamaha.js 查看文件

@@ -120,8 +120,7 @@ export default function NavbarYamaha({ username, ...props }) {
</ul>
</div>

<div className="others-option">

<div style={{display : 'none'}} className="others-option">
<Link href="/yamaha/login">
{!username || username == "" ? (
<Link href="/yamaha/login">
@@ -176,10 +175,10 @@ export default function NavbarYamaha({ username, ...props }) {
}).then((res) => {
//if (res.ok) {
window.location.href = "../yamaha";
/*}
else{
// }
// else{
}*/
// }
});
}}
>


+ 1
- 1
config/apollo-config.js 查看文件

@@ -1,6 +1,6 @@
// Apollo Value Configuration
const ApolloConfig = {
graphql_uri: process.env.API_GRAPHQL_URI,
graphql_uri: process.env.NEXT_PUBLIC_API_GRAPHQL_URI,
};

export default ApolloConfig;

+ 1
- 2
env-example 查看文件

@@ -1,5 +1,4 @@
API_URL=#STRAPI URL#
API_GRAPHQL_URI=#STRAPI URL#/graphql
NEXT_PUBLIC_API_GRAPHQL_URI=#STRAPI URL#/graphql
BACKEND_SERVER_URI =#STRAPI URL#

PORT=#PORT#

+ 3
- 3
lib/apollo.js 查看文件

@@ -51,7 +51,7 @@ async function query(query, token = "", variables = {}, cache = false) {
});
res = { STATUS: 1, DATA: sql.data };
} catch (e) {
res = { STATUS: 0, DATA: errorHandler(e) };
res = { STATUS: 0, DATA: e.message };
}
return res;
}
@@ -68,8 +68,8 @@ async function mutation(mutation, token = "", variables = {}) {
});
res = { STATUS: 1, DATA: sql.data };
} catch (e) {
console.log(e.networkError.result);
res = { STATUS: 0, DATA: errorHandler(e) };
// console.log(mutation,e);
res = { STATUS: 0, DATA: e.message };
}
return res;
}


+ 13
- 3
public/css/style.css 查看文件

@@ -10630,12 +10630,22 @@ Footer CSS
}

.single-footer-widget ul.social-links li a.instagram {
border-color: #231F20;
color: #231F20;
border-color: #bb58aa;
color: #bb58aa;
}

.single-footer-widget ul.social-links li a.instagram:hover {
background: #231F20;
background: #bb58aa;
color: #ffffff;
}

.single-footer-widget ul.social-links li a.youtube {
border-color: #cf3259;
color: #cf3259;
}

.single-footer-widget ul.social-links li a.youtube:hover {
background: #cf3259;
color: #ffffff;
}



+ 12
- 3
public/css/style.scss 查看文件

@@ -4909,11 +4909,20 @@ Shop Details CSS
}
}
&.instagram {
border-color: #231F20;
color: #231F20;
border-color: #bb58aa;
color: #bb58aa;

&:hover {
background: #231F20;
background: #bb58aa;
color: $white-color;
}
}
&.youtube {
border-color: #cf3259;
color: #cf3259;

&:hover {
background: #cf3259;
color: $white-color;
}
}


+ 0
- 1
server.js 查看文件

@@ -7,7 +7,6 @@ const app = next({ dev });
const handle = app.getRequestHandler();
// require("dotenv").config();

console.log(process.env.PORT);
const port = process.env.PORT || "14009";

app.prepare().then(() => {


Loading…
取消
儲存