From 4e402d27a9277dbef610de391e4b1a5bbbaf5496 Mon Sep 17 00:00:00 2001 From: Boris Paing Date: Fri, 12 Mar 2021 20:18:00 +0100 Subject: [PATCH] FIX: install script + EHH: bar to add video now in header --- conf/conf.php | 19 +++++++++- inc/footer.php | 7 ++++ inc/header.php | 47 +++++++++++++++++++++++ install/install_web_ui.sh | 12 +++--- styles/crowdbunker/crowdbunker.css | 60 ++++++++++++++++++++++++++++++ youtube.php | 32 ++-------------- youtube_add_video_aux.php | 4 ++ youtube_watch.php | 51 +++++++------------------ 8 files changed, 159 insertions(+), 73 deletions(-) create mode 100644 inc/footer.php create mode 100644 inc/header.php diff --git a/conf/conf.php b/conf/conf.php index 9a5d4a2..5945c53 100644 --- a/conf/conf.php +++ b/conf/conf.php @@ -19,4 +19,21 @@ default 120x 90 Large Preview define('YOUTUBE_THUMB', 'https://i.ytimg.com/vi/%s/mqdefault.jpg'); define('SITENAME', 'Astrobunker'); -define('USP', 'Votre caverne remplie des trésors que vous avez découverts sur le web, votre forteresse de contenu imprenable, votre palais informationnel.'); + + +function changeEveryNSec ($n, $a) { + + $nbElts = count($a); + + $refresh = $n * $nbElts; + + return $a[floor((time() % $refresh) / ($refresh / $nbElts))]; +} + +$taglines = [ + 'Votre caverne remplie des trésors que vous avez découverts sur le web.', + 'Votre forteresse de contenu imprenable>', + 'Votre palais informationnel.' +]; + +define('USP', changeEveryNSec(2, $taglines)); diff --git a/inc/footer.php b/inc/footer.php new file mode 100644 index 0000000..d6f7d38 --- /dev/null +++ b/inc/footer.php @@ -0,0 +1,7 @@ + + + + + + + diff --git a/inc/header.php b/inc/header.php new file mode 100644 index 0000000..cdbe620 --- /dev/null +++ b/inc/header.php @@ -0,0 +1,47 @@ + + + + Astrobunker + + + + + +
+ +

+ +

+

+ +

+ +
+ + + + + +

Votre vidéo est en cours de téléchargement…

+ + + + +
+
+ +
diff --git a/install/install_web_ui.sh b/install/install_web_ui.sh index 544b6e2..98a606b 100755 --- a/install/install_web_ui.sh +++ b/install/install_web_ui.sh @@ -7,16 +7,16 @@ USER_GROUP=`groups | awk '{print $1}'` #sudo adduser --home $HOME --no-create-home --disabled-password --disabled-login --quiet --gecos "" astroport #sudo adduser astroport $USER_GROUP -sudo chgrp -R www-data ~{.zen,.ipfs,astroport} +sudo chgrp -R www-data ~/{.zen,.ipfs,astroport} sudo chmod -R g+rw ~/{.zen,.ipfs,astroport} echo ~ | tee ../conf/home_dir.txt -rm ./{astrXbian,astroport,swarm,me} -ln -s ../astrXbian astrXbian -ln -s ../../astroport astroport -ln -s ../ipfs_swarm swarm -ln -s ../ipfs me +rm ../{astrXbian,astroport,swarm,me} +ln -s ../astrXbian ../astrXbian +ln -s ../../astroport ../astroport +ln -s ../ipfs_swarm ../swarm +ln -s ../ipfs ../me sudo rm $NGINX_CONF_FILE cd /etc/nginx/sites-enabled diff --git a/styles/crowdbunker/crowdbunker.css b/styles/crowdbunker/crowdbunker.css index d925234..41a37d4 100644 --- a/styles/crowdbunker/crowdbunker.css +++ b/styles/crowdbunker/crowdbunker.css @@ -131,3 +131,63 @@ article .video-title { font-size: 1.25rem; margin: 0; } + +form.add-video { + + position: absolute; + top: 0.50rem; + right: 0.50rem; +} + + +form.add-video input { + + height: 2rem; + padding: 0.25rem 0.5rem; + box-sizing: border-box; + border-width: 0.125rem; + border-radius: 0.5rem; + +} + + +form.add-video input[type="text"] { + + border-style: solid; + border-color: transparent; +} + + +form.add-video input[type="text"]:focus { + + border-color: var(--pink); + outline: 0; +} + +form.add-video input[type="submit"] { + + background: var(--pink); + border-color: var(--pink); + border-style: solid; + color: white; + font-weight: bold; +} + +form label { + + display: none; + +} + + +form label input { + + width: 50%; +} + +form.add-video .confirmation { + + margin: 0.5rem 0; + font-size: 0.85rem; + text-align: center; +} diff --git a/youtube.php b/youtube.php index bb4ee88..39313f0 100644 --- a/youtube.php +++ b/youtube.php @@ -30,34 +30,11 @@ foreach ($videos as $v) { } +$home = true; -?> - - - Astrobunker - - - - - -
-

- -

-

- -

-
- -
+include('inc/header.php'); -
- - -
- -'; foreach ($videosList as $video) { @@ -82,9 +59,6 @@ foreach ($videosList as $video) { } echo ''; -?> -
- - +include('inc/footer.php'); diff --git a/youtube_add_video_aux.php b/youtube_add_video_aux.php index 373b834..1379f76 100644 --- a/youtube_add_video_aux.php +++ b/youtube_add_video_aux.php @@ -1,4 +1,8 @@ - - - Astrobunker - - - - +include('inc/header.php'); -
-
- -
-

- +echo ' +

+'; -
- - - -

- ' . $videoName . ' -

-

- Télécharger -

- '; -?> -
- - - - - +include('inc/footer.php');