Skip to content

Commit f620026

Browse files
committed
Placeholder structure
1 parent a0d9138 commit f620026

8 files changed

Lines changed: 256 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy MkDocs website
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Install dependencies
26+
run: |
27+
pip install -r requirements.txt
28+
29+
- name: Build site
30+
run: mkdocs build --strict
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: ./site
36+
37+
deploy:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: github-pages
42+
steps:
43+
- name: Deploy
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
.venv/
7+
venv/
8+
9+
# MkDocs build
10+
/site/
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Editor
17+
.vscode/
18+
.idea/

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
11
# hidef-textill-site
22
Bilingual (IS/EN) website for the HiDef Textíll project – MkDocs + Material, open source, and easy to update.
3+
4+
5+
```
6+
hidef-textill-site/
7+
├─ docs/
8+
│ ├─ index.md
9+
│ ├─ stylesheets/
10+
│ │ └─ extra.css
11+
│ ├─ javascripts/
12+
│ │ └─ lang-toggle.js
13+
│ ├─ assets/
14+
│ │ └─ images/
15+
│ │ └─ placeholder-logo.png
16+
├─ mkdocs.yml
17+
├─ .gitignore
18+
├─ requirements.txt
19+
└─ .github/
20+
└─ workflows/
21+
└─ deploy.yml
22+
```

docs/index.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<div class="lang-block is" lang="is">
2+
3+
# HiDef Textíll
4+
5+
Velkomin á opinbera vefinn fyrir **HiDef Textíll** – snjallprjón, rannsóknahugbúnað og miðlun til almennings.
6+
7+
Þetta verkefni sameinar:
8+
- sjálfbærni
9+
- tækni og hátækni-prjóna
10+
- íslenskan menningararf
11+
- þverfaglegt samstarf við HÍ, LHÍ og fleiri samstarfsaðila
12+
13+
## Um vefsíðuna
14+
Þetta er tvítyngdur vefur. Sjálfgefið er sýnd Íslenska, en hægt er að skipta yfir í Ensku efst á síðunni.
15+
16+
## Hvað er framundan?
17+
- Kynning á Hönnunarmars 2026
18+
- Opin vinnustofa í Hönnunarsafni Íslands sumarið 2026
19+
20+
---
21+
22+
</div>
23+
24+
25+
26+
<div class="lang-block en" lang="en">
27+
28+
# HiDef Textíll
29+
30+
Welcome to the official website for **HiDef Textíll** – smart knitting, research software, and public engagement.
31+
32+
This project connects:
33+
- sustainability
34+
- textile technology and machine knitting
35+
- Icelandic cultural heritage
36+
- interdisciplinary collaboration between UI, IUA, and partners
37+
38+
## About this site
39+
This is a bilingual website. Icelandic is shown by default, but you can switch to English using the toggle at the top of the page.
40+
41+
## What's coming?
42+
- Exhibition at DesignMarch 2026
43+
- Open studio at the Museum of Design and Applied Art in summer 2026
44+
45+
---
46+
47+
</div>

docs/javascripts/lang-toggle.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
(function () {
2+
const STORAGE_KEY = 'preferred_lang'; // 'is' or 'en'
3+
const root = document.documentElement;
4+
5+
function setLang(lang) {
6+
root.classList.remove('lang-is', 'lang-en');
7+
root.classList.add(`lang-${lang}`);
8+
try { localStorage.setItem(STORAGE_KEY, lang); } catch (e) {}
9+
10+
document.querySelectorAll('[data-lang-btn]')
11+
.forEach(btn =>
12+
btn.classList.toggle('active', btn.getAttribute('data-lang-btn') === lang)
13+
);
14+
}
15+
16+
function detectInitial() {
17+
try {
18+
const saved = localStorage.getItem(STORAGE_KEY);
19+
if (saved === 'is' || saved === 'en') return saved;
20+
} catch (e) {}
21+
22+
const navlang = (navigator.language || 'is').toLowerCase();
23+
if (navlang.startsWith('is')) return 'is';
24+
return 'en';
25+
}
26+
27+
function injectToggle() {
28+
const header = document.querySelector('.md-header__inner');
29+
if (!header || header.querySelector('.lang-toggle')) return;
30+
31+
const wrap = document.createElement('div');
32+
wrap.className = 'lang-toggle';
33+
wrap.innerHTML = `
34+
<span>Tungumál / Language:</span>
35+
<button type="button" data-lang-btn="is">IS</button>
36+
<button type="button" data-lang-btn="en">EN</button>
37+
`;
38+
header.appendChild(wrap);
39+
40+
header.querySelectorAll('[data-lang-btn]').forEach(btn => {
41+
btn.addEventListener('click', () =>
42+
setLang(btn.getAttribute('data-lang-btn'))
43+
);
44+
});
45+
}
46+
47+
document.addEventListener('DOMContentLoaded', () => {
48+
injectToggle();
49+
setLang(detectInitial() || 'is');
50+
});
51+
})();

docs/stylesheets/extra.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* LANGUAGE BLOCK VISIBILITY */
2+
.lang-block { display: none; }
3+
4+
.lang-is .lang-block.is { display: block; }
5+
.lang-en .lang-block.en { display: block; }
6+
7+
/* LANGUAGE TOGGLE */
8+
.lang-toggle {
9+
display: inline-flex;
10+
gap: .5rem;
11+
align-items: center;
12+
font-size: .9rem;
13+
padding: .25rem .5rem;
14+
border-radius: 6px;
15+
border: 1px solid rgba(0,0,0,.1);
16+
margin-left: 1rem;
17+
}
18+
.lang-toggle button {
19+
background: none;
20+
border: none;
21+
cursor: pointer;
22+
padding: .25rem .5rem;
23+
}
24+
.lang-toggle button.active {
25+
font-weight: 700;
26+
text-decoration: underline;
27+
}
28+
29+
/* OPTIONAL branding tweaks */
30+
.md-header {
31+
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
32+
}

mkdocs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
site_name: HiDef Textíll
2+
site_description: Snjallprjón, rannsóknahugbúnaður og samfélagsmiðlun – HiDef Textíll / Smart knitting, research software, and public outreach.
3+
site_url: https://<your-github-username>.github.io/hidef-textill-site/
4+
5+
theme:
6+
name: material
7+
language: is
8+
features:
9+
- navigation.top
10+
- content.code.copy
11+
- navigation.instant
12+
- header.autohide
13+
- search.suggest
14+
- search.highlight
15+
palette:
16+
- scheme: default
17+
primary: "#0F3B6F" # UPDATE WITH YOUR BRAND PRIMARY
18+
accent: "#FFB300" # UPDATE WITH YOUR ACCENT COLOR
19+
- scheme: slate
20+
primary: "#0F3B6F"
21+
accent: "#FFB300"
22+
logo: assets/images/placeholder-logo.png
23+
24+
extra_css:
25+
- stylesheets/extra.css
26+
27+
extra_javascript:
28+
- javascripts/lang-toggle.js
29+
30+
markdown_extensions:
31+
- admonition
32+
- footnotes
33+
- toc:
34+
permalink: true
35+
- attr_list
36+
- md_in_html
37+
38+
nav:
39+
- Forsíða / Home: index.md

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mkdocs
2+
mkdocs-material
3+
mkdocs-minify-plugin
4+

0 commit comments

Comments
 (0)