使用git repos将自定义文件放在AdminLTE项目上的位置

时间:2020-01-09 01:27:27

标签: adminlte

使用AdminLTE的新项目(将使用3.0)。我想对其进行结构化,以便在需要时可以从AdminLTE存储库中提取错误修复。由于我以前从未使用过AdminLTE,所以我不知道自己将自己编辑AdminLTE文件的可能性,而不是仅编写自己的文件并根据需要复制AdminLTE示例中的零件和组件。

我应该将自定义文件放在AdminLTE / pages目录中,还是放在与AdminLTE处于同一级别的项目文件夹之外?

我假设一个好的策略是为我的项目创建一个单独的git repo(其中AdminLTE不属于该repo的一部分),然后使用AdminLTE的[只读?] git克隆,可以提取更新和错误修复根据需要。

该项目将有5-10个公共页面(用于营销)和50-60个私有页面(仅用于经过身份验证/登录的用户)。

选择1:将AdminLTE目录与myproject目录保持在同一级别,并且不计划对AdminLTE中的文件进行任何自定义更改(将其视为只读):

/public_html (scope of what apache can see/serve)

    index.php -> sym link to myproject/index.php (not controlled by git?)

    /AdminLTE (git clone of AdminLTE 3.0)
        /dist
            /css
            /js
            /img
        /plugins
            /bootstrap
            /font-awesome

    /myproject (git clone of myproject 1.0)
        index.php (public home page)
        features.php
        testimonials.php
        /user (for logged in users only)
            dashboard.php
            preferences.php
            account.php
        /js
            myproject.js
        /css
            myproject.css

inside of features.php (public page):
  <link rel="stylesheet" href="../AdminLTE/plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="../AdminLTE/dist/css/adminlte.min.css">
  <link rel="stylesheet" href="css/myproject.css">

inside of dashboard.php (private page):
  <link rel="stylesheet" href="../../AdminLTE/plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="../../AdminLTE/dist/css/adminlte.min.css">
  <link rel="stylesheet" href="../css/myproject.css">

选择2:将myproject目录放在AdminLTE / pages目录中

/public_html (scope of what apache can see/serve)

    index.php -> sym link to AdminLTE/pages/myproject/index.php (not controlled by git?)

    /AdminLTE (git clone of AdminLTE 3.0)
        /dist
            /css
            /js
            /img
        /plugins
            /bootstrap
            /font-awesome
        /pages
            /myproject (git clone of myproject 1.0)
                index.php (public home page)
                features.php
                testimonials.php
                /user (for logged in users only)
                    dashboard.php
                    preferences.php
                    account.php
                /js
                    myproject.js
                /css
                    myproject.css

inside of features.php (public page):
  <link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="../../dist/css/adminlte.min.css">
  <link rel="stylesheet" href="css/myproject.css">

inside of dashboard.php (private page):
  <link rel="stylesheet" href="../../../plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="../../../dist/css/adminlte.min.css">
  <link rel="stylesheet" href="../css/myproject.css">

0 个答案:

没有答案