Bläddra i källkod

incorporating Joana's changes (plus some tweaks)

main
Simon Bowie 2 år sedan
förälder
incheckning
354fe501e9
5 ändrade filer med 119 tillägg och 46 borttagningar
  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 Visa fil

@@ -22,65 +22,71 @@ def index():
# route for expanding theme page
@hidden.route('/hidden/expanding/')
def expanding():
core = 'expanding'
with open('content/section_3/expanding.md', 'r') as f:
text = f.read()
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
@hidden.route('/hidden/active/')
def active():
core = 'active'
with open('content/section_3/active.md', 'r') as f:
text = f.read()
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
@hidden.route('/hidden/secret/')
def secret():
core = 'secret'
with open('content/section_3/secret.md', 'r') as f:
text = f.read()
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
@hidden.route('/hidden/leaking/')
def leaking():
core = 'leaking'
with open('content/section_3/leaking.md', 'r') as f:
text = f.read()
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
@hidden.route('/hidden/working/')
def working():
core = 'working'
with open('content/section_3/working.md', 'r') as f:
text = f.read()
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
@hidden.route('/hidden/resourceful/')
def resourceful():
core = 'resourceful'
with open('content/section_3/resourceful.md', 'r') as f:
text = f.read()
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 Visa fil

@@ -94,7 +94,7 @@ body {
h1, .h1 {
font-family: var(--title-font) !important;
font-size: var(--title-fontsize) !important;
-webkit-text-stroke-width: 0.09rem;
-webkit-text-stroke-width: 0.08rem;
-webkit-text-stroke-color: black;
letter-spacing: -0.15rem;
}
@@ -119,6 +119,8 @@ p {

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

/* overwrite */
@@ -382,6 +384,66 @@ canvas > * {
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 ****************/

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

+ 5
- 13
web/app/templates/base.html Visa fil

@@ -36,20 +36,12 @@
{% endblock %}

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

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

</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>

</html>
</html>

+ 10
- 8
web/app/templates/index.html Visa fil

@@ -7,7 +7,7 @@
<!-- 👁 ⓘ ⅈ ✍ ⁐ -->
</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">
<!-- random titles -->
<a href="{{ url_for('interventions.ten_random_titles') }}">a poetics of titles</a>
@@ -90,7 +90,7 @@
</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>

<div class="info" style="display: none;">
@@ -99,10 +99,12 @@
</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 %}

{% 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 Visa fil

@@ -2,9 +2,11 @@

{% 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 %}

@@ -12,9 +14,14 @@

{% else %}

<div class="themeResults">

{% 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:

@@ -23,7 +30,7 @@
</p>

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

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

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

<div class="mt-2 mb-5 search-links">
<!-- <div class="search-links">
<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">
{{ result['application_id'] }}
</span>
</a>
</p>
</div>
</div> -->

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

</div>

{% endif %}

</div>

{% endblock %}

Laddar…
Avbryt
Spara