From bfa1dfa2b79396f8bcc549c3a506105d097ee0b0 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 6 Nov 2025 12:17:07 +0000 Subject: Fix routes, make it 39C3 everywhere --- halfnarp2.py | 6 +++--- static/faq.html | 4 ++-- static/halfnarp.js | 41 ++++++++++++++++++++++------------------- static/index.html | 37 +++++++++++++++++++------------------ 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/halfnarp2.py b/halfnarp2.py index 24d099a..fcc8788 100755 --- a/halfnarp2.py +++ b/halfnarp2.py @@ -45,7 +45,7 @@ def get_own_preferences(uid): { "hashed_uid": pref.public_uid, "public_url": url_for( - "get_preferences", + "main.get_preferences", public_uid=public_uid, _external=True, _scheme="https", @@ -79,13 +79,13 @@ def store_preferences(): "uid": uid, "hashed_uid": str(public_uid), "public_url": url_for( - "get_preferences", + "main.get_preferences", public_uid=public_uid, _external=True, _scheme="https", ), "update_url": url_for( - "update_preferences", uid=uid, _external=True, _scheme="https" + "main.update_preferences", uid=uid, _external=True, _scheme="https" ), } ) diff --git a/static/faq.html b/static/faq.html index a90b4b5..e5f53cd 100644 --- a/static/faq.html +++ b/static/faq.html @@ -3,7 +3,7 @@ halfnarp FAQ - + @@ -38,7 +38,7 @@
Q: How can I help?
-

A: Submitting your preferences to the halfnarp servers helps a lot. You can find and create pull requests for halfnarp on its github home.

+

A: Submitting your preferences to the halfnarp servers helps a lot. You can the halfnarp living halfnarp2 on its git home.

diff --git a/static/halfnarp.js b/static/halfnarp.js index 5cd1ef3..e40c84e 100644 --- a/static/halfnarp.js +++ b/static/halfnarp.js @@ -102,14 +102,14 @@ function redraw_calendar(myuid, ids) { } }); calendar += 'END:VCALENDAR\r\n'; - $('.export-url-a').attr( 'href', "data:text/calendar;filename=38C3.ics," + encodeURIComponent(calendar) ); + $('.export-url-a').attr( 'href', "data:text/calendar;filename=39C3.ics," + encodeURIComponent(calendar) ); $('.export-url').removeClass( 'hidden' ); } function do_the_halfnarp() { // var halfnarpAPI = 'talks_36C3.json'; var halfnarpAPI = '/-/talkpreferences'; - var halfnarpCorrs = 'corr_array_38c3.json'; + var halfnarpCorrs = 'corr_array_39c3.json'; var halfnarpPubAPI = halfnarpAPI + '/public/'; var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)); window.top.all_events = new Object(); @@ -179,8 +179,8 @@ function do_the_halfnarp() { return $(this).attr('event_id'); }).get(); try { - localStorage['38C3-halfnarp'] = ids; - myapi = localStorage.getItem('38C3-halfnarp-api'); + localStorage['39C3-halfnarp'] = ids; + myapi = localStorage.getItem('39C3-halfnarp-api'); if (myapi) { myapi = myapi.replace(/.*?:\//g, ""); myapi = 'https:/' + myapi.replace(/.*?:\//g, ""); @@ -207,9 +207,9 @@ function do_the_halfnarp() { $('.info').text('submitted'); $('.info').removeClass('hidden'); try { - localStorage['38C3-halfnarp-api'] = data['update_url']; - localStorage['38C3-halfnarp-pid'] = mypid = data['hashed_uid']; - localStorage['38C3-halfnarp-uid'] = myuid = data['uid']; + localStorage['39C3-halfnarp-api'] = data['update_url']; + localStorage['39C3-halfnarp-pid'] = mypid = data['hashed_uid']; + localStorage['39C3-halfnarp-uid'] = myuid = data['uid']; window.location.hash = mypid; } catch(err) {} }, 'json' ).fail(function() { @@ -225,9 +225,9 @@ function do_the_halfnarp() { contentType: "application/json", dataType: 'json', }).done(function(data) { - localStorage['38C3-halfnarp-uid'] = myuid = data['uid']; - if( localStorage['38C3-halfnarp-pid'] ) { - window.location.hash = localStorage['38C3-halfnarp-pid']; + localStorage['39C3-halfnarp-uid'] = myuid = data['uid']; + if( localStorage['39C3-halfnarp-pid'] ) { + window.location.hash = localStorage['39C3-halfnarp-pid']; } $('.info').text('updated'); $('.info').removeClass('hidden'); @@ -279,18 +279,21 @@ function do_the_halfnarp() { } /* Add callbacks for view selector */ + if (0) { document.querySelector('.vlist').onclick = function() { toggle_grid(0); }; document.querySelector('.vday1').onclick = function() { toggle_grid(1); }; document.querySelector('.vday2').onclick = function() { toggle_grid(2); }; document.querySelector('.vday3').onclick = function() { toggle_grid(3); }; document.querySelector('.vday4').onclick = function() { toggle_grid(4); }; document.querySelector('.vdays').onclick = function() { toggle_grid(5); }; - + } document.querySelector('.vlang').onclick = function() { document.body.classList.toggle('languages'); }; document.querySelector('.vtrack').onclick = function() { document.body.classList.toggle('all-tracks'); }; document.querySelector('.vnarpr').onclick = function() { $('.narpr').toggleClass('hidden'); set_random_event(); }; + if (0) { document.querySelector('.vcorr').onclick = toggle_corr_mode; + } $('.vclass').click( function() { toggle_classifier( $(this).attr('classifier'), $(this).hasClass('track'), $(this).hasClass('two_poles')); }); @@ -308,10 +311,10 @@ function do_the_halfnarp() { /* If we've been here before, try to get local preferences. They are authoratative */ var selection = [], friends = { }; try { - selection = localStorage['38C3-halfnarp'] || []; - friends = localStorage['38C3-halfnarp-friends'] || { }; - myuid = localStorage['38C3-halfnarp-uid'] || ''; - mypid = localStorage['38C3-halfnarp-pid'] || ''; + selection = localStorage['39C3-halfnarp'] || []; + friends = localStorage['39C3-halfnarp-friends'] || { }; + myuid = localStorage['39C3-halfnarp-uid'] || ''; + mypid = localStorage['39C3-halfnarp-pid'] || ''; } catch(err) { } @@ -354,7 +357,7 @@ function do_the_halfnarp() { if( hour > 23) hour -= 24; - /* Fix up room for 38C3 */ + /* Fix up room for 39C3 */ room = (item.room_id || '').toString().replace('1','room1').replace('2','room2').replace('3','room3'); /* Apply attributes to sort events into calendar */ @@ -400,8 +403,8 @@ function do_the_halfnarp() { } }); - $.getJSON( halfnarpCorrs, { format: 'json' }).done(function(data) { window.top.all_votes = data; }); - toggle_grid(5); + // $.getJSON( halfnarpCorrs, { format: 'json' }).done(function(data) { window.top.all_votes = data; }); + toggle_grid(0); /* Check for a new friends public uid in location's #hash */ var shared = window.location.hash; @@ -439,7 +442,7 @@ function do_the_halfnarp() { $.getJSON( halfnarpPubAPI + friends.pid, { format: 'json' }) .done(function( data ) { friend.prefs = data.talk_ids; - localStorage['38C3-halfnarp-friends'] = friends; + localStorage['39C3-halfnarp-friends'] = friends; update_friends(); }); } diff --git a/static/index.html b/static/index.html index bb680d1..bc8da67 100644 --- a/static/index.html +++ b/static/index.html @@ -3,8 +3,8 @@ halfnarp web scheduling helper app - - + + @@ -14,14 +14,14 @@
- +
track
lang
@@ -51,9 +51,9 @@
-

The 38C3 halfnarp

+

The 39C3 halfnarp

-

Help us to reduce conflicts of scheduling 38C3's Fahrplan: Click on the talks you would like to watch and press submit.

+

Help us to reduce conflicts of scheduling 39C3's Fahrplan: Click on the talks you would like to watch and press submit.

For questions please read our FAQ and our blogpost for details. Please report problems to erdgeist@ccc.de.

Select an event below to display halfnarp correlations, the darker the stronger.

@@ -75,10 +75,10 @@
-
Saal 1
Saal GLITCH
Saal ZIGZAG
-
Saal 1
Saal GLITCH
Saal ZIGZAG
-
Saal 1
Saal GLITCH
Saal ZIGZAG
-
Saal 1
Saal GLITCH
Saal ZIGZAG
+
Saal One
Saal Zero
Saal Ground
Saal Fuse
+
Saal One
Saal Zero
Saal Ground
Saal Fuse
+
Saal One
Saal Zero
Saal Ground
Saal Fuse
+
Saal One
Saal Zero
Saal Ground
Saal Fuse
P A U S E
@@ -90,13 +90,14 @@
Day 3
Day 4
-

Security

-

Hardware & Making

-

Ethics, Society & Politics

-

CCC

-

Entertainment

-

Science

-

Art & Beauty

+

Security

+

Hardware & Making

+

Ethics, Society & Politics

+

CCC

+

Entertainment

+

Science

+

Art & Beauty

+ -- cgit v1.2.3