Skip to content

Commit

Permalink
CSS Improvements for Demo_Gen (#5715)
Browse files Browse the repository at this point in the history
Adjusts bootstrap and JS to allow for better scaling based on device
width, as well as allowing for text wrapping.
  • Loading branch information
ambiguousname authored Oct 19, 2024
1 parent 77f2523 commit b78a9f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions tutorials/web-demo/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>Diplomat Demo Generation Example</title>
<script src="dist/index.bundle.js"></script>
<link rel="stylesheet" href="dist/index.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
Expand Down
3 changes: 2 additions & 1 deletion tutorials/web-demo/public/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="dist/rendering.bundle.js" defer></script>
<title>Rendering Function</title>
<link rel="stylesheet" href="dist/index.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="main" class="container">
Expand All @@ -14,7 +15,7 @@
<template id="terminus">
<link rel="stylesheet" href="dist/index.css"/>
<div class="vstack gap-2">
<h1><slot name="func-name"></slot></h1>
<h1 class="text-break"><slot name="func-name"></slot></h1>
<slot name="parameters"></slot>
<button type="submit" class="btn btn-primary" data-submit>Submit</button>
<div class="card">
Expand Down
2 changes: 1 addition & 1 deletion tutorials/web-demo/src/js/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { RenderInfo } from "icu4x/demo";
Object.values(RenderInfo.termini).forEach((t) => {
let a = document.createElement("a");
a.classList.add("list-group-item", "list-group-item-action");
a.innerHTML = `<a href="template.html?func=${t.funcName}">${t.funcName}</a>`;
a.innerHTML = `<a href="template.html?func=${t.funcName}" class="text-break">${t.funcName}</a>`;
document.getElementById("links").appendChild(a);
});

0 comments on commit b78a9f2

Please sign in to comment.