diff options
author | Freya Murphy <freya@freyacat.org> | 2024-04-05 15:00:27 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-04-05 15:00:27 -0400 |
commit | 4c8d58b646ac62e67fc34c12f8cad51e7512bee3 (patch) | |
tree | 432351cce0acccd9a986872f7ea020dae14b0c71 /src/web/_views | |
parent | user menu (diff) | |
download | xssbook2-4c8d58b646ac62e67fc34c12f8cad51e7512bee3.tar.gz xssbook2-4c8d58b646ac62e67fc34c12f8cad51e7512bee3.tar.bz2 xssbook2-4c8d58b646ac62e67fc34c12f8cad51e7512bee3.zip |
add en_CAT makefile and use ucfirst/ucwords
Diffstat (limited to 'src/web/_views')
-rw-r--r-- | src/web/_views/apps/auth/login.php | 7 | ||||
-rw-r--r-- | src/web/_views/apps/error/main.php | 2 | ||||
-rw-r--r-- | src/web/_views/apps/home/main.php | 4 | ||||
-rw-r--r-- | src/web/_views/apps/people/header.php | 4 | ||||
-rw-r--r-- | src/web/_views/apps/profile/main.php | 35 | ||||
-rw-r--r-- | src/web/_views/header.php | 10 | ||||
-rw-r--r-- | src/web/_views/modal/new_post.php | 4 | ||||
-rw-r--r-- | src/web/_views/modal/register.php | 28 | ||||
-rw-r--r-- | src/web/_views/template/post.php | 6 |
9 files changed, 52 insertions, 48 deletions
diff --git a/src/web/_views/apps/auth/login.php b/src/web/_views/apps/auth/login.php index 2ba0896..c12af57 100644 --- a/src/web/_views/apps/auth/login.php +++ b/src/web/_views/apps/auth/login.php @@ -3,7 +3,7 @@ <div id="main-content"> <div class="branding col"> <h1>xssbook</h1> - <span><?=lang('login_branding')?></span> + <span><?=ucfirst(lang('login_branding'))?></span> </div> <div class="form card col"> <form id="action-login" class="col" action=""> @@ -13,9 +13,10 @@ name="username" id="login-username" placeholder=" " + autofocus="true" > <label for="username"> - <?=lang('ph_username')?> + <?=ucfirst(lang('ph_username'))?> </label> </div> <div class="rel mb"> @@ -26,7 +27,7 @@ placeholder=" " > <label for="password"> - <?=lang('ph_password')?> + <?=ucfirst(lang('ph_password'))?> </label> </div> <?=ilang('action_login', diff --git a/src/web/_views/apps/error/main.php b/src/web/_views/apps/error/main.php index dde39cf..6d7e2ea 100644 --- a/src/web/_views/apps/error/main.php +++ b/src/web/_views/apps/error/main.php @@ -2,5 +2,5 @@ <?php /* vi: syntax=php */ ?> <div id="main-content"> <h1><?=$title?></h1> - <span><?=$msg?></span> + <span><?=ucfirst($msg)?></span> </div> diff --git a/src/web/_views/apps/home/main.php b/src/web/_views/apps/home/main.php index 60c3eb9..6112173 100644 --- a/src/web/_views/apps/home/main.php +++ b/src/web/_views/apps/home/main.php @@ -9,9 +9,9 @@ id="action-new-post" class="btn btn-alt btn-wide ml" autocomplete="off" - aria-label="<?=lang('action_new_post_tip')?>" + aria-label="<?=ucfirst(lang('action_new_post_tip'))?>" > - <?=lang('action_new_post_text', sub: [$self['first_name']])?> + <?=ucfirst(lang('action_new_post_text', sub: [$self['first_name']]))?> </a> </div> <script> diff --git a/src/web/_views/apps/people/header.php b/src/web/_views/apps/people/header.php index 7f3d95b..1f3a025 100644 --- a/src/web/_views/apps/people/header.php +++ b/src/web/_views/apps/people/header.php @@ -1,6 +1,6 @@ <?php /* Copyright (c) 2024 Freya Murphy */ ?> <?php /* vi: syntax=php */ ?> <div id="main-content" class="col"> - <h1 class="title"><?=lang('title')?></h1> - <h3 class="desc"><?=lang('desc')?></h3> + <h1 class="title"><?=ucfirst(lang('title'))?></h1> + <h3 class="desc"><?=ucfirst(lang('desc'))?></h3> <hr> diff --git a/src/web/_views/apps/profile/main.php b/src/web/_views/apps/profile/main.php index 6671d87..919b190 100644 --- a/src/web/_views/apps/profile/main.php +++ b/src/web/_views/apps/profile/main.php @@ -12,9 +12,12 @@ <div class="row grow"> <div class="col"> <strong class="name"><?=$this->format_model->name($user)?></strong> - <span class="dim"><?=$user['follower_count'] . ' ' . lang('followers')?></span> + <span class="dim"><?=$user['follower_count'] . ' ' . ucfirst(lang('followers'))?></span> </div> - <?php if (!isset($self) || $self['id'] != $user['id']): ?> + <?php if ( + $this->main->session && + (!isset($self) || $self['id'] != $user['id']) + ): ?> <div id="follow-container"> <?=ilang( 'action_follow', @@ -120,7 +123,7 @@ </div> <?php if(strlen($user['profile_bio']) > 0): ?> <br> - <strong><?=lang('bio')?></strong> + <strong><?=ucfirst(lang('bio'))?></strong> <span class="dim"><?=$user['profile_bio']?></span> <?php endif; ?> </div> @@ -158,53 +161,53 @@ ?> </div> <div id="tab-about" class="tab card"> - <h1><?=lang('about_general')?></h1> + <h1><?=ucfirst(lang('about_general'))?></h1> <table> <tr> - <td><strong><?=lang('about_general_username')?></strong></td> + <td><strong><?=ucfirst(lang('about_general_username'))?></strong></td> <td><?=$user['username']?></td> </tr> <tr> - <td><strong><?=lang('about_general_full_name')?></strong></td> + <td><strong><?=ucfirst(lang('about_general_full_name'))?></strong></td> <td><?=$user['first_name'] . ' ' . $user['last_name']?></td> </tr> <tr> - <td><strong><?=lang('about_general_email')?></strong></td> + <td><strong><?=ucfirst(lang('about_general_email'))?></strong></td> <td><?=$user['email']?></td> </tr> <tr> - <td><strong><?=lang('about_general_gender')?></strong></td> + <td><strong><?=ucfirst(lang('about_general_gender'))?></strong></td> <td><?=$user['gender']?></td> </tr> <tr> - <td><strong><?=lang('about_general_birth_date')?></strong></td> + <td><strong><?=ucfirst(lang('about_general_birth_date'))?></strong></td> <td><?=$user['birth_date']?></td> </tr> </table> - <h1><?=lang('about_stats')?></h1> + <h1><?=ucfirst(lang('about_stats'))?></h1> <table> <tr> - <td><strong><?=lang('about_stats_posts')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_posts'))?></strong></td> <td><?=$user['post_count']?></td> </tr> <tr> - <td><strong><?=lang('about_stats_like')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_like'))?></strong></td> <td><?=$user['like_count']?></td> </tr> <tr> - <td><strong><?=lang('about_stats_comments')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_comments'))?></strong></td> <td><?=$user['comment_count']?></td> </tr> <tr> - <td><strong><?=lang('about_stats_following')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_following'))?></strong></td> <td><?=$user['followed_count']?></td> </tr> <tr> - <td><strong><?=lang('about_stats_joined')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_joined'))?></strong></td> <td><?=$user['created']?></td> </tr> <tr> - <td><strong><?=lang('about_stats_seen')?></strong></td> + <td><strong><?=ucfirst(lang('about_stats_seen'))?></strong></td> <td><?=$user['seen']?></td> </tr> </table> diff --git a/src/web/_views/header.php b/src/web/_views/header.php index 71607d5..97eb435 100644 --- a/src/web/_views/header.php +++ b/src/web/_views/header.php @@ -13,19 +13,19 @@ id="action-home" class="btn<?=$this->main->info['app'] == 'home' ? ' btn-blue btn-border' : ''?>" href="/home" - title="<?=lang('action_home_tip')?>" + title="<?=ucfirst(lang('action_home_tip'))?>" > <i class="mi mi-lg">home</i> - <span><?=lang('action_home_text')?></span> + <span><?=ucfirst(lang('action_home_text'))?></span> </a> <a id="action-people" class="btn<?=$this->main->info['app'] == 'people' ? ' btn-blue btn-border' : ''?>" href="/people" - title="<?=lang('action_people_tip')?>" + title="<?=ucfirst(lang('action_people_tip'))?>" > <i class="mi mi-lg">people</i> - <span><?=lang('action_people_text')?></span> + <span><?=ucfirst(lang('action_people_text'))?></span> </a> <!--a id="action-chat" @@ -40,7 +40,7 @@ <div class="nav-right"> <button id="action-hamburger" - title="<?=lang('action_hamburger_tip')?>" + title="<?=ucfirst(lang('action_hamburger_tip'))?>" class="btn mr" > <i class="mi mi-lg">menu</i> diff --git a/src/web/_views/modal/new_post.php b/src/web/_views/modal/new_post.php index 15163c9..c9e9c7f 100644 --- a/src/web/_views/modal/new_post.php +++ b/src/web/_views/modal/new_post.php @@ -9,14 +9,14 @@ <?=pfp($user)?> <div class="col ml"> <strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong> - <span class="dim"><?=lang('now')?></span> + <span class="dim"><?=ucfirst(lang('now'))?></span> </div> </div> <textarea type="text" name="content" id="new-post-content" - placeholder="<?=lang('action_new_post_text', sub: [$user['first_name']])?>" + placeholder="<?=ucfirst(lang('action_new_post_text', sub: [$user['first_name']]))?>" ></textarea> </div> <div class="modal-footer"> diff --git a/src/web/_views/modal/register.php b/src/web/_views/modal/register.php index 1949dd3..a6a2f1f 100644 --- a/src/web/_views/modal/register.php +++ b/src/web/_views/modal/register.php @@ -4,7 +4,7 @@ <form id="register-form"> <div class="modal-content register-modal col"> <label class="static"> - <?=lang('ph_basic_info')?> + <?=ucwords(lang('ph_basic_info'))?> </label> <div class="row mt"> <div class="rel btn-wide"> @@ -15,7 +15,7 @@ placeholder=" " > <label for="first_name"> - <?=lang('ph_first_name')?> + <?=ucwords(lang('ph_first_name'))?> </label> </div> <div class="rel ml btn-wide"> @@ -26,7 +26,7 @@ placeholder=" " > <label for="last_name"> - <?=lang('ph_last_name')?> + <?=ucwords(lang('ph_last_name'))?> </label> </div> </div> @@ -38,7 +38,7 @@ placeholder=" " > <label for="username"> - <?=lang('ph_username')?> + <?=ucwords(lang('ph_username'))?> </label> </div> <div class="rel mt"> @@ -49,7 +49,7 @@ placeholder=" " > <label for="password"> - <?=lang('ph_password')?> + <?=ucwords(lang('ph_password'))?> </label> </div> <div class="rel mt"> @@ -60,11 +60,11 @@ placeholder=" " > <label for="email"> - <?=lang('ph_email')?> + <?=ucwords(lang('ph_email'))?> </label> </div> <label for="birth_date" class="mt static"> - <?=lang('ph_birth_date')?> + <?=ucwords(lang('ph_birth_date'))?> </label> <input class="mt" @@ -73,7 +73,7 @@ id="register-birth-date" > <label for="gender" class="mt static"> - <?=lang('ph_gender')?> + <?=ucwords(lang('ph_gender'))?> </label> <div class="row mt" data-type="radio" data-name="gender-wrapper"> <div class="rel radio mr"> @@ -81,13 +81,13 @@ type="radio" id="register-gender-male" name="gender" - value="male" + value="Male" > <label for="register-gender-male" class="static" > - <?=lang('ph_gender_male')?> + <?=ucwords(lang('ph_gender_male'))?> </label> </div> <div class="rel radio mr"> @@ -95,13 +95,13 @@ type="radio" id="register-gender-female" name="gender" - value="female" + value="Female" > <label for="register-gender-female" class="static" > - <?=lang('ph_gender_female')?> + <?=ucwords(lang('ph_gender_female'))?> </label> </div> <div class="rel radio"> @@ -109,13 +109,13 @@ type="radio" id="register-gender-lettuce" name="gender" - value="lettuce" + value="Lettuce" > <label for="register-gender-lettuce" class="static" > - <?=lang('ph_gender_lettuce')?> + <?=ucwords(lang('ph_gender_lettuce'))?> </label> </div> </div> diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php index fb8cef5..3dcae8f 100644 --- a/src/web/_views/template/post.php +++ b/src/web/_views/template/post.php @@ -21,7 +21,7 @@ $post_attrs['likeId'] = $post['like_id']; } ?> - <span class="likes dim"><span class="count"><?=$post['like_count']?></span><?=' ' . lang('likes')?></span> + <span class="likes dim"><span class="count"><?=$post['like_count']?></span><?=' ' . ucfirst(lang('likes'))?></span> <?php if ($self): ?> <hr> <div class="row"> @@ -76,8 +76,8 @@ autocomplete="off" type="text" name="text" - placeholder="<?=lang('action_new_comment_text')?>" - aria-label="<?=lang('action_new_comment_tip')?>" + placeholder="<?=ucfirst(lang('action_new_comment_text'))?>" + aria-label="<?=ucfirst(lang('action_new_comment_tip'))?>" > </form> </div> |