From 237176a4477359626499251547ede4c0cc2c0b0e Mon Sep 17 00:00:00 2001 From: Aribaskar-jb Date: Thu, 21 Dec 2023 17:29:23 +0530 Subject: [PATCH 1/2] Resolved non-responsive layout for Apt installation steps on Downloads page --- src/pages/downloads.js | 367 +++++++++++++++++++++++++++++++---------- 1 file changed, 283 insertions(+), 84 deletions(-) diff --git a/src/pages/downloads.js b/src/pages/downloads.js index a73a7e3..e0a3a01 100644 --- a/src/pages/downloads.js +++ b/src/pages/downloads.js @@ -1,30 +1,44 @@ -import Head from 'next/head'; -import Link from 'next/link'; -import { IconBrandApple, IconBrandWindows, IconBrandUbuntu, IconDeviceDesktop } from "@tabler/icons"; -import Navbar from 'components/Navbar'; -import Footer from 'components/Footer'; -import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'; -import 'react-tabs/style/react-tabs.css'; -import GlobalStyle from '../globalStyles'; +import Head from "next/head"; +import Link from "next/link"; +import { + IconBrandApple, + IconBrandWindows, + IconBrandUbuntu, + IconDeviceDesktop, +} from "@tabler/icons"; +import Navbar from "components/Navbar"; +import Footer from "components/Footer"; +import { Tab, TabList, TabPanel, Tabs } from "react-tabs"; +import "react-tabs/style/react-tabs.css"; +import GlobalStyle from "../globalStyles"; export async function getStaticProps() { - const res = await fetch('https://api.github.com/repos/usebruno/bruno/releases/latest') - const data = await res.json() + const res = await fetch( + "https://api.github.com/repos/usebruno/bruno/releases/latest" + ); + const data = await res.json(); return { props: { - latestVersion: '1.5.1', + latestVersion: "1.5.1", // disabling this for now // latestVersion: data.tag_name.replace('v', ''), - releaseDate: new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'short', day: 'numeric' }).format(new Date(data.created_at)), + releaseDate: new Intl.DateTimeFormat("en-US", { + year: "numeric", + month: "short", + day: "numeric", + }).format(new Date(data.created_at)), }, - revalidate: 60*15, // refresh every 15 minutes - } + revalidate: 60 * 15, // refresh every 15 minutes + }; } export default function Downloads({ latestVersion, releaseDate }) { return ( -
+
Downloads @@ -40,13 +54,21 @@ export default function Downloads({ latestVersion, releaseDate }) {

- Latest Version: {latestVersion} + Latest Version:{" "} + + {latestVersion} +

Release Date: {releaseDate}

-
- If you like Bruno and want to support our opensource work, consider sponsoring us via +
+ If you like Bruno and want to support our opensource work, consider + sponsoring us via - Mac + + Mac - Linux + + Linux - Windows + + Windows
-

Binaries

+

+ Binaries +

@@ -87,46 +126,100 @@ export default function Downloads({ latestVersion, releaseDate }) { - - - - @@ -134,17 +227,26 @@ export default function Downloads({ latestVersion, releaseDate }) {
-

Homebrew

+

+ Homebrew +

To install via Homebrew, run the following command:

- brew install bruno + + brew install bruno +
-

Binaries

+

+ Binaries +

- Mac x64 + + + Mac x64 - - Download - + + Download +
- Mac x64 (Portable) + + + Mac x64 (Portable) - - Download - + + Download +
- Mac Apple Silicon + + + Mac Apple Silicon - - Download - + + Download +
- Mac Apple Silicon (Portable) + + + + Mac Apple Silicon (Portable) + - - Download - + + Download +
@@ -158,24 +260,50 @@ export default function Downloads({ latestVersion, releaseDate }) { - - @@ -187,7 +315,12 @@ export default function Downloads({ latestVersion, releaseDate }) {

To install via Snap, run the following command:

- snap install bruno + + snap install bruno +
@@ -195,21 +328,37 @@ export default function Downloads({ latestVersion, releaseDate }) {

To install via Apt, follow these steps:

-
-                sudo mkdir -p /etc/apt/keyrings 
- sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com --recv-keys 9FA6017ECABE0266

- - echo "deb [signed-by=/etc/apt/keyrings/bruno.gpg] http://debian.usebruno.com/ bruno stable" | sudo tee /etc/apt/sources.list.d/bruno.list

- - sudo apt update
- sudo apt install bruno -
+
+
+                  sudo mkdir -p /etc/apt/keyrings 
+ sudo gpg --no-default-keyring --keyring + /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com + --recv-keys 9FA6017ECABE0266
+
+ echo "deb [signed-by=/etc/apt/keyrings/bruno.gpg] + http://debian.usebruno.com/ bruno stable" | sudo tee + /etc/apt/sources.list.d/bruno.list

+ sudo apt update
+ sudo apt install bruno +
+
-

Binaries

+

+ Binaries +

- Ubuntu / Debian + + + Ubuntu / Debian - - Download - + + Download +
- Linux AppImage + + + Linux AppImage - - Download - + + Download +
@@ -223,36 +372,69 @@ export default function Downloads({ latestVersion, releaseDate }) { - -
- Windows x64 + + + Windows x64 - - Download - + + Download +
- Windows x64 (Portable) + + + Windows x64 (Portable) - - Download - + + Download +
-
-

Chocolatey

+
+

+ Chocolatey +

To install via Chocolatey, run the following command:

- choco install bruno + + choco install bruno +
@@ -260,16 +442,33 @@ export default function Downloads({ latestVersion, releaseDate }) {

To install via Scoop, run the following commands:

- scoop bucket add extras
scoop install bruno
+ + scoop bucket add extras +
+ scoop install bruno +
-
- The release notes along with the release and source artifacts can be found under in the GitHub release. +
+ The release notes along with the release and source artifacts can be + found under in the{" "} + + GitHub release + + .
-
+
); -}; +} From a594cb6053591cb56cfc48e75594338f8646a726 Mon Sep 17 00:00:00 2001 From: Aribaskar-jb Date: Mon, 25 Dec 2023 07:23:18 +0530 Subject: [PATCH 2/2] Remove the prettier formatted code --- src/pages/downloads.js | 345 +++++++++-------------------------------- 1 file changed, 77 insertions(+), 268 deletions(-) diff --git a/src/pages/downloads.js b/src/pages/downloads.js index e0a3a01..620402f 100644 --- a/src/pages/downloads.js +++ b/src/pages/downloads.js @@ -1,44 +1,30 @@ -import Head from "next/head"; -import Link from "next/link"; -import { - IconBrandApple, - IconBrandWindows, - IconBrandUbuntu, - IconDeviceDesktop, -} from "@tabler/icons"; -import Navbar from "components/Navbar"; -import Footer from "components/Footer"; -import { Tab, TabList, TabPanel, Tabs } from "react-tabs"; -import "react-tabs/style/react-tabs.css"; -import GlobalStyle from "../globalStyles"; +import Head from 'next/head'; +import Link from 'next/link'; +import { IconBrandApple, IconBrandWindows, IconBrandUbuntu, IconDeviceDesktop } from "@tabler/icons"; +import Navbar from 'components/Navbar'; +import Footer from 'components/Footer'; +import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'; +import 'react-tabs/style/react-tabs.css'; +import GlobalStyle from '../globalStyles'; export async function getStaticProps() { - const res = await fetch( - "https://api.github.com/repos/usebruno/bruno/releases/latest" - ); - const data = await res.json(); + const res = await fetch('https://api.github.com/repos/usebruno/bruno/releases/latest') + const data = await res.json() return { props: { - latestVersion: "1.5.1", + latestVersion: '1.5.1', // disabling this for now // latestVersion: data.tag_name.replace('v', ''), - releaseDate: new Intl.DateTimeFormat("en-US", { - year: "numeric", - month: "short", - day: "numeric", - }).format(new Date(data.created_at)), + releaseDate: new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'short', day: 'numeric' }).format(new Date(data.created_at)), }, - revalidate: 60 * 15, // refresh every 15 minutes - }; + revalidate: 60*15, // refresh every 15 minutes + } } export default function Downloads({ latestVersion, releaseDate }) { return ( -
+
Downloads @@ -54,21 +40,13 @@ export default function Downloads({ latestVersion, releaseDate }) {

- Latest Version:{" "} - - {latestVersion} - + Latest Version: {latestVersion}

Release Date: {releaseDate}

-
- If you like Bruno and want to support our opensource work, consider - sponsoring us via +
+ If you like Bruno and want to support our opensource work, consider sponsoring us via - - Mac + Mac - - Linux + Linux - - Windows + Windows
-

- Binaries -

+

Binaries

@@ -126,100 +87,46 @@ export default function Downloads({ latestVersion, releaseDate }) { - - - - @@ -227,26 +134,17 @@ export default function Downloads({ latestVersion, releaseDate }) {
-

- Homebrew -

+

Homebrew

To install via Homebrew, run the following command:

- - brew install bruno - + brew install bruno
-

- Binaries -

+

Binaries

- - Mac x64 + + Mac x64 - - Download - + + Download +
- - Mac x64 (Portable) + + Mac x64 (Portable) - - Download - + + Download +
- - Mac Apple Silicon + + Mac Apple Silicon - - Download - + + Download +
- - - Mac Apple Silicon (Portable) - + + Mac Apple Silicon (Portable) - - Download - + + Download +
@@ -260,50 +158,24 @@ export default function Downloads({ latestVersion, releaseDate }) { - - @@ -315,12 +187,7 @@ export default function Downloads({ latestVersion, releaseDate }) {

To install via Snap, run the following command:

- - snap install bruno - + snap install bruno
@@ -328,16 +195,10 @@ export default function Downloads({ latestVersion, releaseDate }) {

To install via Apt, follow these steps:

-
+
                   sudo mkdir -p /etc/apt/keyrings 
sudo gpg --no-default-keyring --keyring @@ -356,9 +217,7 @@ export default function Downloads({ latestVersion, releaseDate }) {
-

- Binaries -

+

Binaries

- - Ubuntu / Debian + + Ubuntu / Debian - - Download - + + Download +
- - Linux AppImage + + Linux AppImage - - Download - + + Download +
@@ -372,69 +231,36 @@ export default function Downloads({ latestVersion, releaseDate }) { - -
- - Windows x64 + + Windows x64 - - Download - + + Download +
- - Windows x64 (Portable) + + Windows x64 (Portable) - - Download - + + Download +
-