Skip to content

Commit

Permalink
Revert "deploy today @ 7 pm (#655)" (#657)
Browse files Browse the repository at this point in the history
This reverts commit d4e5aa2.
  • Loading branch information
internot169 authored May 31, 2024
1 parent d4e5aa2 commit ab54db5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
6 changes: 1 addition & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import datetime
import json
import os
import random
import re

import google.oauth2.id_token
Expand Down Expand Up @@ -179,10 +178,6 @@ def main():
# Get the last 28 days of lunches
lunches = get_lunches_since_date(datetime.date.today() - datetime.timedelta(28))

days_randified = DAYS.copy()
num = random.uniform(0, 1)
if num < 0.75:
days_randified[0]["2024-05-31"] = "D-A_Fri"
# Handler for how to serialize date objs into json
response = make_response(
render_template(
Expand Down Expand Up @@ -227,6 +222,7 @@ def gen_opted_out_table():


def is_same_class(a, b):
print(a)
return (
a["teacher_username"] == b["teacher_username"]
and a["period"] == b["period"]
Expand Down
8 changes: 4 additions & 4 deletions static/html/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@
<template is="dom-repeat" id="entryList" items="{{entries}}">
<div class="card" layout="" vertical="" xcenter="" on-tap="toggleExpand">
<div class="card-header" layout="" horizontal="" center="">
<img src="/static/images/theboard.png"
onerror="if (this.src != '/static/images/theboard.png') this.src = '/static/images/theboard.png';">
<img src="{{item.avatar}}"
onerror="if (this.src != '/static/images/placeholder_small.png') this.src = '/static/images/placeholder_small.png';">
<div class="card-mid" layout="" vertical="">
<p item="time">
<template is="dom-if" if="{{!isCore()}}">
Expand Down Expand Up @@ -308,8 +308,8 @@ <h2>{{getName(item.name)}}</h2>
<iron-list items="{{item.students}}" grid class="studentgrid" style="height:20vh">
<template>
<div class="student" layout="" horizontal="" center="" on-tap="studentThunk">
<img class="studentimage" src="/static/images/theboard.png"
onerror="if (this.src != '/static/images/theboard.png') this.src = '/static/images/theboard.png';">
<img class="studentimage" src="{{item.photo_url}}"
onerror="if (this.src != '/static/images/placeholder_small.png') this.src = '/static/images/placeholder_small.png';">

<div id="studentname" class="studentname">
<span>{{item.firstname}} {{item.lastname}}</span>
Expand Down
Binary file removed static/images/theboard.png
Binary file not shown.
15 changes: 6 additions & 9 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,12 @@ function dateToString(date) {
);
}

function prank(){
var pran = document.getElementById("prank");
pran.open();
}

function updateMainSchedule() {
var scheduleElement = document.getElementById("mainschedule");
renderDate(globalDate);
renderSchedule(globalDate, userSchedule, "full", scheduleElement, lunches);
// also update github info
renderGitHubCommits();
prank();
}
function renderToast(text) {
toast = document.getElementById("toast");
Expand Down Expand Up @@ -373,7 +367,6 @@ function renderTeacher(teacherObj) {
var popupContainer = document.getElementById("popupContainer");
var imgSrc = "teacher_photos_fullsize/" + teacherObj.firstname + "_";
imgSrc = imgSrc + teacherObj.lastname + ".jpg";
imgSrc = "static/images/epslogo.jpg"
imgSrc = imgSrc.toLowerCase();
var email = teacherObj.email;
var innerHTMLStyle;
Expand All @@ -388,7 +381,9 @@ function renderTeacher(teacherObj) {
innerHTMLStyle +
">" +
"<div layout horizontal center>" +
'<img src="/static/images/theboard.png" width="128px" height="128px">' +
'<img src="' +
imgSrc +
'" width="128px" height="128px">' +
"<div layout vertical>" +
'<p><a href="mailto:' +
email +
Expand Down Expand Up @@ -529,7 +524,9 @@ function renderStudent(studentObj) {
innerHTMLStyle +
">" +
"<div layout horizontal center>" +
'<img src="/static/images/theboard.png" width="360px"' +
'<img src="' +
studentObj.photo_url +
'" width="360px"' +
"\" onerror=\"if (this.src != '/static/images/placeholder.png') this.src = '/static/images/placeholder.png';\">" +
'<div layout vertical><h3><span class="grade">' +
grade +
Expand Down
6 changes: 1 addition & 5 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@
</paper-header-panel>
</neon-animated-pages>

<paper-dialog class="prank-dialog" id="prank">
<div id="prankpanel">
<h1>The Board demands you know your classes by heart. This is unacceptable.</h1>
</div>
</paper-dialog>



<paper-dialog class="about-dialog" id="about">
Expand Down

0 comments on commit ab54db5

Please sign in to comment.