Skip to content

Commit 8850e94

Browse files
committed
use get_url and/or relative links to get static files
1 parent 9766a16 commit 8850e94

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

sass/css/main.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $menu-gradient: linear-gradient(to bottom,
66
#fafbff 91%);
77

88
html {
9-
background-image: url("/images/background.jpg");
9+
background-image: url("../images/background.jpg");
1010
background-size: cover;
1111
background-attachment: fixed;
1212
}
@@ -34,7 +34,7 @@ ul {
3434
}
3535

3636
ul {
37-
list-style-image: url('/images/bluearrowbullet.png');
37+
list-style-image: url('../images/bluearrowbullet.png');
3838
}
3939

4040
h1,
@@ -81,8 +81,8 @@ img {
8181
#header {
8282
height: 106px;
8383
background:
84-
url(/images/head-center.png),
85-
url(/images/head-text.png),
84+
url('../images/head-center.png'),
85+
url('../images/head-text.png'),
8686
linear-gradient(to bottom, #dfe6ff, white, #f1f3ff);
8787

8888
background-repeat: no-repeat;
@@ -120,7 +120,7 @@ img {
120120
}
121121

122122
#content-container {
123-
background-image: url("/images/body-none.png");
123+
background-image: url("../images/body-none.png");
124124
}
125125

126126
#content-container #animated-nav-container {
@@ -170,11 +170,11 @@ img {
170170
}
171171

172172
#content-container {
173-
background-image: url("/images/body-left.png");
173+
background-image: url("../images/body-left.png");
174174
}
175175

176176
#menu {
177-
background: url("/images/menu.png"), $menu-gradient;
177+
background: url("../images/menu.png"), $menu-gradient;
178178
background-repeat: no-repeat;
179179
background-position-x: 43px, center;
180180
justify-content: right;
@@ -186,4 +186,4 @@ img {
186186
border-left-style: solid;
187187
border-left-color: #cccccc;
188188
}
189-
}
189+
}

static/js/gallery.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import PhotoSwipeLightbox from '/js/photoswipe-lightbox.esm.min.js';
2-
import PhotoSwipe from '/js/photoswipe.esm.min.js';
1+
import PhotoSwipeLightbox from './photoswipe-lightbox.esm.min.js';
2+
import PhotoSwipe from './photoswipe.esm.min.js';
33

44
const lightbox = new PhotoSwipeLightbox({
55
gallery: '.click-to-enlarge-gallery',

templates/base.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<meta name="keywords" content="Микросамолёт,микросамолет,микро-самолёт,микро,самолет,Микросамолеты,Микромодель,Микромодели,леталка,микро,мотор,микромотор,бесколлекторный,безколлекторный,бесколекторный,безколекторный,БК,Бесщёточный,Бесщеточный,Безщёточный,Безщеточный,коллекторный узел,Самый,маленький,Миниатюрный,Микро ,легкий,лёгкий,обмотка,катушка,вибрик,магнит,Магнитик,Редкоземельный,Вал,Shicoh,2.8mm,3.2mm,А1442,Pic10f200,Карбон,Карбоновый,пруток,Углеволокно,Углеволоконный,Бальза,Приемник,Приёмник,Передатчик,IRX262,Futaba,Plane,Carbon rod,Balsa,Transmitter,Receiver,Airframe,Actuator,Film,Brushless,Homemade,Home-made,ATS276,ATS277,Fan8082,Sub gram" />
1212
<meta name="description" content="микроплан" />
1313

14-
<script type="module" src="/js/gallery.js"></script>
15-
<link rel="stylesheet" href="/css/photoswipe.css">
14+
<script type="module" src="{{ get_url(path='js/gallery.js') }}"></script>
15+
<link rel="stylesheet" href="{{ get_url(path='css/photoswipe.css') }}">
1616

1717
{% if page or section %}
1818
{% set this = page | default(value=section) %}
@@ -22,8 +22,8 @@
2222
<meta property="og:url" content="{{ this.permalink }}" />
2323
{% endif %}
2424

25-
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
26-
<link href="/css/main.css" rel="stylesheet" type="text/css" />
25+
<link href="{{ get_url(path='/favicon.ico') }}" rel="shortcut icon" type="image/x-icon" />
26+
<link href="{{ get_url(path='/css/main.css') }}" rel="stylesheet" type="text/css" />
2727
{% endblock %}
2828
</head>
2929

@@ -34,7 +34,7 @@
3434
{% for lang, _ in config.languages %}
3535
{% set page = get_url(path="@/_index.md", lang=lang) %}
3636
<a href="{{ page }}">
37-
<img src="/images/language-flags/{{ lang }}.gif" alt="{{ lang }}" title="{{ lang }}" />
37+
<img src="{{ get_url(path='/images/language-flags/' ~ lang ~ '.gif') }}" alt="{{ lang }}-icon" />
3838
</a>
3939
{% endfor %}
4040
</div>
@@ -67,7 +67,7 @@
6767
<div id="copyright">(c){{ now() | date(format="%Y")}}</div>
6868
<div id="logo">
6969
<a href="http://sozdatel.org.ua/">
70-
<img src="/images/site-by-sozdatel.org.ua.png" alt="sozdatel.org.ua" width="26" height="29" class="joomla-template-design" />
70+
<img src="{{ get_url(path='/images/site-by-sozdatel.org.ua.png') }}" alt="" width="26" height="29" />
7171
</a>
7272
</div>
7373
</div>

templates/section-make-it-yourself.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
document.getElementById("animated-nav-container").appendChild(player);
5353

54-
player.load("/flash/assembly.swf");
54+
player.load("{{ get_url(path='/flash/assembly.swf') }}");
5555
});
5656
</script>
5757
{{ super() }}

0 commit comments

Comments
 (0)