diff --git a/docusaurus.config.js b/docusaurus.config.js index 3d93b9b..51a4449 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -134,6 +134,10 @@ const config = { title: "mf", items: [ ...subjects.map((s) => s.navbar()), + { + to: "contributions", + label: "Contributions", + }, { to: "blog", position: "right", diff --git a/src/components/contributions/Contribution.module.scss b/src/components/contributions/Contribution.module.scss new file mode 100644 index 0000000..7bd02f6 --- /dev/null +++ b/src/components/contributions/Contribution.module.scss @@ -0,0 +1,52 @@ +@import "../../css/mixins"; + +.card { + margin-bottom: calc(var(--ifm-spacing-horizontal) * 2); + border: 1px solid var(--ifm-color-emphasis-300); + box-shadow: none; +} + +.contributionsContainer { + border-left: 1px solid var(--ifm-color-emphasis-300); + + @include small-size { + border-left: 0; + border-top: 1px solid var(--ifm-color-emphasis-300); + padding-top: var(--ifm-spacing-vertical); + } +} + +.list { + list-style-type: none; + padding-left: 0; +} + +.buttons { + > a { + @include small-size { + width: 100%; + margin-top: calc(var(--ifm-spacing-vertical) / 2); + } + } + + a + a { + margin-left: 0.5em; + + @include small-size { + margin-left: 0; + } + } +} + +.icon { + width: 22px; + height: 22px; + margin-right: 0.3rem; + display: inline-block; + position: relative; + top: 4px; + + [data-theme="dark"] & { + fill: var(--ifm-font-color-base); + } +} \ No newline at end of file diff --git a/src/components/contributions/Contribution.tsx b/src/components/contributions/Contribution.tsx new file mode 100644 index 0000000..bd0e5db --- /dev/null +++ b/src/components/contributions/Contribution.tsx @@ -0,0 +1,57 @@ +import clsx from "clsx"; +import React, { FunctionComponent } from "react"; + +import styles from "./Contribution.module.scss"; +import RepositoryIcon from "./assets/icon-repository.svg"; + +export interface ContributionMetadata { + title: string; + description: React.ReactNode; + contribution: React.ReactNode; + repoURL: string; +} + +const Contribution: FunctionComponent = ({ + title, + description, + contribution, + repoURL, +}) => { + return ( +
+
+
+

{title}

+
+
+
+
+
Description
+ {description} +
+
+
Contribution
+ {contribution} +
+
+
+
+
+ + + + + See repository + +
+
+
+
+ ); +}; + +export default Contribution; \ No newline at end of file diff --git a/src/components/contributions/assets/icon-repository.svg b/src/components/contributions/assets/icon-repository.svg new file mode 100644 index 0000000..2b0f237 --- /dev/null +++ b/src/components/contributions/assets/icon-repository.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/css/mixins.scss b/src/css/mixins.scss new file mode 100644 index 0000000..a61a303 --- /dev/null +++ b/src/css/mixins.scss @@ -0,0 +1,7 @@ +$breakpoint: 996px; + +@mixin small-size { + @media (max-width: $breakpoint) { + @content; + } +} \ No newline at end of file diff --git a/src/pages/contributions.tsx b/src/pages/contributions.tsx new file mode 100644 index 0000000..82f1c97 --- /dev/null +++ b/src/pages/contributions.tsx @@ -0,0 +1,207 @@ +import React from "react"; +import Layout from "@theme/Layout"; + +import Contribution, { ContributionMetadata } from "../components/contributions/Contribution"; + +const contributions: ContributionMetadata[] = [ + { + title: "Fedora Infrastructure Ansible", + description: (

+ Collection of Ansible playbooks that powers the Fedora Infrastructure. +

), + contribution: (

+ I have adjusted the groups in the Bodhi playbooks after Packit has + been granted the privileges to propose updates without restrictions. +

), + repoURL: "https://pagure.io/fedora-infra/ansible", + }, + { + title: "Bodhi", + description: (

+ Bodhi is a web-system that facilitates the process of publishing + updates for a Fedora-based software distribution. +

), + contribution: (

+ I have adjusted the client, so that it doesn't show secrets in + terminal when you log in to the Bodhi via browser. +

), + repoURL: "https://github.com/fedora-infra/bodhi", + }, + { + title: "Gluetool Modules Collection", + description: (

+ Modules for gluetool — a command line centric framework + usable for glueing modules into a pipeline. +

), + contribution: (), + repoURL: "https://gitlab.com/testing-farm/gluetool-modules", + }, + { + title: "Pagure", + description: (

+ Pagure is a git-centered forge, python based using pygit2. +

), + contribution: (

+ I have added an API endpoint for reopening pull requests. +

), + repoURL: "https://pagure.io/pagure", + }, + { + title: "Copr", + description: (

+ RPM build system - upstream for{" "} + Copr. +

), + contribution: (), + repoURL: "https://github.com/fedora-copr/copr", + }, + { + title: "python-gitlab", + description: (

+ A python wrapper for the GitLab API. +

), + contribution: (

+ I have contributed support for the merge_ref on merge + requests that hasn't been supported, yet it was present in the GitLab + API. +

), + repoURL: "https://github.com/python-gitlab/python-gitlab", + }, + { + title: "PatternFly React", + description: (

+ A set of React components for the PatternFly project. +

), + contribution: (

+ When working on Packit Dashboard, I have spotted smaller bugs that + were present in this project and fixed them upstream to provide + better experience for our users. +

), + repoURL: "https://github.com/patternfly/patternfly-react", + }, + { + title: "Fira Code", + description: (

+ Free monospaced font with programming ligatures. +

), + contribution: (

+ I have set up a GitHub Action for building the font on each push to + the default branch allowing users to install bleeding edge{" "} + version of the font. +

), + repoURL: "https://github.com/tonsky/FiraCode", + }, + { + title: "nixpkgs", + description: (

+ Nixpkgs is a collection of over 80,000 software packages that can be + installed with the Nix package manager. It also implements NixOS, + a purely-functional Linux distribution. +

), + contribution: (

+ When I was trying out the nixpkgs, I have tried to bump .NET Core to + the latest version. My changes haven't been accepted as they required + bumping of multiple more packages that depended upon the .NET Core. +

), + repoURL: "https://github.com/NixOS/nixpkgs", + }, + { + title: "Darcula", + description: (

+ A theme for Visual Studio Code based on Darcula theme from Jetbrains + IDEs. +

), + contribution: (

+ I have contributed support for diff files, though the project doesn't + seem to be live anymore, so it hasn't been accepted as of now. +

), + repoURL: "https://github.com/rokoroku/vscode-theme-darcula", + }, + { + title: "Packit", + description: (

+ An open source project aiming to ease the integration of your + project with Fedora Linux, CentOS Stream and other distributions. +

), + contribution: (

+ Have a look at my{" "} + + pull requests + . +

), + repoURL: "https://github.com/packit", + }, + { + title: "Snitch", + description: (<> +

+ Language agnostic tool that collects TODOs in the source code + and reports them as Issues. +

+ ), + contribution: (), + repoURL: "https://github.com/tsoding/snitch", + }, + { + title: "Karel the Robot", + description: (<> +

+ Karel the robot is in general an educational programming + language for beginners, created by Richard E. Pattis. + This is implementation of Karel the Robot for{" "} + C programming language. +

+

+ This project is used for educational purposes at{" "} + TUKE. +

+ ), + contribution: (

+ I have contributed some refactoring tips to the author of the + library. +

), + repoURL: "https://git.kpi.fei.tuke.sk/kpi/karel-the-robot", + }, +]; + +const title = "Contributions"; +const description = "Many of my contributions to open-source projects."; + +export default function Contributions(): JSX.Element { + return ( + +
+

{title}

+

{description}

+ +
+ {contributions.map((contributionData) => ( + + ))} +
+
+
+ ); +} \ No newline at end of file