mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-04-23 19:32:15 +00:00
remove files from .gitignore
added .html files edited handler and tagHandler
This commit is contained in:
parent
68df6e6969
commit
49d539ee72
@ -8,14 +8,14 @@ RewriteEngine on
|
|||||||
|
|
||||||
# Condition de redirection
|
# Condition de redirection
|
||||||
# si https est off ou si le protocol n'est pas en HTTPS
|
# si https est off ou si le protocol n'est pas en HTTPS
|
||||||
RewriteCond %{HTTPS} off
|
#RewriteCond %{HTTPS} off
|
||||||
|
|
||||||
# lieux de redirection
|
# lieux de redirection
|
||||||
# on redirige vers https
|
# on redirige vers https
|
||||||
# entre [] se sont des Flags
|
# entre [] se sont des Flags
|
||||||
# R=302 indique une redirection visible en indiquant le code 302
|
# R=302 indique une redirection visible en indiquant le code 302
|
||||||
# L finit le processus et n'aplique plus rien de se qui se trouve en dessous
|
# L finit le processus et n'aplique plus rien de se qui se trouve en dessous
|
||||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
|
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
|
||||||
|
|
||||||
# condition si il n'y a pas de fichier a l'endroit ciblé
|
# condition si il n'y a pas de fichier a l'endroit ciblé
|
||||||
# (ou si le fichier n'est pas accésible par l'utilisateur)
|
# (ou si le fichier n'est pas accésible par l'utilisateur)
|
||||||
|
6
project/.idea/misc.xml
generated
6
project/.idea/misc.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="JavaScriptSettings">
|
|
||||||
<option name="languageLevel" value="ES6" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
8
project/.idea/modules.xml
generated
8
project/.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/project.iml" filepath="$PROJECT_DIR$/.idea/project.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
8
project/.idea/project.iml
generated
8
project/.idea/project.iml
generated
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
6
project/.idea/vcs.xml
generated
6
project/.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
227
project/.idea/workspace.xml
generated
227
project/.idea/workspace.xml
generated
@ -1,227 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="fadbc7d1-5187-462c-8e18-595bb22b7d4e" name="Default Changelist" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/assets/css/style_index.css" beforeDir="false" afterPath="$PROJECT_DIR$/assets/css/style_index.css" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="FUSProjectUsageTrigger">
|
|
||||||
<session id="-1522156829">
|
|
||||||
<usages-collector id="statistics.lifecycle.project">
|
|
||||||
<counts>
|
|
||||||
<entry key="project.closed" value="2" />
|
|
||||||
<entry key="project.open.time.1" value="1" />
|
|
||||||
<entry key="project.open.time.5" value="1" />
|
|
||||||
<entry key="project.open.time.9" value="1" />
|
|
||||||
<entry key="project.opened" value="3" />
|
|
||||||
</counts>
|
|
||||||
</usages-collector>
|
|
||||||
<usages-collector id="statistics.file.extensions.open">
|
|
||||||
<counts>
|
|
||||||
<entry key="css" value="1" />
|
|
||||||
<entry key="htaccess" value="1" />
|
|
||||||
<entry key="php" value="2" />
|
|
||||||
</counts>
|
|
||||||
</usages-collector>
|
|
||||||
<usages-collector id="statistics.file.types.open">
|
|
||||||
<counts>
|
|
||||||
<entry key="CSS" value="1" />
|
|
||||||
<entry key="PHP" value="2" />
|
|
||||||
<entry key="htaccess" value="1" />
|
|
||||||
</counts>
|
|
||||||
</usages-collector>
|
|
||||||
<usages-collector id="statistics.file.extensions.edit">
|
|
||||||
<counts>
|
|
||||||
<entry key="css" value="447" />
|
|
||||||
<entry key="php" value="205" />
|
|
||||||
</counts>
|
|
||||||
</usages-collector>
|
|
||||||
<usages-collector id="statistics.file.types.edit">
|
|
||||||
<counts>
|
|
||||||
<entry key="CSS" value="447" />
|
|
||||||
<entry key="PHP" value="205" />
|
|
||||||
</counts>
|
|
||||||
</usages-collector>
|
|
||||||
</session>
|
|
||||||
</component>
|
|
||||||
<component name="FileEditorManager">
|
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
|
||||||
<file pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/index.php">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="240">
|
|
||||||
<caret line="16" column="32" selection-start-line="16" selection-start-column="32" selection-end-line="16" selection-end-column="32" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/navbar.php">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="465">
|
|
||||||
<caret line="31" column="10" selection-start-line="31" selection-start-column="10" selection-end-line="31" selection-end-column="10" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/assets/css/style_index.css">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="15">
|
|
||||||
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
</leaf>
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
|
||||||
</component>
|
|
||||||
<component name="IdeDocumentHistory">
|
|
||||||
<option name="CHANGED_PATHS">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/navbar_imie.php" />
|
|
||||||
<option value="$PROJECT_DIR$/navbar.php" />
|
|
||||||
<option value="$PROJECT_DIR$/index.php" />
|
|
||||||
<option value="$PROJECT_DIR$/assets/css/style_index.css" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
|
||||||
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
|
||||||
<component name="JsGulpfileManager">
|
|
||||||
<detection-done>true</detection-done>
|
|
||||||
<sorting>DEFINITION_ORDER</sorting>
|
|
||||||
</component>
|
|
||||||
<component name="PhpServers">
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectFrameBounds" fullScreen="true">
|
|
||||||
<option name="y" value="23" />
|
|
||||||
<option name="width" value="1280" />
|
|
||||||
<option name="height" value="740" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
||||||
<component name="ProjectView">
|
|
||||||
<navigator proportions="" version="1">
|
|
||||||
<foldersAlwaysOnTop value="true" />
|
|
||||||
</navigator>
|
|
||||||
<panes>
|
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="ProjectPane">
|
|
||||||
<subPane>
|
|
||||||
<expand>
|
|
||||||
<path>
|
|
||||||
<item name="project" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="project" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="project" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="project" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="assets" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
</expand>
|
|
||||||
<select />
|
|
||||||
</subPane>
|
|
||||||
</pane>
|
|
||||||
</panes>
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
||||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
|
||||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="RunDashboard">
|
|
||||||
<option name="ruleStates">
|
|
||||||
<list>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="StatusDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="SvnConfiguration">
|
|
||||||
<configuration />
|
|
||||||
</component>
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="fadbc7d1-5187-462c-8e18-595bb22b7d4e" name="Default Changelist" comment="" />
|
|
||||||
<created>1543220472616</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1543220472616</updated>
|
|
||||||
<workItem from="1543220476187" duration="647000" />
|
|
||||||
<workItem from="1543222406237" duration="1278000" />
|
|
||||||
<workItem from="1543224746578" duration="3566000" />
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TimeTrackingManager">
|
|
||||||
<option name="totallyTimeSpent" value="5491000" />
|
|
||||||
</component>
|
|
||||||
<component name="ToolWindowManager">
|
|
||||||
<frame x="0" y="0" width="1280" height="800" extended-state="0" />
|
|
||||||
<editor active="true" />
|
|
||||||
<layout>
|
|
||||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25767368" />
|
|
||||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
|
||||||
<window_info id="Favorites" order="2" side_tool="true" />
|
|
||||||
<window_info anchor="bottom" id="Message" order="0" />
|
|
||||||
<window_info anchor="bottom" id="Find" order="1" />
|
|
||||||
<window_info anchor="bottom" id="Run" order="2" />
|
|
||||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
|
||||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
|
||||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
|
||||||
<window_info anchor="bottom" id="TODO" order="6" />
|
|
||||||
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
|
||||||
<window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
|
|
||||||
<window_info anchor="bottom" id="Version Control" order="9" show_stripe_button="false" />
|
|
||||||
<window_info anchor="bottom" id="Terminal" order="10" />
|
|
||||||
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
|
|
||||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
|
||||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
|
||||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
|
||||||
<window_info anchor="right" id="Database" order="3" />
|
|
||||||
</layout>
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="1" />
|
|
||||||
</component>
|
|
||||||
<component name="VcsContentAnnotationSettings">
|
|
||||||
<option name="myLimit" value="2678400000" />
|
|
||||||
</component>
|
|
||||||
<component name="editorHistoryManager">
|
|
||||||
<entry file="file://$PROJECT_DIR$/.htaccess" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/navbar.php">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="465">
|
|
||||||
<caret line="31" column="10" selection-start-line="31" selection-start-column="10" selection-end-line="31" selection-end-column="10" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/assets/css/style_index.css">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="15">
|
|
||||||
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/index.php">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="240">
|
|
||||||
<caret line="16" column="32" selection-start-line="16" selection-start-column="32" selection-end-line="16" selection-end-column="32" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
1
project/assets/html/includes/footer.html
Normal file
1
project/assets/html/includes/footer.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<div>@Copyright 2018 HIFIVE</div>
|
8
project/assets/html/includes/head.html
Normal file
8
project/assets/html/includes/head.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>Page Title</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
|
||||||
|
<script src="main.js"></script>
|
||||||
|
</head>
|
1
project/assets/html/includes/header.html
Normal file
1
project/assets/html/includes/header.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<nav>pouet</nav>
|
13
project/assets/html/index.html
Normal file
13
project/assets/html/index.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head></head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<tag type="includes" file="header" />
|
||||||
|
</header>
|
||||||
|
<footer>
|
||||||
|
<tag type="includes" file="footer" />
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1 +1,15 @@
|
|||||||
|
<?php
|
||||||
/* Fichier qui va gerer la creation de la page et la redirection au cas ou */
|
/* Fichier qui va gerer la creation de la page et la redirection au cas ou */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$_GET['page'] = trim($_GET['page'], '/');
|
||||||
|
$_GET['page'] = explode('/', $_GET['page'])[0];
|
||||||
|
if($_GET['page'] == '') $_GET['page'] = 'index';
|
||||||
|
|
||||||
|
// var_dump($_POST);
|
||||||
|
// var_dump($_GET);
|
||||||
|
|
||||||
|
include_once "tagHandler.php";
|
||||||
|
$file = file_get_contents("../html/".$_GET["page"].".html");
|
||||||
|
echo loadTags($file, false);
|
@ -137,6 +137,18 @@ class author extends tag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class includes extends tag {
|
||||||
|
public function render() {
|
||||||
|
$el = $this->getDOM();
|
||||||
|
$doc = $this->getDoc();
|
||||||
|
$attr = $el->getAttribute("file");
|
||||||
|
$t = $doc->createDocumentFragment();
|
||||||
|
$p = file_get_contents("../html/includes/".$attr.".html");
|
||||||
|
$t->appendXML($p);
|
||||||
|
$el->parentNode->appendChild($t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* input <tag type="loop" for="(table)" limit="(nombre-max généré)">
|
* input <tag type="loop" for="(table)" limit="(nombre-max généré)">
|
||||||
@ -243,7 +255,7 @@ function renameTag( DOMElement $oldTag, $newTagName ) {
|
|||||||
|
|
||||||
|
|
||||||
//testing purpose
|
//testing purpose
|
||||||
$content = file_get_contents("./test.html");
|
//$content = file_get_contents("./test.html");
|
||||||
|
|
||||||
|
|
||||||
function loadTags($ctnt, $debug) {
|
function loadTags($ctnt, $debug) {
|
||||||
@ -253,6 +265,13 @@ function loadTags($ctnt, $debug) {
|
|||||||
libxml_clear_errors();
|
libxml_clear_errors();
|
||||||
$list = $dom->getElementsByTagName("tag");
|
$list = $dom->getElementsByTagName("tag");
|
||||||
|
|
||||||
|
|
||||||
|
$head = $dom->getElementsByTagName("head");
|
||||||
|
$t = $dom->createDocumentFragment();
|
||||||
|
$p = file_get_contents("../html/includes/head.html");
|
||||||
|
$t->appendXML($p);
|
||||||
|
$head->item(0)->appendChild($t);
|
||||||
|
|
||||||
for ($i=0; $i < $list->count(); $i++) {
|
for ($i=0; $i < $list->count(); $i++) {
|
||||||
$lst = $list->item($i);
|
$lst = $list->item($i);
|
||||||
$tgs = $lst->getAttribute("type");
|
$tgs = $lst->getAttribute("type");
|
||||||
@ -270,5 +289,3 @@ function loadTags($ctnt, $debug) {
|
|||||||
$res = $dom->saveHTML();
|
$res = $dom->saveHTML();
|
||||||
echo $res;
|
echo $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTags($content, $debug);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user