Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/edbook/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@

# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = "_static/hi_vnvs_horiz_raunvisindadeild.jpg"
latex_logo = "_static/latex_logo.jpg"

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
Expand Down
3 changes: 2 additions & 1 deletion cli/edbook/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import List, Optional
from enum import Enum
import typer
from typing import List
from rich import print
from rich.console import Console
from rich.table import Table
Expand Down Expand Up @@ -130,7 +131,7 @@ def cmd_build():
def cmd_create(
name: str = typer.Option(..., prompt="Course id"),
description: str = typer.Option(..., prompt="Course name"),
num_authors: List[str] = typer.Option(None),
#num_authors: List[str] = typer.Option(..., prompt="Hjálp"),
author: str = typer.Option(..., prompt="Author name"),
email: str = typer.Option(..., prompt="Author email"),
template: str = typer.Option(
Expand Down
201 changes: 201 additions & 0 deletions projects/fyrirollx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
EXTENSIONNAMES=`cat extension_names`

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext extensioninstall

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/NAME.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/NAME.qhc"

applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/NAME"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/NAME"
@echo "# devhelp"

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."

xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

extensioninstall:
for f in $(EXTENSIONNAMES); do \
cd $$f && python3 setup.py build && sudo python3 setup.py install; cd ..; \
done ;

singleinstall:
cd $(EX) && python3 setup.py build && sudo python3 setup.py install; cd ..
5 changes: 5 additions & 0 deletions projects/fyrirollx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# TMP001G - Sniðmát fyrir Edbook

Sniðmát fyrir nýtt námskeið/nótur, https://edbook.hi.is/tmp001g

Ábyrgðarmaður: Benedikt Magnússon <bsm@hi.is>
26 changes: 26 additions & 0 deletions projects/fyrirollx/_static/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.button {
width: 340px;
background-color:#10099F;
border-radius:5px;
border:1px solid #225788;
display:inline-block;
cursor:pointer;
color:#ffffff;
/* font-family:Arial; */
font-size:15px;
text-align: center;
padding:12px 37px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-decoration:none;
text-shadow:0px 1px 0px #283966;
}
.button:hover {
background-color:#342ead;
border:1px solid #01447B;
}
.button:active {
position:relative;
top:1px;
}
9 changes: 9 additions & 0 deletions projects/fyrirollx/_static/css/datacamp-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.dcl-plot img {
height: 100% !important;
}
ul.dcl-content--tab li{
list-style: none !important;
}
.powered-by-datacamp{
visibility: hidden;
}
126 changes: 126 additions & 0 deletions projects/fyrirollx/_static/css/edbook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
@media screen and (max-width: 1100px){
.wy-body-for-nav{background:#fcfcfc}
.wy-nav-top{display:block}
.wy-nav-side{left:-300px}
.wy-nav-side.shift{width:85%;left:0}
.wy-side-scroll{width:auto}
.wy-side-nav-search{width:auto}
.wy-menu.wy-menu-vertical{width:auto}
.wy-nav-content-wrap{margin-left:0}
.wy-nav-content-wrap
.wy-nav-content{padding:1.618em}
.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;topn
:0;height:100%;overflow:hidden}
}


/*
Notað með
.. rst-class:: midja
til að miðja texta
*/
.rst-content .midja {
text-align: center !important;
}


/* Admonition: Dæmi */
.rst-content .daemi .admonition-title {
background: #F8961E
}
.rst-content .daemi {
background: #faddb9;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
}


/* Admonition: Skilgreining */
.rst-content .skilgreining .admonition-title {
background: #90BE6D
}
.rst-content .skilgreining {
background: #efffe3;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
/* border-bottom: 6px;
border-style: solid ;
border-color: #555555 ; */
}


/* Admonition: Setning */
.rst-content .setning .admonition-title {
background: #e6b43c
}
.rst-content .setning {
background: #ffefc7;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
}

/* Admonition: Fylgisetning */
.rst-content .fylgisetning .admonition-title {
background: #e6ba53
}
.rst-content .fylgisetning {
background: #faecc8;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
}

/* Admonition: Athugasemd */
.rst-content .athugasemd .admonition-title {
background: #577590
}
.rst-content .athugasemd {
background: #d4eaff;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
}


/* Admonition: Aðvörun */
.rst-content .advorun .admonition-title {
background: #d11d1d
}
.rst-content .advorun {
background: #f7b9b5;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
/* border-bottom: 6px;
border-style: solid ;
border-color: #555555 ; */
}


/* Admonition: Sjá einnig */
.rst-content .sjaeinnig .admonition-title {
background: #F3722C
}
.rst-content .sjaeinnig {
background: #ffe1d1;
margin-left: auto ;
margin-right: auto ;
margin-bottom: 20px;
margin-top: 20px;
padding: 0px 12px 12px ;
}
Loading