<?php
namespace entities\html;

class Input
{
   public function __construct(
      $name=null, $type=null, $value=null, $class=null, $clear_on_focus=false)
   {
      $this->name = $name;
      $this->type = $type;
      $this->value = $value;
      $this->class = $class;
      $this->clear_on_focus = $clear_on_focus;
   }
   public function __toString()
   {
      return $this->build_html();
   }
   private function build_html()
   {
      $markup = "<input";
      $markup .= $this->build_assignments();
      if ($this->clear_on_focus)
      {
         $markup .= " onFocus=\"this.value='';this.style.color='black'\"";
      }
      $markup .= "/>\n";
      return $markup;
   }
   protected function build_assignments()
   {
      $assignments = $this->build_assignment("name");
      $assignments .= $this->build_assignment("type");
      $assignments .= $this->build_assignment("value");
      $assignments .= $this->build_assignment("class");
      return $assignments;
   }
   private function build_assignment($name)
   {
      $value = $this->$name;
      if (!is_null($value))
      {
         return " $name=\"$value\"";
      }
      return null;
   }
}
<?php
namespace entities\html;

class Page
{
   private $scripts = array();
   public function __construct($title=null)
   {
      $this->set_title($title);
      $this->css_path = $GLOBALS["CSS_PATH"];
   }
   protected function set_title($title)
   {
      $this->title = $title;
   }
   public function __toString()
   {
      return $this->build_html();
   }
   private function build_html()
   {
      $markup = "<html>\n";
      $markup .= "<head>\n";
      $markup .= $this->build_head();
      $markup .= "</head>\n";
      $markup .= $this->build_body();
      $markup .= "</html>\n";
      return $markup;
   }
   protected function build_head()
   {
      $markup = $this->build_title();
      $markup .= $this->build_style_link();
      $markup .= $this->build_script_tags();
      $markup .= $this->build_description();
      $markup .= $this->build_thumbnail_link();
      $markup .= $this->build_favicon_link();
      return $markup;
   }
   private function build_title()
   {
      $markup = "<title>" . $this->title . "</title>\n";
      $markup .= new Meta($this->title, "title");
      return $markup;
   }
   private function build_style_link()
   {
      $tag = "<link href=\"" . $this->css_path . "\" rel=\"stylesheet\">\n";
      return $tag;
   }
   protected function build_script_tags()
   {
      $markup = "";
      foreach ($this->scripts as $path)
      {
         $markup .= new Script($path);
      }
      return $markup;
   }
   private function build_description()
   {
      return new Meta($GLOBALS["PAGE_DESCRIPTION"], "description") . "\n";
   }
   private function build_thumbnail_link()
   {
      $tag = "<link rel=\"image_src\"";
      $tag .= " href=\"" . $GLOBALS["THUMBNAIL_PATH"] . "\"/>";
      return $tag;
   }
   private function build_favicon_link()
   {
      return new Link("shortcut icon", $GLOBALS["FAVICON_PATH"]);
   }
   private function build_body()
   {
      $markup = "<body>\n";
      $markup .= $this->build_content();
      $markup .= "</body>\n";
      return $markup;
   }
   protected function build_content()
   {
      return "";
   }
   protected function add_script($path)
   {
      $this->scripts[] = $path;
   }
}
<?php
namespace entities\html;

class Script
{
   public function __construct($path=null, $content=null)
   {
      $this->path = $path;
      $this->content = $content;
   }
   public function __toString()
   {
      return $this->build_html();
   }
   public function build_html()
   {
      $markup = "<script";
      if (!is_null($this->path))
      {
         $markup .= " src=\"" . $this->path . "\"";
      }
      $markup .= ">";
      $markup .= $this->build_content();
      $markup .= "</script>\n";
      return $markup;
   }
   protected function build_content()
   {
      return $this->content;
   }
}
<?php
namespace entities\html;

class A extends Element
{
   public function __construct($href=null, $content=null, $id=null, $class=null)
   {
      parent::__construct("a", $id, $class);
      $this->add_attribute("href", $href);
      $this->content = $content;
   }
   protected function build_content()
   {
      $content = $this->content;
      if (is_null($content))
      {
         $content = $this->get_attribute("href");
      }
      return $content;
   }
}
<?php
namespace entities\html;

class IFrame extends Element
{
   public function __construct($id, $src, $width, $height)
   {
      parent::__construct("iframe", $id);
      $this->add_attribute("src", $src);
      $this->add_attribute("width", $width);
      $this->add_attribute("height", $height);
      $this->add_attribute("frameborder", "0");
   }
}
44.210.77.106
44.210.77.106
44.210.77.106
 
July 18, 2022


A new era ‼

Our infrastructure has recently upgraded ‼

Nugget Communications Bureau 👍

You've never emailed like this before ‼

Roundcube

Webmail software for reading and sending email from @nugget.fun and @shampoo.ooo addresses.

Mailman3

Email discussion lists, modernized with likes and emojis. It can be used for announcements and newsletters in addition to discussions. See lists for Picture Processing or Scrapeboard. Nowadays, people use Discord, but you really don't have to!

FreshRSS

With this hidden in plain sight, old technology, even regular people like you and I can start our own newspaper or social media feed.

Nugget Streaming Media 👍

The content you crave ‼

HLS

A live streaming, video format based on M3U playlists that can be played with HTML5.

RTMP

A plugin for Nginx can receive streaming video from ffmpeg or OBS and forward it as an RTMP stream to sites like Youtube and Twitch or directly to VLC.


Professional ‼

Nugget Productivity Suite 👍

Unleash your potential ‼

Kanboard

Virtual index cards you can use to gamify your daily grind.

Gitea

Grab whatever game code you want, share your edits, and report bugs.

Nugget Security 👍

The real Turing test ‼

Fail2ban

Banning is even more fun when it's automated.

Spamassassin

The documentation explains, "an email which mentions rolex watches, Viagra, porn, and debt all in one" will probably be considered spam.

GoAccess

Display HTTP requests in real time, so you can watch bots try to break into WordPress.

Nugget Entertainment Software 👍

The best in gaming entertainment ‼

Emoticon vs. Rainbow

With everything upgraded to the bleeding edge, this HTML4 game is running better than ever.


Zoom ‼

The game engine I've been working on, SPACE BOX, is now able to export to web, so I'm planning on turning nugget.fun into a games portal by releasing my games on it and adding an accounts system. The upgraded server and software will make it easier to create and maintain. I'm also thinking of using advertising and subscriptions to support the portal, so some of these services, like webmail or the RSS reader, may be offered to accounts that upgrade to a paid subscription.