Add theme, templates, docs, license
This commit is contained in:
parent
6648269557
commit
9b6aea946a
8
LICENSE
8
LICENSE
|
|
@ -1,9 +1,5 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 welsberr
|
||||
Copyright (c) 2024 evo-edu.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Permission is hereby granted... [standard MIT text]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# Using the evo-edu Framework
|
||||
|
||||
## 1. Copy Theme Files
|
||||
Copy `/theme/` into your site’s root.
|
||||
|
||||
## 2. Create Pages
|
||||
Use `base.html` as a template. Replace `{{ }}` placeholders with actual content.
|
||||
|
||||
## 3. Add Dynamic Behavior (Optional)
|
||||
Include `/theme/main.js` for:
|
||||
- Year auto-update
|
||||
- Language switching
|
||||
|
||||
## 4. Customize Styling
|
||||
Edit `style.css` to match your project’s visual identity.
|
||||
|
||||
## 5. Multilingual Support
|
||||
- Organize content under `/en/`, `/es/`, etc.
|
||||
- Update language switcher options in `base.html`
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<article class="card">
|
||||
<h3>{{ app_title }}</h3>
|
||||
<p>{{ app_description }}</p>
|
||||
<a href="/{{ lang }}/apps/{{ app_slug }}/" class="btn">Launch App</a>
|
||||
</article>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<div class="section-card">
|
||||
<h3>{{ section_title }}</h3>
|
||||
<p class="meta">{{ section_meta }}</p>
|
||||
<p class="excerpt">{{ section_excerpt }}</p>
|
||||
<button class="expand-btn" data-src="/{{ lang }}/notebook/{{ section_path }}">Show</button>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ lang }}">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{{ title }} — {{ site_title }}</title>
|
||||
<link rel="stylesheet" href="/theme/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="container">
|
||||
<a href="/{{ lang }}/">{{ site_title }}</a>
|
||||
<div style="display:flex;align-items:center;gap:1rem;">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/{{ lang }}/">Home</a></li>
|
||||
<li><a href="/{{ lang }}/apps/">Apps</a></li>
|
||||
<li><a href="/{{ lang }}/notebook/">Notebook</a></li>
|
||||
<li><a href="/{{ lang }}/resources/">Resources</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<select id="lang-switch" onchange="switchLanguage(this.value)">
|
||||
{{#each languages}}
|
||||
<option value="{{code}}" {{#if (eq code ../lang)}}selected{{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
{{> content }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>© <span id="year">2024</span> {{ site_title }}. {{ license }}</p>
|
||||
<p>
|
||||
<a href="{{ github_url }}">GitHub</a> •
|
||||
<a href="mailto:{{ contact_email }}">Contact</a> •
|
||||
<a href="/{{ lang }}/disclaimer/">Disclaimer</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/theme/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
// Auto-update year
|
||||
document.getElementById('year')?.textContent = new Date().getFullYear();
|
||||
|
||||
// Language switcher
|
||||
function switchLanguage(lang) {
|
||||
const currentPath = window.location.pathname;
|
||||
let newPath = currentPath.replace(new RegExp(`^/${window.langCode}/|^/`), `/${lang}/`);
|
||||
if (!currentPath.startsWith(`/${lang}/`)) {
|
||||
newPath = `/${lang}${currentPath}`;
|
||||
}
|
||||
window.location.href = newPath;
|
||||
}
|
||||
|
||||
// Optional: expose langCode for JS logic
|
||||
window.langCode = document.documentElement.lang || 'en';
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
:root {
|
||||
--primary: #2c6fbb;
|
||||
--light: #f8f9fa;
|
||||
--dark: #212529;
|
||||
--gray: #6c757d;
|
||||
--border: #dee2e6;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: var(--dark);
|
||||
background-color: #fff;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
header {
|
||||
background-color: var(--primary);
|
||||
color: white;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
header .container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
header a { color: white; text-decoration: none; font-weight: bold; }
|
||||
nav ul {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
gap: 1.5rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
nav a { color: white; text-decoration: none; }
|
||||
main { padding: 2rem 0; }
|
||||
footer {
|
||||
background-color: var(--light);
|
||||
color: var(--gray);
|
||||
padding: 1.5rem 0;
|
||||
border-top: 1px solid var(--border);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
h1, h2, h3 { margin: 1.5rem 0 1rem; }
|
||||
.card {
|
||||
background: var(--light);
|
||||
padding: 1.25rem;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.btn {
|
||||
display: inline-block;
|
||||
background-color: var(--primary);
|
||||
color: white;
|
||||
padding: 0.5rem 1rem;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.btn:hover { background-color: #1e5aa8; }
|
||||
.topic { margin-bottom: 2.5rem; }
|
||||
.cards-grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
#lang-switch {
|
||||
background: white;
|
||||
color: var(--primary);
|
||||
border: 1px solid white;
|
||||
border-radius: 4px;
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue