Skip to content

Commit

Permalink
GoldSaucer [Dev v0.4]
Browse files Browse the repository at this point in the history
  • Loading branch information
Murakumo-JP committed Apr 25, 2024
1 parent 8842b67 commit a257e50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
11 changes: 6 additions & 5 deletions Assets/css/GoldSaucer.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,11 @@ p + p {margin: 10px;}
transition: all 0.5s;
}
.btn_gs_menu:hover {color: #5990ff;}
.btn_gs_menu img {
width: 35px;
.btn_svg {
height: 48px;
float: left;
}
.btn_gs_menu svg {
width: 35px;
height: 100%;
}
.img-svg {
fill: #5990ff;
}
21 changes: 1 addition & 20 deletions Assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,4 @@ function backToTop() {
});
}

backToTop();

// SVG

$('img.img-svg').each(function(){
const $img = $(this);
const imgClass = $img.attr('class');
const imgURL = $img.attr('src');
$.get(imgURL, function(data) {
let $svg = $(data).find('svg');
if(typeof imgClass !== 'undefined') {
$svg = $svg.attr('class', imgClass+' replaced-svg');
}
$svg = $svg.removeAttr('xmlns:a');
if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) {
$svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width'))
}
$img.replaceWith($svg);
}, 'xml');
});
backToTop();
6 changes: 4 additions & 2 deletions Page/ChocoboRacing.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
<div class="gs_menu_page">
<div class="gs_menu_page_pos">
<div class="gs_menu_page_inner">
<a class="btn_gs_menu" href="../GoldSaucer.html">
<img class="img-svg" src="../Assets/img/svg/home.svg"/>
<a class="btn_gs_menu btn_svg" href="../GoldSaucer.html">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path style="fill: #4769b3;" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" />
</svg>
</a>
<a class="btn_gs_menu" href="https://eu.finalfantasyxiv.com/lodestone/playguide/contentsguide/goldsaucer/chocoboracing/">Chocobo Racing</a>
<a class="btn_gs_menu">Triple Triad</a>
Expand Down

0 comments on commit a257e50

Please sign in to comment.