diff options
Diffstat (limited to 'data/templates')
| -rw-r--r-- | data/templates/index.html | 25 | ||||
| -rw-r--r-- | data/templates/recipe.html | 25 | 
2 files changed, 34 insertions, 16 deletions
| diff --git a/data/templates/index.html b/data/templates/index.html index f216ed4..9115d31 100644 --- a/data/templates/index.html +++ b/data/templates/index.html @@ -8,22 +8,29 @@  		<meta charset="utf-8"/>  		<meta name="viewport" content="width=device-width, initial-scale=1.0"> -		<link rel="stylesheet" href="./static/libweb.css" type="text/css"> +		<link rel="stylesheet" href="./static/style.css" type="text/css">  	</head>  	<body> -		<main> +		<header> +			<nav> +				<a href="./add_recipes">add recipe</a> +			</nav>  			<h1>Recipes</h1> -			<button><a href="./add_recipes">add recipe</a></button> +		</header> + +		<main>  			<p>Here are the available recipes 😋🍳🍔🍕🥘</p> -			{{range .}} -			<a href="./recipe?id={{.Id}}"> -				<div class="card"> -					<h5 class="card-first-item" class="card-last-item">{{.Title}}</h5> -				</div> -			</a>{{end}} +			<ul>{{range .}} +				<li><a href="./recipe?id={{.Id}}">{{.Title}}</a></li>{{end}} +			</ul> + +			<footer> +				<hr> +				<p>The <a href="https://xengineering.eu/git/ceres">Ceres</a> recipe server is licensed under <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL v3</a> and developed with <a href="https://simplecss.org/">simple.css</a>.</p> +			</footer>  		</main>  	</body> diff --git a/data/templates/recipe.html b/data/templates/recipe.html index fcfdf67..536cac9 100644 --- a/data/templates/recipe.html +++ b/data/templates/recipe.html @@ -8,24 +8,35 @@  		<meta charset="utf-8"/>  		<meta name="viewport" content="width=device-width, initial-scale=1.0"> -		<link rel="stylesheet" href="../../../static/libweb.css" type="text/css"> +		<link rel="stylesheet" href="../../../static/style.css" type="text/css">  	</head>  	<body> -		<main> +		<header>{{if ne .UpstreamUrl ""}} +			<nav> +				<a href="{{.UpstreamUrl}}">Link to recipe</a> +			</nav> +			{{end}}  			<h1>{{.Title}}</h1> -			<img src="./recipe/image?id={{.Id}}" alt="Recipe image">{{if ne .UpstreamUrl ""}} -			<p><a href="{{.UpstreamUrl}}">Link to recipe</a></p>{{end}} +		</header> + +		<main> +			<img src="./recipe/image?id={{.Id}}" alt="Recipe image">  			<h2>Recipe description</h2> -			<button id="editbtn" style="margin-top:20px;margin-bottom:20px;display:block" onclick=startEditMode()>edit</button> -			<button id="cancelbtn" style="margin-top:20px;margin-bottom:20px;display:none" onclick=cancelEditMode()>abort</button> -			<button id="savebtn" style="margin-top:20px;margin-bottom:20px;display:none" onclick=saveDescriptionMarkdown()>save</button> +			<button id="editbtn" style="display:block" onclick=startEditMode()>edit</button> +			<button id="cancelbtn" style="display:none" onclick=cancelEditMode()>abort</button> +			<button id="savebtn" style="display:none" onclick=saveDescriptionMarkdown()>save</button>  			<pre id="description_md" style="display:none;" contenteditable="true">{{.DescriptionMarkdown}}</pre>  			<div id="rendered_description_md" style="display:block;">  				{{.RenderedDescriptionMarkdown}}  			</div> + +			<footer> +				<hr> +				<p>The <a href="https://xengineering.eu/git/ceres">Ceres</a> recipe server is licensed under <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL v3</a> and developed with <a href="https://simplecss.org/">simple.css</a>.</p> +			</footer>  		</main>  		<script> | 
