Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

75 muokka list template taulukko muotoon #89

Merged
merged 9 commits into from
Dec 6, 2023
17 changes: 8 additions & 9 deletions tests/integration/references.robot
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Click Submit Link
Click View Link
Go To View Page
View Page Should Be Open

Add Article Successfully
Go To Add Page
Check Reference Type article
Expand All @@ -36,7 +36,7 @@ Add Book Successfully
Go To Add Page
Check Reference Type article
Select From List By Value form_select book
Set Author Maija Makkonen book
Set Author Maija Makkonen book
Set Title Maijan kirja book
Set Publisher WSOY book
Set Year 2000 book
Expand All @@ -54,7 +54,6 @@ Add Inproceedings Successfully
Submit Reference inproceedings
Add Reference Should Succeed


Add Two References Consecutively
Go To Add Page
Check Reference Type inproceedings
Expand All @@ -68,7 +67,7 @@ Add Two References Consecutively
Click Button Submit another reference
Check Reference Type article
Select From List By Value form_select book
Set Author Maija Makkonen book
Set Author Maija Makkonen book
Set Title Maijan kirja book
Set Publisher WSOY book
Set Year 2000 book
Expand All @@ -77,12 +76,10 @@ Add Two References Consecutively

View All Added References
Go To View Page
Click Button Show all references
Page Should Contain P. Mikkola
Page Should Contain Pekka Mikkola
Page Should Contain Maijan artikkeli
Page Should Contain Maijan artikkelikokoelma
Page Should Contain 2011
${count} = SeleniumLibrary.Get Element Count xpath://div[@id='references_container']//hr
${count} = SeleniumLibrary.Get Element Count xpath://tr[@class='reference-row']
# Oletuksena countille, että tietokanta on tyhjä ja lasketaan hr-elementit
# aiempien test casejen lisäämien viitteiden perusteella
Should Be Equal As Integers ${count} 5
Expand All @@ -95,7 +92,9 @@ Add Article Unsuccessfully
Set Title Maijan artikkeli article
Set Journal Maijan artikkelikokoelma article
Submit Reference article
${error} = SeleniumLibrary.Get Element Attribute xpath://div[@id='article']//input[@name='year'] validationMessage
${error} = SeleniumLibrary.Get Element Attribute
... xpath://div[@id='article']//input[@name='year']
... validationMessage
Should Not Be Empty ${error}


Expand Down
186 changes: 140 additions & 46 deletions viiteri/static/styles.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,79 @@
body {
font-family: Arial, sans-serif;
font-family: Arial, sans-serif;
}

.navigation-button {
background-color: #75ACE0;
border-radius: 20px;
background-color: #75ACE0;
border-radius: 20px;
}

.navigation-button:hover {
background-color: #5b9ac8;
background-color: #5b9ac8;
}

.view-reference {
max-width: 80vw;
overflow-wrap: break-word;
.index-list {
font-size: 10px;
line-height: 1;
}

.view-reference-hr {
width: 80%;
margin-left: 0;
border: none;
border-top: 1px solid black;
.index-list-description {
font-size: 10px;
}

.view-text {
color: #482307
table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
}

.view-button {
appearance: button;
background-color: transparent;
background-image: linear-gradient(to bottom, #fff, #f8eedb);
border: 0 solid #e5e7eb;
border-radius: .5rem;
box-sizing: border-box;
color: #482307;
column-gap: 1rem;
cursor: pointer;
display: flex;
font-size: 100%;
font-weight: 700;
line-height: 24px;
margin: 0;
outline: 2px solid transparent;
padding: 1rem 1.5rem;
text-align: center;
text-transform: none;
transition: all .1s cubic-bezier(.4, 0, .2, 1);
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
box-shadow: -6px 8px 10px rgba(81,41,10,0.1),0px 2px 2px rgba(81,41,10,0.2);
display: block;
margin-bottom: 10px;
th, td {
width: 25%;
border: 1px solid #ddd;
padding: 8px;
}

.view-button:active {
background-color: #f3f4f6;
box-shadow: -1px 2px 5px rgba(81,41,10,0.15),0px 1px 1px rgba(81,41,10,0.15);
transform: translateY(0.125rem);
th {
background-color: #f2f2f2;
}

.view-button:focus {
box-shadow: rgba(72, 35, 7, .46) 0 0 0 4px, -6px 8px 10px rgba(81,41,10,0.1), 0px 2px 2px rgba(81,41,10,0.2);
td {
word-wrap: break-word;
max-width: 200px;
}

.reference-details {
background-color: #f9f9f9;
}

.reference-details-labels td {
font-weight: bold;
}

.reference-details-values td {
background-color: white;
}

.reference-row, .reference-details, .button-row {
border-left: 2px solid black;
border-right: 2px solid black;
}

.reference-row {
border-top: 2px solid black;
}

.reference-details:last-of-type {
border-bottom: 2px solid black;
}

.empty-row {
border-top: 2px solid black;
height: 10px;
pointer-events: none;
}

.type-label {
text-align: center;
}

.submit-button {
Expand Down Expand Up @@ -113,4 +124,87 @@ body {
.submit-button:active {
background-color: #298e46;
box-shadow: rgba(20, 70, 32, .2) 0 1px 0 inset;
}

.copy-button {
background-image: linear-gradient(#f7f8fa ,#e7e9ec);
border-color: #adb1b8 #a2a6ac #8d9096;
border-style: solid;
border-width: 1px;
border-radius: 3px;
box-shadow: rgba(255,255,255,.6) 0 1px 0 inset;
box-sizing: border-box;
color: #0f1111;
cursor: pointer;
display: inline-block;
font-family: "Amazon Ember",Arial,sans-serif;
font-size: 14px;
height: 29px;
font-size: 13px;
outline: 0;
overflow: hidden;
padding: 0 11px;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
white-space: nowrap;
min-width: 150px;
margin-right: 200px;
}

.copy-button:active {
background-image: linear-gradient(#e6e7e9, #d0d2d5);
border-color: #8d9096;
box-shadow: rgba(0, 0, 0, .2) 0 1px 2px inset;
transform: translateY(1px);
}

.copy-button:active:hover {
background-image: linear-gradient(#e6e7e9, #d0d2d5);
border-color: #8d9096;
box-shadow: rgba(0, 0, 0, .2) 0 1px 2px inset;
transform: translateY(1px);
}

.bcopy-button:hover {
border-color: #a2a6ac #979aa1 #82858a;
}

.copy-button:focus {
border-color: #e77600;
box-shadow: rgba(228, 121, 17, .5) 0 0 3px 2px;
outline: 0;
}

.delete-button {
background-image: linear-gradient(#ffdddd, #ffcccc);
color: #d33a2c;
border-color: #fabebe;
min-width: 150px;
}

.delete-button:hover {
background-image: linear-gradient(#ffcccc, #ffbbbb);
border-color: #e77600;
}

.delete-button:active {
background-image: linear-gradient(#ffbbbb, #ffaaaa);
border-color: #a2a6ac;
}

.delete-button:focus {
border-color: #e77600;
box-shadow: rgba(228, 121, 17, .5) 0 0 3px 2px;
}

#textarea {
width: 100%;
height: 2000px;
padding: 10px;
border: 1px solid #ccc;
box-sizing: border-box;
}
6 changes: 4 additions & 2 deletions viiteri/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
{% block title %}Home{% endblock %}
{% block content %}
<div>
<p>This is the management tool for BibTex Article references. You can save article, book and inproceedings type references and then view them.</p>
<p>Click on <b>Submit</b> to enter an article reference, and then click on <b>View</b> to view all the saved references.</p>
<p>This is a management tool for <a href="https://www.bibtex.com/g/bibtex-format/">BibTex</a> format references. You can currently save article, book and inproceedings type references and then view them stored in the system. There are <a href="https://www.bibtex.com/e/entry-types/">14 entry types</a> in the BibTex format and we recommend getting acquainted with them first if you are yet unfamiliar with BibTex.</p>

<p>Click on <b>Submit</b> to enter a reference, and then click on <b>View</b> to view all the saved references. Authors are separated in the BibTex format with the word <a href="https://www.bibtex.com/f/author-field/">"and"</a>.</p>

<p>
(The website is a group project as part of the University of Helsinki course <a href="https://studies.helsinki.fi/kurssit/toteutus/hy-opt-cur-2324-e4d8713d-d678-4dba-a41a-576f26e75ac0">Ohjelmistotuotanto</a>, code TKT20006. The group in charge of this site is JEEOVI.)
</p>
Expand Down
Loading