Skip to content

Commit 2299e68

Browse files
authored
Merge pull request #99 from braboj/fix/installation-instructions
Simplify installation instructions
2 parents 6405036 + 58bc7c9 commit 2299e68

6 files changed

Lines changed: 110 additions & 69 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ After editing a chapter in `chapters/`, copy it to
9797
- [Dev journal](docs/dev-journal.md)
9898
- [Playbook](docs/PLAYBOOK.md)
9999

100+
## Credits
101+
102+
- [Branimir Georgiev](https://github.com/braboj)
103+
- [Marwan Rashed](https://github.com/marwan-rashed)
104+
100105
## License
101106

102107
[MIT](LICENSE.md)

astro-site/src/components/Header.astro

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ const base = import.meta.env.BASE_URL;
3131
</div>
3232

3333
<div class="site-tabs-bar">
34-
<nav class="site-tabs" aria-label="Main navigation">
34+
<button class="nav-toggle" id="nav-toggle" aria-label="Open navigation menu" aria-expanded="false">
35+
<svg class="nav-toggle-icon" viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">
36+
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
37+
</svg>
38+
</button>
39+
<nav class="site-tabs" id="site-tabs" aria-label="Main navigation">
3540
{site.tabs.map((tab) => {
3641
const tabSection = tab.href.split("/").filter(Boolean)[0];
3742
const currentSection = currentPath.split("/").filter(Boolean)[0];
@@ -69,4 +74,13 @@ const base = import.meta.env.BASE_URL;
6974
theme === "light" ? "Switch to dark theme" : "Switch to light theme"
7075
);
7176
}
77+
78+
const navToggle = document.getElementById("nav-toggle");
79+
const siteTabs = document.getElementById("site-tabs");
80+
81+
navToggle.addEventListener("click", () => {
82+
const expanded = navToggle.getAttribute("aria-expanded") === "true";
83+
navToggle.setAttribute("aria-expanded", String(!expanded));
84+
siteTabs.classList.toggle("open");
85+
});
7286
</script>

astro-site/src/content/docs/introduction.md

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,31 @@ share with others when you are ready.
4141

4242
## 3. Installation
4343

44-
### Windows
44+
### Download
4545

46-
1. Download the installer from https://git-scm.com/downloads
47-
2. Run the installer with the default options
48-
3. Open PowerShell and run `git --version`
46+
Go to https://git-scm.com/downloads and download the installer for
47+
your operating system.
4948

50-
### macOS
49+
### Install
5150

52-
**Option A — Xcode Command Line Tools (no extra software needed):**
51+
| OS | How to install |
52+
|----|---------------|
53+
| Windows | Run the downloaded installer with the default options |
54+
| macOS | Run `xcode-select --install` in Terminal, or `brew install git` if you use Homebrew |
55+
| Ubuntu / Debian | `sudo apt-get install git` |
56+
| Fedora | `sudo dnf install git` |
57+
| Arch Linux | `sudo pacman -S git` |
5358

54-
1. Open Terminal and run `git --version`
55-
2. If Git is not installed, macOS will prompt you to install the Command Line Tools — follow the dialog
59+
### Verify
5660

57-
**Option B — Homebrew:**
61+
Open a terminal and run:
5862

59-
1. Install [Homebrew](https://brew.sh/) if you do not have it
60-
2. Run `brew install git`
61-
3. Run `git --version`
62-
63-
### Linux
64-
65-
| Distribution | Command |
66-
|-----------------|--------------------------------------|
67-
| Ubuntu / Debian | `apt-get install git` |
68-
| Fedora 22+ | `dnf install git` |
69-
| Arch Linux | `pacman -S git` |
70-
| openSUSE | `zypper install git` |
71-
| Alpine | `apk add git` |
72-
| Gentoo | `emerge --ask --verbose dev-vcs/git` |
73-
| FreeBSD | `pkg install git` |
74-
| Nix/NixOS | `nix-env -i git` |
63+
```text
64+
$ git --version
65+
git version 2.47.1
66+
```
7567

76-
After installing, run `git --version` to verify.
68+
If you see a version number, Git is installed.
7769

7870
## 4. Hosting
7971

@@ -153,13 +145,15 @@ full history.
153145

154146
![Command Overview](../assets/images/git-command-overview.png)
155147

156-
Commands are grouped by experience level:
148+
Commands are grouped by category and experience level:
157149

158-
- **Beginner** — Help, Create, Configure, Track, Inspect
159-
- **Advanced** — Sync, Revert, Branch, Reuse
160-
- **Expert** — Rewrite and Cleanup (can destroy history — use with caution)
150+
| Level | Categories |
151+
|-------|-----------|
152+
| Beginner | Help, Create, Configure, Track, Inspect |
153+
| Advanced | Sync, Revert, Branch, Reuse |
154+
| Expert | Rewrite, Cleanup (can destroy history) |
161155

162-
Each command group is covered in detail in the following chapters. The
156+
Each category is covered in detail in the following chapters. The
163157
table below lists the most common commands in daily operations.
164158

165159
| Command | What it does | Example |

astro-site/src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const headings = [
107107
<h2 id="about">About</h2>
108108

109109
<ul>
110-
<li>Created by <a href="https://github.com/braboj">Branimir Georgiev</a></li>
110+
<li>Created by <a href="https://github.com/braboj">Branimir Georgiev</a> and <a href="https://github.com/marwan-rashed">Marwan Rashed</a></li>
111111
<li>Part of <a href="https://codewithbranko.com">Code with Branko</a> — practical tutorials for developers</li>
112112
</ul>
113113

astro-site/src/styles/global.css

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ a:hover {
260260
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
261261
}
262262

263+
.nav-toggle {
264+
display: none;
265+
}
266+
263267
.site-tabs {
264268
display: flex;
265269
padding: 0 var(--space-md);
@@ -333,7 +337,7 @@ a:hover {
333337
}
334338

335339
.sidebar-toc ul ul > li {
336-
margin-bottom: 0;
340+
margin-bottom: var(--space-xs);
337341
}
338342

339343
.sidebar-toc a {
@@ -562,14 +566,44 @@ a:hover {
562566
}
563567
}
564568

565-
@media (max-width: 600px) {
569+
@media (max-width: 768px) {
570+
.nav-toggle {
571+
display: flex;
572+
align-items: center;
573+
justify-content: center;
574+
background: none;
575+
border: none;
576+
color: #fff;
577+
padding: var(--space-sm) var(--space-md);
578+
cursor: pointer;
579+
}
580+
581+
.nav-toggle:hover {
582+
background: rgba(255, 255, 255, 0.1);
583+
}
584+
566585
.site-tabs {
567-
padding: 0 var(--space-sm);
586+
display: none;
587+
flex-direction: column;
588+
padding: 0;
589+
overflow-x: visible;
590+
}
591+
592+
.site-tabs.open {
593+
display: flex;
568594
}
569595

570596
.site-tabs a {
571-
font-size: 0.75rem;
572-
padding: 0 var(--space-sm);
597+
height: auto;
598+
padding: var(--space-sm) var(--space-md);
599+
border-bottom: none;
600+
border-left: 3px solid transparent;
601+
}
602+
603+
.site-tabs a.active {
604+
border-bottom: none;
605+
border-left: 3px solid var(--color-accent);
606+
background: rgba(255, 255, 255, 0.1);
573607
}
574608

575609
.content {

chapters/01-introduction.md

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,31 @@ share with others when you are ready.
4141

4242
## 3. Installation
4343

44-
### Windows
44+
### Download
4545

46-
1. Download the installer from https://git-scm.com/downloads
47-
2. Run the installer with the default options
48-
3. Open PowerShell and run `git --version`
46+
Go to https://git-scm.com/downloads and download the installer for
47+
your operating system.
4948

50-
### macOS
49+
### Install
5150

52-
**Option A — Xcode Command Line Tools (no extra software needed):**
51+
| OS | How to install |
52+
|----|---------------|
53+
| Windows | Run the downloaded installer with the default options |
54+
| macOS | Run `xcode-select --install` in Terminal, or `brew install git` if you use Homebrew |
55+
| Ubuntu / Debian | `sudo apt-get install git` |
56+
| Fedora | `sudo dnf install git` |
57+
| Arch Linux | `sudo pacman -S git` |
5358

54-
1. Open Terminal and run `git --version`
55-
2. If Git is not installed, macOS will prompt you to install the Command Line Tools — follow the dialog
59+
### Verify
5660

57-
**Option B — Homebrew:**
61+
Open a terminal and run:
5862

59-
1. Install [Homebrew](https://brew.sh/) if you do not have it
60-
2. Run `brew install git`
61-
3. Run `git --version`
62-
63-
### Linux
64-
65-
| Distribution | Command |
66-
|-----------------|--------------------------------------|
67-
| Ubuntu / Debian | `apt-get install git` |
68-
| Fedora 22+ | `dnf install git` |
69-
| Arch Linux | `pacman -S git` |
70-
| openSUSE | `zypper install git` |
71-
| Alpine | `apk add git` |
72-
| Gentoo | `emerge --ask --verbose dev-vcs/git` |
73-
| FreeBSD | `pkg install git` |
74-
| Nix/NixOS | `nix-env -i git` |
63+
```text
64+
$ git --version
65+
git version 2.47.1
66+
```
7567

76-
After installing, run `git --version` to verify.
68+
If you see a version number, Git is installed.
7769

7870
## 4. Hosting
7971

@@ -153,13 +145,15 @@ full history.
153145

154146
![Command Overview](../assets/images/git-command-overview.png)
155147

156-
Commands are grouped by experience level:
148+
Commands are grouped by category and experience level:
157149

158-
- **Beginner** — Help, Create, Configure, Track, Inspect
159-
- **Advanced** — Sync, Revert, Branch, Reuse
160-
- **Expert** — Rewrite and Cleanup (can destroy history — use with caution)
150+
| Level | Categories |
151+
|-------|-----------|
152+
| Beginner | Help, Create, Configure, Track, Inspect |
153+
| Advanced | Sync, Revert, Branch, Reuse |
154+
| Expert | Rewrite, Cleanup (can destroy history) |
161155

162-
Each command group is covered in detail in the following chapters. The
156+
Each category is covered in detail in the following chapters. The
163157
table below lists the most common commands in daily operations.
164158

165159
| Command | What it does | Example |

0 commit comments

Comments
 (0)