Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsilver authored Aug 2, 2024
0 parents commit edde9e2
Show file tree
Hide file tree
Showing 34 changed files with 930 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/kevinlin1/just-the-class/discussions
about: Ask questions and discuss with other community members
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.gem
.bundle/
.jekyll-cache/
.jekyll-metadata
.sass-cache/
Gemfile.lock
_site/
node_modules/
vendor/
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem "webrick", "~> 1.8"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Kevin Lin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: home
title: Just the Class
nav_exclude: true
permalink: /:path/
seo:
type: Course
name: Just the Class
---

# Just the Class

Just the Class is a GitHub Pages template developed for the purpose of quickly deploying course websites. In addition to serving plain web pages and files, it provides a boilerplate for:

- [announcements](announcements.md),
- a [course calendar](calendar.md),
- a [staff](staff.md) page,
- and a weekly [schedule](schedule.md).

Just the Class is a template that extends the popular [Just the Docs](https://github.com/just-the-docs/just-the-docs) theme, which provides a robust and thoroughly-tested foundation for your website. Just the Docs include features such as:

- automatic [navigation structure](https://just-the-docs.github.io/just-the-docs/docs/navigation-structure/),
- instant, full-text [search](https://just-the-docs.github.io/just-the-docs/docs/search/) and page indexing,
- and a set of [UI components](https://just-the-docs.github.io/just-the-docs/docs/ui-components) and authoring [utilities](https://just-the-docs.github.io/just-the-docs/docs/utilities).

## Getting Started

Getting started with Just the Class is simple.

1. Create a [new repository based on Just the Class](https://github.com/kevinlin1/just-the-class/generate).
1. Update `_config.yml` and `README.md` with your course information. [Be sure to update the url and baseurl](https://mademistakes.com/mastering-jekyll/site-url-baseurl/).
1. Configure a [publishing source for GitHub Pages](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages). Your course website is now live!
1. Edit and create `.md` [Markdown files](https://guides.github.com/features/mastering-markdown/) to add more content pages.

Just the Class has been used by instructors at Stanford University ([CS 161](https://stanford-cs161.github.io/winter2021/)), UC Berkeley ([Data 100](https://ds100.org/fa21/)), UC Santa Barbara ([CSW8](https://ucsb-csw8.github.io/s22/)), Northeastern University ([CS4530/5500](https://neu-se.github.io/CS4530-CS5500-Spring-2021/)), and Carnegie Mellon University ([17-450/17-950](https://cmu-crafting-software.github.io/)). Share your course website and find more examples in the [show and tell discussion](https://github.com/kevinlin1/just-the-class/discussions/categories/show-and-tell)!

### Local development environment

Just the Class requires no special Jekyll plugins and can run on GitHub Pages' standard Jekyll compiler. To setup a local development environment, clone your template repository and follow the GitHub Docs on [Testing your GitHub Pages site locally with Jekyll](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
8 changes: 8 additions & 0 deletions _announcements/week-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Week 0 Announcement
week: 0
date: 2019-04-01
---

Hello world!
{: .fs-5 }
10 changes: 10 additions & 0 deletions _announcements/week-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Week 1 Announcement
week: 1
date: 2019-04-08
---

1. Create a [new repository based on Just the Class](https://github.com/kevinlin1/just-the-class/generate).
1. Configure a [publishing source for GitHub Pages](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages). Your course website is now live!
1. Update `_config.yml` with your course information.
1. Edit and create `.md` [Markdown files](https://guides.github.com/features/mastering-markdown/) to add your content.
79 changes: 79 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole site, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing these this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.github_repo }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Just the Class
tagline: A Jekyll template for course websites
description: A modern, highly customizable, responsive Jekyll template for course websites
author: Kevin Lin
baseurl: '/just-the-class' # the subpath of your site, e.g. /blog
url: 'https://kevinl.info' # the base hostname & protocol for your site, e.g. http://example.com
exclude: ["Gemfile", "Gemfile.lock", "LICENSE"]

# Theme settings
remote_theme: just-the-docs/[email protected]
color_scheme: light
search_enabled: true
heading_anchors: true
permalink: pretty
aux_links:
Kevin Lin:
- 'https://kevinl.info'
Just the Class on GitHub:
- 'https://github.com/kevinlin1/just-the-class'
footer_content:

# Collections for website data
collections:
staffers:
modules:
schedules:
announcements:
# Default layouts for each collection type
defaults:
- scope:
path: ''
type: staffers
values:
layout: staffer
height: 300
subpath: '/assets/images/'
width: 300
- scope:
path: ''
type: modules
values:
layout: module
- scope:
path: ''
type: schedules
values:
layout: schedule
- scope:
path: ''
type: announcements
values:
layout: announcement

compress_html:
clippings: all
comments: all
endings: all
startings: []
blanklines: false
profile: false

liquid:
error_mode: strict
strict_filters: true
20 changes: 20 additions & 0 deletions _includes/minutes.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% capture _minutes_workspace %}
{% comment %}
Return the number of minutes between midnight and the given time string (e.g. '9:30 AM').
Parameters:
`time` (string): the time to convert.
{% endcomment %}

{% assign _time = include.time %}
{% assign _hhmm = _time | split: ' ' | first | split: ':' %}
{% assign _hours = _hhmm | first | to_integer %}
{% assign _minutes = _hhmm | last | to_integer %}
{% assign _ampm = _time | split: ' ' | last | upcase %}

{% if _ampm == 'AM' and _hours == 12 %}
{% assign _hours = _hours | minus: 12 %}
{% elsif _ampm == 'PM' and _hours != 12 %}
{% assign _hours = _hours | plus: 12 %}
{% endif %}
{% endcapture %}{% assign _minutes_workspace = '' %}{{ _hours | times: 60 | plus: _minutes }}
14 changes: 14 additions & 0 deletions _layouts/announcement.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="announcement">
<h2>{{ page.title }}</h2>
<span class="announcement-meta">
{% if page.date %}
{{ page.date | date: '%b %e' }}
&middot;
{% endif %}
{% assign minutes = content | strip_html | number_of_words | divided_by: 180.0 | round %}
{{ minutes }} min read
</span>
<div>
{{ content }}
</div>
</div>
4 changes: 4 additions & 0 deletions _layouts/module.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h2 class="fs-4" id="{{ page.title | slugify }}" >{{ page.title }}</h2>
<div class="module">
{{ content }}
</div>
34 changes: 34 additions & 0 deletions _layouts/schedule.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% assign start_time = page.timeline | first %}
{% capture offset %}{% include minutes.liquid time=start_time %}{% endcapture %}
<div class="schedule">
<ul class="schedule-timeline" style="min-width: {{ page.schedule | size | times: 120 }}px">
{% for time in page.timeline %}
<li class="schedule-time">{{ time }} </li>
{% endfor %}
</ul>
<ul class="schedule-group">
{% for day in page.schedule %}
<li class="schedule-day">
<h2 class="schedule-header no_anchor">{{ day.name }}</h2>
{% if day.events %}
<ul class="schedule-events" style="height: {{ page.timeline | size | times: 40 }}px">
{% for event in day.events %}
{% capture start %}{% include minutes.liquid time=event.start %}{% endcapture %}
{% capture end %}{% include minutes.liquid time=event.end %}{% endcapture %}
{% assign top = start | minus: offset | times: 40 | divided_by: 30 %}
{% assign height = end | minus: start | times: 40 | divided_by: 30 %}
<li class="schedule-event {% if event.class %}{{ event.class }}{% else %}{{ event.name | slugify }}{% endif %}"
style="top: {{ top }}px; height: {{ height }}px;">
<div class="name">{{ event.name }}</div>
<div class="time">{{ event.start }}–{{ event.end }}</div>
{% if event.location %}
<div class="location">{{ event.location }}</div>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
29 changes: 29 additions & 0 deletions _layouts/staffer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="staffer">
{%- if page.photo -%}
<img class="staffer-image" src="{{ site.baseurl }}{{ page.subpath }}{{ page.photo }}" alt="" width="{{ page.width }}" height="{{ page.height }}">
{%- endif -%}
<div>
<h3 class="staffer-name" id="{{ page.name | slugify }}">
{%- if page.website -%}
<a href="{{ page.website }}">{{ page.name }}</a>
{%- else -%}
{{ page.name }}
{%- endif -%}
</h3>
{%- if page.pronouns -%}
<p class="staffer-pronouns">{{ page.pronouns }}</p>
{%- endif -%}
{%- if page.email -%}
<p><a href="mailto:{{ page.email }}">{{ page.email }}</a></p>
{%- endif -%}
{%- if page.meta -%}
<dl class="staffer-meta">
{%- for meta in page.meta -%}
<dt>{{ meta[0] }}</dt>
<dd>{{ meta[1] | markdownify }}</dd>
{%- endfor -%}
</dl>
{%- endif -%}
{{ content }}
</div>
</div>
23 changes: 23 additions & 0 deletions _modules/week-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Introduction to Java
---

Sep 28
: [Java & Git](#)
: [1.1](#)

Sep 29
: **Section**{: .label .label-purple }[Intro to Java](#)
: [Solution](#)

Sep 30
: [Variables & Objects](#)
: [1.2](#), [2.1](#)

Oct 1
: **Lab**{: .label .label-purple } [Intro to Java](#)

Oct 2
: [Tracing, IntLists, & Recursion](#)
: [2.1](#)
: **HW 1 due**{: .label .label-red }
23 changes: 23 additions & 0 deletions _modules/week-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Basic Data Structures
---

Oct 5
: [Linked Lists & Encapsulation](#)
: [3.1](#), [2.2](#), [2.3](#)

Oct 6
: **Section**{: .label .label-purple }[Linked Lists](#)
: [Solution](#)

Oct 7
: [Resizing Arrays](#)
: [2.4](#), [2.5](#)

Oct 8
: **Lab**{: .label .label-purple } [Resizing Arrays](#)

Oct 9
: [Runtime Analysis](#)
: [8.1](#), [8.2](#), [8.3](#), [8.4](#)
: **HW 2 due**{: .label .label-red }
Loading

0 comments on commit edde9e2

Please sign in to comment.