Skip to content

Commit

Permalink
set index: false and add a clobber test (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk authored Nov 2, 2024
1 parent eb1d7b3 commit 6b739d9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion localturk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const app = express();
app.use(errorhandler());
app.use(express.json({limit: '50mb'}));
app.use(express.urlencoded({limit: '50mb', extended: false, parameterLimit: 50_000}));
app.use(serveStatic(path.resolve(staticDir)));
app.use(serveStatic(path.resolve(staticDir), {index: false}));

app.get(
'/',
Expand Down
1 change: 1 addition & 0 deletions test/index-clobber/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You're looking for <code>template.html</code>. If you see this, it's a bug!
2 changes: 2 additions & 0 deletions test/index-clobber/outputs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
image1,image2,line1,line2
images/0.png,images/1.png,"Lorem ipsum dolor sit amet, consectetur adipsiscing elit.",Integer vulputate augue a sem pellentesque pharetra.
7 changes: 7 additions & 0 deletions test/index-clobber/tasks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image1,image2
images/0.png,images/1.png
images/2.png,images/3.png
images/4.png,images/5.png
images/6.png,images/7.png
images/8.png,images/9.png
images/10.png,images/11.png
29 changes: 29 additions & 0 deletions test/index-clobber/template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<h3>Transcribe text</h3>

<style type="text/css">
img {
min-height: 42px;
margin-left: 20px;
}
input[type=text] {
font-size: 18px;
margin-left: 20px;
}
</style>

<ul class="overview-list">
<li class="overview-list-item">Type the words that you see in each image in the box below the image.</li>
<li class="overview-list-item">If you cannot read a word, record it as ____</li>
<li class="overview-list-item">Please preserve capitalization and punctuation.</li>
<li class="overview-list-item">Ignore crossed-out words.</li>
</ul>

<p>
<img src="${image1}" /><br/>
<input type="text" size=100 name="line1" />
</p>

<p>
<img src="${image2}" /><br/>
<input type="text" size=100 name="line2" />
</p>

0 comments on commit 6b739d9

Please sign in to comment.