-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into marks/errors
- Loading branch information
Showing
70 changed files
with
1,602 additions
and
617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,7 @@ public/css/*.scss.css | |
.myradio.key | ||
config.toml | ||
public/css/*.scss.css.map | ||
|
||
|
||
.direnv/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package controllers | ||
|
||
import ( | ||
"log" | ||
"net/http" | ||
|
||
"github.com/UniversityRadioYork/2016-site/models" | ||
"github.com/UniversityRadioYork/2016-site/structs" | ||
"github.com/UniversityRadioYork/2016-site/utils" | ||
"github.com/UniversityRadioYork/myradio-go" | ||
) | ||
|
||
// AboutController is the controller for the about page. | ||
type AboutController struct { | ||
Controller | ||
} | ||
|
||
// NewAboutController returns a new AboutController with the MyRadio session s | ||
// and configuration context c. | ||
func NewAboutController(s *myradio.Session, c *structs.Config) *AboutController { | ||
return &AboutController{Controller{session: s, config: c}} | ||
} | ||
|
||
// Get handles the HTTP GET request r for the about us page, writing to w. | ||
func (aboutC *AboutController) Get(w http.ResponseWriter, r *http.Request) { | ||
teamM := models.NewTeamModel(aboutC.session) | ||
teams, err := teamM.GetAll() | ||
if err != nil { | ||
log.Println(err) | ||
utils.RenderTemplate(w, aboutC.config.PageContext, nil, "404.tmpl") | ||
return | ||
} | ||
data := struct { | ||
Teams []myradio.Team | ||
}{ | ||
Teams: teams, | ||
} | ||
err = utils.RenderTemplate(w, aboutC.config.PageContext, data, "about.tmpl") | ||
Check failure on line 38 in controllers/about.go GitHub Actions / build
|
||
if err != nil { | ||
log.Println(err) | ||
return | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem(system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
}; | ||
inherit (pkgs) lib; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
nativeBuildInputs = with pkgs; [ | ||
sassc | ||
gnumake | ||
go | ||
]; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.