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

feat: Add stgall tei route and sample tei output #1132

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
18a4fdb
feat: Add stgall tei route and sample tei output
pghorpade Nov 17, 2023
58adb7c
add styling
axamei Nov 17, 2023
e41e37d
fix: xslt styles
pghorpade Nov 27, 2023
6c8544f
update styling for accordion
axamei Nov 28, 2023
734d192
Merge branch 'main' into APPS-2464
pghorpade Nov 28, 2023
3d18b28
Merge branch 'main' into APPS-2464
github-actions[bot] Nov 29, 2023
bad35ec
fix: subwork item styling
pghorpade Nov 29, 2023
d4ce365
fix: togglelinks for work items
pghorpade Nov 30, 2023
8a06a19
update styling
axamei Dec 5, 2023
5c3e299
fix: update tei route
pghorpade Dec 6, 2023
0627cd3
fix: add active class and beliograpghy link class with ul and li tags…
pghorpade Dec 7, 2023
c7470cd
fix: replace _ with .
pghorpade Dec 7, 2023
40341c9
Merge branch 'main' into APPS-2464
github-actions[bot] Dec 12, 2023
674dc5b
Merge branch 'main' into APPS-2464
github-actions[bot] Jan 5, 2024
4c0efda
Merge branch 'main' into APPS-2464
github-actions[bot] Jan 12, 2024
d46d5fc
Merge branch 'main' into APPS-2464
github-actions[bot] Jan 17, 2024
f77bb8e
Merge branch 'main' into APPS-2464
github-actions[bot] Jan 19, 2024
d6d8cd8
Merge branch 'main' into APPS-2464
github-actions[bot] Jan 19, 2024
1b252ff
Merge branch 'main' into APPS-2464
github-actions[bot] Feb 22, 2024
44ec429
Merge branch 'main' into APPS-2464
github-actions[bot] Mar 21, 2024
bfc1423
Merge branch 'main' into APPS-2464
github-actions[bot] Jun 13, 2024
3f5130f
Merge branch 'main' into APPS-2464
github-actions[bot] Jun 14, 2024
39b5f38
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 5, 2024
9557749
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 9, 2024
af5d103
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 16, 2024
8d3aa4f
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 20, 2024
c5bbe21
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 23, 2024
28f3bf7
Merge branch 'main' into APPS-2464
github-actions[bot] Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $ucla-darker-blue: #005587; // (0, 85, 135)
$ucla-darkest-blue: #003b5c; // (0, 59, 92)
$ucla-lighter-blue: #8bb8e8;
$ucla-lightest-blue: #c3d7ee;
$ucla-lightest-blue-2: #eaf2fb;
$ucla-gold: #ffd100;
$ucla-darker-gold: #ffc72c;
$ucla-darkest-gold: #ffb81c;
279 changes: 279 additions & 0 deletions app/assets/stylesheets/theme_ursus/pages/_ur-static-stgallpage.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
/* Add your CSS styles here */
.stgall-container {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;

}

.stgall-work-title,
.stgall-transcription-title,
.stgall-bibliograghy-title {
font-weight: bold;
font-style: italic;
}

.stgall-subnav {
display: flex;
justify-content: space-between;
width: 100%;
margin-bottom: 2rem;
}

.stgall-subnav-item {
flex: 1;
background-color: #f0f0f0;
padding: 10px;
border: 1px solid #ccc;
}

.stagll-flex-container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin: 20px;
}

.stgall-title {
display: flex;
flex-direction: row;
align-items: center;
}

.stgall-work-item-bibliography,
.stgall-work-item-content,
.stgall-work-item-transcription {
margin-top: -0.5rem;
}

.stgall-work-item-bibliography .WorkBibiliography {
display: flex;
flex-direction: column;
gap: 16px;
list-style-type: none;

> li {
display: flex;
flex-direction: column;
gap: 8px;
}

p {
margin-bottom: 4px;
}
}

.stgall-contents {
display: flex;
flex-direction: column;

justify-content: flex-start;
}

.toggleDivWorkItem .stgall-work-title {
padding: 1rem;
font-size: 16px;
}

.toggleDivWorkItem .stgall-contents {
flex-direction: column;

justify-content: flex-start;

br {
display: none;
}

.stgall-work-item {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 8px;

&:nth-child(odd) {
background-color: rgba($gray-10,0.5);
}

.stgall-work-item-heading {
display: flex;
gap: 8px;
font-weight: bold;
}

h4 {
margin: 1rem 0;
font-size: 14px;
font-weight: bold;
}

.stgall-work-item-bibliography {
padding: 0;
}

.WorkBibiliography {
display: flex;
flex-direction: column;
gap: 16px;
list-style-type: none;
font-size: 12px;

> li {
display: flex;
flex-direction: column;
gap: 4px;
}
}

.stgall-work-item-bibliography + h4,
.document-metadata + h4 {
border-top: 1px dotted $ucla-darker-blue;
padding-top: 1.5rem;
}
}
}

.stgall-transcription-source {
font-size: 14px;
}

.stgall-work-item-bibliography .WorkBibliography {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 16px;
list-style-type: none;

> li {
display: flex;
flex-direction: column;
gap: 4px;
}
}
.bibliography-links {
display: inline-flex;
flex-direction: row;
justify-content: flex-start;
gap: 12px;

> li {
display: inline;
}

a {
padding: 1rem 0;
font-size: 10px;
font-weight: 600;
color: $ucla-blue;
text-transform: uppercase;
letter-spacing: 1px;

&::after {
content: "";
width: 11px;
height: 11px;
margin-left: 4px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: contain;
display: inline-block;
}
}
}

.stgall-sub-links {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
gap: 2px;
position: relative;

a,
button {
background-color: $ucla-lightest-blue-2;
color: $ucla-darker-blue;
line-height: 1;
margin: 0.5rem 0 0.5rem;
padding: 0.7rem 1rem;
border: 2px solid transparent;

display: inline-block;
position: relative;
z-index: 2;
top: 2px;

&:hover:not(.active) {
background-color: $ucla-blue;
color: $white;
}

&:focus,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pghorpade after the logic is put in place in the js, you can move 213 and to 208 so that the hover and focus states have the same styling.

&.active {
background-color: $white;
border-color: $ucla-darker-blue;
border-bottom-color: $white;
border-top-width: 6px;
border-top-color: $ucla-blue;
}

&:visited {
background-color: $ucla-lightest-blue-2;
color: $ucla-darker-blue;
}
}
}

.stgall-work-item-bibliography {
padding: 1rem;
}

.stgall-work-item-transcription .stgall-transcriptionSource {
padding: 1rem;
}

.toggleDivWorkItem {
display: none;

border: 2px solid $ucla-darker-blue;
background-color: $white;
}

.stgall-manuscript-contents {
display: flex;

.document__list-metadata-key--ursus {
color: $black;
}
}

.book-level-section {
display: flex;
flex-direction: column;
gap: 16px;
font-size: 14px;

.book-level-item {
display: flex;
flex-direction: column;
gap: 4px;
}

.book-title, .book-level-item > p {
font-weight: bold;
}
}

.stgall-tan_divider > br {
display: none;
}

.stgall-tan_divider {
display: flex;
flex-direction: column;
gap: 1rem;
}

/* Add more styles as needed */
3 changes: 2 additions & 1 deletion app/assets/stylesheets/theme_ursus/theme_ursus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
@import 'theme_ursus/canon-law/_canon-body';
@import 'theme_ursus/canon-law/_canon-table';
@import 'theme_ursus/pages/_ur-static-page';
@import 'theme_ursus/pages/_ur-static-stgallpage';
@import 'theme_ursus/pages/_ur-item-page';
@import 'theme_ursus/pages/_ur-homepage';
@import 'theme_ursus/pages/_ur-homepage';
12 changes: 12 additions & 0 deletions app/controllers/static_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,16 @@ def ursus_privacy; end
def ursus_iiif_guide; end

def version; end

def stgall_tei_msdesc
encoded_id = CGI.escape(params[:id])
# puts(params[:id])
# Your code to render the specific TEI file
# puts "hello from static controller"+ encoded_id
if params[:id].match?(/ark(\:|(%3A))(\/|(%2F)).*(\/|(%2F)).*/)
render template: "static/stgall/#{encoded_id}"
else
render template: "static/stgall/#{params[:id]}"
end
end
end
3 changes: 3 additions & 0 deletions app/views/catalog/work_record--ursus/_note_metadata.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<!-- TABLE OF CONTENTS -->
<dt class='metadata-block__label-key'><%= toc_key %></dt>
<dd class='metadata-block__label-value'><%= raw toc_value %></dd>
<!-- TABLE OF CONTENTS -->
<dt class='metadata-block__label-key'>TEI</dt>
<dd class='metadata-block__label-value'><a href="/stgall/ark:/21198/zz00161mpp/msdesc">Link</a></dd>
</dl>

<hr class='divider divider--ursus'>
Expand Down
Loading