Changes to the mineral practice page
This commit is contained in:
@@ -1,28 +1,28 @@
|
|||||||
{% extends "three_d_viewer/base.html" %}
|
{% extends "three_d_viewer/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="pushDown"></div>
|
<div id="pushDown"></div>
|
||||||
<div id="mainText">
|
<div id="mainText">
|
||||||
<p><h3>Welcome to 3DVOL – Minerals.</h3><br><br>
|
<p><h3>Welcome to 3DVOL – Minerals.</h3><br><br>
|
||||||
This website contains a three-dimensional virtual object library of the most important rock-forming minerals making up planet Earth. You will find information on:<br>
|
This website contains a three-dimensional virtual object library of the most important rock-forming minerals making up planet Earth. You will find information on:<br>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Which are the most common minerals on Earth?</li>
|
<li>Which are the most common minerals on Earth?</li>
|
||||||
<li>What are their most important physical and chemical properties?</li>
|
<li>What are their most important physical and chemical properties?</li>
|
||||||
<li>Where in the Earth and under which physical conditions do they form?</li>
|
<li>Where in the Earth and under which physical conditions do they form?</li>
|
||||||
<li>How can they be identified in hand specimen?</li>
|
<li>How can they be identified in hand specimen?</li>
|
||||||
</ul>
|
</ul>
|
||||||
A mineral is typically defined as an inorganic solid with a particular chemical composition and a characteristic, periodic atomic structure.
|
A mineral is typically defined as an inorganic solid with a particular chemical composition and a characteristic, periodic atomic structure.
|
||||||
This characteristic atomic make-up is often reflected in the macroscopic crystalline structure of a mineral.
|
This characteristic atomic make-up is often reflected in the macroscopic crystalline structure of a mineral.
|
||||||
The 3D models presented on this website will help you to visualise, study, and memorise these beautiful and often
|
The 3D models presented on this website will help you to visualise, study, and memorise these beautiful and often
|
||||||
complex crystal structures as well as other diagnostic features of minerals.
|
complex crystal structures as well as other diagnostic features of minerals.
|
||||||
<br>
|
<br>
|
||||||
We hope that you enjoy using 3DVOL.
|
We hope that you enjoy using 3DVOL.
|
||||||
<br><br>
|
<br><br>
|
||||||
Your 3DVOL team
|
Your 3DVOL team
|
||||||
<br><br>
|
<br><br>
|
||||||
Acknowledgements
|
Acknowledgements
|
||||||
<br>
|
<br>
|
||||||
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
||||||
</p>
|
</p>
|
||||||
</div><!-- CLOSE MAINTEXT !-->
|
</div><!-- CLOSE MAINTEXT !-->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -2,52 +2,50 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
<div id='mineralMenu'>
|
<div id='mineralMenu'>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="has-sub mainitem"><a href="#">Select a mineral</a>
|
<li class="has-sub mainitem"><a href="#">Select a mineral</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href='#mineralOne' name="mineralOne"><span>Mineral 1</span></a></li>
|
{% for sample in active_samples %}
|
||||||
<li><a href='#mineralTwo' name="mineralTwo"><span>Mineral 2</span></a></li>
|
<li>{{ sample.name }}</li>
|
||||||
<li><a href='#mineralThree' name="mineralThree"><span>Mineral 3</span></a></li>
|
{% endfor %}
|
||||||
<li><a href='#mineralFour' name="mineralFour"><span>Mineral 4</span></a></li>
|
</ul>
|
||||||
<li class="last"><a href='#mineralFive' name="mineralFive"><span>Mineral 5</span></a></li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</div><!-- close MINERALMENU !-->
|
||||||
</ul>
|
<div id="mineralContainer">
|
||||||
</div><!-- close MINERALMENU !-->
|
<div id="mineralOne" style="display:none">
|
||||||
<div id="mineralContainer">
|
<h1 class="subHeadings">Mineral name here</h1>
|
||||||
<div id="mineralOne" style="display:none">
|
<h2 class="theoryHeadings">Physical properties</h2>
|
||||||
<h1 class="subHeadings">Mineral name here</h1>
|
<p>Info about the mineral here</p>
|
||||||
<h2 class="theoryHeadings">Physical properties</h2>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
<h2 class="theoryHeadings">Diagnostic features</h2>
|
||||||
<p>Info about the mineral here</p>
|
<p>Info about the mineral here</p>
|
||||||
<h2 class="theoryHeadings">Diagnostic features</h2>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
<h2 class="theoryHeadings">Geological significance</h2>
|
||||||
<p>Info about the mineral here</p>
|
<p>Info about the mineral here</p>
|
||||||
<h2 class="theoryHeadings">Geological significance</h2>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
<p>Info about the mineral here</p>
|
||||||
<p>Info about the mineral here</p>
|
|
||||||
<p>Info about the mineral here</p>
|
|
||||||
</div>
|
|
||||||
<div id="mineralTwo" style="display:none">
|
|
||||||
<p>Info about mineral 2</p>
|
|
||||||
</div>
|
|
||||||
<div id="mineralThree" style="display:none">
|
|
||||||
<p>Info about mineral 3</p>
|
|
||||||
</div>
|
|
||||||
<div id="mineralFour" style="display:none">
|
|
||||||
<p>Info about mineral 4</p>
|
|
||||||
</div>
|
|
||||||
<div id="mineralFive" style="display:none">
|
|
||||||
<p>Info about mineral 5</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="virtualObject">
|
<div id="mineralTwo" style="display:none">
|
||||||
|
<p>Info about mineral 2</p>
|
||||||
|
</div>
|
||||||
|
<div id="mineralThree" style="display:none">
|
||||||
|
<p>Info about mineral 3</p>
|
||||||
|
</div>
|
||||||
|
<div id="mineralFour" style="display:none">
|
||||||
|
<p>Info about mineral 4</p>
|
||||||
|
</div>
|
||||||
|
<div id="mineralFive" style="display:none">
|
||||||
|
<p>Info about mineral 5</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<img src="images/rock_example.jpeg" class="example" />
|
<div id="virtualObject">
|
||||||
</div>
|
<img src="images/rock_example.jpeg" class="example" />
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -8,10 +8,11 @@ urlpatterns = patterns(
|
|||||||
url(r'^$', views.HomeView.as_view(), name='home'),
|
url(r'^$', views.HomeView.as_view(), name='home'),
|
||||||
url(r'^$', generic.TemplateView.as_view(template_name="three_d_viewer/home.html"), name='home'),
|
url(r'^$', generic.TemplateView.as_view(template_name="three_d_viewer/home.html"), name='home'),
|
||||||
url(r'^minerals_theory/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_theory.html"), name='minerals_theory'),
|
url(r'^minerals_theory/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_theory.html"), name='minerals_theory'),
|
||||||
url(r'^minerals_practice/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
url(r'^minerals_practice/$', views.MineralPracticeView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
||||||
url(r'^minerals_selftest/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_selftest.html"), name='minerals_selftest'),
|
url(r'^minerals_selftest/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_selftest.html"), name='minerals_selftest'),
|
||||||
url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
|
url(r'^minerals/(?P<pk>\d+)/$', views.MineralPracticeView.as_view(), name='mineral_detail'),
|
||||||
url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
#url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
|
||||||
|
#url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
||||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
||||||
{'document_root': settings.MEDIA_ROOT}),
|
{'document_root': settings.MEDIA_ROOT}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ Define the views for the Django MVC
|
|||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
from itertools import chain
|
||||||
|
from operator import attrgetter
|
||||||
|
|
||||||
from three_d_viewer.models import Sample, Category, Mineral
|
from three_d_viewer.models import Sample, Category, Mineral
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
@@ -24,7 +26,21 @@ class HomeView(generic.ListView):
|
|||||||
filter(active=True).order_by('name')
|
filter(active=True).order_by('name')
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
class MineralPracticeView(generic.ListView):
|
||||||
|
model = Sample
|
||||||
|
template_name = 'three_d_viewer/minerals_practice.html'
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
context = super(MineralPracticeView, self).get_context_data(**kwargs)
|
||||||
|
cat = Category.objects.get(name='Minerals')
|
||||||
|
#context['active_samples'] = cat.active_samples
|
||||||
|
result = cat.active_samples
|
||||||
|
|
||||||
|
for child in cat.active_children:
|
||||||
|
result = chain(result, child.active_samples)
|
||||||
|
|
||||||
|
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||||
|
return context
|
||||||
|
|
||||||
class DetailView(generic.DetailView):
|
class DetailView(generic.DetailView):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user