Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Adapt website for multi semester
Browse files Browse the repository at this point in the history
  • Loading branch information
anli5005 committed Aug 27, 2024
1 parent 46e4a75 commit 797a527
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 82 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Build and deploy Next.js site
name: Build Next.js site

on:
# Runs on pushes targeting the default branch
Expand Down Expand Up @@ -61,31 +61,8 @@ jobs:
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Copy .htaccess
run: cp .htaccess out
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: out
path: ./out

# Deployment job
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
- name: Connect to Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:cis1951
- name: Write SSH files
run: |
umask 077
echo "${{ secrets.SSH_KEY }}" > ${{ runner.temp }}/id_cis1951
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ${{ runner.temp }}/known_hosts
- name: Upload files
run: rsync -av --delete -e "ssh -i ${{ runner.temp }}/id_cis1951 -o UserKnownHostsFile=${{ runner.temp }}/known_hosts" out/ [email protected]:public_html
15 changes: 0 additions & 15 deletions .htaccess

This file was deleted.

16 changes: 11 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Link from "next/link"

export const metadata: Metadata = {
title: {
default: "CIS 1951",
template: "%s | CIS 1951",
default: "CIS 1951 (Spring 2024)",
template: "%s | CIS 1951 (Spring 2024)",
},
description: "An intro to iOS development course at the University of Pennsylvania.",
}
Expand All @@ -23,12 +23,18 @@ export default function RootLayout({
<body>
<MenuContextProvider>
<div className="md:container mx-auto md:px-8 md:py-16 print:md:py-8">
<h1 className="hidden md:block print:block md:text-8xl print:text-4xl w-fit font-bold text-transparent bg-clip-text bg-gradient-to-br from-cyan-600 to-purple-600 dark:from-cyan-500 dark:to-purple-500">
<Link href="/">CIS 1951</Link>
<a className="block bg-gradient-to-br from-cyan-600 to-purple-600 text-center px-4 py-2 md:rounded-lg md:mb-8 font-bold text-sm sm:text-base" href="/~cis1951">
This website is for a previous semester and will not be updated. Click or tap on this banner to go to the current CIS 1951 website.
</a>
<h1 className="hidden md:block print:block">
<Link href="/" className="flex flex-row items-center gap-4">
<div className="md:text-8xl print:text-4xl w-fit font-bold text-transparent bg-clip-text bg-gradient-to-br from-cyan-600 to-purple-600 dark:from-cyan-500 dark:to-purple-500">CIS 1951</div>
<div className="inline-block font-bold text-xl px-4 py-1 align-middle rounded-lg bg-gradient-to-br from-cyan-600 to-purple-600 text-white">Spring 2024</div>
</Link>
</h1>
<div className="md:mt-8 md:flex flex-nowrap gap-4">
<div className="flex flex-col items-center bg-neutral-50 dark:bg-neutral-800 md:bg-transparent dark:md:bg-transparent pt-4 md:pt-0 print:hidden">
<h1 className="text-center mb-3 md:hidden text-3xl w-fit font-bold text-transparent bg-clip-text bg-gradient-to-br from-cyan-700 to-purple-700 dark:from-cyan-400 dark:to-purple-400">CIS 1951</h1>
<h1 className="text-center mb-3 md:hidden text-3xl w-fit font-bold text-transparent bg-clip-text bg-gradient-to-br from-cyan-700 to-purple-700 dark:from-cyan-400 dark:to-purple-400">CIS 1951 <span className="font-light">• Spring 2024</span></h1>
<div className="px-4 md:px-0 w-full"><Menu /></div>
<div className="w-full rounded-t-2xl h-4 bg-white dark:bg-black mt-4 border-t border-neutral-200 dark:border-neutral-700 md:hidden" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function ScheduleRow({ date, ...details }: ScheduleItem) {
content = <div>
<div>🧑‍🏫 {details.title}</div>
<div className="flex gap-2">
{details.files.map(file => <a className="link" href={`/~cis1951/lectures/${details.slug}/${file}`} key={file}>{file}</a>)}
{details.files.map(file => <a className="link" href={`/~cis1951/24sp/lectures/${details.slug}/${file}`} key={file}>{file}</a>)}
</div>
</div>
} else if (details.type === "assignment") {
Expand Down
2 changes: 1 addition & 1 deletion components/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { FormattedDate } from "./FormattedDate";

export const mdxComponents: MDXComponents = {
a: ({ href, ...props }) => {
const prefix = "/~cis1951/"
const prefix = "/~cis1951/24sp/"
if (typeof href === "string") {
return <Link href={href.startsWith(prefix) ? href.slice(prefix.length - 1) : href} legacyBehavior>
<a {...props} />
Expand Down
2 changes: 1 addition & 1 deletion content/homework/hw0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ results — without making a full app! Some of our tutorials will use Playground

Great! You should now see a Playgrounds file with some boilerplate code:

<img src="/~cis1951/images/playground_parts.png" alt="labeled playground parts"/>
<img src="/~cis1951/24sp/images/playground_parts.png" alt="labeled playground parts"/>

1. This is the code editor. Code goes here!
2. This is a “status panel” — a feature unique to Playgrounds. When you initialize a variable, it will show you the
Expand Down
2 changes: 1 addition & 1 deletion content/homework/hw1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In addition, your code should contain:

All state should be stored in the adventure game struct itself, and not in a global variable. To test this, try clicking the "Reset" button. Everything in the struct should be reset to its initial state.

Be sure to follow the [code style guidelines](/~cis1951/codestyle) - we won't be grading on style too harshly, but unreadable or messy code may be reflected in the style grade.
Be sure to follow the [code style guidelines](/~cis1951/24sp/codestyle) - we won't be grading on style too harshly, but unreadable or messy code may be reflected in the style grade.

Don't feel the need to go overboard with your game in terms of creativity or complexity - we're more interested in how you'll apply the concepts we've learned in class. If you're stuck for ideas, you can always implement a classic like [Colossal Cave Adventure](https://en.wikipedia.org/wiki/Colossal_Cave_Adventure) or [Zork](https://en.wikipedia.org/wiki/Zork).

Expand Down
10 changes: 5 additions & 5 deletions content/homework/hw3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ With location checking out of the way, you can now implement the logic to collec

**If you're using motion:** You'll need to set up a [CMMotionManager](https://developer.apple.com/documentation/coremotion/cmmotionmanager) object, listen for device motion updates, then use the accelerometer data to detect a shake. For help with setting up access to motion data, you can consult [our finished code from lecture 7](https://github.com/cis1951/lec7-code/tree/solution).

**If you're using gestures:** You'll need to set up a gesture on your view, then use the position data you get from the `onChanged` handler to determine whether the user is scribbling. You may want to add a few state variables to help you with this. For help with gesture recognition, you can check out the [slides from lecture 6](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/slides.pdf) or our [live demo walkthrough](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/live-demo-06.md).
**If you're using gestures:** You'll need to set up a gesture on your view, then use the position data you get from the `onChanged` handler to determine whether the user is scribbling. You may want to add a few state variables to help you with this. For help with gesture recognition, you can check out the [slides from lecture 6](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/slides.pdf) or our [live demo walkthrough](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/live-demo-06.md).

### Step 9: Test and submit!

Expand All @@ -169,13 +169,13 @@ This is a fairly complex assignment. **We encourage you to come to office hours
Some relevant course material:

* Lecture 5: App Lifecycle, Structure, and MVVM
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Code](https://github.com/cis1951/lec5-code)
* Lecture 6: Custom Views and Gesture Recognition
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/slides.pdf)
* [Live Demo Walkthrough](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/live-demo-06.md)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/slides.pdf)
* [Live Demo Walkthrough](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/live-demo-06.md)
* Lecture 7: Location and Motion
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/07-sensors/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/07-sensors/slides.pdf)
* [Finished Code](https://github.com/cis1951/lec7-code/tree/solution)

## Grading
Expand Down
8 changes: 4 additions & 4 deletions content/homework/hw4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ This is a fairly complex assignment. **We encourage you to come to office hours
Some relevant course material:

* Lecture 5: App Lifecycle, Structure, and MVVM
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Code](https://github.com/cis1951/lec5-code)
* Lecture 8: Networking and Error Handling
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/08-networking/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/08-networking/slides.pdf)
* [Code](https://github.com/cis1951/lec8-code)
* Lecture 9: Data Persistence
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/09-data-persistence/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/09-data-persistence/slides.pdf)
* [Code](https://github.com/cis1951/lec9-code)

## Grading
Expand Down Expand Up @@ -343,7 +343,7 @@ This assignment is worth 100 points, broken down as follows:

## Extra Credits

* **Current location (+10)** Add a way to autofill the user's current location into the input fields (see [Lecture 7](https://www.seas.upenn.edu/~cis1951/lectures/07-sensors/slides.pdf) for details on getting location!)
* **Current location (+10)** Add a way to autofill the user's current location into the input fields (see [Lecture 7](https://www.seas.upenn.edu/~cis1951/24sp/lectures/07-sensors/slides.pdf) for details on getting location!)
* **Map (+5):** Show the given location in a map in the location detial view.

## Submission
Expand Down
18 changes: 9 additions & 9 deletions content/homework/project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ We will need to approve your project proposal, so make sure it is complex enough

## Milestone 1

For milestone 1, you will need to design and plan most of your app. **NOTE: Most/a lot of this work will be done in class during [Lecture 11: App Design & UX](https://www.seas.upenn.edu/~cis1951/lectures/11-app-design/slides.pdf) for your own project.** The requirements of what you need to include are listed below. Note that you are free to work on programming the rest of the App before this deadline due to time constraints, but we wanted to give some time to plan out the structure if needed.
For milestone 1, you will need to design and plan most of your app. **NOTE: Most/a lot of this work will be done in class during [Lecture 11: App Design & UX](https://www.seas.upenn.edu/~cis1951/24sp/lectures/11-app-design/slides.pdf) for your own project.** The requirements of what you need to include are listed below. Note that you are free to work on programming the rest of the App before this deadline due to time constraints, but we wanted to give some time to plan out the structure if needed.

### Stage 1: User Stories
The first stage is coming up with your app's user stories. User stories are a technique used in software development to capture and communicate a user's requirements or desired features in a concise and easily understandable way. A user story is typically a short sentence or paragraph that describes a specific action that a user wants to perform, why they want to perform it, and what benefit they expect to receive from it.
Expand Down Expand Up @@ -145,23 +145,23 @@ This is a large project! You should be making something you are proud to show of
Some relevant course material:

* Lecture 5: App Lifecycle, Structure, and MVVM
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/05-app-lifecycle-and-structure/slides.pdf)
* [Code](https://github.com/cis1951/lec5-code)
* Lecture 6: Custom Views and Gesture Recognition
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/slides.pdf)
* [Live Demo Walkthrough](https://www.seas.upenn.edu/~cis1951/lectures/06-custom-views-and-event-handling/live-demo-06.md)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/slides.pdf)
* [Live Demo Walkthrough](https://www.seas.upenn.edu/~cis1951/24sp/lectures/06-custom-views-and-event-handling/live-demo-06.md)
* Lecture 7: Location and Motion
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/07-sensors/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/07-sensors/slides.pdf)
* [Finished Code](https://github.com/cis1951/lec7-code/tree/solution)
* Lecture 8: Networking and Error Handling
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/08-networking/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/08-networking/slides.pdf)
* [Code](https://github.com/cis1951/lec8-code)
* Lecture 9: Data Persistence
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/09-data-persistence/slides.pdf)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/09-data-persistence/slides.pdf)
* [Code](https://github.com/cis1951/lec9-code)
* Lecture 11: App Design & UX
* [Slides](https://www.seas.upenn.edu/~cis1951/lectures/11-app-design-and-ux/slides.pdf)
* [Other Resources](https://www.seas.upenn.edu/~cis1951/resources/)
* [Slides](https://www.seas.upenn.edu/~cis1951/24sp/lectures/11-app-design-and-ux/slides.pdf)
* [Other Resources](https://www.seas.upenn.edu/~cis1951/24sp/resources/)
* [Course GitHub](https://github.com/cis1951)

## Grading
Expand Down
39 changes: 24 additions & 15 deletions content/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,44 @@ customLayout: true
github: "jhawk0224",
website: "https://jordanh.xyz",
avatar: "https://i.imgur.com/31gi0lQ.png",
oh: "TBD",
},
{
name: "Jacky Fang",
section: "201",
flavorText: "Bananas",
pennkey: "jackyf",
school: "seas",
pronouns: "he/him",
github: "innocentoak",
avatar: "https://i.imgur.com/zlrHr8A.jpg",
oh: "TBD",
oh: "Fri 11:30-1:30pm @Levine 3rd Floor Bump Space",
},
{
name: "Anthony Li",
section: "202",
section: "201",
flavorText: "OvercomplicatedView",
pennkey: "antli",
school: "seas",
pronouns: "he/him",
github: "anli5005",
website: "https://anli.dev",
avatar: "https://www.seas.upenn.edu/~cis1951/images/anli.png",
oh: "TBD",
avatar: "https://www.seas.upenn.edu/~cis1951/assets/anli.png",
oh: "Wed 5:15-7pm Online",
},
{
name: "Yuying Fan",
section: "202",
flavorText: "Food, Music, Plants, Coding",
pennkey: "yuyingf",
school: "seas",
pronouns: "she/her",
github: "fyy26",
website: "https://www.linkedin.com/in/fanyuying/",
avatar: "https://lh3.googleusercontent.com/a/ACg8ocLFVWxE2df478AegQvN72qniqSQ5i-M9aUOYOLOlz1iyU8=s576-c-no",
oh: "Mon 6:45-7:45pm @Towne 337",
},
]} />

<h3 className="mt-4 text-xl font-bold">TAs</h3>
<StaffGrid members={[
{
name: "Jacky Fang",
section: "201",
pennkey: "jackyf",
school: "seas",
pronouns: "he/him",
avatar: "https://i.imgur.com/zlrHr8A.jpg",
},
{
name: "Ondrej Gonzor",
section: "202",
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { withContentlayer } = require('next-contentlayer')

/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/~cis1951",
basePath: "/~cis1951/24sp",
output: "export",
pageExtensions: ["js", "jsx", "ts", "tsx", "mdx"],
trailingSlash: true,
Expand Down

0 comments on commit 797a527

Please sign in to comment.