update img tags and correct deploy
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Acereca 2022-03-10 09:52:42 +01:00
parent d930de2081
commit 26676ab4e9
6 changed files with 53 additions and 26 deletions

View File

@ -2,11 +2,11 @@ kind: pipeline
name: default name: default
steps: steps:
# - name: build - name: build
# image: node image: node
# commands: commands:
# - npm install - npm install
# - npm run build - npm run build
- name: deploy - name: deploy
image: node image: node
@ -14,6 +14,8 @@ steps:
- name: www-next - name: www-next
path: /www-next path: /www-next
commands: commands:
- npm install
- npm run build
- rm -rf /www-next/* /www-next/.[!.]* - rm -rf /www-next/* /www-next/.[!.]*
- cp -r ./ /www-next/ - cp -r ./ /www-next/
- npm install --prefix /www-next - npm install --prefix /www-next

View File

@ -16,22 +16,23 @@ export function GitGallery(props) {
name={repo.name} name={repo.name}
description={repo.description} description={repo.description}
avatarUrl={repo.avatar_url} avatarUrl={repo.avatar_url}
key={repo.full_name}
/> />
); );
}); });
props.publicGithubRepos.forEach((repo) => { // props.publicGithubRepos.forEach((repo) => {
links.push( // links.push(
<ProjectCard // <ProjectCard
classNames={styles.card_github} // classNames={styles.card_github}
url={repo.html_url} // url={repo.html_url}
fullName={repo.full_name} // fullName={repo.full_name}
name={repo.name} // name={repo.name}
description={repo.description} // description={repo.description}
avatarUrl={repo.avatar_url} // avatarUrl={repo.avatar_url}
/> // />
); // );
}); // });
return ( return (
<div className={styles.cardContainer}> <div className={styles.cardContainer}>

View File

@ -11,10 +11,14 @@ export function ProjectCard(props) {
> >
<Image <Image
className={props.mockupUrl ? styles.card_mockup : styles.card_gitea} className={props.mockupUrl ? styles.card_mockup : styles.card_gitea}
src={props.mockupUrl ? props.mockupUrl : props.avatarUrl} src={
props.mockupUrl
? props.mockupUrl
: props.avatarUrl || "/article_black_48dp.svg"
}
alt={props.name} alt={props.name}
width="15vw" width="15"
height="15vw" height="15"
unoptimized={true} unoptimized={true}
/> />
<h2>{props.name}</h2> <h2>{props.name}</h2>
@ -22,7 +26,3 @@ export function ProjectCard(props) {
</a> </a>
); );
} }
ProjectCard.defaultProps = {
avatarUrl: "/article_black_48dp.svg",
};

View File

@ -17,10 +17,25 @@ export function RepoSummary(props) {
options={{ options={{
indexAxis: "y", indexAxis: "y",
responsive: true, responsive: true,
legend: {
labels: {
fontColor: "#ffffff",
},
},
scales: { scales: {
myScale: { y: {
type: "category",
position: "left",
ticks: {
color: "white",
},
},
x: {
type: "logarithmic", type: "logarithmic",
position: "bottom", position: "bottom",
ticks: {
color: "white",
},
}, },
}, },
}} }}

View File

@ -2,3 +2,6 @@
max-width: 1000px max-width: 1000px
width: 50vw width: 50vw
margin: 150px 0 margin: 150px 0
canvas
color: white

View File

@ -63,11 +63,17 @@ export async function getStaticProps(context) {
// console.log(githubResp); // console.log(githubResp);
var publicGithubRepos = await githubResp.json(); var publicGithubRepos = await githubResp.json();
console.log(publicGithubRepos);
} catch (error) { } catch (error) {
console.warn(error); console.warn(error);
} }
for (const repo of publicGithubRepos) { if (publicGiteaRepos.documentation_url) {
console.error(publicGithubRepos);
publicGithubRepos = [];
}
for (const repo in publicGithubRepos) {
var resp = await fetch( var resp = await fetch(
"https://api.github.com/repos/" + repo.full_name + "/languages", "https://api.github.com/repos/" + repo.full_name + "/languages",
{ {