home.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. /**
  3. * Home view.
  4. *
  5. * Contains the view layout and some code to present the data.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package IV
  10. * @category View
  11. * @property Home_Page $page The page model.
  12. * @var Home_Page $page The page model.
  13. */
  14. ?>
  15. <!DOCTYPE html>
  16. <html lang='en'>
  17. <head>
  18. <?=$page->generate_head()?>
  19. </head>
  20. <body>
  21. <header>
  22. <?php
  23. include __DIR__ . "/inc/header.php";
  24. ?>
  25. </header>
  26. <main>
  27. <section id='profile'>
  28. <h3>
  29. <?=$page->get_title()?>
  30. </h3>
  31. <!-- TODO: Profile form model -->
  32. <article>
  33. <img
  34. id='profile_image'
  35. srcset='<?=HTML::srcset("profile/profile.png")?>'
  36. src='<?=URL::IMG["CONTENT"]?>profile/x400/profile.png'
  37. alt='<?=TEXT::get("USER_NAME");?>'
  38. title='<?=TEXT::get("USER_NAME");?>'
  39. />
  40. <div id='profile_content'>
  41. <h4 id='tagline'><?=TEXT::get("USER_TAGLINE");?></h4>
  42. <p id='bio'><?=TEXT::get("USER_BIO");?></p>
  43. </div>
  44. <div class='buttons'>
  45. <a class='a_button' title='eMail' href='mailto:i@inigovalentin.com'>
  46. <?=TEXT::get("INDEX_PROFILE_MAIL");?>
  47. <img class='footer_social_icon' src='<?=URL::IMG["LAYOUT"]?>social/email.svg' alt='eMail' title='eMail'/>
  48. </a>
  49. <a class='a_button' href='<?=URL::PROFILE?>'>
  50. <?=TEXT::get("INDEX_PROFILE_MORE");?>
  51. </a>
  52. </div>
  53. </article>
  54. </section>
  55. <section id='projects'>
  56. <h3>
  57. <?=TEXT::get("INDEX_PROJECTS");?>
  58. </h3>
  59. <?php
  60. foreach ($page->get_projects() as $project){
  61. ?>
  62. <article class='project'>
  63. <table>
  64. <tr>
  65. <?php
  66. if (strlen($project->get_logo()) > 0){
  67. ?>
  68. <td>
  69. <a href='<?=URL::PROJECTS . $project->get_permalink()?>'>
  70. <img
  71. class='project_image'
  72. alt='<?=TEXT::get($project->get_title())?>'
  73. title='<?=TEXT::get($project->get_title())?>'
  74. srcset='<?=HTML::srcset("project/" . $project->get_logo())?>'
  75. src='<?=URL::IMG["CONTENT"]?>project/x200/<?=$project->get_logo()?>'
  76. />
  77. </a>
  78. </td>
  79. <?php
  80. }
  81. ?>
  82. <td class='project_details'>
  83. <h4 class='project_name'>
  84. <a href='<?=URL::PROJECTS . $project->get_permalink()?>'>
  85. <?=$project->get_title()?>
  86. </a>
  87. </h4>
  88. <span>
  89. <?=$project->get_header()?>
  90. </span>
  91. </td>
  92. </tr>
  93. </table>
  94. </article>
  95. <?php
  96. }
  97. ?>
  98. <div class='buttons'>
  99. <a class='a_button' href='<?=URL::PROJECTS?>'>
  100. <?=TEXT::get("INDEX_PROJECTS_ALL");?>
  101. </a>
  102. </div>
  103. </section>
  104. </main>
  105. <?php
  106. include __DIR__ . "/inc/footer.php";
  107. ?>
  108. </body>
  109. </html>