Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Stroop Task feature and enhance user interface #18

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d8c99ea
Gh-pages-catchup (#10)
Exios66 Oct 5, 2024
f923e08
Rename styles.css to 2styles.css
Exios66 Oct 5, 2024
6a28bba
Rename src/styles.css to styles.css
Exios66 Oct 5, 2024
e671c24
Update styles.css
Exios66 Oct 5, 2024
7460291
Delete 2index.html
Exios66 Oct 5, 2024
abcae66
Update script.js
Exios66 Oct 5, 2024
406a446
Update styles.css
Exios66 Oct 5, 2024
922a338
[v0.0.3]
Exios66 Oct 5, 2024
82accaf
// Content: Initial commit
Exios66 Oct 5, 2024
1ecf658
// Content: Initial commit
Exios66 Oct 5, 2024
ab2619c
[v0.0.3] Update application components and dependencies
Exios66 Oct 5, 2024
da37daa
[v0.0.3] Update application components and dependencies
Exios66 Oct 5, 2024
7b04970
[v0.1.3] Updated index.html and styles.css
Exios66 Oct 5, 2024
51a66b3
chore: Refactor CSS for improved responsiveness and readability
Exios66 Oct 5, 2024
41a143e
Merge branch 'main' into Exios66-gh-pages
Exios66 Oct 5, 2024
88616d8
[v0.0.4]
Exios66 Oct 5, 2024
ae06367
feat: Improve trait explanation formatting
Exios66 Oct 5, 2024
8e97e42
feat: Add Stroop Task feature and enhance user interface
Exios66 Oct 5, 2024
dddaeb2
feat: Add Stroop Task feature and enhance user interface
Exios66 Oct 5, 2024
75d65d9
feat: Add Stroop Task feature and enhance user interface
Exios66 Oct 5, 2024
0699c61
chore
Exios66 Oct 5, 2024
c7eb9d6
Merge branch 'main' into Exios66-gh-pages
Exios66 Oct 5, 2024
5629df1
Exios66 gh pages (#17)
Exios66 Oct 5, 2024
fbe99d5
Update index.html and remove 2index.html
Exios66 Oct 5, 2024
2c5135e
Update index.html and styles.css, remove redundant files
Exios66 Oct 5, 2024
51eb044
Refactor CSS for improved responsiveness and readability
Exios66 Oct 5, 2024
4a4ff50
Merge branch 'main' into gh-pages
Exios66 Oct 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
16 changes: 11 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const fs = require('fs');
const path = require('path');

const srcDir = path.join(__dirname, 'src');
const rootDir = __dirname;
const publicDir = path.join(rootDir, 'public');
publicDir = path.join(rootDir, 'public');

const filesToCopy = ['index.html', 'styles.css', 'script.js'];

Expand All @@ -11,14 +12,19 @@ if (!fs.existsSync(publicDir)) {
}

filesToCopy.forEach(file => {
const srcPath = path.join(rootDir, file);
const destPath = path.join(publicDir, file);
const srcPath = path.join(srcDir, file);
const publicPath = path.join(publicDir, file);
const destPath = path.join(rootDir, file);

if (fs.existsSync(srcPath)) {
fs.copyFileSync(srcPath, publicPath);
fs.copyFileSync(srcPath, destPath);
console.log(`Copied ${file} to public directory`);
console.log(`Copied ${file} to public and root directories`);
} else if (fs.existsSync(publicPath)) {
fs.copyFileSync(publicPath, destPath);
console.log(`Copied ${file} from public to root directory`);
} else {
console.log(`Warning: ${file} not found in root directory`);
console.log(`Warning: ${file} not found in src or public directory`);
}
});

Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ <h1>Welcome to Dark Triad Assessments</h1>
<p>Explore the darker aspects of personality through scientifically validated assessments</p>
</div>
<div id="darkModeToggleContainer">
<button id="darkModeToggle" aria-label="Toggle Dark Mode">🌙 Dark Mode</button>
<button id="darkModeToggle" type="button" aria-label="Toggle Dark Mode">🌙 Dark Mode</button>
</div>
<div id="content">
<header>
<h1>Dark Triad Assessments</h1>
<button id="menuToggle" aria-label="Toggle Menu">☰</button>
<button id="menuToggle" type="button" aria-label="Toggle Menu">☰</button>
</header>
<nav id="mainNav">
<ul>
Expand Down Expand Up @@ -87,7 +87,7 @@ <h2>Stroop Task</h2>
<div id="stroopInstructions">
<p>Name the <strong>color</strong> of the word, not the word itself.</p>
<p>This task measures cognitive flexibility and inhibition, which may relate to Dark Triad traits.</p>
<button onclick="startStroopTask()">Start Task</button>
<button type="button" onclick="startStroopTask()">Start Task</button>
</div>
<div id="stroopGame" class="hidden">
<div id="stroopWord"></div>
Expand Down
Loading
Loading