Skip to content

Commit

Permalink
Fix up generation of URLs with prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 23, 2018
1 parent 611f2e3 commit db3d37f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions butterfly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, url):

def __call__(self, cls):
if tornado.options.options.uri_root_path:
url = tornado.options.options.uri_root_path.rstrip('/') + self.url
url = '/' + tornado.options.options.uri_root_path.strip('/') + self.url
else:
url = self.url
application.add_handlers(
Expand Down Expand Up @@ -78,7 +78,7 @@ def get_theme_dir(self, theme):
template_path=os.path.join(os.path.dirname(__file__), "templates"),
debug=tornado.options.options.debug,
static_url_prefix='%s/static/' % (
'/%s' % tornado.options.options.uri_root_path
'/%s' % tornado.options.options.uri_root_path.strip('/')
if tornado.options.options.uri_root_path else '')
)

Expand Down
14 changes: 7 additions & 7 deletions butterfly/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,37 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-ExtraLight.otf") format("woff");
src: url("fonts/SourceCodePro-ExtraLight.otf") format("woff");
font-weight: 100; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Light.otf") format("woff");
src: url("fonts/SourceCodePro-Light.otf") format("woff");
font-weight: 300; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Regular.otf") format("woff");
src: url("fonts/SourceCodePro-Regular.otf") format("woff");
font-weight: 400; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Medium.otf") format("woff");
src: url("fonts/SourceCodePro-Medium.otf") format("woff");
font-weight: 500; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Semibold.otf") format("woff");
src: url("fonts/SourceCodePro-Semibold.otf") format("woff");
font-weight: 600; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Bold.otf") format("woff");
src: url("fonts/SourceCodePro-Bold.otf") format("woff");
font-weight: 700; }

@font-face {
font-family: "SourceCodePro";
src: url("/static/fonts/SourceCodePro-Black.otf") format("woff");
src: url("fonts/SourceCodePro-Black.otf") format("woff");
font-weight: 900; }

body {
Expand Down
4 changes: 2 additions & 2 deletions butterfly/static/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion butterfly/static/main.min.js

Large diffs are not rendered by default.

0 comments on commit db3d37f

Please sign in to comment.