Browse Source

update site

heroku-pages
Charles Reid 3 years ago
parent
commit
bf98bc7dd0
  1. 1
      .gitignore
  2. 6
      content/fishslap/index.html
  3. BIN
      content/img/attack-rabbits.png
  4. BIN
      content/img/warning.png
  5. 13
      content/index.html
  6. 16
      content/search/search_index.json
  7. 4
      content/sillywalk/index.html
  8. 2
      content/sitemap.xml
  9. 30
      github.py

1
.gitignore

@ -0,0 +1 @@
vp/

6
content/fishslap/index.html

@ -272,7 +272,7 @@
<li class="md-nav__item">
<a href="../sillywalks/" title="Silly Walks" class="md-nav__link">
<a href="../sillywalk/" title="Silly Walks" class="md-nav__link">
Silly Walks
</a>
</li>
@ -307,6 +307,8 @@
<h1 id="the-secret-society-of-the-fish-slapping-dance">The Secret Society of the Fish Slapping Dance</h1>
<p>Welcome, and congratulations on having an even number of vowels in your Github handle. </p>
<p>And now for something completely expected:</p>
<p><a href="https://www.youtube.com/watch?v=T8XeDvKqI4E">Fish-Slapping Dance</a></p>
@ -343,7 +345,7 @@
</a>
<a href="../sillywalks/" title="Silly Walks" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<a href="../sillywalk/" title="Silly Walks" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">

BIN
content/img/attack-rabbits.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 KiB

BIN
content/img/warning.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

13
content/index.html

@ -272,7 +272,7 @@
<li class="md-nav__item">
<a href="sillywalks/" title="Silly Walks" class="md-nav__link">
<a href="sillywalk/" title="Silly Walks" class="md-nav__link">
Silly Walks
</a>
</li>
@ -309,9 +309,14 @@
<h1 id="secret-index">Secret Index</h1>
<p>This is an index of secret pages. Note that this page is not protected.</p>
<p>You will be asked to authenticate when you click the links below.</p>
<p>Any Github user will be able to view these sites.</p>
<p>Secret page 1: <a href="fishslap/"><code>fish_slap</code></a></p>
<p>Secret page 2: <a href="sillywalks/"><code>silly_walks</code></a></p>
<p>If your username has an <strong>even number of vowels</strong>, you are a member
of the <a href="fishslap/">Secret Society of the Fish Slappers</a>.
Click the link to log in and proceed, or else be attacked by
the Github-Heroku attack rabbits.</p>
<p>If your username has an <strong>odd number of vowels</strong>, you are a member
of the <a href="sillywalk/">Secret Ministerial Department for Theoretical Silly Walk Studies</a>.
Click the link to log in and proceed, or else be attacked by
the Github-Heroku attack rabbits.</p>

16
content/search/search_index.json

@ -2,32 +2,32 @@
"docs": [
{
"location": "/",
"text": "Secret Index\n\n\nThis is an index of secret pages. Note that this page is not protected.\n\n\nYou will be asked to authenticate when you click the links below.\n\n\nAny Github user will be able to view these sites.\n\n\nSecret page 1: \nfish_slap\n\n\nSecret page 2: \nsilly_walks",
"text": "Secret Index\n\n\nThis is an index of secret pages. Note that this page is not protected.\n\n\nYou will be asked to authenticate when you click the links below.\n\n\nIf your username has an \neven number of vowels\n, you are a member \nof the \nSecret Society of the Fish Slappers\n.\nClick the link to log in and proceed, or else be attacked by \nthe Github-Heroku attack rabbits.\n\n\nIf your username has an \nodd number of vowels\n, you are a member \nof the \nSecret Ministerial Department for Theoretical Silly Walk Studies\n.\nClick the link to log in and proceed, or else be attacked by \nthe Github-Heroku attack rabbits.",
"title": "Index"
},
{
"location": "/#secret-index",
"text": "This is an index of secret pages. Note that this page is not protected. You will be asked to authenticate when you click the links below. Any Github user will be able to view these sites. Secret page 1: fish_slap Secret page 2: silly_walks",
"text": "This is an index of secret pages. Note that this page is not protected. You will be asked to authenticate when you click the links below. If your username has an even number of vowels , you are a member \nof the Secret Society of the Fish Slappers .\nClick the link to log in and proceed, or else be attacked by \nthe Github-Heroku attack rabbits. If your username has an odd number of vowels , you are a member \nof the Secret Ministerial Department for Theoretical Silly Walk Studies .\nClick the link to log in and proceed, or else be attacked by \nthe Github-Heroku attack rabbits.",
"title": "Secret Index"
},
{
"location": "/fishslap/",
"text": "The Secret Society of the Fish Slapping Dance\n\n\nFish-Slapping Dance",
"text": "The Secret Society of the Fish Slapping Dance\n\n\nWelcome, and congratulations on having an even number of vowels in your Github handle. \n\n\nAnd now for something completely expected:\n\n\nFish-Slapping Dance",
"title": "Fish Slapping"
},
{
"location": "/fishslap/#the-secret-society-of-the-fish-slapping-dance",
"text": "Fish-Slapping Dance",
"text": "Welcome, and congratulations on having an even number of vowels in your Github handle. And now for something completely expected: Fish-Slapping Dance",
"title": "The Secret Society of the Fish Slapping Dance"
},
{
"location": "/sillywalks/",
"text": "The Secret Ministry of Silly Walks\n\n\nMinistry of Sily Walks",
"location": "/sillywalk/",
"text": "The Secret Ministry of Silly Walks\n\n\nWelcome, and congratulations on having an odd number of vowels in your Github handle. \n\n\nAnd now for something completely expected:\n\n\nMinistry of Sily Walks",
"title": "Silly Walks"
},
{
"location": "/sillywalks/#the-secret-ministry-of-silly-walks",
"text": "Ministry of Sily Walks",
"location": "/sillywalk/#the-secret-ministry-of-silly-walks",
"text": "Welcome, and congratulations on having an odd number of vowels in your Github handle. And now for something completely expected: Ministry of Sily Walks",
"title": "The Secret Ministry of Silly Walks"
}
]

4
content/sillywalks/index.html → content/sillywalk/index.html

@ -11,7 +11,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="canonical" href="https://github-heroku-attack-rabbits.herokuapp.com/sillywalks/">
<link rel="canonical" href="https://github-heroku-attack-rabbits.herokuapp.com/sillywalk/">
@ -307,6 +307,8 @@
<h1 id="the-secret-ministry-of-silly-walks">The Secret Ministry of Silly Walks</h1>
<p>Welcome, and congratulations on having an odd number of vowels in your Github handle. </p>
<p>And now for something completely expected:</p>
<p><a href="https://www.youtube.com/watch?v=IqhlQfXUk7w">Ministry of Sily Walks</a></p>

2
content/sitemap.xml

@ -19,7 +19,7 @@
<url>
<loc>https://github-heroku-attack-rabbits.herokuapp.com/sillywalks/</loc>
<loc>https://github-heroku-attack-rabbits.herokuapp.com/sillywalk/</loc>
<lastmod>2018-05-25</lastmod>
<changefreq>daily</changefreq>
</url>

30
github.py

@ -36,7 +36,7 @@ contents200 = """
<div class="body attack attack-rabbits">
<p>You found a public page, so you're safe for now. Run away while you still can.</p>
<p>Otherwise... the attack rabbits may find you yet.</p>
<img src="img/waring.png" />
<img src="../img/warning.png" />
</div>
</body></html>
"""
@ -52,7 +52,7 @@ contents403 = """
sneaky unauthorized intruder, at the hands of one of
the nastiest, most horrible, gnashing teeth, and fangs,
and little claws like daggers -</p>
<img src="img/attack-rabbits.png" />
<img src="../img/attack-rabbits.png" />
</div>
</body></html>
"""
@ -65,7 +65,7 @@ contents404 = """
<div class="body attack attack-rabbits">
<p>The resource you requested could not be found.</p>
<p>The attack rabbits are circling, eyeing you suspiciously.</p>
<img src="img/attack-rabbit.png" />
<img src="../img/attack-rabbit.png" />
</div>
</body></html>
"""
@ -78,22 +78,26 @@ def index():
return send_from_directory(STATIC_PATH, 'index.html')
@app.route('/fishslap/<path:path>')
def fishslap_even(path):
@app.route('/fishslap/')
def fishslap_even():
if not github.authorized:
return redirect(url_for("github.login"))
resp = github.get("/user")
if resp.ok:
username = resp.json()['login']
if not even_vowels(username):
return send_from_directory(STATIC_PATH, path)
if even_vowels(username):
#return "Hello {username}".format(username=username)
fishslap = os.path.join(STATIC_PATH,'fishslap')
return send_from_directory(fishslap, 'index.html')
return contents403
@app.route('/sillywalk/<path:path>')
def sillywalk_odd(path):
#@app.route('/sillywalk/<path:path>')
#def sillywalk_odd(path):
@app.route('/sillywalk/')
def sillywalk_odd():
if not github.authorized:
return redirect(url_for("github.login"))
@ -101,7 +105,9 @@ def sillywalk_odd(path):
if resp.ok:
username = resp.json()['login']
if not even_vowels(username):
return send_from_directory(STATIC_PATH, path)
#return "Hello {username}".format(username=username)
sillywalk = os.path.join(STATIC_PATH,'sillywalk')
return send_from_directory(sillywalk, path)
return contents403
@ -124,8 +130,8 @@ def even_vowels(my_string):
Boolean: are there an even number of vowels in my_string?
"""
i = 0
for c in username:
if c in ['a','e','i','o','u']:
for c in my_string:
if c in list('aeiou'):
i += 1
if i%2==0:
return True

Loading…
Cancel
Save