Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
BIN
overrides/search.gaiamobile.org/home/assets/logo.png
Normal file
BIN
overrides/search.gaiamobile.org/home/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
BIN
overrides/search.gaiamobile.org/home/assets/nivi.png
Normal file
BIN
overrides/search.gaiamobile.org/home/assets/nivi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
27
overrides/search.gaiamobile.org/home/index.html
Normal file
27
overrides/search.gaiamobile.org/home/index.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="theme-color" content="#06152d">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self' file:; style-src 'self'; script-src 'self'; form-action https://duckduckgo.com; base-uri 'none'; object-src 'none'">
|
||||
<title>Accueil | Vulpes</title><link rel="icon" href="assets/logo.png"><link rel="stylesheet" href="welcome.css"><script src="welcome.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<header><a class="brand" href="index.html" aria-label="Vulpes"><img src="assets/logo.png" width="32" height="32" alt="">Vulpes</a><nav aria-label="Language"><button type="button" data-lang="fr" lang="fr" aria-pressed="true">FR</button><span aria-hidden="true">/</span><button type="button" data-lang="en" lang="en" aria-pressed="false">EN</button></nav></header>
|
||||
<main>
|
||||
<img class="nivi" src="assets/nivi.png" width="240" height="240" alt="Nivi">
|
||||
<h1 data-i18n="heading">Le Web vous attend.</h1><p class="intro" data-i18n="intro">Un nouvel onglet. À vous la suite.</p>
|
||||
<form action="https://duckduckgo.com/" method="get" id="search" role="search">
|
||||
<label for="query" data-i18n="label">Rechercher sur le Web</label>
|
||||
<div class="search"><input type="search" id="query" name="q" autocomplete="off" autocapitalize="none" spellcheck="false" placeholder="Une recherche ou une adresse…" required><button type="submit" aria-label="Rechercher"><span aria-hidden="true">→</span></button></div>
|
||||
<p class="hint" data-i18n="provider">Les recherches s’ouvrent avec DuckDuckGo.</p>
|
||||
</form>
|
||||
<nav class="shortcuts" aria-label="Raccourcis" id="shortcuts">
|
||||
<a href="https://vulpes-os.org/" data-site="/"><span aria-hidden="true">⌂</span><strong data-i18n="project">Vulpes OS</strong></a>
|
||||
<a href="https://vulpes-os.org/marketplace/" data-site="/marketplace/"><span aria-hidden="true">▦</span><strong>Marketplace</strong></a>
|
||||
<a href="https://vulpes-os.org/changelog.php" data-site="/changelog.php"><span aria-hidden="true">↗</span><strong data-i18n="news">Nouveautés</strong></a>
|
||||
</nav>
|
||||
<p class="offline" hidden data-i18n="offline">Vous êtes hors ligne. Cette page reste disponible ; les recherches et les liens nécessitent une connexion.</p>
|
||||
<noscript><p class="hint">FR / EN : activez JavaScript pour changer la langue. Enable JavaScript to switch languages. Web search works without it.</p></noscript>
|
||||
</main><footer><span data-i18n="footer">Libre, curieux, ouvert sur le Web.</span><small data-i18n="local">Page locale · Aucun suivi</small></footer>
|
||||
</body></html>
|
||||
1
overrides/search.gaiamobile.org/home/welcome.css
Normal file
1
overrides/search.gaiamobile.org/home/welcome.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
*{box-sizing:border-box}html{min-height:100%;background:#06152d}body{margin:0;background:radial-gradient(ellipse at 50% 25%,#103d68,transparent 65%);color:#f2f9ff;font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif;min-height:100vh}a{color:inherit;text-decoration:none}button,input{font:inherit}header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;max-width:960px;margin:auto}.brand{display:flex;align-items:center;font-weight:700}.brand img{margin-right:8px}header nav{display:flex;align-items:center;color:#abc4d9}header button{background:none;border:0;border-bottom:2px solid transparent;color:#abc4d9;min-width:44px;min-height:44px;cursor:pointer}header button[aria-pressed=true]{border-color:#5ddaff;color:#5ddaff}main{max-width:620px;margin:20px auto 0;padding:0 20px;text-align:center}.nivi{width:150px;height:150px;object-fit:contain;display:block;margin:0 auto}h1{font-size:2rem;line-height:1.15;letter-spacing:-.04em;margin:12px 0}.intro{color:#c1d4e5;margin:0 0 26px}form label{display:block;text-align:left;font-size:.85rem;color:#c1d4e5;margin-bottom:6px}.search{display:flex;background:#fff;border-radius:12px;padding:4px;box-shadow:0 8px 30px #020c20}.search input{min-width:0;width:100%;border:0;background:transparent;color:#06152d;padding:12px;font-size:16px}.search button{flex-shrink:0;min-width:48px;min-height:48px;background:#126186;color:#fff;border:0;border-radius:9px;font-size:1.5rem;cursor:pointer}.hint{font-size:.75rem;color:#afc7dd;text-align:left}.shortcuts{display:flex;justify-content:center;flex-wrap:wrap;margin:30px 0}.shortcuts a{flex:1;min-width:80px;margin:4px;padding:12px 4px;border:1px solid #315577;border-radius:12px;background:#0b2544}.shortcuts a:hover{background:#16416b;border-color:#5ddaff}.shortcuts span{display:block;font-size:1.5rem;color:#73defe}.shortcuts strong{font-size:.8rem;font-weight:500}footer{text-align:center;padding:24px 12px;color:#c1d4e5;font-size:.8rem}footer small{display:block;color:#aac3da;margin-top:4px}a:focus,button:focus,input:focus{outline:2px solid #55cfee;outline-offset:3px}input:focus{outline-color:#126186}a:focus:not(:focus-visible),button:focus:not(:focus-visible){outline:none}[hidden]{display:none!important}.offline{font-size:.85rem;color:#ffe3a8;border:1px solid #705733;border-radius:8px;padding:12px}@media(max-height:650px){main{margin-top:0}.nivi{width:105px;height:105px}.shortcuts{margin:20px 0}footer{padding:12px}}@media(min-width:700px){main{margin-top:45px}.nivi{width:190px;height:190px}h1{font-size:2.5rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
|
||||
47
overrides/search.gaiamobile.org/home/welcome.js
Normal file
47
overrides/search.gaiamobile.org/home/welcome.js
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
var copy = {
|
||||
fr: {title:'Accueil | Vulpes',heading:'Le Web vous attend.',intro:'Un nouvel onglet. À vous la suite.',label:'Rechercher sur le Web',placeholder:'Une recherche ou une adresse…',provider:'Les recherches s’ouvrent avec DuckDuckGo.',project:'Vulpes OS',news:'Nouveautés',footer:'Libre, curieux, ouvert sur le Web.',local:'Page locale · Aucun suivi',search:'Rechercher',shortcuts:'Raccourcis',offline:'Vous êtes hors ligne. Cette page reste disponible ; les recherches et les liens nécessitent une connexion.'},
|
||||
en: {title:'Home | Vulpes',heading:'The Web is yours.',intro:'A new tab. Where next?',label:'Search the Web',placeholder:'Search or enter an address…',provider:'Searches open with DuckDuckGo.',project:'Vulpes OS',news:'What’s new',footer:'Free, curious, open to the Web.',local:'Local page · No tracking',search:'Search',shortcuts:'Shortcuts',offline:'You’re offline. This page still works; searches and links need a connection.'}
|
||||
};
|
||||
var language = /^fr(?:-|$)/i.test(navigator.language || '') ? 'fr' : 'en';
|
||||
var buttons=document.querySelectorAll('[data-lang]');
|
||||
function translate(code) {
|
||||
language=code;document.documentElement.lang=code;document.title=copy[code].title;
|
||||
var nodes=document.querySelectorAll('[data-i18n]');
|
||||
for(var i=0;i<nodes.length;i++) nodes[i].textContent=copy[code][nodes[i].getAttribute('data-i18n')];
|
||||
for(var j=0;j<buttons.length;j++) buttons[j].setAttribute('aria-pressed',buttons[j].getAttribute('data-lang')===code?'true':'false');
|
||||
document.getElementById('query').placeholder=copy[code].placeholder;
|
||||
document.querySelector('[type=submit]').setAttribute('aria-label',copy[code].search);
|
||||
document.getElementById('shortcuts').setAttribute('aria-label',copy[code].shortcuts);
|
||||
var links=document.querySelectorAll('[data-site]');
|
||||
for(var k=0;k<links.length;k++) links[k].href='https://vulpes-os.org'+links[k].getAttribute('data-site')+'?lang='+code;
|
||||
}
|
||||
for(var i=0;i<buttons.length;i++) buttons[i].addEventListener('click',function(){var code=this.getAttribute('data-lang');translate(code);});
|
||||
function navigate(url) {
|
||||
// Keep external pages in Gaia's browser rather than the nested home frame.
|
||||
if (parent !== window) parent.postMessage({type:'vulpes-welcome-open',url:url}, location.origin);
|
||||
else window.location.href=url;
|
||||
}
|
||||
document.addEventListener('click',function(e){
|
||||
var link=e.target.closest('a[href]');
|
||||
if(link && /^https?:/.test(link.href)){e.preventDefault();navigate(link.href);}
|
||||
});
|
||||
document.getElementById('search').addEventListener('submit',function(e){
|
||||
e.preventDefault();
|
||||
var value=document.getElementById('query').value.replace(/^\s+|\s+$/g,'');
|
||||
if(!value){e.preventDefault();return;}
|
||||
if(/^https?:\/\/[^\s]+$/i.test(value)){e.preventDefault();navigate(value);}
|
||||
else if(/^(localhost(?::\d+)?|(?:[a-z0-9-]+\.)+[a-z]{2,})(?::\d+)?(?:[/?#][^\s]*)?$/i.test(value)){e.preventDefault();navigate('https://'+value);}
|
||||
else navigate('https://duckduckgo.com/?q='+encodeURIComponent(value));
|
||||
});
|
||||
function network(){document.querySelector('.offline').hidden=navigator.onLine!==false;}
|
||||
window.addEventListener('online',network);window.addEventListener('offline',network);
|
||||
window.addEventListener('languagechange',function(){translate(/^fr(?:-|$)/i.test(navigator.language || '')?'fr':'en');});
|
||||
window.addEventListener('message',function(event){
|
||||
if(event.source!==parent || event.origin!==location.origin || !event.data || event.data.type!=='vulpes-welcome-language') return;
|
||||
translate(/^fr(?:-|$)/i.test(event.data.language || '')?'fr':'en');
|
||||
});
|
||||
translate(language);network();
|
||||
if(parent!==window) parent.postMessage({type:'vulpes-welcome-ready'},location.origin);
|
||||
}());
|
||||
Loading…
Reference in a new issue