Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facelift #69

Merged
merged 10 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.go]
indent_style = tab
indent_size = 4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
hacktoberfest
secret.env
node_modules
public/css
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ Start the web service:
docker-compose up --build web
```

Install frontend assets:

```
npm install
```

Build the frontend assets:

```
npm run production
```

You're ready to go! Visit [http://localhost:8080](localhost:8080) in your
browser.

Expand All @@ -54,6 +66,10 @@ Using the configured Docker Compose file if you edit anything under `public/` or
press <kbd>ctrl</kbd> + <kbd>c</kbd> to cancel the process and then run
`docker-compose up --build web` again to restart.

Running `npm run watch` will watch for frontend changes and rebuild CSS assets.

This website uses the Typicons icon library. [Download the SVG files from their website](https://www.s-ings.com/typicons/).

## Credit

The entire idea and name "Hacktoberfest" comes from the
Expand Down
4 changes: 2 additions & 2 deletions issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func issueSearch(ctx context.Context, label, token string, ch chan<- Issue) erro
q += " org:" + k
}
}
for k, v := range projects {
if v == true {
for k, p := range projects {
if p.Visible == true {
q += " repo:" + k
}
}
Expand Down
74 changes: 61 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,67 @@ var orgs = map[string]bool{
"StartupWichita": true,
"wichitalks": false,
"ennovar": false,
"lake-afton-public-observatory": true,
"lake-afton-public-observatory": false,
}

type Project struct {
Title string
Description string
Visible bool
}

// These specific projects also count
var projects = map[string]bool{
"imacrayon/eventsinwichita": true,
"br0xen/boltbrowser": true,
"benblankley/fort-rpg": true,
"chrisl8/ArloBot": true,
"blunket/image-checker": true,
"hitjim/ting-bill-split": true,
"nessalc/food-groups": true,
"kentonh/ProjectNameGenerator": true,
"doby162/witchazzan-server": true,
"chrisl8/witchazzan-client": true,
var projects = map[string]Project{
"imacrayon/eventsinwichita": Project{
Title: "Events in Wichita",
Description: "",
Visible: false,
},
"br0xen/boltbrowser": Project{
Title: "Bolt Browser",
Description: "A CLI Browser for BoltDB Files.",
Visible: true,
},
"benblankley/fort-rpg": Project{
Title: "fort-rpg",
Description: "A text-based Computer Role Playing Game written in Fortran 90.",
Visible: true,
},
"chrisl8/ArloBot": Project{
Title: "ArloBot",
Description: "Robot Operating System (ROS) for a Parallax ArloBot.",
Visible: true,
},
"blunket/image-checker": Project{
Title: "Image Checker",
Description: "This is a web app to aid in checking image sizes and stuff.",
Visible: true,
},
"hitjim/ting-bill-split": Project{
Title: "Ting Bill Split",
Description: "Split the cost your group's Ting bill proportionately, based on each device's usage.",
Visible: true,
},
"nessalc/food-groups": Project{
Title: "Food Groups",
Description: "An app to coordinate groups of people gathering for meals.",
Visible: true,
},
"kentonh/ProjectNameGenerator": Project{
Title: "Project Name Generator",
Description: "Really stupid way to give your project a code name.",
Visible: true,
},
"doby162/witchazzan-server": Project{
Title: "Witchazzan (Server)",
Description: "The Clojure server for the online game Witchazzan.",
Visible: true,
},
"chrisl8/witchazzan-client": Project{
Title: "Witchazzan (Client)",
Description: "The Node JS client for the online game Witchazzan.",
Visible: true,
},
}

var v = render.New(render.Options{
Expand Down Expand Up @@ -110,10 +156,12 @@ func logger(h http.Handler) http.Handler {
func home(w http.ResponseWriter, r *http.Request) {
data := struct {
Orgs map[string]bool
Projects map[string]bool
Projects map[string]Project
Year int
}{
Orgs: orgs,
Projects: projects,
Year: time.Now().Year(),
}
v.HTML(w, http.StatusOK, "home", data)
}
Expand Down
Loading