diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-10-30 22:44:55 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-10-30 23:09:33 +0200 |
| commit | 815b190d28cc42e6f3d44d04e1f1ebaea9208cf6 (patch) | |
| tree | 0d3f0133a39a4a796e698d360dc32f54fb41d8ad /index.php | |
| parent | 3a3baddad1c801d77dc398d2c6980f3c14f4a47c (diff) | |
chore: convert html files to php
Now I can use php to determine current env and load static CSS file if
it is prod.
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/index.php b/index.php new file mode 100644 index 0000000..d0b2f7c --- /dev/null +++ b/index.php @@ -0,0 +1,80 @@ +<?php +require_once('./config/dotenv.php'); + +$dap_current_env = dap_get_current_env(); +?> +<!DOCTYPE html> +<html lang="en"> + + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Demo | Armand Philippot</title> + <?php + if ($dap_current_env === 'production') { + echo '<link rel="stylesheet" href="assets/css/style.css" />'; + } + ?> + </head> + + <body class="body"> + <div class="toolbar"> + <button type="button" class="toolbar__options btn btn--menu">Menu</button> + <button type="button" class="toolbar__options btn btn--details"> + About app + </button> + </div> + <header class="header"> + <div class="branding"> + <div class="branding__logo logo"> + <a href="/" rel="home" class="logo__link"> + <img src="./assets/images/armand-philippot.jpg" alt="Back to homepage" + class="logo__image logo__image--front" /> + <img src="./assets/images/armand-philippot-logo.svg" alt="Back to homepage" + class="logo__image logo__image--back" /> + </a> + </div> + <h1 class="branding__title"> + <a href="/" rel="home" class="branding__link">Armand Philippot</a> + </h1> + <p class="branding__description">Front-end developer</p> + </div> + <nav class="nav"> + <p class="nav__label">App list:</p> + <ul class="nav__list"></ul> + </nav> + </header> + <main class="main"> + <div class="instructions"> + Select an app inside menu to see a live preview and app details + (description, technologies, repositories). + </div> + <noscript> + <span class="no-js"> + This website needs Javascript to work. It shows JS/React applications. + Please activate scripts in your browser or use a compatible browser. + </span> + </noscript> + </main> + <footer class="footer"> + <nav class="nav nav--footer"> + <ul class="nav__list"> + <li class="nav__item"> + <a href="legal-notice.php" class="nav__link nav__link--legal"> + Legal notice + </a> + </li> + </ul> + </nav> + <div class="copyright"> + <span class="copyright__license" title="License MIT">MIT</span> + <span class="copyright__date">2021.</span> + <a href="https://www.armandphilippot.com/" class="copyright__author">Armand Philippot.</a> + </div> + </footer> + <script src="./assets/js/runtime.js"></script> + <script src="./assets/js/app.js"></script> + </body> + +</html> |
