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

Melody review #8

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7deab79
Copy worldmusic_development to branch
cjwit Nov 14, 2020
1c926b9
Add netlify form
cjwit Nov 14, 2020
ee3a749
Change form tag to netlify attribute
cjwit Nov 14, 2020
167a8bb
Remove action from form
cjwit Nov 14, 2020
fe67db9
Remove comments from Gemfile
cjwit Nov 15, 2020
2df4e82
Two column footer
cjwit Nov 15, 2020
9d99332
Add witulski chapter
cjwit Jan 15, 2021
33be644
Fix chapter listing to include index only
cjwit Jan 15, 2021
fd8f37e
Add Song Grant proof
cjwit Jan 15, 2021
fc1a6fb
Add formatting for multiple authors
cjwit Jan 15, 2021
ed76cd4
Update text on chapters page
cjwit Jan 15, 2021
2b48719
Add images to Song Grant
cjwit Jan 18, 2021
4c19c10
Move chapter description to bottom
cjwit Jan 18, 2021
7445f5d
Fix readings in Song Grant
cjwit Jan 20, 2021
17fd4b2
Proof revisions for Song Grant
cjwit Jan 20, 2021
a9dd34b
Fix capitalization typos
cjwit Jan 21, 2021
cab9bb2
Fix chapter spacing with two authors
cjwit Jan 21, 2021
76b3ba3
Add link back into Song Grant
cjwit Jan 21, 2021
b357635
Add second author to page header
cjwit Jan 22, 2021
706cf43
Song Grant edits
cjwit Jan 22, 2021
ef9d586
Add Nielsen abstract
cjwit Feb 4, 2021
5f59661
Create redirects
cjwit Feb 4, 2021
d6645ac
Add about landing page
cjwit Feb 5, 2021
44e10bb
Add first page of melody preview
cjwit Mar 24, 2021
78696fc
Add part 2 and fix JS
cjwit Mar 24, 2021
86aef56
Add (omitted) info to melody preview
cjwit Mar 24, 2021
b5c711d
Fix typo
cjwit Mar 25, 2021
361524c
Update revisions for part 1
cjwit Apr 2, 2021
541dd54
Update revisions for part 2
cjwit Apr 3, 2021
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
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
## For Jekyll

_site
.sass-cache
.jekyll-metadata

## For vim

# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~

# Auto-generated tag files
tags

# Persistent undo
[._]*.un~
29 changes: 1 addition & 28 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.8.7"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
end
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# worldmusic

This page houses the code for the [World Music Textbook](worldmusictextbook.org).
This page houses the **development version** of the code for the [World Music Textbook](worldmusictextbook.org).

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.

Feel free to email the editors at [[email protected]](mailto:[email protected]) if you are interested in contributing.

## Next up

### For code

* Add home page or clickable spot in header
* Remove upper border on item list (both for resources and chapters)
* Add image thumbnails to `chapter.html` and chapters
* Balance columns in footer (play with form size)
* Route Kristina’s essay, the call, and the resources to be sure that we don’t break any bookmarks with the update

### For content

* Abstract for Kristina's essay
* Add news to home page
* Think about geoTags: do countries get their own? What about the USA? Mexico has one in the chapters
* Set up custom pages
* Markdown files in a `custom` folder that use chapter.html and item.html to include specific resources, with headers
36 changes: 4 additions & 32 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing 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
# 'bundle exec 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.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: World Music Textbook
repository: worldmusic/worldmusic.github.io
title: World Music Textbook
author: Maintained by Christopher Witulski
email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
Expand All @@ -23,9 +8,8 @@ description: >- # this means to ignore newlines until "baseurl:"
timezone: America/New_York
baseurl: "" # the subpath of your site, e.g. /blog
url: https://worldmusictextbook.org # the base hostname & protocol for your site, e.g. http://example.com
# twitter_username: jekyllrb
# github_username: jekyll
# google_analytics: UA-80548224-5
facebook_username: WorldMusicTextbook
twitter_username: music_textbook
collections:
- resources

Expand All @@ -35,16 +19,4 @@ theme: jekyll-theme-cayman
plugins:
- jekyll-feed
sass:
sass_dir: _sass

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
# exclude:
# - Gemfile
# - Gemfile.lock
# - node_modules
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
sass_dir: /_sass
18 changes: 18 additions & 0 deletions _includes/chapter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<p class="hang">{{ chapter.author }}{% if chapter.author2 %}, {{ chapter.author2 }}{% endif %}, <a href="{{ site.baseurl }}{{ chapter.url }}">"{{ chapter.title }},"</a> ({{ chapter.date | date: "%b %Y" }})</p>

{% if chapter.description %}
<p class="description">{{ chapter.description }}</p>
{% endif %}

{% if chapter.tags %}
{% assign sorted-tags = (chapter.tags | sort) %}
{% for tag in sorted-tags %}
<span class = 'tag btn'>{{ tag }}</span>
{% endfor %}
{% endif %}
{% if chapter.geoTags %}
{% assign sorted-geoTags = (chapter.geoTags | sort) %}
{% for geoTag in sorted-geoTags %}
<span class = 'tag btn geoTag'>{{ geoTag }}</span>
{% endfor %}
{% endif %}
61 changes: 61 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<footer id="content" class="site-footer">
<div class="row">
<div class="two-column">
<h3>Comments, mailing list</h2>
<p>
With our aim to provide a collaborative and open free resource for instructors and students alike, we invite you to share any ideas about what you wish you had available for your students.
</p>
<form method="POST" netlify>

<textarea name="suggestions" rows="4" placeholder = "I have some thoughts"></textarea>

<p>
If you would like to be involved, please contact the editors. For updates, join our mailing list by entering your email below. We will not sell or share your responses without your permission.
</p>

<center>
<input type="text" name="name" placeholder="Your name (optional)" size = "50">
<input type="text" name="email" placeholder="Your email (optional)" size = "50">
<br />

<input type = "submit" class="btn" value = "Send">
</center>
</form>
</div>

<div class="two-column">
<h3>General Editors</h3>
<ul>
<li><a href="https://www.smu.edu/Meadows/AreasOfStudy/Music/Faculty/NielsenKristina">Kristina Nielsen</a></li>
<li><a href="https://www.cpp.edu/class/music/faculty-staff/jessie-vallejo.shtml">Jessie Vallejo</a></li>
<li><a href="https://www.bgsu.edu/musical-arts/faculty-and-staff/christopher-witulski.html">Christopher Witulski</a></li>
</ul>
<h3>Get in touch</h3>
<ul>
<li><a href="mailto:{{site.email}}">E-mail</a></li>
<li><a href="https://www.facebook.com/{{site.facebook_username}}">Facebook</a></li>
<li><a href="https://twitter.com/{{site.twitter_username}}">Twitter</a></li>
</ul>
<h3>Site Map</h3>
<ul>
<li><a href="{{ site.baseurl }}/">Site homepage</a></li>
<li><a href="{{ site.baseurl }}/chapters">Chapters</a></li>
<li><a href="{{ site.baseurl }}/resources">Other open resources</a></li>
<li><a href="{{ site.baseurl }}/call">Call for contributions</a></li>
<li><a href="{{ site.baseurl }}/about">About the project</a></li>
</ul>
<h3>License and development</h3>
<p>
Worldmusictextbook.org is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a> at <a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a>.
</p>
<p>
This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution — Non-Commercial — No Derivatives 4.0 International License</a>.<br />
</p>
<center>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0; margin:0.5rem;" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
</center>
</div>
</div>

<script data-goatcounter="https://worldmusic.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
</footer>
6 changes: 6 additions & 0 deletions _includes/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@
{% for tag in sorted-tags %}
<span class = 'tag btn'>{{ tag }}</span>
{% endfor %}
{% endif %}
{% if pub.geoTags %}
{% assign sorted-geoTags = (pub.geoTags | sort) %}
{% for geoTag in sorted-geoTags %}
<span class = 'tag btn geoTag'>{{ geoTag }}</span>
{% endfor %}
{% endif %}
21 changes: 21 additions & 0 deletions _includes/page-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<header role="banner">
<input type="checkbox" id="overlay-input" />
<label for="overlay-input" id="overlay-button"><span></span></label>
<div id="overlay">
<ul>
<li><a href="{{ site.baseurl }}/">Home</a></li>
<li><a href="{{ site.baseurl }}/chapters">Chapters</a></li>
<li><a href="{{ site.baseurl }}/resources">Other Resources</a></li>
<li><a href="{{ site.baseurl }}/call">Call for Contributions</a></li>
<li><a href="{{ site.baseurl }}/about">About the project</a></li>
</ul>
</div>
<div class="page-header turtle">
<h1 class="project-name">{{ page.title | site.title | site.github.repository_name }}</h1>
<h2 class="project-tagline">
{{ page.author | default: page.description | site.description | site.github.project_tagline }}
{% if page.author2 %} and {{ page.author2 }}{% endif %}
</h2>
</div>

</header>
8 changes: 8 additions & 0 deletions _includes/site-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<head>
<meta charset="UTF-8">
{% seo %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
</head>
93 changes: 93 additions & 0 deletions _includes/tag-script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<script>

// collect tags for the filter list
var tagElements = document.getElementsByClassName("tag");
var tagList = document.getElementById("tagList");
var tags = [];
var geoTags = [];

for (i = 0; i < tagElements.length; i++) {
if (tags.indexOf(tagElements[i].innerText) < 0 && geoTags.indexOf(tagElements[i].innerText) < 0) {
if (tagElements[i].classList.contains("geoTag")) {
geoTags.push(tagElements[i].innerText);
}
else {
tags.push(tagElements[i].innerText);
}
}
}

// create buttons for the filter list
tags.sort();
for (i = 0; i < tags.length; i++) {
var button = document.createElement("span");
var text = document.createTextNode(tags[i]);
button.appendChild(text);
button.classList.add("tag");
button.classList.add("filter");
button.classList.add("btn");
tagList.appendChild(button);
}

geoTags.sort();
for (i = 0; i < geoTags.length; i++) {
var button = document.createElement("span");
var text = document.createTextNode(geoTags[i]);
button.appendChild(text);
button.classList.add("tag");
button.classList.add("filter");
button.classList.add("btn");
button.classList.add("geoTag");
tagList.appendChild(button);
}

// set events for filter list
var active = [];

var filters = document.getElementsByClassName("filter");
var items = document.getElementsByClassName("item");
for (i = 0; i < filters.length; i++) {
let e = filters[i];
e.addEventListener("click", function() {

// change button status and create list of active tags
if (e.classList.contains("active")) {
e.classList.remove("active");
active.splice(active.indexOf(e.innerText), 1);
}
else {
e.classList.add("active");
active.push(e.innerText);
}

// hide and show items
if (active.length == 0) {
for (j = 0; j < items.length; j++) {
items[j].style.display = "block";
}
}
else {

// get item tags and check that each one is active
for (j = 0; j < items.length; j++) {
let itemTags = items[j].getElementsByTagName("span");
let matches = 0;
for (k = 0; k < itemTags.length; k++) {
if (active.indexOf(itemTags[k].innerText) >= 0) {
matches++;
}
}

// show or hide
if (matches >= active.length) {
items[j].style.display = "block";
}
else {
items[j].style.display = "none";
}
}
}
})
}
</script>

Loading