Browse Source

incorporating Joana's changes (plus some tweaks)

main
Simon Bowie 2 years ago
parent
commit
354fe501e9
5 changed files with 119 additions and 46 deletions
  1. +18
    -12
      web/app/hidden.py
  2. +63
    -1
      web/app/static/styles/custom.css
  3. +5
    -13
      web/app/templates/base.html
  4. +10
    -8
      web/app/templates/index.html
  5. +23
    -12
      web/app/templates/theme.html

+ 18
- 12
web/app/hidden.py View File

# route for expanding theme page # route for expanding theme page
@hidden.route('/hidden/expanding/') @hidden.route('/hidden/expanding/')
def expanding(): def expanding():
core = 'expanding'
with open('content/section_3/expanding.md', 'r') as f: with open('content/section_3/expanding.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('expanding', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)


# route for active theme page # route for active theme page
@hidden.route('/hidden/active/') @hidden.route('/hidden/active/')
def active(): def active():
core = 'active'
with open('content/section_3/active.md', 'r') as f: with open('content/section_3/active.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('active', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)


# route for secret theme page # route for secret theme page
@hidden.route('/hidden/secret/') @hidden.route('/hidden/secret/')
def secret(): def secret():
core = 'secret'
with open('content/section_3/secret.md', 'r') as f: with open('content/section_3/secret.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('secret', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)


# route for leaking theme page # route for leaking theme page
@hidden.route('/hidden/leaking/') @hidden.route('/hidden/leaking/')
def leaking(): def leaking():
core = 'leaking'
with open('content/section_3/leaking.md', 'r') as f: with open('content/section_3/leaking.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('leaking', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)


# route for working theme page # route for working theme page
@hidden.route('/hidden/working/') @hidden.route('/hidden/working/')
def working(): def working():
core = 'working'
with open('content/section_3/working.md', 'r') as f: with open('content/section_3/working.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('working', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)


# route for resourceful theme page # route for resourceful theme page
@hidden.route('/hidden/resourceful/') @hidden.route('/hidden/resourceful/')
def resourceful(): def resourceful():
core = 'resourceful'
with open('content/section_3/resourceful.md', 'r') as f: with open('content/section_3/resourceful.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)


results = solr.get_number_random_records('resourceful', 10)
results = solr.get_number_random_records(core, 10)


return render_template('theme.html', text=text, results=results)
return render_template('theme.html', text=text, results=results, core=core)

+ 63
- 1
web/app/static/styles/custom.css View File

h1, .h1 { h1, .h1 {
font-family: var(--title-font) !important; font-family: var(--title-font) !important;
font-size: var(--title-fontsize) !important; font-size: var(--title-fontsize) !important;
-webkit-text-stroke-width: 0.09rem;
-webkit-text-stroke-width: 0.08rem;
-webkit-text-stroke-color: black; -webkit-text-stroke-color: black;
letter-spacing: -0.15rem; letter-spacing: -0.15rem;
} }


.contrast { .contrast {
color: var(--color-lightyellow) !important; color: var(--color-lightyellow) !important;
-webkit-text-stroke-width: 0.08rem;
-webkit-text-stroke-color: var(--color-lightyellow) !important;
} }


/* overwrite */ /* overwrite */
border-bottom: 0.20rem var(--color-lightyellow) solid; border-bottom: 0.20rem var(--color-lightyellow) solid;
} }


/* THEMES */

.themes {
margin: 0% 20%;
}

.themes p {
margin: 2rem 0rem;
}

.allThemes {
display: flex;
width: 100%;
justify-content: space-around;
flex-wrap: wrap;
}

.allThemes a {
text-decoration: none;
padding: 3rem 1rem;
margin: 2rem 0rem;
border-radius: 10rem;
background-color: var(--color-lightyellow);
}
.allThemes a:hover {
background-color: var(--color-light-gray);
}

.themeResults {
margin: 2rem 0rem;
width: 100%;
display: grid;
grid-column-gap: 0px;
grid-template-columns: 33.3% 33.3% 33.3%;
}

.eachthemeResult {
text-align: center;
margin: 0.5rem 0rem;
padding: 1rem;
border-radius: 50rem;
background-color: var(--color-lightyellow);
}

.eachthemeResult a {
text-decoration: none;
}

.eachthemeResult p {
margin: 0rem !important;
}

.eachthemeResult:nth-child(even) {
margin: 0.5rem 0.5rem;
}

.eachthemeResult:hover {
background-color: var(--color-light-gray);
}

/***************** MOBILE ****************/ /***************** MOBILE ****************/


@media screen and (min-width:0px) and (max-width: 768px) { @media screen and (min-width:0px) and (max-width: 768px) {

+ 5
- 13
web/app/templates/base.html View File

{% endblock %} {% endblock %}


<main class="flex-shrink-0"> <main class="flex-shrink-0">
<div class="container-fluid p-5 mb-5">

<div class="container-fluid p-5 mb-5">
{% block content %} {% block content %}
{% endblock %} {% endblock %}

</div> </div>
</main>

<footer class="footer py-3 mt-auto bg-light">
<div class="container">
<span class="text-muted">Data from the <a href="https://www.epo.org/">European Patent Office's</a> <a href="https://worldwide.espacenet.com/">Espacenet patent search engine</a> and reconfigured by Goldsmiths, University of London's Archival Conversations project.</span>
</div>
</footer>

</main>
{% block footer %}
{% endblock %}
</body> </body>

</html>
</html>

+ 10
- 8
web/app/templates/index.html View File

<!-- 👁 ⓘ ⅈ ✍ ⁐ --> <!-- 👁 ⓘ ⅈ ✍ ⁐ -->
</div> </div>


<div class="index-row button-search random-interferences">
<div class="index-row button-search random-interferences mt-5">
<div class="col text-center p-2"> <div class="col text-center p-2">
<!-- random titles --> <!-- random titles -->
<a href="{{ url_for('interventions.ten_random_titles') }}">a poetics of titles</a> <a href="{{ url_for('interventions.ten_random_titles') }}">a poetics of titles</a>
</div> </div>




<div class="col text-center button-search button-hidden-off p-2">
<div class="col text-center button-search button-hidden-off p-2 mb-5">
<a href="">off the record</a> <a href="">off the record</a>


<div class="info" style="display: none;"> <div class="info" style="display: none;">
</div> </div>
</div> </div>


<div>
<p class="about-text">Performing Patents Otherwise is a search engine, a dataset and a series of interferences in searching 320.000 clothing patents. Searching is a creative act. Search engines expose some parts of the archive, obscure others, and can even render visible what’s not in the archive. Performing Patents Otherwise queries patent data, and the search categories and techniques that make this data sort-, relate- and knowable.
<a href="about">Continue reading...</a>
</p>
</div>

{% endblock %} {% endblock %}

{% block footer %}
<footer class="footer mt-5 py-3 bg-light">
<div class="container">
<span class="text-muted">Data from the <a href="https://www.epo.org/">European Patent Office's</a> <a href="https://worldwide.espacenet.com/">Espacenet patent search engine</a> and reconfigured by Goldsmiths, University of London's Archival Conversations project.</span>
</div>
</footer>
{% endblock%}

+ 23
- 12
web/app/templates/theme.html View File



{% block content %} {% block content %}


{{ text|safe }}
<a href="/contents/" class="arrow-back h1 text-left" title="back to index"> ⇽ </a>

<div class="themes">


<hr>
{{ text|safe }}


{% if 'error' in results %} {% if 'error' in results %}




{% else %} {% else %}


<div class="themeResults">

{% for result in results %} {% for result in results %}


<p class="h1">
<div class="eachthemeResult">
<a href="{{ url_for('search.id_search', id=result['id'], core=core) }}">

<p class="">


Year: Year:


</p> </p>


{% if result['title'] is defined %} {% if result['title'] is defined %}
<p class="mb-2 mt-5">
<p class="">
<span class="emphasis">Title:</span> <span class="emphasis">Title:</span>
<span class="result-entry"> <span class="result-entry">
{{ result['title'] }} {{ result['title'] }}
{% endif %} {% endif %}


{% if result['country'] is defined %} {% if result['country'] is defined %}
<p class="mb-2">
<p class="">
<span class="emphasis">Country:</span> <span class="emphasis">Country:</span>
{% if result['country'].name is defined %} {% if result['country'].name is defined %}
{{ result['country'].name }} {{ result['country'].flag }} {{ result['country'].name }} {{ result['country'].flag }}
{% endif %} {% endif %}


{% if result['abstract'] is defined %} {% if result['abstract'] is defined %}
<p class="mb-2">
<!-- <p class="mb-2">
<span class="emphasis">Abstract:</span> <span class="emphasis">Abstract:</span>
<span class="result-entry"> <span class="result-entry">
{{ result['abstract'] }} {{ result['abstract'] }}
</span> </span>
</p>
</p> -->
{% endif %} {% endif %}


<div class="mt-2 mb-5 search-links">
<!-- <div class="search-links">
<p> <p>
<span class="emphasis">European Patent Office PDF:</span>
<a href="{{ url_for('search.id_search', id=result['id'], core='all') }}">
<span class="emphasis">Link:</span>
<span class="result-entry"> <span class="result-entry">
{{ result['application_id'] }} {{ result['application_id'] }}
</span> </span>
</a>
</p> </p>
</div>
</div> -->


</a>
</div>
{% endfor %} {% endfor %}


</div>

{% endif %} {% endif %}


</div>

{% endblock %} {% endblock %}

Loading…
Cancel
Save