Skip to content

Commit

Permalink
(merge) #69 from acmpesuecc/improve-wizard
Browse files Browse the repository at this point in the history
Improve wizard
  • Loading branch information
polarhive authored Mar 30, 2024
2 parents 041e7d3 + 05dad42 commit 46c7947
Show file tree
Hide file tree
Showing 5 changed files with 386 additions and 157 deletions.
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Anna

![Test Workflow](https://github.com/acmpesuecc/anna/actions/workflows/tests.yml/badge.svg)

![Build Workflow](https://github.com/acmpesuecc/anna/actions/workflows/build.yml/badge.svg)

![GitHub Repo Stars](https://img.shields.io/github/stars/acmpesuecc/Anna)
[![Test Workflow](https://github.com/acmpesuecc/anna/actions/workflows/tests.yml/badge.svg)](https://github.com/acmpesuecc/anna/actions/workflows/tests.yml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/09b8bdf3-5931-4295-9fe7-d463d5d06a3f/deploy-status)](https://app.netlify.com/sites/anna-docs/deploys)
[![Go Reference](https://pkg.go.dev/badge/github.com/acmpesuecc/anna.svg)](https://pkg.go.dev/github.com/acmpesuecc/anna)
[![GitHub Repo Stars](https://img.shields.io/github/stars/acmpesuecc/Anna?style=flat-square&label=Stars&color=lightgreen&logo=github)](https://github.com/acmpesuecc/Anna)

```text
___
Expand All @@ -18,12 +17,11 @@ A static site generator in go

Inspired by [Hugo](https://gohugo.io) and [Saaru](https://github.com/anirudhRowjee/saaru), this static site generator aims to take performance to the next level with parallel rendering, live reload and so much more, all in Go.

Pronounced: `/ɐnːɐ/` which means rice in Kannada 🍚
> Pronounced: `/ɐnːɐ/` which means rice in Kannada 🍚
This Project is a part of the ACM PESU-ECC's yearly [AIEP](https://acmpesuecc.github.io/aiep) program, and is maintained by [Adhesh Athrey](https://github.com/DedLad), [Nathan Paul](https://github.com/polarhive), [Anirudh Sudhir](https://github.com/anirudhsudhir), and [Aditya Hegde](https://github.com/bwaklog)
This project is a part of the ACM PESU-ECC's yearly [AIEP](https://acmpesuecc.github.io/aiep) program, and is maintained by [Adhesh Athrey](https://github.com/DedLad), [Nathan Paul](https://github.com/polarhive), [Anirudh Sudhir](https://github.com/anirudhsudhir), and [Aditya Hegde](https://github.com/bwaklog)

---

## Install

Once you have a directory structure, install `anna` using:
Expand All @@ -35,15 +33,13 @@ go install github.com/acmpesuecc/anna@latest
Or if you have git installed, clone our repository:

```sh
git clone github.com/acmpesuecc/anna --depth=1
cd anna
git clone github.com/acmpesuecc/anna --depth=1; cd anna
go run .
```

### The detailed documentation of the SSG can be found [here](https://anna-docs.netlify.app/)
### Detailed documentation of our SSG can be found [here](https://anna-docs.netlify.app/)

---

## Flags

```text
Expand All @@ -53,8 +49,9 @@ Usage:
Flags:
-a, --addr string ip address to serve rendered content to (default "8000")
-d, --draft renders draft posts
-h, --help help for ssg
-p, --prof profiles the working code and shows data
-h, --help help for anna
-p, --prof enable profiling
-s, --serve serve the rendered content
-v, --validate-html validate semantic HTML
-w, --webconsole wizard to setup anna
```
1 change: 1 addition & 0 deletions cmd/anna/wizard.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Config struct {
SiteScripts []string `yaml:"siteScripts"`
Author string `yaml:"author"`
ThemeURL string `yaml:"themeURL"`
Navbar []string `yaml:"navbar"`
}

type WizardServer struct {
Expand Down
77 changes: 44 additions & 33 deletions cmd/wizard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,75 @@
<body>
<nav class="navbar">
<div class="navbar-header">
<h1 class="navbar-title">🧙 Setup Wizard</h1>
<div class="progress-circle">
<div class="progress"></div>
<span class="emoji">🍚</span>
</div>
<h1 class="navbar-title">Setup Wizard 🍚</h1>
</div>
</nav>

<div class="progress-container"></div>
<div class="container">
<div id="wizard" class="slide">
<div class="content">
<h2>Setup your Anna site</h2>
<div class="input-group">
<input type="text" id="author" required placeholder="Enter an author name" oninput="checkFormValidity()">
</div>
<div class="nav-buttons">
<button onclick="nextSlide()" id="nextButton" disabled>Next</button>
</div>
<h2>Get started!</h2>
<div class="input-group"><input type="text" id="author" required placeholder="Enter an author name"
oninput="checkFormValidity()"></div>
<div class="nav-buttons"><button onclick="nextSlide()" id="authorButton" disabled>Next</button></div>
</div>
<div class="content">
<h2>Name your site</h2>
<div class="input-group"><input type="text" id="siteTitle" required placeholder="ex: my blog" oninput="checkFormValidity()"></div>
<div class="input-group"><input type="text" id="siteTitle" required placeholder="ex: my blog"
oninput="checkFormValidity()"></div>
<div class="nav-buttons">
<button onclick="prevSlide()">&larr;</button>
<button onclick="nextSlide()" id="nextButton2" disabled>Next &rarr;</button>
<button onclick="nextSlide()" id="siteTitleButton" disabled>Next &rarr;</button>
</div>
</div>
<div class="content">
<h2>Enter a domain name</h2>
<div class="input-group"><input type="text" id="baseURL" required placeholder="ex: https://anna.github.io" oninput="checkFormValidity()"></div>
<div class="input-group"><input type="text" id="baseURL" required
placeholder="ex: https://anna.github.io" oninput="checkFormValidity()"></div>
<div class="nav-buttons">
<button onclick="prevSlide()">&larr;</button>
<button onclick="nextSlide()" id="nextButton3" disabled>Next &rarr;</button>
<button onclick="nextSlide()" id="baseURLButton" disabled>Next &rarr;</button>
</div>
</div>
<div class="content">
<h2>Choose a Theme</h2>
<div class="input-group">
<select id="themeURL" required oninput="checkFormValidity()">
<option value="/static/style.css" selected>default</option>
<option value="https://sudhir.live/static/style.css">Sudhir</option>
<option value="https://hegde.live/static/style.css">Hegde</option>
<option value="https://raw.githubusercontent.com/polarhive/sushi/main/style.css">sushi</option>
</select>
<h2>Pick what you'd like on the navbar</h2>
<div class="nav-checkboxes">
<label><input type="checkbox" id="navbar-index" checked value="index">home</label><br>
<label><input type="checkbox" id="navbar-about" value="about">about</label><br>
<label><input type="checkbox" id="navbar-posts" value="posts">posts</label><br>
<label><input type="checkbox" id="navbar-tags" value="tags">tags</label><br>
<label><input type="checkbox" id="navbar-contact" value="contact">contact</label><br>
</div>
<div class="nav-buttons">
<button onclick="prevSlide()">&larr;</button>
<button onclick="submitForm()">Submit</button>
</div>
<button onclick="prevSlide()">&larr;</button>
<button onclick="nextSlide()" id="baseURLButton">Next &rarr;</button>
</div>
</div>
<div class="content">
<h2>Choose a Theme</h2>
<div class="input-group">
<select id="themeURL" required oninput="checkFormValidity()">
<option value="/static/style.css" selected>default</option>
<option value="https://sudhir.live/static/style.css">Sudhir</option>
<option value="https://hegde.live/static/style.css">Hegde</option>
<option value="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">Pico CSS</option>
<option value="https://cdn.simplecss.org/simple.css">Simple CSS</option>
</select>
</div>
<div class="content" id="final-slide">
<h2>Cooking your Anna site</h2>
<p>Your Anna site is being cooked. This page will reload...</p>
<div class="nav-buttons">
<button onclick="prevSlide()">&larr;</button>
<button onclick="submitForm()">Submit</button>
</div>
</div>
<div class="content" id="final-slide">
<h2>Cooking your Anna site</h2>
<p>Your Anna site is being cooked. This page will reload...</p>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js"></script>
<script src="script.js"></script>
<script defer async src="https://cdn.jsdelivr.net/npm/[email protected]/tsparticles.bundle.min.js"></script>
<script defer src="script.js"></script>
</body>

</html>
</html>
Loading

0 comments on commit 46c7947

Please sign in to comment.