profile.php 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * Profile 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 Profile_Page $page The page model.
  12. * @var Profile_Page $page The page model.
  13. */
  14. ?>
  15. <!DOCTYPE html>
  16. <html lang='<?=get_context()->get_lang()?>'>
  17. <head>
  18. <?=$page->generate_head()?>
  19. </head>
  20. <body>
  21. <?php
  22. include __DIR__ . "/inc/header.php";
  23. ?>
  24. <main>
  25. <section id='info'>
  26. <h3>
  27. <?=get_context()->get_user()->get_display_name()?>
  28. </h3>
  29. <img
  30. id='profile_image'
  31. srcset='<?=HTML::srcset("profile/" . get_context()->get_user()->get_image())?>'
  32. src='<?=URL::IMG["CONTENT"]?>profile/<?=get_context()->get_user()->get_image()?>'
  33. alt='<?=get_context()->get_user()->get_display_name()?>'
  34. title='<?=get_context()->get_user()->get_display_name()?>'
  35. />
  36. <h4>
  37. <?=get_context()->get_user()->get_text("TAGLINE")?>
  38. </h4>
  39. <div id='social'>
  40. <?php
  41. if (get_context()->get_user()->get_first_email() != null){
  42. ?>
  43. <a target='_blank' title='eMail' href='mailto:<?=get_context()->get_user()->get_first_email()?>'>
  44. <img src='<?=URL::IMG["LAYOUT"]?>social/email.svg' alt='eMail' title='eMail'/>
  45. </a>
  46. <?php
  47. }
  48. foreach (get_context()->get_user()->get_social() as $social){
  49. ?>
  50. <a target='_blank' title='<?=$social->get_text()?>' href='<?=$social->get_url()?>'>
  51. <img src='<?=URL::IMG["LAYOUT"]?>social/<?=$social->get_logo()?>' title='<?=$social->get_text()?>' alt='<?=$social->get_site_name()?>'/>
  52. </a>
  53. <?php
  54. }
  55. ?>
  56. </div>
  57. </section>
  58. <section id='about'>
  59. <h3>
  60. <?=Text::get("PROFILE_DESCRIPTION");?>
  61. </h3>
  62. <p>
  63. <?=get_context()->get_user()->get_text("TEXT")?>
  64. </p>
  65. <div id='cv_download'>
  66. <a class='a_button' target='_blank' href='<?=$static["cv"] . $page->get_main_cv()->get_file()?>'>
  67. <?=Text::get("PROFILE_CV");?>
  68. </a>
  69. <details>
  70. <summary class='pointer'><?=Text::get("PROFILE_CV_LANG");?></summary>
  71. <ul>
  72. <?php
  73. for ($i = 1; $i < count($page->get_other_cvs()); $i ++) {
  74. ?>
  75. <li>
  76. <a target='_blank' href='<?=$static["cv"] . $page->get_other_cvs()[$i]->get_file()?>'>
  77. <?=$page->get_other_cvs()[$i]->get_lang()->get_name()?>
  78. </a>
  79. </li>
  80. <?php
  81. }
  82. ?>
  83. </ul>
  84. </details>
  85. </div>
  86. </section>
  87. </main>
  88. <?php
  89. include __DIR__ . "/inc/footer.php";
  90. ?>
  91. </body>
  92. </html>