mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 03:47:13 +02:00
Added BMC
Signed-off-by: Amith Koujalgi <koujalgi.amith@gmail.com>
This commit is contained in:
parent
b48f9550c3
commit
fd961d7037
41
docs/src/components/BuyMeACoffee/index.js
Normal file
41
docs/src/components/BuyMeACoffee/index.js
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
class BuyMeACoffee extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props)
|
||||||
|
let script = document.createElement("script");
|
||||||
|
script.src = 'https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js';
|
||||||
|
script.dataset.name = 'BMC-Widget';
|
||||||
|
script.dataset.cfasync = 'false';
|
||||||
|
script.dataset.id = 'amithkoujalgi';
|
||||||
|
script.dataset.description = 'Support me on Buy me a coffee!';
|
||||||
|
script.dataset.message = 'If you like my work and want to say thanks, or encourage me to do more, you can buy me a coffee! 😊';
|
||||||
|
script.dataset.color = '#2e8555';
|
||||||
|
script.dataset.position = 'Right';
|
||||||
|
script.dataset.x_margin = '18';
|
||||||
|
script.dataset.y_margin = '18';
|
||||||
|
script.async = true
|
||||||
|
|
||||||
|
script.onload = function () {
|
||||||
|
let evt = document.createEvent('Event');
|
||||||
|
evt.initEvent('DOMContentLoaded', false, false);
|
||||||
|
window.dispatchEvent(evt);
|
||||||
|
}
|
||||||
|
this.script = script
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
document.head.appendChild(this.script)
|
||||||
|
}
|
||||||
|
|
||||||
|
// componentWillUnmount() {
|
||||||
|
// document.head.removeChild(this.script);
|
||||||
|
// document.body.removeChild(document.getElementById("bmc-wbtn"))
|
||||||
|
// }
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BuyMeACoffee;
|
@ -38,3 +38,11 @@ header > h1,
|
|||||||
h2 > a {
|
h2 > a {
|
||||||
font-size: 2rem !important;
|
font-size: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#bmc-wbtn{
|
||||||
|
bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bmc-wbtn + div{
|
||||||
|
bottom:15px;
|
||||||
|
}
|
@ -3,38 +3,40 @@ import Link from '@docusaurus/Link';
|
|||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import Layout from '@theme/Layout';
|
import Layout from '@theme/Layout';
|
||||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||||
|
import BuyMeACoffee from '@site/src/components/BuyMeACoffee';
|
||||||
import Heading from '@theme/Heading';
|
import Heading from '@theme/Heading';
|
||||||
import styles from './index.module.css';
|
import styles from './index.module.css';
|
||||||
|
|
||||||
function HomepageHeader() {
|
function HomepageHeader() {
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
return (<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<Heading as="h1" className="hero__title">
|
<Heading as="h1" className="hero__title">
|
||||||
{siteConfig.title}
|
{siteConfig.title}
|
||||||
</Heading>
|
</Heading>
|
||||||
<img src="img/logo.svg" alt="Ollama4j Logo" className={styles.logo} style={{maxWidth: '20vh'}}/>
|
<img src="img/logo.svg" alt="Ollama4j Logo" className={styles.logo}
|
||||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
style={{maxWidth: '20vh'}}/>
|
||||||
<div className={styles.buttons}>
|
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||||
<Link
|
<div className={styles.buttons}>
|
||||||
className="button button--secondary button--lg"
|
<Link
|
||||||
to="/intro">
|
className="button button--secondary button--lg"
|
||||||
Getting Started
|
to="/intro">
|
||||||
</Link>
|
Getting Started
|
||||||
</div>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</header>);
|
</div>
|
||||||
|
</header>);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (<Layout
|
return (<Layout
|
||||||
title={`Hello from ${siteConfig.title}`}
|
title={`Hello from ${siteConfig.title}`}
|
||||||
description="Description will go into a meta tag in <head />">
|
description="Description will go into a meta tag in <head />">
|
||||||
<HomepageHeader/>
|
<HomepageHeader/>
|
||||||
<main>
|
<main>
|
||||||
<HomepageFeatures/>
|
<HomepageFeatures/>
|
||||||
</main>
|
<BuyMeACoffee/>
|
||||||
</Layout>);
|
</main>
|
||||||
|
</Layout>);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user