Skip to content
Merged

Trunk #103

Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/azure-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: python-app
path: .
Expand Down
15 changes: 15 additions & 0 deletions static/genericSideViuhti/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ h1, h2, h3, h4, h5, h6{
width: 100%;
> img {
max-width: 120%;
max-height: 60vh;
}
max-width: 512px;
position: relative;
Expand Down Expand Up @@ -138,6 +139,19 @@ h1, h2, h3, h4, h5, h6{
> img {
max-width: 100%;
}
a {
color: #020728;
text-decoration: underline;
}
a:active {
color: #020728;
}
a:visited {
color: #020728;
}
a:hover {
color: $viuhti-violet;
}
}

.speechbubble:after {
Expand Down Expand Up @@ -215,6 +229,7 @@ h1, h2, h3, h4, h5, h6{
justify-content: center;
align-items: center;
gap: $increment-sm;
min-height: 180px;
p, h1, h2, h3, h4, h5, h6 {
width: 100%;
margin-bottom: 0;
Expand Down
12 changes: 6 additions & 6 deletions static/genericSideViuhti/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ $(document).ready(function() {
if (cms_toolbar){
cms_toolbar_height = cms_toolbar.height()
}
console.log(cms_toolbar)
onscroll = (event) => {
get_scroll()
}
set_scroll(0, 0)
$("#scroll_to_top_btn").click(function (){goToTop()})
$("#scroll_to_top_btn").click(function (e){goToTop(e)})

});

Expand All @@ -26,10 +25,11 @@ function set_scroll_menu(scroll) {
}
}

function goToTop() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
return false
function goToTop(e=null) {
e?.preventDefault()
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
return false
}


Expand Down
9 changes: 4 additions & 5 deletions static/js/speechbubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ $(document).ready(function(){
}
});

function get_speechbubble_content(){
function get_speechbubble_content(editing=false){
if ($("#vj-speechbubble-content-override > template").length > 0 || $("#vj-speechbubble-content > template").length > 0){
setTimeout(function (){
get_speechbubble_content()
get_speechbubble_content(true)
}, 100)
return
}
let override = $("#vj-speechbubble-content-override > .cms-plugin:not(template)")
let override = editing ? $("#vj-speechbubble-content-override > .cms-plugin:not(template)") : $("#vj-speechbubble-content-override").children()
if (override && override.length > 0){
speechbubble_content = override
} else {
speechbubble_content = $("#vj-speechbubble-content > .cms-plugin:not(template)")
speechbubble_content = editing ? $("#vj-speechbubble-content > .cms-plugin:not(template)") : $("#vj-speechbubble-content").children()
}

let duration = 10000
if (typeof ts_message_duration !== 'undefined') {
duration = (ts_message_duration +2)*1000
Expand Down
2 changes: 1 addition & 1 deletion templates/vauhtijuoksu/genericSideViuhti.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
<div class="hide-in-small">|</div>
<div class="menu">
<a class="menu-link" href="" onclick="topFunction()" id="scroll_to_top_btn">Takaisin ylös</a>
<a class="menu-link" href="#" id="scroll_to_top_btn">Takaisin ylös</a>
</div>
</div>
<div class="side-page-layout">
Expand Down
Loading