您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

132 行
5.0KB

  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <div class="cell-margin grid mt-16 lg:grid-cols-2">
  4. <div class="left ">
  5. <div class="mb-4 capitalize">{{ resource['type'] }}</div>
  6. <div class="lg:border-r-2 lg:border-black lg:pr-8">
  7. <h2 class="block-margin huge-title {{ resource['type'] }}">
  8. {% block title %}
  9. {% autoescape false %}
  10. {{ resource['name'] | replace(" ","<br>") }}
  11. {% endautoescape %}
  12. {% endblock %}
  13. </h2>
  14. {% if current_user.is_authenticated %}
  15. {% if resource['type'] == 'tool' %}
  16. <div class="row text-center py-3">
  17. <a href="{{ url_for('tool.edit_tool', tool_id=resource['id']) }}">
  18. <span class="">Edit</span>
  19. </a>
  20. </div>
  21. {% elif resource['type'] == 'practice' %}
  22. <div class="row text-center py-3">
  23. <a href="{{ url_for('practice.edit_practice', practice_id=resource['id']) }}">
  24. <span class="">Edit</span>
  25. </a>
  26. </div>
  27. {% endif %}
  28. {% endif %}
  29. <div class="facts">
  30. {% if resource['description'] %}
  31. <div class="">
  32. <h3>Description</h3>
  33. {{ resource['description'] }}
  34. </div>
  35. {% endif %}
  36. <!-- fields for tools -->
  37. {% if resource['developer'] %}
  38. <div class="">
  39. <h3>Developer</h3>
  40. {% if resource['developerUrl'] %}
  41. <a href="{{ resource['developerUrl'] }}">{{ resource['developer'] }}</a>
  42. {% else %}
  43. {{ resource['developer'] }}
  44. {% endif %}
  45. </div>
  46. {% endif %}
  47. {% if resource['license'] %}
  48. <div class="">
  49. <h3>Software license</h3>
  50. {{ resource['license'] }}
  51. </div>
  52. {% endif %}
  53. {% if resource['scriptingLanguage'] %}
  54. <div class="">
  55. <h3>Software language(s)</h3>
  56. {{ resource['scriptingLanguage'] }}
  57. </div>
  58. {% endif %}
  59. {% if resource['projectUrl'] %}
  60. <div class="">
  61. <h3>Project page</h3>
  62. <a href="{{ resource['projectUrl'] }}">{{ resource['projectUrl'] }}</a>
  63. </div>
  64. {% endif %}
  65. {% if resource['repositoryUrl'] %}
  66. <div class="">
  67. <h3>Code repository</h3>
  68. <a href="{{ resource['repositoryUrl'] }}">{{ resource['repositoryUrl'] }}</a>
  69. </div>
  70. {% endif %}
  71. {% if resource['ingestFormats'] %}
  72. <div class="">
  73. <h3>Import / ingest formats</h3>
  74. {{ resource['ingestFormats'] }}
  75. </div>
  76. {% endif %}
  77. {% if resource['outputFormats'] %}
  78. <div class="">
  79. <h3>Output formats</h3>
  80. {{ resource['outputFormats'] }}
  81. </div>
  82. {% endif %}
  83. {% if resource['status'] %}
  84. <div class="">
  85. <h3>Platform status</h3>
  86. {{ resource['status'] }}
  87. </div>
  88. {% endif %}
  89. <!-- fields for practices -->
  90. {% if resource['longDescription'] %}
  91. <div class="col-span-2">
  92. <h3>Full description</h3>
  93. {{ resource['longDescription']|safe }}
  94. </div>
  95. {% endif %}
  96. {% if resource['experimental'] %}
  97. <div class="col-span-2">
  98. <h3>Experimental uses</h3>
  99. {{ resource['experimental']|safe }}
  100. </div>
  101. {% endif %}
  102. {% if resource['considerations'] %}
  103. <div class="col-span-2">
  104. <h3>Considerations</h3>
  105. <p>{{ resource['considerations']|safe }}</p>
  106. </div>
  107. {% endif %}
  108. {% if resource['references'] %}
  109. <div class="col-span-2">
  110. <h3> Further reading </h3>
  111. <p>{{ resource['references']|safe }}</p>
  112. </div>
  113. {% endif %}
  114. </div>
  115. </div>
  116. </div>
  117. <div class="right p-4 pr-8 lg:p-0 ">
  118. <div class="grid lg:grid-cols-2">
  119. {{ relationships_links(resource) }}
  120. </div>
  121. </div>
  122. </div>
  123. {% endblock %}