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
21 changes: 21 additions & 0 deletions packages/preview/ugm-presentation-unofficial/0.1.1/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Fitrafep

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions packages/preview/ugm-presentation-unofficial/0.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ugm-presentation-unofficial

An unofficial presentation template for Universitas Gadjah Mada (UGM) built with Typst.

## Installation

```typst
#import "@preview/ugm-presentation-unofficial:0.1.0": conf, title, section, slide, quote
```

## Usage

```typst
#show: conf.with(num: 5) // choose theme 1-6
```

## Functions

- `conf.with(num)` - Configure document with theme
- `title(content)` - Title slide
- `section(content)` - Section divider
- `slide(content)` - Content slide
- `quote(content)` - Quote slide

## Theme Previews

| Theme | Preview |
|-------|---------|
| 1 | ![Theme 1](src/previews/preview-1.png) |
| 2 | ![Theme 2](src/previews/preview-2.png) |
| 3 | ![Theme 3](src/previews/preview-3.png) |
| 4 | ![Theme 4](src/previews/preview-4.png) |
| 5 | ![Theme 5](src/previews/preview-5.png) |
| 6 | ![Theme 6](src/previews/preview-6.png) |

## License

MIT License
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions packages/preview/ugm-presentation-unofficial/0.1.1/src/lib.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#let vnum = state("vnum", 1)
#let bgs = (
(
title: "image/1/title.png",
section: "image/1/section.png",
slide: "image/1/slide.png",
quote: "image/1/quote.png",
),
(
title: "image/2/title.png",
section: "image/1/section.png",
slide: "image/1/slide.png",
quote: "image/2/quote.png",
),
(
title: "image/3/title.png",
section: "image/1/section.png",
slide: "image/1/slide.png",
quote: "image/3/quote.png",
),
(
title: "image/4/title.png",
section: "image/4/section.png",
slide: "image/4/slide.png",
quote: "image/4/quote.png",
),
(
title: "image/5/title.png",
section: "image/5/section.png",
slide: "image/5/slide.png",
quote: "image/5/quote.png",
),
(
title: "image/6/title.png",
section: "image/6/title.png",
slide: "image/6/slide.png",
quote: "image/6/quote.png",
),
)

#let conf(
num: 1,
doc,
) = [
#vnum.update(num)
#set page(paper: "presentation-16-9", margin: (bottom: 0pt))
#show heading.where(level: 1): set text(size: 30pt, fill: blue.darken(50%))
#show heading.where(level: 2): set text(size: 28pt, fill: blue.darken(50%))
#show heading.where(level: 3): set text(size: 24pt, fill: blue.darken(50%))
#show heading.where(level: 4): set text(size: 20pt, fill: blue.darken(50%))
#set text(size: 14pt)
#set grid(columns: (1fr, 1fr), column-gutter: 2em)

//raw
#show raw.where(block: false): highlight.with(
top-edge: 13pt,
bottom-edge: -7pt,
fill: luma(240),
radius: 2pt,
)
#show raw.where(block: true): block.with(
fill: luma(240),
inset: 5pt,
radius: 5pt,
above: 10pt,
width: 100%,
)
#doc
]

#let title(content) = context [
#let num = vnum.get()
#let path = bgs.at(num - 1).title
#set page(background: image(path))
#align(horizon)[
#if num == 1 or num == 2 {
show heading: set text(fill: yellow.darken(10%))
set text(fill: white)
content
} else if num == 3 {
content
} else if num == 4 {
show heading: set text(fill: yellow.darken(10%))
set align(right)
set text(fill: white)
content
} else if num == 5 or num == 6 {
set align(right)
content
} else {
content
}
]
]

#let section(content) = context [
#let num = vnum.get()
#let path = bgs.at(num - 1).section
#set page(background: image(path))
#align(horizon)[
#if num == 1 or num == 2 or num == 3 {
content
} else if num == 6 {
set align(right)
content
} else {
grid(columns: 2)[
#h(10em)
][
#content
]
}
]
]

#let slide(content) = context [
#let num = vnum.get()
#let path = bgs.at(num - 1).slide
#set page(background: image(path))
#content
]

#let quote(content) = context [
#let num = vnum.get()
#let path = bgs.at(num - 1).quote
#set page(background: image(path))

#if num == 1 or num == 2 {
show heading: set text(fill: yellow.darken(10%))
set text(fill: white)
align(center, content)
} else if num == 3 {
align(center, content)
} else if num == 4 {
show heading: set text(fill: yellow.darken(10%))
set text(fill: white)
v(8em)
content
} else if num == 6 {
v(6em)
align(center, content)
} else {
v(8em)
content
}
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#import "@preview/ugm-presentation-unofficial:0.1.0": conf, quote, section, slide, title

#show: conf.with(num: 5)

#title[
= Hiya Hiya Hiya
#lorem(10)
]

#section[
== Mangtap
#lorem(10)
]

#slide[
=== Jadi gini
#grid[
- ini kiri

#lorem(40)

#lorem(40)
][
- ini kanan

#lorem(20)

$
H = mat(
(partial^2 f) / (partial x_1 partial x_1), (partial^2 f) / (partial x_1 partial x_2), ..., (partial^2 f) / (partial x_1 partial x_n);
(partial^2 f) / (partial x_2 partial x_1), (partial^2 f) / (partial x_2 partial x_2), ..., (partial^2 f) / (partial x_2 partial x_n);
..., ..., ..., ...;
(partial^2 f) / (partial x_n partial x_1), (partial^2 f) / (partial x_n partial x_2), ..., (partial^2 f) / (partial x_n partial x_n)
) = mat(
a_11, a_12, ..., a_1n;
a_21, a_22, ..., a_2n;
..., ..., ..., ...;
a_(n 1), a_(n 2), ..., a_(n n)
)
$

#lorem(20)
]
]

#quote[
#text(size: 20pt, [
#v(2em)
"Jadi, anunya diiniin, ininya diituin, itunya dianuin"

-Si anu-
])

]
56 changes: 56 additions & 0 deletions packages/preview/ugm-presentation-unofficial/0.1.1/typst.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[package]
name = "ugm-presentation-unofficial"
version = "0.1.1"
entrypoint = "src/lib.typ"
authors = ["Fitrafep"]
description = "Unofficial UGM presentation."
repository = "https://github.com/fepfitra/ugm-presentation-unofficial"
keywords = ["ugm", "universitas-gadjah-mada", "presentation"]
categories = ["presentation"]
license = "MIT"
exclude = ["*.pdf"]
disciplines = [
"agriculture",
"anthropology",
"archaeology",
"architecture",
"biology",
"business",
"chemistry",
"communication",
"computer-science",
"design",
"drawing",
"economics",
"education",
"engineering",
"fashion",
"film",
"geography",
"geology",
"history",
"journalism",
"law",
"linguistics",
"literature",
"mathematics",
"medicine",
"music",
"painting",
"philosophy",
"photography",
"physics",
"politics",
"psychology",
"sociology",
"theater",
"theology",
"transportation",
]

[template]
path = "template"
entrypoint = "main.typ"
thumbnail = "thumbnail.png"

[tool]
Loading