Ajout d'une page d'acceuil

This commit is contained in:
n07070 committed 2022-02-19 16:07:43 +01:00
1 parent 97f9fe4e33
commit 185e8b336b
15 files changed
+237

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
@font-face {
font-family: 'Franchise';
src: local('Franchise Regular'), local('Franchise-Regular'),
url('fonts/Franchise-Regular.woff2') format('woff2'),
url('fonts/Franchise-Regular.woff') format('woff'),
url('fonts/Franchise-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Franchise Filled';
src: local('Franchise Filled Regular'), local('FranchiseFilled-Regular'),
url('fonts/FranchiseFilled-Regular.woff2') format('woff2'),
url('fonts/FranchiseFilled-Regular.woff') format('woff'),
url('fonts/FranchiseFilled-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Cube';
src: local('Cube'),
url('fonts/Cube.woff2') format('woff2'),
url('fonts/Cube.woff') format('woff'),
url('fonts/Cube.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+55
View File
@@ -0,0 +1,55 @@
body {
background-color: black;
color: white;
font-family: sans-serif;
margin: 0;
padding: 0;
}
section {
height: 100%;
}
canvas, .texte {
z-index: -1;
}
.texte {
z-index: 1;
flex-direction: column;
align-items: center;
justify-content: center;
display: flex;
background-blend-mode: exclusion;
background-color: rgba(0, 0, 0, 0.5);
}
.texte, a {
color: white;
}
h1 {
font: 4em "Franchise", sans-serif;
}
main {
position: relative;
z-index: -1;
width: 90%;
height: 100%;
padding: 0;
margin: 0;
position: fixed;
top: 0px;
}
main > * {
position: absolute;
height: 100%;
width: 100%;
}
canvas {
height: 100%;
z-index: -1;
}
+41
View File
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/master.css">
<link rel="stylesheet" href="/css/fonts.css">
<title>shlag zone</title>
</head>
<body>
<section>
<main></main>
<div class="texte">
<h1>Bienvenue dans la Shlag Zone</h1>
<h2>C'est quoi ?</h2>
<p>On sait pas trop :)</p>
<h2>C'est qui ?</h2>
<p>Des gens chouettes qui font de l'internet</p>
<h2>C'est comment ?</h2>
<p>Bien et toi ? :)</p>
<h2>Mais encore ?</h2>
<a href="zone/liens.html">Entre dans la zone et tu verra</a>
</div>
</section>
<script src="js/p5.min.js" charset="utf-8"></script>
<script src="js/background.js" charset="utf-8"></script>
</body>
</html>
+94
View File
@@ -0,0 +1,94 @@
let count = 1000;
var particles_a = [];
var particles_b = [];
var particles_c = [];
var fade = 200;
var radius = 3;
const w = window.innerWidth;
const h = 600;
let noiseScale = 10;
let noiseStrength = 1.2;
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
for (let i=0; i<count; i++) {
let loc_a = createVector(random(w) + windowWidth*0.5 - w*0.5, random(h) + windowHeight*0.5 -h*0.5, 2);
let angle_a = random(TWO_PI);
let dir_a = createVector(cos(angle_a), sin(angle_a));
let loc_b = createVector(random(w) + windowWidth*0.5 - w*0.5, random(h) + windowHeight*0.5-h*0.5, 2);
let angle_b = random(TWO_PI);
let dir_b = createVector(cos(angle_b), sin(angle_b));
let loc_c = createVector(random(w) + windowWidth*0.5 - w*0.5, random(h) + windowHeight*0.5-h*0.5, 2);
let angle_c = random(TWO_PI);
let dir_c = createVector(cos(angle_c), sin(angle_c));
particles_a[i] = new Particle(loc_a, dir_a, 0.5);
particles_b[i] = new Particle(loc_b, dir_b,0.6);
particles_c[i] = new Particle(loc_c, dir_c, 0.75);
}
}
function draw() {
fill(0,5);
noStroke();
rect(0,0,width, height);
for (let i=0; i<count; i++) {
fill(191, 19, 99, fade);
particles_a[i].move();
particles_a[i].update(radius);
particles_a[i].checkEdges();
fill (57,166,163, fade);
particles_b[i].move();
particles_b[i].update(radius);
particles_b[i].checkEdges();
fill(222,238,234,fade);
particles_c[i].move();
particles_c[i].update(radius);
particles_c[i].checkEdges();
}
}
let Particle = function(loc_, dir_, speed_) {
this.loc = loc_;
this.dir = dir_;
this.speed = speed_;
this.d = 1;
}
Particle.prototype.run = function() {
this.move();
this.checkEdges();
this.update();
}
Particle.prototype.update = function(r) {
ellipse(this.loc.x, this.loc.y, r);
}
Particle.prototype.checkEdges = function() {
if (this.loc.x < 0 || this.loc.x > width || this.loc.y < 0 || this.loc.y > height) {
this.loc.x = random(w) + windowWidth*0.5 - w*0.5;
this.loc.y = random(h) + windowHeight*0.5 - h*0.5;
}
}
Particle.prototype.move = function() {
this.angle = noise(this.loc.x/noiseScale, this.loc.y/noiseScale, frameCount/noiseScale) * TWO_PI*noiseStrength;
this.dir.x = cos(this.angle) + sin(this.angle) - sin(this.angle);
this.dir.y = sin(this.angle) - cos(this.angle)*sin(this.angle);
this.vel = this.dir.copy();
this.vel.mult(this.speed*this.d);
this.loc.add(this.vel);
}
+3
View File
@@ -0,0 +1,3 @@
/*! p5.js v1.4.1 February 02, 2022 */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).p5=e()}}(function(){var i,e,t;return function i(a,s,l){function u(t,e){if(!s[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=s[t]={exports:{}};a[t][0].call(o.exports,function(e){return u(a[t][1][e]||e)},o,o.exports,i,a,s,l)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e<l.length;e++)u(l[e]);return u}({1:[function(e,t,r){"use strict";r.byteLength=function(e){var t=d(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=d(e),o=n[0],i=n[1],a=new c(function(e,t){return 3*(e+t)/4-t}(o,i)),s=0,l=0<i?o-4:o;for(r=0;r<l;r+=4)t=u[e.charCodeAt(r)]<<18|u[e.charCodeAt(r+1)]<<12|u[e.charCodeAt(r+2)]<<6|u[e.charCodeAt(r+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===i&&(t=u[e.charCodeAt(r)]<<2|u[e.charCodeAt(r+1)]>>4,a[s++]=255&t);1===i&&(t=u[e.charCodeAt(r)]<<10|u[e.charCodeAt(r+1)]<<4|u[e.charCodeAt(r+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,a=r-n;i<a;i+=16383)o.push(l(e,i,a<i+16383?a:i+16383));1==n?(t=e[r-1],o.push(s[t>>2]+s[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return o.join("")};for(var s=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)s[o]=n[o],u[n.charCodeAt(o)]=o;function d(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var n,o,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(s[(o=n)>>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return i.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){},{}],3:[function(e,t,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],4:[function(U,e,N){(function(d){"use strict";var n=U("base64-js"),i=U("ieee754"),e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;N.Buffer=d,N.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},N.INSPECT_MAX_BYTES=50;var r=2147483647;function a(e){if(r<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,r){if("number"!=typeof e)return o(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}function o(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),n=a(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(R(e,ArrayBuffer)||e&&R(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return Object.setPrototypeOf(n,d.prototype),n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);var o=function(e){if(d.isBuffer(e)){var t=0|c(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?a(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),a(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function c(e){if(r<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||R(e,ArrayBuffer))return e.byteLength;if("string"!=typLine truncated
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<title>Les liens de la shlag zone</title>
</head>
<body>
<ul>
<li><a href="art/bubbles.html">Bubbles</a></li>
</ul>
</body>
</html>