Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 61 additions & 35 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,42 +152,68 @@
<!-- this section is the about info. It's got a semi-transparent background, which lets the image from show through.
This whole section uses markdown! Parsedown is required unless you want to rewrite this space. -->
<?php
$file = "./markdown/about.md";
if (file_exists($file)) { ?>
<!-- this <p> is the section title -->
<section class="z-5 pv5 ph2 flex flex-column items-center bg-sov-red-t9">
<p class="font-teko b tracked f1 f2-m light-yellow self-center">ABOUT</p>
<!-- the <div> below is the text of the section-->
<div class="font-hind white flex flex-column a-blue measure">
<?php
$filename = fopen($file, 'r') or die("Unable to open file!");
$Parsedown = new Parsedown ();
echo $Parsedown->text(fread($filename,filesize($file)));
fclose($filename);
?>
</div>
</section>
<?php
}
?>
<?php
$file = "./markdown/main.md";
if (file_exists($file)) { ?>
<!-- this <p> is the section title -->
<section class="z-5 pv5 ph2 self-stretch flex flex-column items-center bg-sov-red-t9">
<p class="font-teko b tracked f1 f2-m light-yellow self-center">DOCUMENTATION</p>
<!-- the <div> below is the text of the section-->
<div class="font-hind white flex flex-column measure a-blue">
<?php
$filename = fopen($file, 'r') or die("Unable to open file!");
$Parsedown = new Parsedown ();
echo $Parsedown->text(fread($filename,filesize($file)));
fclose($filename);
?>
</div>
</section>
<?php





function printMdFile($file, $paragraphName) {
if (file_exists($file)) {
?>
<!-- this <p> is the section title -->
<section class="z-5 pv5 ph2 flex flex-column items-center bg-sov-red-t9">
<p class="font-teko b tracked f1 f2-m light-yellow self-center"><?= $paragraphName ?></p>
<!-- the <div> below is the text of the section-->
<div class="font-hind white flex flex-column a-blue measure">
<?php
$filename = fopen($file, 'r') or die("Unable to open file!");
$Parsedown = new Parsedown ();
echo $Parsedown->text(fread($filename,filesize($file)));
fclose($filename);
?>
</div>
</section>
<?php
}
}



$mdFiles = [
[
"path" => "./markdown/about.md",
"title" => "ABOUT"
],
[
"path" => "./markdown/main.md",
"title" => "DOCUMENTATION"
],
[
"path" => "./markdown/cccp.md",
"title" => "CCCP"
],
[
"path" => "./markdown/installer.md",
"title" => "INSTALLER"
],
[
"path" => "./markdown/liveusb.md",
"title" => "LIVE USB"
],
[
"path" => "./markdown/repo.md",
"title" => "REPO"
]
];



foreach ($mdFiles as $mdFile) {
printMdFile($mdFile["path"], $mdFile["title"]);
}



?>
</main>

Expand Down
7 changes: 7 additions & 0 deletions tail-errors.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash


tail /var/log/apache2/error.log;



24 changes: 24 additions & 0 deletions ubuntu-apache2-deploy-linked.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

whoiam="$(whoami)";


dest="/var/www/linkedhtml";

# https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd );

#rm -rf ${dest}/*;
#shopt -s dotglob;
#cp -r * "${dest}/";


sudo -s -- <<EOF
rm -f "$dest";
ln -s "$SCRIPT_DIR" "$dest";
#chown -R "${whoiam}:${whoiam}" "$dest";
chown -R -L "${whoiam}:www-data" "$dest";
EOF