fix topbar to work on mobile devices
The topbar, by way of JavaScript, now works on mobile devices such as cell phones and tablets. Internal links for entries from 1984 thru 2015 have been adjusted. Ran `make www` to perform the above. TODO: Fix some color issues on topbar. TODO: More testing!
This commit is contained in:
1 parent
99cd17401e
commit
97f6da1247
440 files changed
+74125
-6956
No files matched your search
+197
-31
@@ -51,6 +51,8 @@
|
||||
IOCCC
|
||||
</div>
|
||||
|
||||
<div class="mobile-header-button-label">Click This</div>
|
||||
|
||||
<div class="topbar-items">
|
||||
<div class="item">
|
||||
<span class="item-header">
|
||||
@@ -58,10 +60,10 @@
|
||||
</span>
|
||||
|
||||
<div class="sub-item">
|
||||
<div class="outfit-font"><a href="../../index.html">IOCCC Home</a></div>
|
||||
<div class="outfit-font"><a href="../../years.html">Winning Entries</a></div>
|
||||
<div class="outfit-font"><a href="../../authors.html">People who have won</a></div>
|
||||
<div class="outfit-font"><a href="../../location.html">Location of authors</a></div>
|
||||
<div class="outfit-font"><a href="./index.html">IOCCC Home</a></div>
|
||||
<div class="outfit-font"><a href="./years.html">Winning Entries</a></div>
|
||||
<div class="outfit-font"><a href="./authors.html">People who have won</a></div>
|
||||
<div class="outfit-font"><a href="./location.html">Location of authors</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,11 +73,11 @@
|
||||
</span>
|
||||
|
||||
<div class="sub-item">
|
||||
<div class="outfit-font"><a href="../../news.html">IOCCC News</a></div>
|
||||
<div class="outfit-font"><a href="../../status.html">Contest status</a></div>
|
||||
<div class="outfit-font"><a href="../../next/index.html">Rules and Guidelines</a></div>
|
||||
<div class="outfit-font"><a href="../../faq.html#submit">How to enter the IOCCC</a></div>
|
||||
<div class="outfit-font"><a href="../../faq.html">FAQ</a></div>
|
||||
<div class="outfit-font"><a href="./news.html">IOCCC News</a></div>
|
||||
<div class="outfit-font"><a href="./status.html">Contest status</a></div>
|
||||
<div class="outfit-font"><a href="./next/index.html">Rules and Guidelines</a></div>
|
||||
<div class="outfit-font"><a href="./faq.html#submit">How to enter the IOCCC</a></div>
|
||||
<div class="outfit-font"><a href="./faq.html">FAQ</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -85,11 +87,11 @@
|
||||
</span>
|
||||
|
||||
<div class="sub-item">
|
||||
<div class="outfit-font"><a href="../../bugs.html">Bugs & (mis)features</a></div>
|
||||
<div class="outfit-font"><a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a></div>
|
||||
<div class="outfit-font"><a href="../../faq.html#fix_web_site">Fixing the web site</a></div>
|
||||
<div class="outfit-font"><a href="../../faq.html#fix_author">Fixing author info</a></div>
|
||||
<div class="outfit-font"><a href="../../thanks-for-help.html">Thanks for the help</a></div>
|
||||
<div class="outfit-font"><a href="./bugs.html">Bugs & (mis)features</a></div>
|
||||
<div class="outfit-font"><a href="./faq.html#fix_an_entry">Fixing IOCCC entries</a></div>
|
||||
<div class="outfit-font"><a href="./faq.html#fix_web_site">Fixing the web site</a></div>
|
||||
<div class="outfit-font"><a href="./faq.html#fix_author">Fixing author info</a></div>
|
||||
<div class="outfit-font"><a href="./thanks-for-help.html">Thanks for the help</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,15 +101,179 @@
|
||||
</span>
|
||||
|
||||
<div class="sub-item">
|
||||
<div class="outfit-font"><a href="../../judges.html">The IOCCC Judges</a></div>
|
||||
<div class="outfit-font"><a href="../../contact.html">Contacting the IOCCC</a></div>
|
||||
<div class="outfit-font"><a href="./judges.html">The IOCCC Judges</a></div>
|
||||
<div class="outfit-font"><a href="./contact.html">Contacting the IOCCC</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="header-mobile-menu">
|
||||
<button id="header-open-menu-button" class="topbar-mobile-menu">
|
||||
<svg
|
||||
class="mobile-menu-icon"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M4 6h16M4 12h16M4 18h16"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button id="header-close-menu-button" class="hide-content">
|
||||
<svg
|
||||
class="mobile-menu-icon"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M6 18L18 6M6 6l12 12"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div id="mobile-menu-panel" class="hide-content">
|
||||
<div class="mobile-menu-container">
|
||||
<div class="mobile-menu-wrapper">
|
||||
<div class="mobile-menu-item">
|
||||
Home
|
||||
</div>
|
||||
|
||||
<div class="mobile-submenu-wrapper">
|
||||
<a class="mobile-submenu-item" href="./index.html">
|
||||
IOCCC Home
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./years.html">
|
||||
Winning Entries
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./authors.html">
|
||||
People who have won
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./location.html">
|
||||
Location of authors
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-menu-wrapper">
|
||||
<div class="mobile-menu-item">
|
||||
News
|
||||
</div>
|
||||
|
||||
<div class="mobile-submenu-wrapper">
|
||||
<a class="mobile-submenu-item" href="./news.html">
|
||||
IOCCC News
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./status.html">
|
||||
Contest status
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./next/index.html">
|
||||
Rules and Guidelines
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./faq.html#submit">
|
||||
How to enter the IOCCC
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./faq.html">
|
||||
FAQ
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-menu-wrapper">
|
||||
<div class="mobile-menu-item">
|
||||
Bugs
|
||||
</div>
|
||||
|
||||
<div class="mobile-submenu-wrapper">
|
||||
<a class="mobile-submenu-item" href="./bugs.html">
|
||||
Bugs & (mis)features
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./faq.html#fix_an_entry">
|
||||
Fixing IOCCC entries
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./faq.html#fix_web_site">
|
||||
Fixing the web site
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./faq.html#fix_author">
|
||||
Fixing author info
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./thanks-for-help.html">
|
||||
Thanks for the help
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-menu-wrapper">
|
||||
<div class="mobile-menu-item">
|
||||
Judges
|
||||
</div>
|
||||
|
||||
<div class="mobile-submenu-wrapper">
|
||||
<a class="mobile-submenu-item" href="./judges.html">
|
||||
The IOCCC Judges
|
||||
</a>
|
||||
|
||||
<a class="mobile-submenu-item" href="./contact.html">
|
||||
Contacting the IOCCC
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
|
||||
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
|
||||
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
|
||||
|
||||
headerOpenMenuButton.addEventListener("click", () => {
|
||||
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
|
||||
headerOpenMenuButton.classList.add("hide-content");
|
||||
|
||||
headerCloseMenuButton.classList.remove("hide-content");
|
||||
headerCloseMenuButton.classList.add("topbar-mobile-menu");
|
||||
|
||||
mobileMenuPanel.classList.remove("hide-content");
|
||||
mobileMenuPanel.classList.add("topbar-mobile-panel");
|
||||
});
|
||||
|
||||
headerCloseMenuButton.addEventListener("click", () => {
|
||||
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
|
||||
headerCloseMenuButton.classList.add("hide-content");
|
||||
|
||||
mobileMenuPanel.classList.add("hide-content");
|
||||
mobileMenuPanel.classList.remove("topbar-mobile-panel");
|
||||
|
||||
headerOpenMenuButton.classList.add("topbar-mobile-menu");
|
||||
headerOpenMenuButton.classList.remove("hide-content");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- END: this line ends content from: inc/topbar.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
@@ -188,7 +354,7 @@ really just a decompressor to generate the real source code of the
|
||||
program.</p>
|
||||
<p>This program will loop infinitely while progressively refining a
|
||||
<a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">raytraced</a> image.</p>
|
||||
<p>NOTE: the author refers to <a href="a.c">a.c</a>, placed in a gzipped file <code>a.c.gz</code>. We do not
|
||||
<p>NOTE: the author refers to <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a>, placed in a gzipped file <code>a.c.gz</code>. We do not
|
||||
include it but it can be generated like:</p>
|
||||
<pre><code> cc -Wall hou.c -o hou -lm
|
||||
./hou > a.c</code></pre>
|
||||
@@ -241,7 +407,7 @@ don’t have to worry about conflicts.</li>
|
||||
</ul>
|
||||
<h3 id="abuse-of-the-rules">Abuse of the rules</h3>
|
||||
<ul>
|
||||
<li><a href="hou.c">hou.c</a> uses compression to get around the size limit. The compression
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> uses compression to get around the size limit. The compression
|
||||
fully complies with the rules and the guidelines (at least the portion that
|
||||
shows up in <code>grep</code> “size limit”). Please see the <a href="self-imposed-restrictions">Self-imposed
|
||||
restrictions</a> section below for more details.</li>
|
||||
@@ -251,18 +417,18 @@ restrictions</a> section below for more details.</li>
|
||||
<ul>
|
||||
<li>The building process does not involve any OS tool beyond <code>cc(1)</code> and
|
||||
<code>make(1)</code>. No <code>gzip(1)</code> compression! <code>a.c.gz</code> doesn’t fit in 2053 bytes, anyway.</li>
|
||||
<li>Neither <a href="hou.c">hou.c</a> nor <a href="a.c">a.c</a> (the <em>real</em> decompressed source) uses
|
||||
<li>Neither <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> nor <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> (the <em>real</em> decompressed source) uses
|
||||
<code>#define</code> (or <code>cc -D</code>) at all.</li>
|
||||
<li>The source code is not required at runtime.</li>
|
||||
<li><a href="a.c">a.c</a> does not drop optional features to reduce size. There are pure
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> does not drop optional features to reduce size. There are pure
|
||||
optimization code that can be dropped without affecting the converged output
|
||||
(only affecting the ray tracing speed / convergence rate). All files are
|
||||
properly <code>fopen()</code>ed with <code>"rb"</code> / <code>"wb"</code> for Windows compatibility. The PPM
|
||||
header has a comment line for non-standard-compliant viewers (specifically, my
|
||||
old HDRShop 1.0). And there is a nice text message saying “please wait…”.
|
||||
Despite the messy look, <a href="a.c">a.c</a> and <a href="hou.c">hou.c</a> compile warning-free
|
||||
(<a href="hou.c">hou.c</a> even wastes 18 bytes on <code>#include<stdio.h></code> just for <code>putchar(3)</code>).
|
||||
<a href="a.c">a.c</a> compiles mostly clean in the C99/ANSI modes of clang and gcc (with:</li>
|
||||
Despite the messy look, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> and <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> compile warning-free
|
||||
(<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> even wastes 18 bytes on <code>#include<stdio.h></code> just for <code>putchar(3)</code>).
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> compiles mostly clean in the C99/ANSI modes of clang and gcc (with:</li>
|
||||
</ul>
|
||||
<pre><code>-Wall --pedantic</code></pre>
|
||||
<p>The only warning generated is a pedantic one: <code>"string constant too long"</code>.</p>
|
||||
@@ -278,15 +444,15 @@ internal states.</li>
|
||||
the code, but they leave the text clear in the <em>result</em>. This entry takes it
|
||||
further and obfuscates the output image as well. Can you find the text in the
|
||||
image? Hint: look up.</li>
|
||||
<li><a href="a.c">a.c</a> leaves all shaders in plain text, but the plain text shader code can’t
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> leaves all shaders in plain text, but the plain text shader code can’t
|
||||
be taken for its face value; the arithmetic rules subtly diverge from our common
|
||||
sense.</li>
|
||||
<li><a href="a.c">a.c</a> is less portable than <a href="hou.c">hou.c</a> itself. <a href="hou.c">hou.c</a> only depends
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> is less portable than <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> itself. <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> only depends
|
||||
on ASCII and should run just fine on 16-bit, small memory, or
|
||||
floating-point-incapable machines. <a href="a.c">a.c</a>, while still reasonably portable, is
|
||||
floating-point-incapable machines. <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a>, while still reasonably portable, is
|
||||
quite memory consuming, requires IEEE754-compliant <code>double</code>, and assumes <code>int</code> to be
|
||||
32-bits.</li>
|
||||
<li>Though technically endian-dependent, <a href="a.c">a.c</a> remains portable providing that one
|
||||
<li>Though technically endian-dependent, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/a.c">a.c</a> remains portable providing that one
|
||||
doesn’t copy saved sessions across different endianness.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
@@ -310,7 +476,7 @@ corresponds to the final image, which can then be produced as a simple per-pixel
|
||||
histogram of all generated paths. The robustness comes from a state mutation
|
||||
strategy that actively tries to explore the neighborhood of high energy peaks
|
||||
(e.g. paths that happen to hit the light source in
|
||||
<a href="otherroom.scene">otherroom.scene</a>). In addition, a rudimentary form of lens
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/otherroom.scene">otherroom.scene</a>). In addition, a rudimentary form of lens
|
||||
path stratification is added to balance the attention each pixel receives. The
|
||||
Metropolis-Hasting process completely avoids the tell-tale pixel sampling loop
|
||||
required in most other image generation methods.</p>
|
||||
@@ -329,11 +495,11 @@ session would run through its short period many times, but that doesn’t
|
||||
necessarily map to the same set of paths in <code>PSSMLT</code>. After all,
|
||||
Metropolis-Hasting used an even worse PRNG in their 1953 paper.</p>
|
||||
<p>The <code>PPM</code> compressor uses statically weighted fixed order contexts with an
|
||||
arithmetic encoder tweaked for <a href="../iocccsize.c">iocccsize.c</a>. The encoder emits octet-space pairs
|
||||
arithmetic encoder tweaked for <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/iocccsize.c">iocccsize.c</a>. The encoder emits octet-space pairs
|
||||
where each octet encodes ~6.5 bits of information and each space encodes 2 bits
|
||||
(thanks to the generous definition of “space” in <a href="../iocccsize.c">iocccsize.c</a>). The compressor
|
||||
(thanks to the generous definition of “space” in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/iocccsize.c">iocccsize.c</a>). The compressor
|
||||
actively shuffles the variable names around until the compressed string happens
|
||||
to contain enough <code>{};</code>s to pass the final <a href="../iocccsize.c">iocccsize.c</a> test.
|
||||
to contain enough <code>{};</code>s to pass the final <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/iocccsize.c">iocccsize.c</a> test.
|
||||
There are a few other tweaks:</p>
|
||||
<ul>
|
||||
<li><p>The <code>PPM</code> model uses mostly whitespace characters for weights.</p></li>
|
||||
|
||||
Reference in new issue
Block a user