refactor: update pricing table and improve UI component references

This commit is contained in:
udo committed 2026-04-18 16:29:22 +00:00
1 parent 07e322961e
commit 072a5fa490
14 files changed
+29 -27

No files matched your search

+7 -7
View File
@@ -7,10 +7,10 @@
'period' => '',
'description' => 'Perfect for small projects and learning',
'features' => [
'Fuckall',
'A warm handshake',
'A pat on the back',
'A cup of coffee'
'Up to 3 projects',
'Community support',
'Core components',
'Basic documentation'
],
'cta' => 'Get Started',
'popular' => false
@@ -28,7 +28,7 @@
'Custom themes',
'Analytics dashboard'
],
'cta' => 'Start Not Quite Free Trial',
'cta' => 'Start Free Trial',
'popular' => true
],
[
@@ -44,7 +44,7 @@
'Advanced security',
'White-label options'
],
'cta' => 'Contact Desperate Sales Person',
'cta' => 'Contact Sales',
'popular' => false
]
];
@@ -54,7 +54,7 @@
<div class="pricing-container">
<div class="pricing-header">
<h2>Choose Your Plan</h2>
<p>Start building fucking amazing applications today with our quite inflexible pricing options</p>
<p>Start building great applications today with our flexible pricing options</p>
</div>
<div class="pricing-grid">
<?php foreach($plans as $index => $plan): ?>
+1 -1
View File
@@ -38,7 +38,7 @@ return [
$prop['img_height'] = first($prop['img_height'] ?? false,
$prop['size'] * max(cos(first($prop['scale']['angle_start'], -pi())), cos(first($prop['scale']['angle_end'], 0))));
?>
<section class="gauge-set needlegauge-set" id="<?= $prop['id'] ?>" style="<?= $prop['style'] ?>">
<section class="gauge-set needlegauge-set" id="<?= asafe($prop['id']) ?>" style="<?= asafe($prop['style']) ?>">
<?php if(isset($prop['title'])) { ?>
<div class="gauge-set-header">
<h3><?= safe($prop['title']) ?></h3>
+1 -1
View File
@@ -35,7 +35,7 @@
define('ONE_HOUR', 60*60);
define('ONE_DAY', 60*60*24);
define('ONE_MONTH', 60*60*24*30);
define('ONE_YEAR', 60*60*24*30*365);
define('ONE_YEAR', 60*60*24*365);
$GLOBALS['config'] = array(
'debug' => array(
+1 -1
View File
@@ -1,6 +1,6 @@
var enable_debug = true;
UI = {
var UI = {
smoothScrollToNamedAnchors: function() {
$('a[href^="#"]').each(anchor => {
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+1 -1
View File
@@ -8,7 +8,7 @@
}
}(typeof self !== 'undefined' ? self : this, function () {
Connection = {
var Connection = {
auto_reconnect : false,
established : false,
+4 -3
View File
@@ -168,7 +168,7 @@ class DB
static function GetRowsMatch($table, $matchOptions, $fillIfEmpty = true)
{
self::$writeOps++;
self::$readOps++;
$where = array('1');
foreach($matchOptions as $k => $v)
$where[] = '('.$k.'="'.DB::Safe($v).'")';
@@ -200,8 +200,10 @@ class DB
$cache_entry = $tablename.':'.$keyname.':'.$keyvalue;
if(isset(self::$dataCache[$cache_entry])) return(self::$dataCache[$cache_entry]);
$query = 'SELECT '.$fields.' FROM '.$tablename.' '.$options['join'].' WHERE '.$keyname.'="'.DB::Safe($keyvalue).'";';
$join = isset($options['join']) ? ' '.$options['join'] : '';
$query = 'SELECT '.$fields.' FROM '.$tablename.$join.' WHERE '.$keyname.'="'.DB::Safe($keyvalue).'";';
$queryResult = mysqli_query(self::$link, $query) or critical(mysqli_error(self::$link).' { Query: "'.$query.'" }');
self::$readOps++;
if ($line = @mysqli_fetch_array($queryResult, MYSQLI_ASSOC))
{
@@ -214,7 +216,6 @@ class DB
$result = array();
Profiler::Log('DB::GetRow('.$tablename.', '.$keyvalue.') #fail');
self::$readOps++;
return($result);
}
+4 -1
View File
@@ -193,7 +193,10 @@ class Filebase
static function truncate_log($from_file, $lines = 128)
{
$lines = intval($lines);
return(shell_exec('tail -n '.$lines.' '.escapeshellarg($from_file).' > /tmp/trunc ; cp /tmp/trunc '.escapeshellarg($from_file)));
$tmp = tempnam(sys_get_temp_dir(), 'trunc_');
shell_exec('tail -n '.$lines.' '.escapeshellarg($from_file).' > '.escapeshellarg($tmp).' && cp '.escapeshellarg($tmp).' '.escapeshellarg($from_file));
@unlink($tmp);
return true;
}
static function json_lines($lines)
+3 -2
View File
@@ -421,7 +421,8 @@ class ODT
$this->debug_output = trim(
shell_exec('cd '.escapeshellarg($this->temp_dir).' ; zip -r ../tmp.odt * 2>&1'));
if(!file_exists('/tmp/tmp.odt'))
$zip_output = dirname($this->temp_dir).'/tmp.odt';
if(!file_exists($zip_output))
{
$this->error_msg = 'Failed to create tmp ODT file (shell "'.$this->debug_output.'")';
return false;
@@ -429,7 +430,7 @@ class ODT
if(file_exists($out_filename)) {
unlink($out_filename);
}
shell_exec('mv /tmp/tmp.odt '.escapeshellarg($out_filename));
shell_exec('mv '.escapeshellarg($zip_output).' '.escapeshellarg($out_filename));
if (!file_exists($out_filename)) {
$this->error_msg = 'Failed to create ODT file "'.$out_filename.'"';
+1 -1
View File
@@ -23,7 +23,7 @@ class Profiler
number_format(1000*($thistime - self::$last), 3).'ms | '.
ceil(memory_get_usage()/1024).' kB | '.self::$indent_str.$text;
if($indent_delta > 0) // if greater than zero, update indent after logging
self::$indent_str = str_repeat(' ', 2*max(0, strlen(self::$indent_str) + $indent_delta));
self::$indent_str = str_repeat(' ', self::$indent_level * 2);
self::$last = $thistime;
self::$current = $absoluteMS;
return($thistime);
+1 -1
View File
@@ -27,6 +27,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<label>Password: <input type="password" name="password" required></label><br>
<button type="submit">Login</button>
</form>
<p><a href="register.php">Register</a></p>
<p><a href="<?= URL::link('account/register') ?>">Register</a></p>
</body>
</html>
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
if (!User::IsSignedIn()) {
header('Location: login.php');
header('Location: '.URL::link('account/login'));
exit;
}
$u = User::$current_profile;
+4 -7
View File
@@ -1,11 +1,11 @@
<?= component('components/hero-section', [
<?= component('components/example/hero-section', [
'title' => 'Dark Theme Demo',
'subtitle' => 'Experience our beautiful dark mode with enhanced readability and modern aesthetics.',
'cta_text' => 'Explore Features',
'cta_link' => '#features'
]) ?>
<?= component('components/features-grid', [
<?= component('components/example/features-grid', [
'features' => [
[
'icon' => '🌙',
@@ -25,7 +25,7 @@
]
]) ?>
<?= component('components/pricing-table', [
<?= component('components/example/pricing-table', [
'plans' => [
[
'name' => 'Dark Starter',
@@ -90,10 +90,7 @@
</div>
</div>
]
]) ?>
<?= component('components/theme-switcher') ?>
<?= component('components/example/theme-switcher') ?>
<style>
.demo-section {