themes-details.html.twig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {% set gpm = admin.gpm() %}
  2. {% set installed = gpm.isThemeInstalled(admin.route) %}
  3. <div class="grav-update theme" data-gpm-theme="{{ admin.route }}">
  4. {% if installed and gpm.isThemeUpdatable(admin.route) %}
  5. {% set remote = gpm.getRepositoryTheme(admin.route) %}
  6. <p>
  7. <i class="fa fa-bullhorn"></i>
  8. <strong>v{{ remote.available }}</strong> {{ "PLUGIN_ADMIN.OF_THIS_THEME_IS_NOW_AVAILABLE"|tu }}!
  9. <button class="button button-small secondary" data-download="{{ remote.zipball_url }}">{{ "PLUGIN_ADMIN.UPDATE_THEME"|tu }}</button>
  10. </p>
  11. {% endif %}
  12. </div>
  13. <h1>
  14. {{ theme.name|e }}
  15. {% if admin.isTeamGrav(theme) %}
  16. <small><span class="info-reverse"><i class="fa fa-check-circle" title="Grav Official Theme"></i></span></small>
  17. {% endif %}
  18. {% if theme.symlink %}
  19. <small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"|tu }}">
  20. <i class="fa fa-fw fa-link"></i>
  21. </small>
  22. {% endif %}
  23. <small>{{ theme.version ? 'v' ~ theme.version|e }}</small>
  24. </h1>
  25. <div class="gpm-item-info">
  26. <i class="gpm-item-icon fa fa-fw fa-{{ theme.icon }}"></i>
  27. <table>
  28. {% if theme.version %}
  29. <tr>
  30. <td>{{ "PLUGIN_ADMIN.VERSION"|tu }}:</td>
  31. <td>{{ theme.version }}</td>
  32. </tr>
  33. {% endif %}
  34. {% if theme.author %}
  35. <tr>
  36. <td>{{ "PLUGIN_ADMIN.AUTHOR"|tu }}:</td>
  37. <td>
  38. {% if theme.author.url %}
  39. <a href="{{ theme.author.url }}" target="_blank">{{ theme.author.name }}</a>
  40. {% else %}
  41. {{ theme.author.name }}
  42. {% endif %}
  43. {% if theme.author.email %}
  44. - <a href="mailto:{{ theme.author.email }}">{{ theme.author.email }}</a>
  45. {% endif %}
  46. </td>
  47. </tr>
  48. {% endif %}
  49. {% if theme.homepage %}
  50. <tr>
  51. <td>{{ "PLUGIN_ADMIN.HOMEPAGE"|tu }}:</td>
  52. <td><a href="{{ theme.homepage }}" target="_blank">{{ theme.homepage }}</a></td>
  53. </tr>
  54. {% endif %}
  55. {% if theme.demo %}
  56. <tr>
  57. <td>{{ "PLUGIN_ADMIN.DEMO"|tu }}:</td>
  58. <td><a href="{{ theme.demo }}" target="_blank">{{ theme.demo }}</a></td>
  59. </tr>
  60. {% endif %}
  61. {% if theme.bugs %}
  62. <tr>
  63. <td>{{ "PLUGIN_ADMIN.BUG_TRACKER"|tu }}:</td>
  64. <td><a href="{{ theme.bugs }}" target="_blank">{{ theme.bugs }}</a></td>
  65. </tr>
  66. {% endif %}
  67. {% if theme.keywords %}
  68. <tr>
  69. <td>{{ "PLUGIN_ADMIN.KEYWORDS"|tu }}:</td>
  70. <td>{{ theme.keywords }}</td>
  71. </tr>
  72. {% endif %}
  73. {% if theme.license %}
  74. <tr>
  75. <td>{{ "PLUGIN_ADMIN.LICENSE"|tu }}:</td>
  76. <td>{{ theme.license }}</td>
  77. </tr>
  78. {% endif %}
  79. {% if theme.description %}
  80. <tr>
  81. <td>{{ "PLUGIN_ADMIN.DESCRIPTION"|tu }}:</td>
  82. <td>{{ theme.description_html }}</td>
  83. </tr>
  84. {% endif %}
  85. {% if theme.readme or theme.homepage %}
  86. {% set readme_link = theme.readme ?: theme.homepage ~ '/blob/develop/README.md' %}
  87. <tr>
  88. <td>{{ "PLUGIN_ADMIN.README"|tu }}:</td>
  89. <td><a href="{{ readme_link }}" target="_blank">{{ readme_link }}</a></td>
  90. </tr>
  91. {% endif %}
  92. </table>
  93. </div>
  94. {% if (installed) %}
  95. {% set data = admin.data('themes/' ~ admin.route) %}
  96. {% include 'partials/blueprints.html.twig' with { data: data, blueprints: data.blueprints } %}
  97. {% if (config.get('system.pages.theme') != admin.route) %}
  98. <div class="button-bar danger">
  99. <span class="danger-zone"></span>
  100. <a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task{{ config.system.param_sep }}uninstall"><i class="fa fa-fw fa-warning"></i>{{ "PLUGIN_ADMIN.REMOVE_THEME"|tu }}</a>
  101. </div>
  102. {% endif %}
  103. {% else %}
  104. <div class="button-bar success">
  105. <a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task{{ config.system.param_sep }}install"><i class="fa fa-fw fa-plus"></i>{{ "PLUGIN_ADMIN.INSTALL_THEME"|tu }}</a>
  106. </div>
  107. {% endif %}