integrate into git
continuous-integration/drone Build is passing

This commit is contained in:
2022-03-07 11:02:16 +01:00
parent e164316466
commit 2c4f05aebf
82 changed files with 63754 additions and 386 deletions
-7
View File
@@ -1,7 +0,0 @@
import '../styles/globals.css'
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
export default MyApp
+25
View File
@@ -0,0 +1,25 @@
import '../styles/globals.css';
import React from 'react';
import App from 'next/app';
// import Layout from '../components/Layout';
export default class MyApp extends App {
static async getInitialProps({ Component, router, ctx }) {
let pageProps = {};
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}
return { pageProps };
}
render() {
const { Component, pageProps } = this.props;
return (
<Component {...pageProps} />
);
}
}
+28
View File
@@ -0,0 +1,28 @@
import React from "react";
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import testStyles from "../styles/test.module.sass";
import AutoGallery from "../components/AutoGallery";
export default function BaTh(props) {
return (
<div className={styles.container}>
<Head>
<title>AcerecA.net</title>
<meta name="description" content="Patricks Homepage" />
<link rel="icon" href="/ace_logo.png" />
</Head>
<main className={styles.main}></main>
<footer className={styles.footer}>© 2022 Patrick Nisblé</footer>
</div>
);
}
export async function getStaticProps() {
return {
props: {},
};
}
+22
View File
@@ -0,0 +1,22 @@
import React from "react";
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import testStyles from "../styles/test.module.sass";
import AutoGallery from "../components/AutoGallery";
export default function Home(props) {
return (
<div className={styles.container}>
<Head>
<title>AcerecA.net</title>
<meta name="description" content="Patricks Homepage" />
<link rel="icon" href="/ace_logo.png" />
</Head>
<main className={styles.main}></main>
<footer className={styles.footer}>© 2022 Patrick Nisblé</footer>
</div>
);
}
-69
View File
@@ -1,69 +0,0 @@
import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<p className={styles.description}>
Get started by editing{' '}
<code className={styles.code}>pages/index.js</code>
</p>
<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>
<a href="https://nextjs.org/learn" className={styles.card}>
<h2>Learn &rarr;</h2>
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>
<a
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
<h2>Deploy &rarr;</h2>
<p>
Instantly deploy your Next.js site to a public URL with Vercel.
</p>
</a>
</div>
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{' '}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
)
}
+93
View File
@@ -0,0 +1,93 @@
import React from "react";
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import testStyles from "../styles/test.module.sass";
import AutoGallery from "../components/AutoGallery";
import GitGallery from "../components/GitGallery";
import RepoSummary from "../components/RepoSummary";
export default function Home(props) {
return (
<div className={styles.container}>
<Head>
<title>AcerecA.net</title>
<meta name="description" content="Patricks Homepage" />
<link rel="icon" href="/ace_logo.png" />
</Head>
<main className={styles.main}>
<h1 className={styles.title}>Welcome, i&apos;m Patrick</h1>
<p className={styles.description}>and this is what i do:</p>
<AutoGallery />
<RepoSummary {...props} />
<GitGallery {...props} />
</main>
<footer className={styles.footer}>© 2022 Patrick Nisblé</footer>
</div>
);
}
export async function getStaticProps(context) {
//Stats
var stats = {
languages: {},
};
//Gitea
var giteaResp = await fetch("https://git.acereca.net/api/v1/repos/search");
const publicGiteaRepos = await giteaResp.json();
for (const repo of publicGiteaRepos.data) {
var resp = await fetch(
"https://git.acereca.net/api/v1/repos/" + repo.full_name + "/languages"
);
var dat = await resp.json();
for (const lang in dat) {
stats.languages[lang] = dat[lang] + (stats.languages[lang] || 0);
}
}
// const sortable = Object.entries(stats.languages)
// .sort(([, a], [, b]) => a - b)
// .reduce((r, [k, v]) => ({ ...r, [k]: v }), {});
// GitHub
try {
var githubResp = await fetch("https://api.github.com/users/acereca/repos", {
headers: new Headers({
Accept: "application/vnd.github.v3+json",
}),
});
// console.log(githubResp);
var publicGithubRepos = await githubResp.json();
} catch (error) {
console.warn(error);
}
for (const repo of publicGithubRepos) {
var resp = await fetch(
"https://api.github.com/repos/" + repo.full_name + "/languages",
{
headers: new Headers({
Accept: "application/vnd.github.v3+json",
}),
}
);
var dat = await resp.json();
for (const lang in dat) {
stats.languages[lang] = dat[lang] + (stats.languages[lang] || 0);
}
}
// console.log(publicGithubRepos);
return {
props: {
stats: stats,
publicGiteaRepos: publicGiteaRepos.data,
publicGithubRepos: publicGithubRepos,
},
};
}
+28
View File
@@ -0,0 +1,28 @@
import React from "react";
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import testStyles from "../styles/test.module.sass";
import AutoGallery from "../components/AutoGallery";
export default function MaTh(props) {
return (
<div className={styles.container}>
<Head>
<title>AcerecA.net</title>
<meta name="description" content="Patricks Homepage" />
<link rel="icon" href="/ace_logo.png" />
</Head>
<main className={styles.main}></main>
<footer className={styles.footer}>© 2022 Patrick Nisblé</footer>
</div>
);
}
export async function getStaticProps() {
return {
props: {},
};
}